SotMSteamMods/CauldronMods

Hydra Tiamat breaks on rewind

Closed this issue · 3 comments

Describe the bug
Playing against Hydra Tiamat, after defeating two of the three initial heads and bringing out the heads underneath them, I rewound the game to a time after the new heads were brought out. The new heads then moved back under the original heads.

What does it affect
Card(s): Hydra Tiamat
Deck(s): Tiamat

To Reproduce
Steps to reproduce the behavior:

  1. Play against Hydra Tiamat
  2. Defeat one or more of the original heads
  3. Rewind the game to a time when the new heads were out
  4. See error

Expected behavior
The heads should stay in play

Logs
Player.log

This might be because on a rewind, TiamatSubCharacterCardController.AddStartOfGameTriggers() recreates the trigger to run MoveStartingCards(). If the rewind also resets the value of AreStartingCardsSetup, that trigger would execute immediately. Is there a reason this can't be done in StartGame() instead?

I tried removing that start of game trigger from TiamatSubCharacterCardController and renaming MoveStartingCards() to StartGame() in a local version, that seems to be working perfectly in normal games and in Boss Rush. Something is throwing an error when I try to run Tiamat's unit tests though, so I could be missing something.

AFAICT you have correctly identified the issue and the fix. Unit tests run fine for me. I'll put up a pr.