Fix DFC copy having both faces

This commit is contained in:
Bug Hunter
2022-02-16 12:04:44 +00:00
committed by Hans Mackowiak
parent 39c49b2315
commit cbf1bdd3a5
19 changed files with 46 additions and 73 deletions

View File

@@ -756,9 +756,9 @@ public class AiController {
}
// state needs to be switched here so API checks evaluate the right face
CardStateName currentState = sa.getCardState() != null && sa.getHostCard().getCurrentStateName() != sa.getCardState().getStateName() && !sa.getHostCard().isInPlay() ? sa.getHostCard().getCurrentStateName() : null;
CardStateName currentState = sa.getCardState() != null && sa.getHostCard().getCurrentStateName() != sa.getCardStateName() && !sa.getHostCard().isInPlay() ? sa.getHostCard().getCurrentStateName() : null;
if (currentState != null) {
sa.getHostCard().setState(sa.getCardState().getStateName(), false);
sa.getHostCard().setState(sa.getCardStateName(), false);
}
AiPlayDecision canPlay = canPlaySa(sa); // this is the "heaviest" check, which also sets up targets, defines X, etc.

View File

@@ -299,7 +299,7 @@ public class ControlGainAi extends SpellAbilityAi {
final Game game = ai.getGame();
// Special card logic that is processed elsewhere
if (sa.getParam("AILogic").equals("DonateTargetPerm")) {
if (("DonateTargetPerm").equals(sa.getParam("AILogic"))) {
// Donate step 2 - target a donatable permanent.
return SpecialCardAi.Donate.considerDonatingPermanent(ai, sa);
}