Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
Set **Card** is not set in Executor.OnPreActivate()
  • Loading branch information
Wind2009-Louse authored Jul 24, 2024
1 parent 7e24e58 commit 31ece21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Game/GameAI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1162,14 +1162,14 @@ public BattlePhaseAction ToMainPhase2()

private bool ShouldExecute(CardExecutor exec, ClientCard card, ExecutorType type, int desc = -1, int timing = -1)
{
Executor.SetCard(type, card, desc, timing);
if (card.Id != 0 && type == ExecutorType.Activate)
{
if (_activatedCards.ContainsKey(card.Id) && _activatedCards[card.Id] >= 9)
return false;
if (!Executor.OnPreActivate(card))
return false;
}
Executor.SetCard(type, card, desc, timing);
bool result = card != null && exec.Type == type &&
(exec.CardId == -1 || exec.CardId == card.Id) &&
(exec.Func == null || exec.Func());
Expand Down

0 comments on commit 31ece21

Please sign in to comment.