"Anti Gravity" discussions, tips & tricks, chatter

I have a mirroring issue, it says that i lost in simulation

There seems to be a bug with hero.findMyUnits() and hero.findEnemyUnits() also.

Similar issue to above, lane 0 seems to return the entire count of all units on the field for my units and enemy units respectively.
Screen Shot 2024-04-16 at 1.35.52 PM

Screen Shot 2024-04-16 at 1.28.38 PM

No units in lane 0, but I’m getting 16 for mine and 13 for the enemy. (Which is the total of all units on the field at that time.) Same with hero.findMyUnits(), getting 29 for lane 0.

All other lanes count correctly, lanes 1-3 are giving the correct values for all the find functions.

1 Like

FindUnits in lane 0 should be fixed, thanks for the report!

Another mirroring issue,
CodeCombat - Coding games to learn Python and JavaScript | CodeCombat

Imagine lol.


:rofl:

Here is a link to the Anti Gravity patch notes for anyone who is interested. “Anti Gravity” Patch Notes

There is stilli an issue with lane 0 returning all members instead of scopped just to its lane.

Seems to be with both hero.findMyUnits(aLane) and hero.findEnemyUnits(aLane)

      goodGuys = []
      badGuys = []
      for tTest in range(4):
          goodGuys.append("\nLane " + tTest + " total units: " + len(hero.findMyUnits(tTest)))
          badGuys.append("\nLane " + tTest + " total units: " + len(hero.findEnemyUnits(tTest)))
          
      goodGuys.append("\nAll Friendly units: " + len(hero.findMyUnits()))
      badGuys.append("\nAll Enemy units: " + len(hero.findEnemyUnits()))

After testing with this code

while True:
    for i in range(4):
        hero.summon("snail",i)
    print("t is "+hero.time)

    for tTest in range(4):
        print("\nLane " + tTest + " total units: " + len(hero.findMyUnits(tTest)))
        print("\nLane " + tTest + " total units: " + len(hero.findEnemyUnits(tTest)))
          
    print("\nAll Friendly units: " + len(hero.findMyUnits()))
    print("\nAll Enemy units: " + len(hero.findEnemyUnits()))

Everything seems to be running fine and the unit counts add up

1 Like

As I mentioned in the beta test conversation, there is some chance at play, because of the explosive and ignited conditions, which could in turn, result in different endings different times you spectate

1 Like

When I was testing my code, I came across


It just stops the simulation. It seems like it has something to do with this part

of the referee code

@Venneth Could you please fix this?

Returning to python after doing swift app developing for a year:


:anguished: :fearful: :cold_sweat: :disappointed_relieved: :cry: :sob: :sob: :sob:

3 Likes

It happened again! :rofl::

Should be fixed, but i have a hunch that something else might be the problem, but you can let me know,
thanks for the report!

2 Likes

Most arenas have this problem(which could in turn, result in different endings different times you spectate), thats why I like farmscape

True, I can beat HeeroL in battle mode, but when I simulate, it gives me a loss.
This also happens with different people.

Sorry, there was a bug on my side. I was trying to read a dictionary as a variable. That the system said that was that was quite misleading. Thank you for trying to help. :pray:

Can I ask you a question? How many lose do you have now? Thank you.

Can anyone tell me what would be wrong with this code?

closestInEachLane.sort(key=lambda x: hero.pos.distance(x[0].pos))

hero.distance is correct one.