- Added a simple CheckDFC logic for putting counters on cards that can transform later as a result (Ludevic's Test Subject).

This commit is contained in:
Michael Kamensky
2018-07-07 14:43:17 +03:00
parent 5bbd10dfbb
commit e89a742b24
2 changed files with 11 additions and 12 deletions

View File

@@ -220,13 +220,9 @@ public class CountersPutAi extends SpellAbilityAi {
if ("Never".equals(logic)) {
return false;
}
if ("PayEnergy".equals(logic)) {
} else if ("PayEnergy".equals(logic)) {
return true;
}
if ("PayEnergyConservatively".equals(logic)) {
} else if ("PayEnergyConservatively".equals(logic)) {
boolean onlyInCombat = ai.getController().isAI()
&& ((PlayerControllerAi) ai.getController()).getAi().getBooleanProperty(AiProps.CONSERVATIVE_ENERGY_PAYMENT_ONLY_IN_COMBAT);
boolean onlyDefensive = ai.getController().isAI()
@@ -266,9 +262,7 @@ public class CountersPutAi extends SpellAbilityAi {
return true;
}
}
}
if (logic.equals("MarkOppCreature")) {
} else if (logic.equals("MarkOppCreature")) {
if (!ph.is(PhaseType.END_OF_TURN)) {
return false;
}
@@ -283,6 +277,11 @@ public class CountersPutAi extends SpellAbilityAi {
sa.getTargets().add(bestCreat);
return true;
}
} else if (logic.equals("CheckDFC")) {
// for cards like Ludevic's Test Subject
if (!source.canTransform()) {
return false;
}
}
if (sa.getConditions() != null && !sa.getConditions().areMet(sa) && sa.getSubAbility() == null) {

View File

@@ -3,11 +3,11 @@ ManaCost:1 U
Types:Creature Lizard Egg
PT:0/3
K:Defender
A:AB$PutCounter | Cost$ 1 U | Defined$ Self | CounterType$ HATCHLING | CounterNum$ 1 | SubAbility$ DBBranch | SpellDescription$ Put a hatchling counter on CARDNAME. Then if there are five or more hatchling counters on it, remove all of them and transform it.
SVar:DBBranch:DB$ Branch | BranchConditionSVar$ XMarksTheSpot | References$ XMarksTheSpot | TrueSubAbility$ DBRemoveCtrs
A:AB$PutCounter | Cost$ 1 U | Defined$ Self | CounterType$ HATCHLING | CounterNum$ 1 | AILogic$ CheckDFC | SubAbility$ DBBranch | SpellDescription$ Put a hatchling counter on CARDNAME. Then if there are five or more hatchling counters on it, remove all of them and transform it.
SVar:DBBranch:DB$ Branch | BranchConditionSVar$ HatchTimer | References$ HatchTimer | TrueSubAbility$ DBRemoveCtrs
SVar:DBRemoveCtrs:DB$ RemoveCounter | Defined$ Self | CounterType$ HATCHLING | CounterNum$ All | SubAbility$ DBTransform
SVar:DBTransform:DB$ SetState | Defined$ Self | Mode$ Transform
SVar:XMarksTheSpot:Count$Valid Card.Self+counters_GE5_HATCHLING
SVar:HatchTimer:Count$Valid Card.Self+counters_GE5_HATCHLING
SVar:Picture:http://www.wizards.com/global/images/magic/general/ludevics_test_subject.jpg
AlternateMode:DoubleFaced
Oracle:Defender\n{1}{U}: Put a hatchling counter on Ludevic's Test Subject. Then if there are five or more hatchling counters on it, remove all of them and transform it.