battleman.py: Added informative messages when taking damage or gaining temporary hit points.
This commit is contained in:
parent
d09245db4c
commit
8437071d3c
|
@ -165,6 +165,8 @@ class Combatant():
|
|||
|
||||
self.hp -= amount
|
||||
|
||||
print '{} took {} points of damage.'.format(self, amount)
|
||||
|
||||
if self.is_down():
|
||||
print('{} is down!'.format(self))
|
||||
elif self.is_bloodied() and not was_bloodied:
|
||||
|
@ -198,6 +200,8 @@ class Combatant():
|
|||
def add_temp_hp(self, amount):
|
||||
self.temp_hp += amount
|
||||
|
||||
print '{} gained {} temporary hit points.'.format(self, amount)
|
||||
|
||||
|
||||
def use_surge(self, heal=True):
|
||||
if self.surges <= 0:
|
||||
|
@ -349,7 +353,7 @@ class Battle():
|
|||
else:
|
||||
ret = ret + '{}:\n'.format(g.name)
|
||||
for c in g.members:
|
||||
ret = ret + '\t{}\n'.format(c)
|
||||
ret = ret + ' {}\n'.format(c)
|
||||
|
||||
return ret.rstrip()
|
||||
|
||||
|
@ -367,7 +371,7 @@ class Battle():
|
|||
else:
|
||||
ret = ret + '{}:\n'.format(g.name)
|
||||
for c in g.members:
|
||||
ret = ret + '\t{}\n'.format(c)
|
||||
ret = ret + ' {}\n'.format(c)
|
||||
|
||||
return ret.rstrip()
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user