mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- 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:
@@ -220,13 +220,9 @@ public class CountersPutAi extends SpellAbilityAi {
|
|||||||
|
|
||||||
if ("Never".equals(logic)) {
|
if ("Never".equals(logic)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
} else if ("PayEnergy".equals(logic)) {
|
||||||
|
|
||||||
if ("PayEnergy".equals(logic)) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
} else if ("PayEnergyConservatively".equals(logic)) {
|
||||||
|
|
||||||
if ("PayEnergyConservatively".equals(logic)) {
|
|
||||||
boolean onlyInCombat = ai.getController().isAI()
|
boolean onlyInCombat = ai.getController().isAI()
|
||||||
&& ((PlayerControllerAi) ai.getController()).getAi().getBooleanProperty(AiProps.CONSERVATIVE_ENERGY_PAYMENT_ONLY_IN_COMBAT);
|
&& ((PlayerControllerAi) ai.getController()).getAi().getBooleanProperty(AiProps.CONSERVATIVE_ENERGY_PAYMENT_ONLY_IN_COMBAT);
|
||||||
boolean onlyDefensive = ai.getController().isAI()
|
boolean onlyDefensive = ai.getController().isAI()
|
||||||
@@ -266,9 +262,7 @@ public class CountersPutAi extends SpellAbilityAi {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else if (logic.equals("MarkOppCreature")) {
|
||||||
|
|
||||||
if (logic.equals("MarkOppCreature")) {
|
|
||||||
if (!ph.is(PhaseType.END_OF_TURN)) {
|
if (!ph.is(PhaseType.END_OF_TURN)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -283,6 +277,11 @@ public class CountersPutAi extends SpellAbilityAi {
|
|||||||
sa.getTargets().add(bestCreat);
|
sa.getTargets().add(bestCreat);
|
||||||
return true;
|
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) {
|
if (sa.getConditions() != null && !sa.getConditions().areMet(sa) && sa.getSubAbility() == null) {
|
||||||
|
|||||||
@@ -3,11 +3,11 @@ ManaCost:1 U
|
|||||||
Types:Creature Lizard Egg
|
Types:Creature Lizard Egg
|
||||||
PT:0/3
|
PT:0/3
|
||||||
K:Defender
|
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.
|
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$ XMarksTheSpot | References$ XMarksTheSpot | TrueSubAbility$ DBRemoveCtrs
|
SVar:DBBranch:DB$ Branch | BranchConditionSVar$ HatchTimer | References$ HatchTimer | TrueSubAbility$ DBRemoveCtrs
|
||||||
SVar:DBRemoveCtrs:DB$ RemoveCounter | Defined$ Self | CounterType$ HATCHLING | CounterNum$ All | SubAbility$ DBTransform
|
SVar:DBRemoveCtrs:DB$ RemoveCounter | Defined$ Self | CounterType$ HATCHLING | CounterNum$ All | SubAbility$ DBTransform
|
||||||
SVar:DBTransform:DB$ SetState | Defined$ Self | Mode$ Transform
|
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
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/ludevics_test_subject.jpg
|
||||||
AlternateMode:DoubleFaced
|
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.
|
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.
|
||||||
|
|||||||
Reference in New Issue
Block a user