Few remarks about this level :
I get a success without changing the code. Bonus were not ok, but level was successful.
Even after changing the code, correctly I think, as requested at least, I was not able to get a better result, to achieve the first bonus.
In the Results, the shorter the time, the better the results. I think it should be the opposite. The rank for gold looks correct.
The level is fun, but maybe the balance needs improvement. The first goal is too easy if you have armor, and even if you summon soldier, they did not help much as the enemies are so powerful after 30s.
I did the same. After doing what was expected, I use my hero to attack the strongest enemies. It’s better, and I hardly reach the 60s limit (not always), but not the 350 gold limit. But ok, as it’s a bonus, it needs to be hard.
My message was to compare the difficulty of the first target, too easy if you have a good armor because you don’t need to write code, and the result when you write the code : not much improvement. The number and type of enemy increase very fast.
I’ll try again for the bonus.
The first 30 seconds is now more difficult than it was at first, so you shouldn’t win with default code unless you have very good armor.
The difficulty ramping up after 30 seconds is intentional.
The idea is: passing the level should be easy. Getting the bonuses should be a challenge. There is no particular “expected” way to get the bonus… be creative
This bonus now seems unachievable as a warrior. Even with almost max gear and solid code logic, cannot make it past 49 seconds. The soldiers are just to weak to hold off enemy horde. Beaten every level and achieved every bonus up until this point, so please recheck the balance of this level.
This situation of having to come back to a level to fully beat it has only happened for increasingly difficult repeating levels. That’s the reason this feels so out of place, everyone should be able to fully beat any standard level they run into with the current equipment and correct code they have at that point in the game.
Hi i need some help,here is my code:
# This level shows how to define your own functions.
# The code inside a function is not executed immediately. It's saved for later.
# This function has your hero collect the nearest coin.
def pickUpNearestCoin():
items = hero.findItems()
nearestCoin = hero.findNearest(items)
if nearestCoin:
hero.move(nearestCoin.pos)
# This function has your hero summon a soldier.
def summonSoldier():
# If hero.gold is greater than the cost of the "soldier":
if hero.gold < "slodier":
# Then summon a "soldier":
hero.summon("soldier")
pass
# This function commands your soldiers to attack their nearest enemy.
def commandSoldiers():
for soldier in hero.findFriends():
enemy = soldier.findNearestEnemy()
if enemy:
hero.command(soldier, "attack", enemy)
while True:
# In your loop, you can "call" the functions defined above.
# The following line causes the code inside the "pickUpNearestCoin" function to be executed.
enemy = hero.findNearestEnemy()
pickUpNearestCoin()
# Call summonSoldier here
hero.summon("soldier")
# Call commandSoldiers here