mirror of
https://github.com/DavidGailleton/42-Piscine_Python.git
synced 2026-03-14 05:06:55 +01:00
module 7 ex 0 to 2
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from ex0.Card import Card
|
||||
from ex0 import Card
|
||||
from typing import Union
|
||||
|
||||
|
||||
@@ -24,4 +24,11 @@ class ArtifactCard(Card):
|
||||
return {}
|
||||
|
||||
def activate_ability(self) -> dict:
|
||||
pass
|
||||
if self.durability <= 0:
|
||||
return {
|
||||
"name": self.name,
|
||||
"durability": self.durability,
|
||||
"destroyed": True,
|
||||
}
|
||||
self.durability -= 1
|
||||
return self.get_card_info()
|
||||
|
||||
Reference in New Issue
Block a user