print("<!> {name} tries to cast a spell but fails because they are stunned!".format(name=self.name))
return
ifself.active_spell.type==SPELL_TYPE_USELESS:
ifself.active_spell==spell_lumos:
ifself.lumos:
print("- {name} casts {spell} with no effect: {name} already has a brutal shining light at the tip of their wand!".format(name=self.name,spell=spell_name))
else:
print("- {name} casts {spell}! Look at that brutal shining light at the tip of their wand. Absolutely gorgeous!".format(name=self.name,spell=spell_name))
print("- {name} shouts {spell}! Their brutal shining light dissapears".format(name=self.name,spell=spell_name.upper()))
self.lumos=False
elifself.active_spell==spell_rennervate:
ifopponent.stunned_rounds==0:
print("- {name} casts {spell} with no effect, because {name_o} is not currently stunned!".format(name=self.name,spell=spell_name,name_o=opponent.name))
else:
print("- {name} casts {spell}! {name_o} is no longer stunned!".format(name=self.name,spell=spell_name,name_o=opponent.name))
opponent.stunned_rounds=0
elifself.active_spell==spell_igni:
print("- Geralt casts Igni. Wait. Geralt? White Wolf? The butcher of Blaviken? What is he doing here? Is he even here? What is going on?")
print("- {name} casts {spell}. {name_o} is looking confused. What spell did {name} try to cancel?".format(name=self.name,spell=spell_name,name_o=opponent.name))
elifnotspell_succes:
print("- {name}: (nothing, still stunned)".format(name=self.name))
elifself.active_spell==spell_impendimenta:
ifopponent.active_spell!=spell_protego:
print("- {name} casts {spell} on {name_o}. {name_o} is slowed and their next offensive move will have a 33% slower spell speed!".format(name=self.name,name_o=opponent.name,spell=spell_name))
opponent.decreased_spell_speed=True
else:
print("- {name} casts {spell} on {name_o}. FAILURE! {name_o} blocks the attack!".format(name=self.name,name_o=opponent.name,spell=spell_name))
elifself.active_spell==spell_lumos_solem:
# Light still goes through the shield, therefor always succeed blinding attempts
print("- {name} casts {spell} on {name_o}. {name_o} is blinded and their next offensive move will have 33% less damage!".format(name=self.name,name_o=opponent.name,spell=spell_name))
print("- THE NERVE! {name} casts the killing curse! See you in the after life {name_o}!".format(name=self.name,name_o=opponent.name))
opponent.health=0
elifself.active_spell==spell_crucio:
print("- THE NERVE! {name} casts the torture curse. {name_o} is greatly hurt and falls to the ground. They are stunned for 5 (more) moves".format(name=self.name,name_o=opponent.name))
opponent.stunned_moves+=5
elifself.active_spell==spell_imperio:
print("- THE NERVE! {name} casts the Imperius curse. \"Why don't you take a nice nap for 10 moves, {name_o}?\". {name_o} submits with pleasure".format(name=self.name,name_o=opponent.name))
opponent.stunned_moves=10
else:
ifself.active_spell==spell_mimblewimble:
ifopponent.active_spell!=spell_protego:
print("- {name} casts {spell} on {name_o}. {name_o}'s tongue is tied in a knot. That's annoying! {name_o} is silenced for 1 (more) move".format(name=self.name,spell=spell_name,name_o=opponent.name))
else:
print("- {name} casts {spell} on {name_o}. FAILURE! {name_o} blocks the attack!".format(name=self.name,spell=spell_name,name_o=opponent.name))
elifself.active_spell==spell_silencio:
ifopponent.active_spell!=spell_protego:
ifopponent.stunned_moves==0:
print("- {name} casts {spell} on {name_o}. SUCCES! {name_o} is silenced for 3 (more) moves".format(name=self.name,spell=spell_name,name_o=opponent.name))
opponent.stunned_moves+=3
else:
print("- {name} casts {spell} on {name_o}. FAILURE! {name_o} is already silenced!".format(name=self.name,spell=spell_name,name_o=opponent.name))
else:
print("- {name} casts {spell} on {name_o}. FAILURE! {name_o} blocks the attack!".format(name=self.name,spell=spell_name,name_o=opponent.name))
ifdamage_penalty!=0:print("<!> {name} was unclear in their pronunciation and receives a damage penalty of {damage_penalty}".format(name=self.name,damage_penalty=damage_penalty))