# You'll need good strategy to win this one!
# Your clone will have the same equipment you have!
# But, they're not very skilled at using special powers.
while True:
enemy = hero.findNearestEnemy()
moveHere = hero.findFlag("green")
health = hero.health
maxHealth = hero.maxHealth
hero.say(hero.health)
if moveHere:
hero.moveXY(moveHere.pos.x,moveHere.pos.y)
hero.pickUpFlag(moveHere)
else:
if enemy and enemy.type != "yak":
while enemy.health > 0:
hero.attack(enemy)
if enemy.health > 25:
hero.bash(enemy)
if health < maxHealth /10:
hero.shield()
Maybe you want to check first if you can do abilities like bash using hero.isReady("bash")
what is your equipment? and your strategy?
For this level you might want to have a lower damage sword with a higher damage shield (ie: deflector, dragonplate). Emperor’s gloves and rings that provide casted abilities are a hugehelp as well.
# You'll need good strategy to win this one!
# Your clone will have the same equipment you have!
# But, they're not very skilled at using special powers.
while True:
enemy = hero.findNearestEnemy()
moveHere = hero.findFlag("green")
health = hero.health
maxHealth = hero.maxHealth
if moveHere:
hero.moveXY(moveHere.pos.x,moveHere.pos.y)
hero.pickUpFlag(moveHere)
else:
if enemy and enemy.type != "yak":
while enemy.health > 0:
hero.attack(enemy)
if enemy.health > 25:
hero.bash(enemy)
if hero.canElectrocute(enemy):
hero.electrocute(enemy)
enemies = hero.findEnemies()
if len(enemies) < 4:
hero.cleave(enemy)
if health < maxHealth /10:
hero.shield()
Put your “electrocute” code inside the second while loop. and put the attack enemy line inside an elif or an else.
elif enemy:
if enemy and enemy.type != "yak":
while enemy.health > 0:
if enemy.health > 25:
hero.bash(enemy)
if hero.canElectrocute(enemy):
hero.electrocute(enemy)
else:
hero.attack(enemy)
# You'll need good strategy to win this one!
# Your clone will have the same equipment you have!
# But, they're not very skilled at using special powers.
while True:
enemy = hero.findNearestEnemy()
moveHere = hero.findFlag("green")
health = hero.health
maxHealth = hero.maxHealth
if moveHere:
hero.moveXY(moveHere.pos.x,moveHere.pos.y)
hero.pickUpFlag(moveHere)
elif enemy and enemy.type != "yak":
while enemy.health > 0:
if enemy.health > 25:
hero.bash(enemy)
if hero.canElectrocute(enemy):
hero.electrocute(enemy)
else:
hero.attack(enemy)
enemies = hero.findEnemies()
if len(enemies) > 4:
hero.cleave(enemy)
if health < maxHealth /10:
hero.shield()
but its still not working. did i put something in the wrong place?