Possible bug in order of moves

Hi team!

In the rules, it says that the commands are processed in the following order:

1. Select
2. Movement
3. Digging
4. Banana
5. Snowball
6. Shooting

It looks to me like this is implemented by having an int called order on each command and sorting by it. However, it looks like Banana and Snowball both have the same ordering value (3).

Banana: https://github.com/EntelectChallenge/2019-Worms/blob/develop/game-engine/src/commonMain/kotlin/za/co/entelect/challenge/game/engine/command/implementation/BananaCommand.kt#L30
Snowball: https://github.com/EntelectChallenge/2019-Worms/blob/develop/game-engine/src/commonMain/kotlin/za/co/entelect/challenge/game/engine/command/implementation/SnowballCommand.kt#L15

The impact of this bug would be that it isn’t clearly defined what order those two commands are processed in. Sometimes you can freeze an opponent worm before they banana bomb you, sometimes you can’t.

Thanks!

2 Likes

Hi @justin.worthe

Great catch :blush:.Snowballs should only block worms from being issued new commands. Commands issued before they were frozen, should still be executed as long as they were not frozen when those commands were issued.

The code responsible for this is here:

A quick look shows that frozen worms will miss out on their shoot commands. We will investigate this, I believe Snowballs need to be moved to have the last rank in the command ordering ranks.

Thanks @pierre.roux! I didn’t realize that being able to stop worms from shooting by freezing them was unintentional. I agree that reordering it such that the snowballs are the last command should fix this.

Hi @pierre.roux,

Probably related to this:

It looks like if 2 worms try to snowball each other in the same turn, player 1’s will take effect first, preventing player 2 from throwing his.

Probably not what was intended? I have a match log showing this, if you’d like.

1 Like

That seems like the bug that would happen in the current release. The intended effect should be that the snowballs have both been thrown, before the first one hits a worm…this way both should get frozen.

We will fix this in the upcoming release with the final balance tweaks soon :grin:

3 Likes