Skip to content

Instantly share code, notes, and snippets.

@stefaang
Created September 2, 2015 00:53
Show Gist options
  • Save stefaang/8aa686084b08b718560d to your computer and use it in GitHub Desktop.
Save stefaang/8aa686084b08b718560d to your computer and use it in GitHub Desktop.
print "==== VRAAG 12 ===="
for monsterhp in [300, 600, 850, 900, 1100, 3500]:
t = 0
print "new monster",monsterhp
while monsterhp > 0:
if t % 4 == 0:
monsterhp -= 35
# print " warriorhit", monsterhp,"left"
if monsterhp <= 0:
print " warrior overkill", -monsterhp,t
break
if t % 8 == 2:
monsterhp -= 80
# print " wizhit", monsterhp,"left"
if monsterhp <= 0:
print " wiz overkill", -monsterhp,t
break
if t % 4 == 0:
monsterhp -= 30
# print " rog2hit", monsterhp,"left"
if monsterhp <= 0:
print " rogue1 overkill", -monsterhp,t
break
if t % 3 == 0:
monsterhp -= 20
# print " rog2hit", monsterhp,"left"
if monsterhp <= 0:
print " rogue2 overkill", -monsterhp,t
break
t += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment