Open wrhyme29 opened 8 months ago
try
{
Game game = UIGameView.Instance.GameController.Game;
string key = UndoManager.BuildKey(game.TurnPhaseIndex, game.ActiveTurnTaker, game.ActiveTurnPhase.Phase);
string text = MultiplayerManager.ComputeUndoHash(game, key);
enumerable = UIGameView.Instance.GameController.GetDamagePreviewResults(damageSource, card, 0, func, damageType, isIrreducible.Value, ambiguousChoice, selectCardDecision.CardSource);
string text2 = MultiplayerManager.ComputeUndoHash(game, key);
if (text != text2)
{
Debug.LogErrorFormat("Game hash changed after GetDamagePreviewResults! This can cause resync issues in multiplayer. Before: {0} after: {1}", text, text2);
Debug.LogErrorFormat("Damage source: {0} target: {1} card source: {2}", damageSource, card, selectCardDecision.CardSource);
flag3 = true;
}
}
catch (Exception exception)
{
Debug.LogError("Exception calling GetDamagePreviewResults!");
Debug.LogException(exception, this);
}
that trace looks like it's not even getting in to GetDamagePreviewResults?
Are you still in game start? I see the debugger environment, if you did stuff before the game properly loaded it might be that issue where damage that occurs during setup breaks GetDamagePreviewResults.
Good call about the StartOfGame thing - I didn't know that was an issue. When I do the same thing but have the damage initiator be during the Villain Play phase, damage preview resolves as expected. So I think we can probably declare this issue a non-issue?
To be a bit more specific about things I think might go wrong, if Tango One does 0 damage or damage that is reduced to 0, but is later increased by Critical Hit, I bet it'll dodge redirects that should have triggered.
I don't have anything immediately in mind that should break with chameleon armour.
Describe the bug When there are redirects happening, the damage preview for Chameleon Armor freaks out and shows the error message.
What does it affect Card(s): Chameleon Armor Deck(s): Tango One
To Reproduce Steps to reproduce the behavior:
Expected behavior The question mark ambiguous preview appear, as well as showing the redirect options.
Screenshots
Logs When we look in the Player.log, we see this exception:
Additional context This is related to implementation in #1664