mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
AtEOT: add AtEOTCondition & AtEOTDesc
This commit is contained in:
@@ -218,6 +218,8 @@ public abstract class SpellAbilityEffect {
|
|||||||
boolean your = location.startsWith("Your");
|
boolean your = location.startsWith("Your");
|
||||||
boolean combat = location.endsWith("Combat");
|
boolean combat = location.endsWith("Combat");
|
||||||
|
|
||||||
|
String desc = sa.hasParam("AtEOTDesc") ? sa.getParam("AtEOTDesc") : "";
|
||||||
|
|
||||||
if (your) {
|
if (your) {
|
||||||
location = location.substring("Your".length());
|
location = location.substring("Your".length());
|
||||||
}
|
}
|
||||||
@@ -225,23 +227,30 @@ public abstract class SpellAbilityEffect {
|
|||||||
location = location.substring(0, location.length() - "Combat".length());
|
location = location.substring(0, location.length() - "Combat".length());
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuilder delTrig = new StringBuilder();
|
if (desc.isEmpty()) {
|
||||||
delTrig.append("Mode$ Phase | Phase$ ");
|
StringBuilder sb = new StringBuilder();
|
||||||
delTrig.append(combat ? "EndCombat " : "End Of Turn ");
|
sb.append(location).append(" ");
|
||||||
|
sb.append(Lang.joinHomogenous(crds));
|
||||||
if (your) {
|
sb.append(" at the ");
|
||||||
delTrig.append("| ValidPlayer$ You ");
|
|
||||||
}
|
|
||||||
delTrig.append("| TriggerDescription$ " + location + " ");
|
|
||||||
delTrig.append(Lang.joinHomogenous(crds));
|
|
||||||
delTrig.append(" at the ");
|
|
||||||
if (combat) {
|
if (combat) {
|
||||||
delTrig.append("end of combat.");
|
sb.append("end of combat.");
|
||||||
} else {
|
} else {
|
||||||
delTrig.append("beginning of ");
|
sb.append("beginning of ");
|
||||||
delTrig.append(your ? "your" : "the");
|
sb.append(your ? "your" : "the");
|
||||||
delTrig.append(" next end step.");
|
sb.append(" next end step.");
|
||||||
}
|
}
|
||||||
|
desc = sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
StringBuilder delTrig = new StringBuilder();
|
||||||
|
delTrig.append("Mode$ Phase | Phase$ ");
|
||||||
|
delTrig.append(combat ? "EndCombat " : "End Of Turn ");
|
||||||
|
|
||||||
|
if (your) {
|
||||||
|
delTrig.append("| ValidPlayer$ You ");
|
||||||
|
}
|
||||||
|
delTrig.append("| TriggerDescription$ " + desc);
|
||||||
|
|
||||||
final Trigger trig = TriggerHandler.parseTrigger(delTrig.toString(), sa.getHostCard(), intrinsic);
|
final Trigger trig = TriggerHandler.parseTrigger(delTrig.toString(), sa.getHostCard(), intrinsic);
|
||||||
for (final Card c : crds) {
|
for (final Card c : crds) {
|
||||||
trig.addRemembered(c);
|
trig.addRemembered(c);
|
||||||
@@ -254,6 +263,10 @@ public abstract class SpellAbilityEffect {
|
|||||||
} else if (location.equals("Destroy")) {
|
} else if (location.equals("Destroy")) {
|
||||||
trigSA = "DB$ Destroy | Defined$ DelayTriggerRemembered";
|
trigSA = "DB$ Destroy | Defined$ DelayTriggerRemembered";
|
||||||
}
|
}
|
||||||
|
if (sa.hasParam("AtEOTCondition")) {
|
||||||
|
String var = sa.getParam("AtEOTCondition");
|
||||||
|
trigSA += "| ConditionCheckSVar$ " + var + "| References$ " + var;
|
||||||
|
}
|
||||||
final SpellAbility newSa = AbilityFactory.getAbility(trigSA, sa.getHostCard());
|
final SpellAbility newSa = AbilityFactory.getAbility(trigSA, sa.getHostCard());
|
||||||
newSa.setIntrinsic(intrinsic);
|
newSa.setIntrinsic(intrinsic);
|
||||||
trig.setOverridingAbility(newSa);
|
trig.setOverridingAbility(newSa);
|
||||||
|
|||||||
@@ -4,12 +4,10 @@ Types:Creature Human Shaman
|
|||||||
PT:1/1
|
PT:1/1
|
||||||
K:Ascend
|
K:Ascend
|
||||||
T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigToken | TriggerDescription$ Whenever CARDNAME attacks, you may pay {X}{R}. If you do, create X 1/1 red Elemental creature tokens that are tapped and attacking. At the beginning of the next end step, exile those tokens unless you have the city's blessing.
|
T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigToken | TriggerDescription$ Whenever CARDNAME attacks, you may pay {X}{R}. If you do, create X 1/1 red Elemental creature tokens that are tapped and attacking. At the beginning of the next end step, exile those tokens unless you have the city's blessing.
|
||||||
SVar:TrigToken:AB$ Token | Cost$ X R | TokenAmount$ X | TokenName$ Elemental | TokenTypes$ Creature,Elemental | TokenOwner$ You | TokenColors$ Red | TokenPower$ 1 | TokenToughness$ 1 | TokenTapped$ True | TokenAttacking$ True | TokenImage$ r 1 1 Elemental RIX | RememberTokens$ True | SubAbility$ DelTrig
|
SVar:TrigToken:AB$ Token | Cost$ X R | TokenAmount$ X | TokenName$ Elemental | TokenTypes$ Creature,Elemental | TokenOwner$ You | TokenColors$ Red | TokenPower$ 1 | TokenToughness$ 1 | TokenTapped$ True | TokenAttacking$ True | TokenImage$ r 1 1 Elemental RIX | AtEOT$ Exile | AtEOTCondition$ Y | AtEOTDesc$ At the beginning of the next end step, exile those tokens unless you have the city's blessing.
|
||||||
SVar:DelTrig:DB$ DelayedTrigger | Mode$ Phase | Phase$ End of Turn | Execute$ TrigExile | RememberObjects$ Remembered | TriggerDescription$ At the beginning of the next end step, exile those tokens unless you have the city's blessing. | SubAbility$ DBCleanup
|
|
||||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
|
||||||
SVar:TrigExile:DB$ ChangeZone | Origin$ Battlefield | Destination$ Exile | Defined$ DelayTriggerRemembered | ConditionCheckSVar$ Y | ConditionSVarCompare$ GE1 | References$ Y
|
|
||||||
SVar:X:Count$xPaid
|
SVar:X:Count$xPaid
|
||||||
SVar:Y:Count$Blessing.0.1
|
SVar:Y:Count$Blessing.0.1
|
||||||
|
DeckHas:Ability$Token
|
||||||
SVar:HasAttackEffect:TRUE
|
SVar:HasAttackEffect:TRUE
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/tilonallis_summoner.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/tilonallis_summoner.jpg
|
||||||
Oracle:Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.)\nWhenever Tilonalli's Summoner attacks, you may pay {X}{R}. If you do, create X 1/1 red Elemental creature tokens that are tapped and attacking. At the beginning of the next end step, exile those tokens unless you have the city's blessing.
|
Oracle:Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.)\nWhenever Tilonalli's Summoner attacks, you may pay {X}{R}. If you do, create X 1/1 red Elemental creature tokens that are tapped and attacking. At the beginning of the next end step, exile those tokens unless you have the city's blessing.
|
||||||
Reference in New Issue
Block a user