mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
convert Awakener Druid to script. Comment out CardFactoryUtil.activateManland and revertManland. Anything like this form now on should be using AF_Animate.
This commit is contained in:
@@ -3,6 +3,8 @@ ManaCost:2 G
|
||||
Types:Creature Human Druid
|
||||
Text:no text
|
||||
PT:1/1
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigAnimate | TriggerDescription$ When CARDNAME enters the battlefield, target Forest becomes a 4/5 green Treefolk creature for as long as CARDNAME is on the battlefield. It's still a land.
|
||||
SVar:TrigAnimate:AB$ Animate | Cost$ 0 | ValidTgts$ Forest | TgtPrompt$ Select target Forest | Types$ Creature,Treefolk | Power$ 4 | Toughness$ 5 | Colors$ Green | UntilHostLeavesPlay$ True
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/awakener_druid.jpg
|
||||
|
||||
@@ -52,7 +52,6 @@ import forge.card.spellability.SpellAbility;
|
||||
import forge.card.spellability.SpellPermanent;
|
||||
import forge.card.spellability.Target;
|
||||
import forge.card.trigger.Trigger;
|
||||
import forge.card.trigger.TriggerHandler;
|
||||
import forge.gui.GuiUtils;
|
||||
import forge.gui.input.Input;
|
||||
import forge.gui.input.InputPayManaCost;
|
||||
@@ -2570,52 +2569,6 @@ public class CardFactoryCreatures {
|
||||
ability.setStackDescription(sbStack.toString());
|
||||
} // *************** END ************ END **************************
|
||||
|
||||
// *************** START *********** START **************************
|
||||
else if (cardName.equals("Awakener Druid")) {
|
||||
final long[] timeStamp = { 0 };
|
||||
|
||||
final StringBuilder sbTrig = new StringBuilder();
|
||||
sbTrig.append("Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ");
|
||||
sbTrig.append("ValidCard$ Card.Self | TriggerDescription$ ");
|
||||
sbTrig.append("When CARDNAME enters the battlefield, target Forest ");
|
||||
sbTrig.append("becomes a 4/5 green Treefolk creature for as long as CARDNAME ");
|
||||
sbTrig.append("is on the battlefield. It's still a land.");
|
||||
|
||||
final Trigger myTrig = TriggerHandler.parseTrigger(sbTrig.toString(), card, true);
|
||||
final Target myTarget = new Target(card, "Choose target forest.", "Land.Forest".split(","), "1", "1");
|
||||
final SpellAbility awaken = new Ability(card, "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
if (!AllZone.getZoneOf(card).is(Zone.Battlefield)
|
||||
|| (this.getTarget().getTargetCards().size() == 0)) {
|
||||
return;
|
||||
}
|
||||
final Card c = this.getTarget().getTargetCards().get(0);
|
||||
final String[] types = { "Creature", "Treefolk" };
|
||||
final String[] keywords = {};
|
||||
timeStamp[0] = CardFactoryUtil.activateManland(c, 4, 5, types, keywords, "G");
|
||||
|
||||
final Command onleave = new Command() {
|
||||
private static final long serialVersionUID = -6004932214386L;
|
||||
private final long stamp = timeStamp[0];
|
||||
private final Card tgt = c;
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
final String[] types = { "Creature", "Treefolk" };
|
||||
final String[] keywords = { "" };
|
||||
CardFactoryUtil.revertManland(this.tgt, types, keywords, "G", this.stamp);
|
||||
}
|
||||
};
|
||||
card.addLeavesPlayCommand(onleave);
|
||||
}
|
||||
}; // SpellAbility
|
||||
awaken.setTarget(myTarget);
|
||||
|
||||
myTrig.setOverridingAbility(awaken);
|
||||
card.addTrigger(myTrig);
|
||||
} // *************** END ************ END **************************
|
||||
|
||||
// *************** START *********** START **************************
|
||||
else if (cardName.equals("Duct Crawler") || cardName.equals("Shrewd Hatchling")
|
||||
|| cardName.equals("Spin Engine") || cardName.equals("Screeching Griffin")) {
|
||||
|
||||
@@ -4017,6 +4017,8 @@ public class CardFactoryUtil {
|
||||
* @param timeStamp
|
||||
* a long.
|
||||
*/
|
||||
/*
|
||||
@Deprecated
|
||||
public static void revertManland(final Card c, final String[] removeTypes, final String[] removeKeywords,
|
||||
final String cost, final long timeStamp) {
|
||||
c.setBaseAttack(0);
|
||||
@@ -4033,6 +4035,7 @@ public class CardFactoryUtil {
|
||||
c.removeColor(cost, c, false, timeStamp);
|
||||
c.unEquipAllCards();
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -4053,6 +4056,8 @@ public class CardFactoryUtil {
|
||||
* a {@link java.lang.String} object.
|
||||
* @return a long.
|
||||
*/
|
||||
/*
|
||||
@Deprecated
|
||||
public static long activateManland(final Card c, final int attack, final int defense, final String[] addTypes,
|
||||
final String[] addKeywords, String cost) {
|
||||
c.setBaseAttack(attack);
|
||||
@@ -4080,6 +4085,7 @@ public class CardFactoryUtil {
|
||||
final long timestamp = c.addColor(cost, c, false, true);
|
||||
return timestamp;
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
||||
Reference in New Issue
Block a user