- Convert Renewed Faith to Trigger.

- Added Primal Boost's missing Trigger and converted to AF.
This commit is contained in:
jendave
2011-08-06 16:46:06 +00:00
parent 86e6befb16
commit bef836dd40
4 changed files with 9 additions and 90 deletions

View File

@@ -1,8 +1,11 @@
Name:Primal Boost
ManaCost:2 G
Types:Instant
Text:(NOTE: "When you cycle Primal Boost, you may have target creature get +1/+1 until end of turn." not implemented.)
Text:no text
K:Cycling:2 G
A:SP$Pump | Cost$ 2 G | Tgt$ TgtC | NumAtt$ 4 | NumDef$ 4 | SpellDescription$ Target creature gets +4/+4 until end of turn.
T:Mode$ Cycled | ValidCard$ Card.Self | Optional$ True | Execute$ TrigPump | TriggerDescription$ When you cycle CARDNAME, you may have target creature get +1/+1 until end of turn.
SVar:TrigPump:AB$Pump | Cost$ 0 | Tgt$ TgtC | NumAtt$ +1 | NumDef$ +1
SVar:Rarity:Uncommon
SVar:Picture:http://resources.wizards.com/magic/cards/ons/en-us/card41145.jpg
SetInfo:ONS|Uncommon|http://magiccards.info/scans/en/on/277.jpg

View File

@@ -1,9 +1,11 @@
Name:Renewed Faith
ManaCost:2 W
Types:Instant
Text:When you cycle Renewed Faith, you may gain 2 life.\r\n
A:SP$GainLife | Cost$ 2 W | LifeAmount$ 6 | SpellDescription$ You gain 6 life.
Text:no text
K:Cycling:1 W
A:SP$GainLife | Cost$ 2 W | LifeAmount$ 6 | SpellDescription$ You gain 6 life.
T:Mode$ Cycled | ValidCard$ Card.Self | Optional$ True | Execute$ TrigGainLife | TriggerDescription$ When you cycle Renewed Faith, you may gain 2 life.
SVar:TrigGainLife:AB$GainLife | Cost$ 0 | LifeAmount$ 2
SVar:Rarity:Common
SVar:Picture:http://resources.wizards.com/magic/cards/ons/en-us/card41153.jpg
SetInfo:ONS|Common|http://magiccards.info/scans/en/on/50.jpg

View File

@@ -996,32 +996,6 @@ public class CardFactory_Instants {
}//*************** END ************ END **************************
*/
//*************** START *********** START **************************
else if (cardName.equals("Renewed Faith")) {
/**
* The "You gain 6 life." ability is now done via a keyword. This code
* object will give the controller 2 life when this card is cycled.
*/
card.addCycleCommand(new Command() {
private static final long serialVersionUID = 7699412574052780825L;
public void execute() {
Player player = card.getController();
if (player.isHuman()) {
String question = "Gain 2 life?";
if (GameActionUtil.showYesNoDialog(card, question)) {
player.gainLife(2, card);
}
}
// player is computer
else
player.gainLife(2, card);
}
});
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Life Burst")) {
@@ -1985,66 +1959,6 @@ public class CardFactory_Instants {
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Primal Boost")) {
SpellAbility spell = new Spell(card) {
private static final long serialVersionUID = 2449600319884238808L;
@Override
public boolean canPlayAI() {
return getAttacker() != null;
}
@Override
public void chooseTargetAI() {
setTargetCard(getAttacker());
}
public Card getAttacker() {
//target creature that is going to attack
Combat c = ComputerUtil.getAttackers();
CardList list = new CardList(c.getAttackers());
CardListUtil.sortFlying(list);
Card[] att = list.toArray();
if(att.length != 0) return att[0];
else return null;
}//getAttacker()
@Override
public void resolve() {
final Card[] target = new Card[1];
final Command untilEOT = new Command() {
private static final long serialVersionUID = 3753684523153747308L;
public void execute() {
if(AllZone.GameAction.isCardInPlay(target[0])) {
target[0].addTempAttackBoost(-4);
target[0].addTempDefenseBoost(-4);
}
}
};
target[0] = getTargetCard();
if(AllZone.GameAction.isCardInPlay(target[0]) && CardFactoryUtil.canTarget(card, target[0])) {
target[0].addTempAttackBoost(4);
target[0].addTempDefenseBoost(4);
AllZone.EndOfTurn.addUntil(untilEOT);
}
}//resolve()
};
spell.setDescription("\r\nTarget creature gets +4/+4 until end of turn.");
spell.setBeforePayMana(CardFactoryUtil.input_targetCreature(spell));
card.clearSpellAbility();
card.addSpellAbility(spell);
card.setSVar("PlayMain1", "TRUE");
//card.addSpellAbility(CardFactoryUtil.ability_cycle(card, "2 G"));
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Animate Land")) {
final Card[] target = new Card[1];