Triplea: Mongolian rule bug

Created on 14 Apr 2019  路  11Comments  路  Source: triplea-game/triplea

Engine version

1.9.0.0.13066

My Operating System

Ubuntu

Map name

Global 40 House Rules
also WW2 Global 1940 Balanced Mod3

Can you describe how to trigger the error? (eg: what sequence of actions will recreate it?)

Blitz through Amur while the Mongolian rule is still in play. Undo the move. Mongolian rule will be activated incorrectly

Do you have the exact error text? Please copy/paste if so

Instead of this error, what should have happened?

Mongolian rule should not be activated if the move which activated it is undone.

Any additional information that may help

Bad Game Rules

Most helpful comment

This should be fixed once #4813 is merged.

The problem was that blitz moves create "placeholder battles" for empty territories that are conquered (Amur in this case). The engine was only removing any battles that were empty from the end territory of a route not any intermediate steps. This is now fixed so that it'll undo these blitz battles as well. In 99.9% of cases this didn't matter and only matters in this case as triggers are checking if there was any battle in territories adjacent to Mongolia.

I would appreciate any additional testing folks can do around undoing blitz moves to ensure it doesn't negatively impact any other existing behavior.

All 11 comments

Just adding here, that it is handled correctly in ww2global40_2nd_edition.xml (OOB):

mongolian_rule_undo_move_test.zip

so i tested "Global 40 House Rules" similar to the test panther ran on global 40 oob and it behaved the same as his test. Also tried editing the same conditions to the one simon has but it still behaved correctly.

I'll manually go through a oob game and see if I can reproduce. I didn't see anything different in the oob xml and the mods either.

Here's the first test

global 40 house rules mongolia undo test.zip

well unfortunately the zip didn't post. i didn't think zips worked but i saw panthers did so : ) I'll try a straight up save. i think those work

savedGames/ global 40 house rules mongolia undo test.tsvg

guess I need to go back to school lol figure it out sooner or later

try this again
global _40 _house _rules_ mongolia_ undo_ test.zip

guess it didn't like copy/paste. More of a click n drag type i guess lol. I'll go back to testing the problem now : )

so in simons game russia declares war on japan and in panthers test japan is declaring on russia. Just mentioning it as i go through things. We'll see if it matters

so testing some more and oob is still working correctly. The only difference i see so far from simons game is how the armor moves through Amur. Here's a couple screenshots 1st is simon game

Screenshot from 2019-04-14 23-15-28

this one i had to move 1 territory at a time. I remember seeing a way where you don't have to, which maybe is what simon did ? The red arrows are different. Anyway, just mentioning. Here's the other one. Arrow goes straight. Takes 2 moves ( had to back up twice to undo )instead of 1 continuous if my assumption is correct.

Screenshot from 2019-04-14 23-17-20

So wouldn't think that should matter but it is different in the arrows anyway.

@simon33-2 @panther2 you guys think it matters ? Oh yea here's the other test game

mongolian_rule_undo_move_test_oob 3.zip

@beelee1
In my tests I have tried different moves and it did not make a difference.
I have tested with a new BM game myself, now, and could not reproduce the issue, either.

I tend to think that this is something related to that special game, as we sometimes experience it.

Interesting. It does indeed only occur if you do the blitz in a single move with the ctrl-click. If you do it in two moves as in @panther2 's example, the problem doesn't occur.

I can reproduce it with Global 1940 2nd Ed.

@simon33-2 @beelee1

That's it! In my testings I always moved the blitzing tank back to where it came from (without ctrl-click) and in two steps. When the second move goes anywhere else and the complete move is done using ctrl-click, the problem is reproducable.

right on. well we know what it is now. Don't know how hard it'd be to fix but at least there is a workaround

This should be fixed once #4813 is merged.

The problem was that blitz moves create "placeholder battles" for empty territories that are conquered (Amur in this case). The engine was only removing any battles that were empty from the end territory of a route not any intermediate steps. This is now fixed so that it'll undo these blitz battles as well. In 99.9% of cases this didn't matter and only matters in this case as triggers are checking if there was any battle in territories adjacent to Mongolia.

I would appreciate any additional testing folks can do around undoing blitz moves to ensure it doesn't negatively impact any other existing behavior.

Is 1.10 going to be ready for beta testing soon? Sounds like regression testing that should be done at the same time as everything else. I might get a chance over Easter to look at this though.

Closing as this should be resolved. Please comment if its not fixed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

panther2 picture panther2  路  6Comments

ron-murhammer picture ron-murhammer  路  5Comments

General-Dru-Zod picture General-Dru-Zod  路  5Comments

DanVanAtta picture DanVanAtta  路  6Comments

DanVanAtta picture DanVanAtta  路  5Comments