Added code to represent minions, and to kill multiple minions with one command.
This commit is contained in:
parent
9b00d08b39
commit
52fde623ef
2 changed files with 29 additions and 6 deletions
10
battleman.py
10
battleman.py
|
@ -205,6 +205,16 @@ class CommandParser(Cmd):
|
|||
c.damage(amount)
|
||||
|
||||
|
||||
def do_minionkill(self, line):
|
||||
"""damage [index list]
|
||||
Deals 1 damage to each of the specified combatants. Used to indicate minion death"""
|
||||
|
||||
data = parse_data(line)
|
||||
|
||||
for index in data:
|
||||
self.btl.get_combatant(int(index)).damage(1)
|
||||
|
||||
|
||||
def do_heal(self, line):
|
||||
"""heal [index] [amount]
|
||||
Heal hit points for the specified combatant"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue