Beta Test "Pawn's Passage"

  1. Every submission gives a random seed
  2. You might updated your code, but you did not submit it. Solve this by submitting your code again inside that match by clicking "Battle!’
3 Likes

Hello, may I ask a bit about the code running part? I just tried this game mode, so my thought was to detect what the opponent is using and use a unit that beats over it, but I don’t know what code to use to detect, as when I use hero.findEnemyUnits(row), I don’t know what it would show as the variable if I wanted to use it. Would it show integers or just texts? Also, if you have no idea too, please give me some suggestions of how to do the same effect by using different codes, thank you.

2 Likes

you probably wanna use a if enemy.type loop say (5 as an example)if hero.findEnemyUnits(5) and enemy.type == ‘pawn’:
hero.summonunit(‘bishop’, 4)
(you can just change the enemy type and row)

just repeat that into a while true loop (:

hero.findEnemyUnits(row)

returns a list of enemies. To access it you can use a for loop to loop through the list and find what type of enemies there are. For example:

While True:
   enemies = hero.findEnemies(2)
   for enemy in enemies:
      if enemy.type == "queen":
         hero.do something here
1 Like

Thank you very much for your help, it worked well.

1 Like

@Venneth I believe something funny is going on in this match

I am winning and the it goes into infinite loop. On the ladder it gives me a tie, which I believe is not suppose to happen. Can you investigate please? I’m pretty sure it has nothing to do with my code since my code is fairly simple and it doesn’t happen against anyone else that I know of. Could you investigate the other guy’s code?

The same thing happend to me a few days ago​:sweat_smile::sweat_smile: it also said infinite loop detected.

when you go to the spectate link, does his session ID match this: 678d98c813bc655c2e8de277?

1 Like

i dont remember, it was a few days ago. (btw nice code)

does anyone know who wins if it is the same gold and no one scores?

me and buddeycc have same gold and points and when i battle it gives me the win, but with some other guy it gives him the win.

same with coasterwhiz

i had the same problem, the person in red always wins if its a tie, i believe.

1 Like

my feedback on api:

  • would like to see cooldowns for both hero and hero.opponent
  • unit attackCooldown seems to be null?
  • hero.opponent.summon() works lmao

@Venneth

I can confirm that hero.opponent.summon() works, this should get fixed ASAP

isReady works on both hero and hero.opponent though seeing cooldowns is typically not availiable

I can also confirm that unit.attackCooldown is null

1 Like