Play Home Contribute GitHub Join Us Discourse Staff Members GitHub Contribution Guides Team

[Adventurer] The One Wizard


how do you avoid the firetraps?


I said use lightning bolt. It has unlimited range, and it should kill it in one shot.



Experiment and try different methods. Think as a player which just completed early forest levels.
<health property is introduced later>


OK this is my new code. Can you help me to make it better?

enemy = hero.findNearestEnemy()
hero.cast("chain-lightning", enemy)
while True:
    enemy = hero.findNearestEnemy()
    if enemy:
        if hero.isReady("root"):
            hero.cast("root", enemy)
        if hero.isReady("chain-lightning"):
            hero.cast("chain-lightning", enemy)
        elif hero.isReady("lightning-bolt") and enemy.type == "scout" or enemy.type == "catapult":
            hero.cast("lightning-bolt", enemy)
        elif hero.isReady("regen") and<70:
            hero.cast("regen", hero)
        elif hero.isReady("shockwave") and hero.distanceTo(enemy) < 20:
            hero.cast("shockwave", enemy)
        elif hero.distanceTo(enemy) < 5:
            hero.moveXY(8, 36)


Hmm, why do root and shockwave work??? Thanks. I will find and remove them.


Why do you need to remove it? Isn’t it better if we have more abilities?


Also it said in the Hints that we can use root and shockwave.


Nope. It’s in the spell pallet and it’s automatically

No. If you add all spells and all thangs on the field it doesn’t help to make a good level.


Oh ok i understand. :smile:


we can’t attack the catapults until we see it, and we can’t see it until it is within 60 meters, and it isn’t within 60 meters.


The hero’s visual range is 65 in this level. Anyway what the problem?
Guys. This is a level for early Forest. Don’t complicate it. Try to make your solution step by step. Attack first. Then add some spell, another. The keyword for this level is IF-ELSE-IF.


This is a great little puzzle that took me a few tries. I think the important part (for anyone having trouble as I did) is to understand the way the if-else statements interact and more importantly, understand how to properly nest them.

For example, I originally had my hero check for the ogre AFTER checking the distances to the enemies, like this:

if distance <= 30:
    if hero.canCast("chain-lightning"):
        hero.cast("chain-lightning", enemy)
elif distance > 30:
    if hero.canCast("lightning-bolt"):
        hero.cast("lightning-bolt", enemy)
elif enemy.type == "ogre":
    hero.moveXY(7, 32)

But because the hero notices the enemy distance first, the enemy.type == “ogre” statement never runs. I needed the hero to check the enemy type first.


Try to set type checking before distance checking


Wow this level really gets you thinking out of the box.

Before I had a complicated code, then I decided to restart.

The simpler code I wrote after I restarted allowed to get all the bonuses when the complicated one can’t.

Great level!

Hint to the people who are stuck on the level:


Try moving back a bit, so the ogres take longer to reach you.


you still have to be withing 65 meters.


yep. that too. (20 chars)


So then i can’t attack the catapult.


I pass this level, using the plan array

plan = ["lightning-bolt", 'attack', 'attack', 'attack', 'attack', 'attack', "lightning-bolt", "chain-lightning",
        "regen", 'attack', "regen", "lightning-bolt", "chain-lightning", 'attack', 'attack', "lightning-bolt", 'attack',
        "regen", "lightning-bolt", 'say', "away", 'armagedon']


what’s armagedon? (20)


No need to do that… You just need to move back so you have more time to attack the ogres…