Chest can be destroyed by bombs.
This commit is contained in:
parent
e56fc502cb
commit
841c7b9f90
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user