Hi Niko!
You can get personalized help posting your level session Id in separate post.
How to do it: [SOLVED]Javascript: Aggressive Mimicry Help - #12 by xython
when you succeed it’s better to delete the post.
I ugly patched your code and passed the level several times with or without bonus pasting the code into several sessions taken from the leader board.
Corrections i’ve made:
def chooseStrategy():
if hero.costOf("peasant") <= hero.gold and len(hero.built) == 1 and cpt < 1:
# len(hero.built) == 1 - the peasant will be built after one griffin
# if that doesn't work try len(hero.built) == 2
# ..... your code
def pickUpCoin():
coin = hero.findNearestItem()
if coin:
# hero.moveXY(coin.pos.x, coin.pos.y)
hero.move(coin.pos)
# Jenny suggested that in her post
def heroAttack():
enemies = hero.findByType("fangrider", hero.findEnemies())
for enemy in enemies:
if enemy.pos.x < 37: # insert this line and reformat the rest
if hero.canCast("chain-lightning"):
hero.cast("chain-lightning", enemy)
# ... your code
Hi Jenny ! This is a bit late but the song was for you and all women here