Opened 2 years ago

Closed 23 months ago

#6527 closed defect (fixed)

Wonder duration timer is reset when a teammate is defeated

Reported by: Langbart Owned by: wraitii
Priority: Should Have Milestone: Alpha 26
Component: UI & Simulation Keywords:
Cc: Patch: Phab:D4661

Description (last modified by Langbart)

An issue was reported via the forum by ettubrutus.

Even if you build a wonder first before any of the bots, if one of the bots on your team is wiped out then the teams change I guess and suddenly you are no longer winning in N minutes [...]

to reproduce

  • Make a game with two teams and at least one teammate, set the victory condition to wonder with a wonder duration timer, e.g. 10 minutes.
    • Use the auto command below to quickly start such a game.
      binaries/system/pyrogenesis -conf=mod.enabledmods:"public" -autostart="random/mainland" -autostart-players=3 -autostart-team=1:1 -autostart-team=2:1 -autostart-team=3:2 -autostart-victory=wonder -autostart-wonderduration=10
      
  • Type gift from the gods and build a wonder.
  • The timer should now appear and normally run down.
  • If you type exodia, your teammate (player 2) should be defeated and the timer will reset to 10 minutes.

bisect

[21441] seems to be the candidate that made this change. A concern was raised by elexis on this commit.

elexis: If my allies were defeated or declared war on me, that shouldn't make me lose the victory timer.

See discussion about this change: https://code.wildfiregames.com/rP21441#31049

reproducible

  • Reproducible for the current GIT version [26850] and up to A23b [21946].
  • At A22 - ​Venustas [19922] the issue is not reproducible, the timer does not reset.

possible solution

Maybe set WonderVictoryPlayerDefeated to false in Line 166 for the WonderVictory.js.

Line 
165 cmpTrigger.RegisterTrigger("OnPlayerWon", "WonderVictoryPlayerWon", { "enabled": true });
166 cmpTrigger.RegisterTrigger("OnPlayerDefeated", "WonderVictoryPlayerDefeated", { "enabled": false });
167 cmpTrigger.wonderVictoryMessages = {};
168}

Change History (3)

comment:1 by Langbart, 2 years ago

Description: modified (diff)

Link to the questionable changeset

comment:2 by Langbart, 2 years ago

Owner: set to wraitii
Patch: Phab:D4661

adding the patch number

comment:3 by wraitii, 23 months ago

Resolution: fixed
Status: newclosed

In 26914:

Don't reset wonder victory timer on ally defeat.

Follows rP21441.
Resetting the wonder time when an ally to the wonder-owner is defeated seems like double-punishment, and should not happen.

Resetting on explicit diplomacy change remains in Allied victory mode.

Fixes #6527

Reported by: Langbart

Differential Revision: https://code.wildfiregames.com/D4661

Note: See TracTickets for help on using tickets.