#4323 closed defect (fixed)
[PATCH] Don't flag the player as won on scenario maps without enemies
Reported by: | mimo | Owned by: | Vladislav Belov |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 22 |
Component: | Maps | Keywords: | patch |
Cc: | Patch: |
Description (last modified by )
When starting the Trade Demo map, the game immediately says that we've win and ask if we want to leave. This kind of map, useful either for debug purpose or for beginners who want to learn some aspect of the game, which have "None" victory conditions should never be stopped by such test (I suppose there is a test checking if the player have some enemies left).
Attachments (2)
Change History (11)
comment:1 by , 7 years ago
Component: | UI & Simulation → Maps |
---|---|
Keywords: | simple added |
Priority: | Should Have → Nice to Have |
Summary: | Irrelevant victory condition in demo maps → Don't flag the player as won on scenario maps without enemies |
comment:2 by , 7 years ago
Description: | modified (diff) |
---|
comment:3 by , 7 years ago
Keywords: | patch rfc added |
---|---|
Milestone: | Backlog → Alpha 22 |
Owner: | set to |
Priority: | Nice to Have → Should Have |
Status: | new → assigned |
Summary: | Don't flag the player as won on scenario maps without enemies → [PATCH] Don't flag the player as won on scenario maps without enemies |
comment:4 by , 7 years ago
Milestone: | Alpha 22 → Work In Progress |
---|
SubmittingPatches We changed the protocol for milestone :)
comment:7 by , 7 years ago
Keywords: | rfc simple removed |
---|---|
Milestone: | Work In Progress → Alpha 22 |
Thanks.
comment:8 by , 7 years ago
On 2016-11-23 between 16:16 and 18:56 there was a partially conclusive discussion about the patch.
The EndGameManager
sets either the last remaining player or last remaining team as won. Being the last one remaining sounds pretty much like Conquest mode, so considering #4014 the logic could be moved to that gamemode.
Eventually after #4014, Regicide and Wonder victory should have their Conquest inheritance stripped. So if conquest mode is disabled but regicide enabled, players can still survive even if they only have the hero remaining and lost all workers (has been requested multiple times as counterintuitive). Wondermode without conquest means that a game can only be won by building a wonder (even if all enemies are annihilated).
Does that sound reasonable? Vladislav proposed that we could move the "last remaining wins" logic to a new TriggerScript and allow this independently of Conquest if I understood correctly.
comment:9 by , 7 years ago
Sounds like a good idea. I mostly committed this because it was needed to test a few things (and arguably not wrong).
Yes, we should move the allied victory check to a trigger script as that is where it belongs. Not loading/enabling that leads to last man standing behaviour. Also not loading a script results in an endless game, since nothing can (should) mark a player as won or defeated.
One would have to think about whether different victory conditions are combined with OR or AND (the latter might be nice in a few cases, but that should probably go into a new/custom trigger script (else Conquest+Wonder would require one to destroy the other player and build a wonder)). Actually I'm not sure if there is a case where AND makes sense.
The code responsible for flagging the last remaining player as a winner is not a victory condition but the
EndGameManager
. Before r18342 it would flag the remaining allies as a winner, but only there was a diplomacy change or defeat after the first turn.So if we want to disable the winning of players without enemies on some maps, these maps should specify a new boolean which if set, hides the gamesetup option 'last man standing' and disable the
AlliedVictoryCheck
entirely.