The one wizard help!


#1

This is my code. I only get 30 kills before i am teleported. This is the best i could think of so far

# Defeat as many ogres as you can.
# Use 'cast' and 'canCast' for spells.
enemy = hero.findNearestEnemy()
hero.cast("chain-lightning", enemy)
e = 0
while e <= 4:
    hero.moveXY(14, 42)
    hero.moveXY(12, 32)
    e +=1
    if e == 4:
        enemy = hero.findNearestEnemy()
        while enemy.health > 0:
            hero.attack(enemy)
        hero.cast("regen", hero)
enemy = hero.findNearestEnemy()
hero.cast("lightning-bolt", enemy)
hero.say("Yea come one!")
enemy = hero.findNearestEnemy()
hero.cast("chain-lightning", enemy)
enemy = hero.findNearestEnemy()
hero.attack(enemy)
hero.say("Hey where are you")
hero.say("Hey!")
hero.say("!!!")
enemy = hero.findNearestEnemy()
hero.cast("lightning-bolt", enemy)
hero.cast("regen", hero)
hero.say("Hey where are you")
hero.say("Hey!")
hero.say("!!!")
hero.say("!!!")
hero.moveXY(8, 36)
while True:
    enemy = hero.findNearestEnemy()
    if enemy:
        hero.attack(enemy)
        if hero.canCast("chain-lightning") and enemy.type == "scout" or enemy.type == "catapult":
            hero.cast("chain-lightning", enemy)
        elif hero.canCast("lightning-bolt") and enemy.type == "scout" or enemy.type == "catapoult":
            hero.cast("lightning-bolt", enemy)
        elif hero.isReady("root"):
            hero.cast("root", enemy)
    if not enemy and hero.canCast("regen"):
        hero.cast("regen", hero)


#2

only use chain-lightning on the long line scouts. only use lightning bolt on catapults. otherwise just attack.


#3

Use chain-lightning on long line of munchkins too.

Also, move back a little bit, so you can deal more damage before the enemy reaches you.


#4

The only problem is that the ball is still there when i kill the catapult so i cant avoud it unless i get the findenemymissiles method. Then i would ba a ok


#5

So kill the catapult before it shoots. easy.