Opened 2 years ago

Last modified 2 years ago

#6527 closed defect

Wonder duration timer is reset when a teammate is defeated — at Version 1

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

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 (1)

comment:1 by Langbart, 2 years ago

Description: modified (diff)

Link to the questionable changeset

Note: See TracTickets for help on using tickets.