Player can now dance! Closes #69.
This commit is contained in:
@ -707,6 +707,7 @@ class FightingEntity(Entity):
|
||||
constitution: int
|
||||
level: int
|
||||
critical: int
|
||||
confused: int # Seulement 0 ou 1
|
||||
|
||||
def __init__(self, maxhealth: int = 0, health: Optional[int] = None,
|
||||
strength: int = 0, intelligence: int = 0, charisma: int = 0,
|
||||
@ -723,6 +724,7 @@ class FightingEntity(Entity):
|
||||
self.level = level
|
||||
self.critical = critical
|
||||
self.effects = [] # effects = temporary buff or weakening of the stats.
|
||||
self.confused = 0
|
||||
|
||||
@property
|
||||
def dead(self) -> bool:
|
||||
@ -750,6 +752,10 @@ class FightingEntity(Entity):
|
||||
The entity deals damage to the opponent
|
||||
based on their respective stats.
|
||||
"""
|
||||
if self.confused:
|
||||
return _("{name} is confused, it can not hit {opponent}.")\
|
||||
.format(name=_(self.translated_name.capitalize()),
|
||||
opponent=_(opponent.translated_name))
|
||||
diceroll = randint(1, 100)
|
||||
damage = max(0, self.strength)
|
||||
string = " "
|
||||
|
Reference in New Issue
Block a user