mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
- Convert Stangg to Script
This commit is contained in:
@@ -1,8 +1,14 @@
|
||||
Name:Stangg
|
||||
ManaCost:4 R G
|
||||
Types:Legendary Creature Human Warrior
|
||||
Text:When Stangg enters the battlefield, if Stangg is on the battlefield, put a legendary 3/4 red and green Human Warrior creature token named Stangg Twin onto the battlefield. When Stangg leaves the battlefield, exile that token. When that token leaves the battlefield, sacrifice Stangg.
|
||||
PT:3/4
|
||||
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigStangg | TriggerDescription$ When CARDNAME enters the battlefield, if Stangg is on the battlefield, put a legendary 3/4 red and green Human Warrior creature token named Stangg Twin onto the battlefield.
|
||||
SVar:TrigStangg:DB$ Token | TokenAmount$ 1 | TokenName$ Stangg Twin | TokenTypes$ Legendary,Creature,Human,Warrior | TokenOwner$ You | TokenColors$ Green,Red | TokenPower$ 3 | TokenToughness$ 4 | RememberTokens$ True
|
||||
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Execute$ TrigExile | TriggerController$ TriggeredCardController | TriggerDescription$ When Stangg leaves the battlefield, exile that token.
|
||||
SVar:TrigExile:AB$ ChangeZone | Cost$ 0 | Defined$ Remembered | Origin$ Battlefield | Destination$ Exile | DB$ Cleanup
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.IsRemembered | Execute$ TrigSac | TriggerDescription$ When that token leaves the battlefield, sacrifice CARDNAME.
|
||||
SVar:TrigSac:AB$ Sacrifice | Cost$ 0 | Defined$ Self | SubAbility$ DBCleanup
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/stangg.jpg
|
||||
Oracle:When Stangg enters the battlefield, put a legendary 3/4 red and green Human Warrior creature token named Stangg Twin onto the battlefield. When Stangg leaves the battlefield, exile that token. When that token leaves the battlefield, sacrifice Stangg.
|
||||
SetInfo:CHR Rare
|
||||
|
||||
@@ -64,62 +64,6 @@ import forge.util.Aggregates;
|
||||
* @version $Id$
|
||||
*/
|
||||
public class CardFactoryCreatures {
|
||||
private static void getCard_Stangg(final Card card) {
|
||||
|
||||
final Ability ability = new Ability(card, ManaCost.ZERO) {
|
||||
@Override
|
||||
public void resolve() {
|
||||
final List<Card> cl = CardFactory.makeToken("Stangg Twin",
|
||||
CardToken.makeTokenFileName("RG", 3, 4, "Stangg Twin"),
|
||||
card.getController(), "R G", new String[] { "Legendary", "Creature", "Human", "Warrior" },
|
||||
3, 4, new String[] { "" });
|
||||
for(Card tok : cl) {
|
||||
Singletons.getModel().getGame().getAction().moveToPlay(tok);
|
||||
}
|
||||
Singletons.getModel().getGame().getEvents().post(new TokenCreatedEvent());
|
||||
|
||||
cl.get(0).addLeavesPlayCommand(new Command() {
|
||||
private static final long serialVersionUID = 3367390368512271319L;
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (card.isInPlay()) {
|
||||
Singletons.getModel().getGame().getAction().sacrifice(card, null);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
sb.append("When Stangg enters the battlefield, if Stangg is on the battlefield, ");
|
||||
sb.append("put a legendary 3/4 red and green Human Warrior creature token ");
|
||||
sb.append("named Stangg Twin onto the battlefield.");
|
||||
ability.setStackDescription(sb.toString());
|
||||
|
||||
card.addComesIntoPlayCommand(new Command() {
|
||||
private static final long serialVersionUID = 6667896040611028600L;
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
Singletons.getModel().getGame().getStack().addSimultaneousStackEntry(ability);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
card.addLeavesPlayCommand(new Command() {
|
||||
private static final long serialVersionUID = 1786900359843939456L;
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
final List<Card> list = CardLists.filter(Singletons.getModel().getGame().getCardsIn(ZoneType.Battlefield), CardPredicates.nameEquals("Stangg Twin"));
|
||||
|
||||
if (list.size() == 1) {
|
||||
Singletons.getModel().getGame().getAction().exile(list.get(0));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static void getCard_SphinxJwar(final Card card) {
|
||||
final SpellAbility ability1 = new AbilityStatic(card, ManaCost.ZERO) {
|
||||
@Override
|
||||
@@ -430,9 +374,7 @@ public class CardFactoryCreatures {
|
||||
|
||||
public static void buildCard(final Card card, final String cardName) {
|
||||
|
||||
if (cardName.equals("Stangg")) {
|
||||
getCard_Stangg(card);
|
||||
} else if (cardName.equals("Sphinx of Jwar Isle")) {
|
||||
if (cardName.equals("Sphinx of Jwar Isle")) {
|
||||
getCard_SphinxJwar(card);
|
||||
} else if (cardName.equals("Master of the Wild Hunt")) {
|
||||
getCard_MasterOfTheWildHunt(card);
|
||||
|
||||
Reference in New Issue
Block a user