1
0

Merge pull request #5 from KW46/fix-issue-3

FIX: #3 that fixes #2
This commit is contained in:
Kwarde 2024-01-15 20:35:21 +01:00 committed by GitHub
commit 8fd6a74bb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -134,10 +134,10 @@ class Player:
opponent.health = 0 opponent.health = 0
elif self.active_spell == spell_crucio: elif self.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)) 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_rounts += 5 opponent.stunned_rounds += 5
elif self.active_spell == spell_imperio: elif self.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)) 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_rounts = 10 opponent.stunned_rounds = 10
else: else:
if self.active_spell == spell_mimblewimble: if self.active_spell == spell_mimblewimble:
@ -147,9 +147,9 @@ class Player:
print("- {name} casts {spell} on {name_o}. FAILURE! {name_o} blocks the attack!".format(name=self.name, spell=spell_name, name_o=opponent.name)) print("- {name} casts {spell} on {name_o}. FAILURE! {name_o} blocks the attack!".format(name=self.name, spell=spell_name, name_o=opponent.name))
elif self.active_spell == spell_silencio: elif self.active_spell == spell_silencio:
if opponent.active_spell != spell_protego: if opponent.active_spell != spell_protego:
if opponent.stunned_rounts == 0: if opponent.stunned_rounds == 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)) 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_rounts += 3 opponent.stunned_rounds += 3
else: 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)) 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: else: