Can't pass cursed valley


#1

to pass this level i need to kill 3 skeletons and stay alive. But my hero just can’t stay alive until the second skeleton shows up , even though he has drunk the potion
here’s my code:

while True:
enemies = hero.findEnemies()
if enemies:
for enemy in enemies:
if enemy.team == ‘ogres’ and enemy.type == ‘skeleton’:
hero.attack(enemy)

item = hero.findNearest(hero.findItems())
if item and item.type == 'potion' and hero.health < hero.maxHealth/4:
    hero.moveXY(item.pos.x, item.pos.y)

#2

Could you show what the equipment you are using? (just a screenshot). I will try to reproduce it.


#3

Thanks


#5

Are you using “chain-lightning” for that level?


#6

No, just hero.attack()


#7

Hello,

can you send us an email at team@codecombat.com so that we can look over your session and see what may be wrong?


#8

sure, thanks for your time


#9

Sorry for the delay. Could you try it now? There was a problem with one of component changing and I made some rebalance things. Please tell me if you failure or success that level.


#10

Thanks, finally it works fine.


#11

Thanks ,i passed it . it works fine now. but i find another problem on another level… i tell u about it in a new post


#12

Maybe there’s a new bug, but I can’t pass this either. I see three skeletons get killed, but it continues anyway and eventually fails because it times out. Here’s my code…

[Solution is correct, so it's removed]

Thanks!


#13

@AttackArmy Your code looks correct and I checked it with my hero - no problems. Could you sent me with direct messages your CodeCombat username or to the email team@codecombat.com? I will look at your game replay and try to find a problem.


#14

Thanks for looking into it. It seemed very odd that it wasn’t completing. Here’s my user name…


#15

Thanks. I see a problem, but not see where it is. Give me please some time to find it.


#16

Ha! It was interesting. The “problem” was in “samurai + High tier damage sword”. As the result, your hero can kill a skeleton with one hit (411 damage in one hit). The level’s referee could not process that case.

Not it’s fixed (I changed the referee logic). Could you try it again? Please, use the direct link if you still have the same problem.

Thank you very much for the feedback - without it some players could stuck on this level and leave.