diff --git a/squirrelbattle/entities/friendly.py b/squirrelbattle/entities/friendly.py index 36f9db3..ee4f7cd 100644 --- a/squirrelbattle/entities/friendly.py +++ b/squirrelbattle/entities/friendly.py @@ -3,7 +3,7 @@ from random import choice, shuffle -from .items import Item +from .items import Item, Bomb from .monsters import Monster from .player import Player from ..interfaces import Entity, FightingEntity, FriendlyEntity, \ @@ -68,6 +68,9 @@ class Chest(InventoryHolder, FriendlyEntity): """ A chest is not living, it can not take damage """ + if isinstance(attacker, Bomb) : + self.die() + return _("The chest exploded") return _("It's not really effective") @property @@ -82,7 +85,7 @@ class Sunflower(FriendlyEntity): """ A friendly sunflower. """ - def __init__(self, maxhealth: int = 15, + def __init__(self, maxhealth: int = 20, *args, **kwargs) -> None: super().__init__(name="sunflower", maxhealth=maxhealth, *args, **kwargs) @@ -162,6 +165,6 @@ class Trumpet(Familiar): A class of familiars. """ def __init__(self, name: str = "trumpet", strength: int = 3, - maxhealth: int = 20, *args, **kwargs) -> None: + maxhealth: int = 30, *args, **kwargs) -> None: super().__init__(name=name, strength=strength, maxhealth=maxhealth, *args, **kwargs)