triplea-game / triplea

TripleA is a turn based strategy game and board game engine, similar to Axis & Allies or Risk.
https://triplea-game.org/
GNU General Public License v3.0
1.32k stars 392 forks source link

Can blitz through a friendly neutral. Should not be possible. #4685

Open simon33-2 opened 5 years ago

simon33-2 commented 5 years ago

Engine version

All, 1.9-13066

My Operating System

Ubuntu

Map name

World War II Global 2nd Edition

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

For example, start new game, click through to German NCM, move tank from Romania to Albania via Bulgaria. The same thing can be achieved with a mech infantry.

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

Instead of this error, what should have happened?

This should not be possible. When activating a friendly neutral, units must stop in the territory which is activated.

Any additional information that may help

Europe 1940 2nd ed rules, p10, refer bolded bit: "Friendly neutrals" Friendly neutrals are neutral territories that are sympathetic to your alliance. For example, on the map Bulgaria and Iraq are shown as being pro-Axis. These territories would be friendly neutrals to both Germany and Italy. A pro-Allies neutral would be considered a friendly neutral to the United States, United Kingdom, Soviet Union, and France. Friendly neutrals may not be attacked, and air units may not fly over them. They can be moved into (but not through) as a noncombat move by land units of a power that is at war (see “Noncombat Move,” page 22). This moves the territory out of its neutral status, however. The first friendly power to do so places its national control marker on the former friendly neutral territory, and its national production level is adjusted upward by the value of the territory. With the territory’s loss of neutrality in this way, its standing army is immediately activated. The units placed belong to the power that now controls the formerly neutral territory, and may be used freely beginning on that power’s next turn.

WCSumpton commented 4 years ago

Right now when 'canMoveLandUnitsOverOwnedLand' is false, land units are prevented for entering owned land territories, when is should only prevent the movement over/through those territories

WCSumpton commented 4 years ago

This could be done by using 'territioyEffect' to increase the movement value to Bulgaria during Germany's and Italy's NCM while removing/changing the 'territoryEffect' after their NCM. A trigger would check the owner of Bulgaria and if it was still the friendly neutral set the effect. This could also be used to restrict AA Guns from moving there during the NCM.

simon33-2 commented 4 years ago

@WCSumpton I'm not sure I understand. Would changing those attributes for Bulgaria prevent moving through the territory after the territory is activated? If so, that would be wrong.

WCSumpton commented 4 years ago

@simon33-2 No prior to the activation of the friendly neutral territory, so that unit that have 2 movement will not be able to move through/blitz the territory.

Cernelius commented 4 years ago

@simon33-2 What @WCSumpton is proposing would work, as you would have a trigger removing that effect after take over, but it is substantially a hack, so I don't think you want to "fix" this game that way, also considering that this would be purely a map level way to do it, requiring changing the xml of every single game affected.

And, anyways, this would not fix this issue on a general standpoint, assuming TripleA, as a program, wants not blitzing through a friendly neutral.