mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
convert Mystic Snake to script
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
Name:Mystic Snake
|
||||
ManaCost:1 G U U
|
||||
Types:Creature Snake
|
||||
Text:When CARDNAME enters the battlefield, counter target spell.
|
||||
Text:no text
|
||||
PT:2/2
|
||||
K:Flash
|
||||
SVar:RemAIDeck:True
|
||||
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigCounter | TriggerDescription$ When CARDNAME enters the battlefield, counter target spell.
|
||||
SVar:TrigCounter:AB$Counter | Cost$ 0 | TargetType$ Spell | ValidTgts$ Card | TgtPrompt$ Select target spell
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/mystic_snake.jpg
|
||||
SetInfo:APC|Rare|http://magiccards.info/scans/en/ap/112.jpg
|
||||
|
||||
@@ -6,7 +6,6 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Stack;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
@@ -157,6 +156,7 @@ public class CardFactory_Creatures {
|
||||
}
|
||||
//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Kiki-Jiki, Mirror Breaker")) {
|
||||
final CardFactory cfact = cf;
|
||||
@@ -3064,50 +3064,6 @@ public class CardFactory_Creatures {
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Mystic Snake")) {
|
||||
final SpellAbility ability = new Ability(card, "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
if(AllZone.Stack.size() > 0) {
|
||||
SpellAbility sa = AllZone.Stack.peek();
|
||||
if(sa.isSpell() && CardFactoryUtil.isCounterable(sa.getSourceCard())) {
|
||||
sa = AllZone.Stack.pop();
|
||||
AllZone.GameAction.moveToGraveyard(sa.getSourceCard());
|
||||
}
|
||||
}
|
||||
}//resolve()
|
||||
};//SpellAbility
|
||||
|
||||
Command intoPlay = new Command() {
|
||||
private static final long serialVersionUID = -6564365394043612388L;
|
||||
|
||||
public void execute() {
|
||||
if(AllZone.Stack.size() > 0) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Mystic Snake counters ").append(AllZone.Stack.peek().getSourceCard().getName());
|
||||
ability.setStackDescription(sb.toString());
|
||||
|
||||
AllZone.Stack.addSimultaneousStackEntry(ability);
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
card.addComesIntoPlayCommand(intoPlay);
|
||||
|
||||
// Do not remove SpellAbilities created by AbilityFactory or Keywords.
|
||||
card.clearFirstSpellAbility();
|
||||
card.addSpellAbility(new Spell_Permanent(card) {
|
||||
private static final long serialVersionUID = 6440845807532409545L;
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Rootwater Thief")) {
|
||||
final Ability ability2 = new Ability(card, "2") {
|
||||
|
||||
Reference in New Issue
Block a user