mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
*Partially converted Venser, the Sojourner to script.
This commit is contained in:
@@ -3,6 +3,10 @@ ManaCost:3 W U
|
||||
Types:Planeswalker Venser
|
||||
Text:no text
|
||||
Loyalty:3
|
||||
A:AB$PumpAll | Cost$ SubCounter<1/LOYALTY> | Planeswalker$ True | ValidCards$ Creature | KW$ Unblockable | SpellDescription$ Creatures are unblockable this turn.
|
||||
A:AB$Effect | Cost$ SubCounter<8/LOYALTY> | Planeswalker$ True | Name$ Venser, the Sojourner emblem | Triggers$ TrigSpellCast | SVars$ EffSpellCast | Duration$ Permanent | SpellDescription$ You get an emblem with "Whenever you cast a spell, exile target permanent."
|
||||
SVar:TrigSpellCast:Mode$ SpellCast | ValidControllingPlayer$ You | Execute$ EffSpellCast | TriggerDescription$ Whenever you cast a spell, exile target permanent.
|
||||
SVar:EffSpellCast:AB$ChangeZone | Cost$ 0 | Origin$ Battlefield | Destination$ Exile | ValidTgts$ Permanent
|
||||
SVar:Rarity:Mythic
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/venser_the_sojourner.jpg
|
||||
SetInfo:SOM|Mythic|http://magiccards.info/scans/en/som/135.jpg
|
||||
|
||||
@@ -1595,133 +1595,10 @@ public class CardFactory_Planeswalkers {
|
||||
}//showMessage()
|
||||
};//Input
|
||||
|
||||
|
||||
final SpellAbility ability2 = new Ability(card, "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
card.subtractCounter(Counters.LOYALTY, 1);
|
||||
turn[0] = AllZone.getPhase().getTurn();
|
||||
|
||||
CardList list = AllZoneUtil.getCardsIn(Zone.Battlefield);
|
||||
list = list.getType("Creature");
|
||||
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
final Card[] target = new Card[1];
|
||||
target[0] = list.get(i);
|
||||
|
||||
final Command untilEOT = new Command() {
|
||||
private static final long serialVersionUID = -7291011871465745495L;
|
||||
|
||||
public void execute() {
|
||||
if (AllZoneUtil.isCardInPlay(target[0])) {
|
||||
target[0].removeExtrinsicKeyword("Unblockable");
|
||||
}
|
||||
}
|
||||
};//Command
|
||||
|
||||
if (AllZoneUtil.isCardInPlay(target[0])) {
|
||||
target[0].addExtrinsicKeyword("Unblockable");
|
||||
AllZone.getEndOfTurn().addUntil(untilEOT);
|
||||
}//if
|
||||
}//for
|
||||
|
||||
}//resolve()
|
||||
|
||||
@Override
|
||||
public boolean canPlay() {
|
||||
return AllZone.getZoneOf(card).is(Constant.Zone.Battlefield)
|
||||
&& turn[0] != AllZone.getPhase().getTurn()
|
||||
&& card.getCounters(Counters.LOYALTY) >= 1
|
||||
&& Phase.canCastSorcery(card.getController());
|
||||
}//canPlay()
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
|
||||
CardList list = AllZone.getComputerPlayer().getCardsIn(Zone.Battlefield);
|
||||
list = list.filter(new CardListFilter() {
|
||||
public boolean addCard(Card crd) {
|
||||
return crd.isEmblem()
|
||||
&& crd.hasKeyword("Whenever you cast a spell, exile target permanent.");
|
||||
}
|
||||
});
|
||||
|
||||
CardList creatList = AllZone.getComputerPlayer().getCardsIn(Zone.Battlefield);
|
||||
creatList = creatList.filter(new CardListFilter() {
|
||||
public boolean addCard(Card crd) {
|
||||
return CombatUtil.canAttack(crd);
|
||||
}
|
||||
});
|
||||
|
||||
return list.size() >= 1
|
||||
&& card.getCounters(Counters.LOYALTY) > 2
|
||||
&& creatList.size() >= 3
|
||||
&& AllZone.getPhase().getPhase().equals("Main1");
|
||||
|
||||
}
|
||||
};//SpellAbility ability2
|
||||
|
||||
|
||||
//ability3
|
||||
final SpellAbility ability3 = new Ability(card, "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
card.subtractCounter(Counters.LOYALTY, 8);
|
||||
turn[0] = AllZone.getPhase().getTurn();
|
||||
|
||||
Card emblem = new Card();
|
||||
//should we even name this permanent?
|
||||
//emblem.setName("Elspeth Emblem");
|
||||
emblem.addIntrinsicKeyword("Indestructible");
|
||||
emblem.addIntrinsicKeyword("Shroud");
|
||||
emblem.addIntrinsicKeyword("Whenever you cast a spell, exile target permanent.");
|
||||
emblem.setImmutable(true);
|
||||
emblem.addType("Emblem");
|
||||
emblem.addController(card.getController());
|
||||
emblem.setOwner(card.getOwner());
|
||||
|
||||
AllZone.getGameAction().moveToPlay(emblem);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlay() {
|
||||
return 8 <= card.getCounters(Counters.LOYALTY)
|
||||
&& AllZone.getZoneOf(card).is(Constant.Zone.Battlefield)
|
||||
&& turn[0] != AllZone.getPhase().getTurn()
|
||||
&& Phase.canCastSorcery(card.getController());
|
||||
}//canPlay()
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
//multiple venser emblems are NOT redundant
|
||||
/*
|
||||
CardList list = AllZone.getComputerPlayer().getCardsIn(Zone.Battlefield);
|
||||
list = list.filter(new CardListFilter(){
|
||||
public boolean addCard(Card c)
|
||||
{
|
||||
return c.isEmblem()
|
||||
&& c.hasKeyword("Whenever you cast a spell, exile target permanent.");
|
||||
}
|
||||
});
|
||||
*/
|
||||
return card.getCounters(Counters.LOYALTY) > 8;
|
||||
}
|
||||
};
|
||||
|
||||
ability1.setBeforePayMana(runtime);
|
||||
ability1.setDescription("+2: Exile target permanent you own. Return it to the battlefield under your control at the beginning of the next end step.");
|
||||
card.addSpellAbility(ability1);
|
||||
|
||||
ability2.setDescription("-1: Creatures are unblockable this turn.");
|
||||
ability2.setStackDescription("Creatures are unblockable this turn.");
|
||||
card.addSpellAbility(ability2);
|
||||
|
||||
ability3.setDescription("-8: You get an emblem with \"Whenever you cast a spell, exile target permanent.\"");
|
||||
StringBuilder stack3 = new StringBuilder();
|
||||
stack3.append(card.getName()).append("You get an emblem with \"Whenever you cast a spell, exile target permanent.\"");
|
||||
ability3.setStackDescription(stack3.toString());
|
||||
card.addSpellAbility(ability3);
|
||||
|
||||
card.setSVars(card.getSVars());
|
||||
card.setSets(card.getSets());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user