Cast spells if one of two player fails to cast their spell. Adds player.cast_spell(): Not scripted yet, currently just a placeholder so that cast_spell() prints somethin when called! (and modifies health)
This commit is contained in:
@ -54,4 +54,9 @@ class Player:
|
||||
elif (spell.type == SPELL_TYPE_USELESS):
|
||||
return "{name} must not be feeling well, since they casted a non existing spell. Cast FAILED!".format(name=self.name)
|
||||
else: message = "{name} tried to cast '{spell}' but mispronounced it. Cast FAILED!"
|
||||
return message.format(name=self.name, spell=spell.name)
|
||||
return message.format(name=self.name, spell=spell.name)
|
||||
|
||||
def cast_spell(self, spell: Spell, opponent): #: Player ?
|
||||
# Below is pretty much a placeholder and will be implemented after placing all cast_spell()s in game.py
|
||||
print("> {} hits {} and does {} damage!".format(self.name, opponent.name, spell.damage))
|
||||
opponent.health -= spell.damage
|
Reference in New Issue
Block a user