mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
- Converted Agony Warp, Burst Lightning, Vitalizing Cascade to script.
This commit is contained in:
@@ -2,6 +2,8 @@ Name:Agony Warp
|
||||
ManaCost:U B
|
||||
Types:Instant
|
||||
Text:no text
|
||||
A:SP$ Pump | Cost$ U B | ValidTgts$ Creature | TgtPrompt$ Select target creature to get -3/-0 | NumAtt$ -3 | IsCurse$ True | SubAbility$ SVar=DBPump | SpellDescription$ Target creature gets -3/-0 until end of turn.
|
||||
SVar:DBPump:DB$Pump | ValidTgts$ Creature | TgtPrompt$ Select target creature to get -0/-3 | NumDef$ -3 | IsCurse$ True | SpellDescription$ Target creature gets -0/-3 until end of turn.
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/agony_warp.jpg
|
||||
SetInfo:ALA|Common|http://magiccards.info/scans/en/ala/153.jpg
|
||||
|
||||
@@ -2,6 +2,8 @@ Name:Burst Lightning
|
||||
ManaCost:R
|
||||
Types:Instant
|
||||
Text:no text
|
||||
A:SP$ DealDamage | Cost$ R | Tgt$ TgtCP | NumDmg$ 2 | SpellDescription$ CARDNAME deals 2 damage to target creature or player. If CARDNAME was kicked, it deals 4 damage to that creature or player instead.
|
||||
A:SP$ DealDamage | Cost$ 4 R | Tgt$ TgtCP | NumDmg$ 4 | SpellDescription$ Kicker 4 (You may pay an additional 4 as you cast this spell.)
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/burst_lightning.jpg
|
||||
SetInfo:ZEN|Common|http://magiccards.info/scans/en/zen/119.jpg
|
||||
|
||||
@@ -2,6 +2,9 @@ Name:Vitalizing Cascade
|
||||
ManaCost:X G W
|
||||
Types:Instant
|
||||
Text:no text
|
||||
A:SP$ GainLife | Cost$ X G W | Defined$ You | LifeAmount$ X | SubAbility$ SVar=DBGain3 | SpellDescription$ You gain X plus 3 life.
|
||||
SVar:DBGain3:DB$GainLife | LifeAmount$ 3 | Defined$ You
|
||||
SVar:X:Count$xPaid
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/vitalizing_cascade.jpg
|
||||
SetInfo:MIR|Uncommon|http://magiccards.info/scans/en/mr/346.jpg
|
||||
|
||||
@@ -1290,35 +1290,6 @@ public class CardFactory_Instants {
|
||||
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Vitalizing Cascade"))
|
||||
{
|
||||
final SpellAbility spell = new Spell(card){
|
||||
private static final long serialVersionUID = -5930794708688097023L;
|
||||
|
||||
public void resolve()
|
||||
{
|
||||
card.getController().gainLife(card.getXManaCostPaid()+3, card);
|
||||
card.setXManaCostPaid(0);
|
||||
}
|
||||
|
||||
public boolean canPlayAI()
|
||||
{
|
||||
int humanLife = AllZone.HumanPlayer.getLife();
|
||||
int computerLife = AllZone.ComputerPlayer.getLife();
|
||||
|
||||
final int maxX = ComputerUtil.getAvailableMana().size() - 1;
|
||||
return maxX > 3 && (humanLife >= computerLife);
|
||||
}
|
||||
};
|
||||
spell.setDescription("You gain X plus 3 life.");
|
||||
spell.setStackDescription("Vitalizing Cascade - You gain X plus 3 life.");
|
||||
|
||||
card.clearSpellAbility();
|
||||
card.addSpellAbility(spell);
|
||||
}
|
||||
//*************** END ************ END **************************
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Hurkyl's Recall")) {
|
||||
/*
|
||||
@@ -1360,100 +1331,6 @@ public class CardFactory_Instants {
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Burst Lightning")) {
|
||||
/*
|
||||
* Kicker 4 (You may pay an additional 4 as you cast this spell.)
|
||||
* Burst Lightning deals 2 damage to target creature or player. If
|
||||
* Burst Lightning was kicked, it deals 4 damage to that creature
|
||||
* or player instead.
|
||||
*/
|
||||
final SpellAbility spell = new Spell(card) {
|
||||
private static final long serialVersionUID = -5191461039745723331L;
|
||||
int damage = 2;
|
||||
|
||||
@Override
|
||||
public void chooseTargetAI() {
|
||||
|
||||
CardList creatures = AllZoneUtil.getCreaturesInPlay(AllZone.HumanPlayer);
|
||||
creatures = creatures.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return c.getNetAttack() <= damage && !c.getKeyword().contains("Indestructible");
|
||||
}
|
||||
});
|
||||
if(AllZone.HumanPlayer.getLife() <= damage || 0 == creatures.size()) {
|
||||
setTargetPlayer(AllZone.HumanPlayer);
|
||||
return;
|
||||
}
|
||||
Card c = CardFactoryUtil.AI_getBestCreature(creatures);
|
||||
setTargetCard(c);
|
||||
}//chooseTargetAI()
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
if(getTargetCard() != null) {
|
||||
if(AllZone.GameAction.isCardInPlay(getTargetCard())
|
||||
&& CardFactoryUtil.canTarget(card, getTargetCard())) {
|
||||
Card c = getTargetCard();
|
||||
c.addDamage(damage, card);
|
||||
}
|
||||
} else getTargetPlayer().addDamage(damage, card);
|
||||
}
|
||||
};//SpellAbility
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(cardName).append(" deals 2 damage to target creature or player. If ");
|
||||
sb.append(cardName).append(" was kicked, it deals 4 damage to that creature or player instead.");
|
||||
spell.setDescription(sb.toString());
|
||||
|
||||
final SpellAbility kicker = new Spell(card) {
|
||||
private static final long serialVersionUID = 7608486082373416819L;
|
||||
int damage = 4;
|
||||
|
||||
@Override
|
||||
public void chooseTargetAI() {
|
||||
|
||||
CardList creatures = AllZoneUtil.getCreaturesInPlay(AllZone.HumanPlayer);
|
||||
creatures = creatures.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return c.getNetAttack() <= damage && !c.getKeyword().contains("Indestructible");
|
||||
}
|
||||
});
|
||||
if(AllZone.HumanPlayer.getLife() <= damage || 0 == creatures.size()) {
|
||||
setTargetPlayer(AllZone.HumanPlayer);
|
||||
return;
|
||||
}
|
||||
Card c = CardFactoryUtil.AI_getBestCreature(creatures);
|
||||
setTargetCard(c);
|
||||
}//chooseTargetAI()
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
|
||||
if(getTargetCard() != null) {
|
||||
if(AllZone.GameAction.isCardInPlay(getTargetCard())
|
||||
&& CardFactoryUtil.canTarget(card, getTargetCard())) {
|
||||
Card c = getTargetCard();
|
||||
c.addDamage(damage, card);
|
||||
}
|
||||
} else getTargetPlayer().addDamage(damage, card);
|
||||
|
||||
card.setKicked(true);
|
||||
}
|
||||
};//kicker
|
||||
kicker.setManaCost("R 4");
|
||||
kicker.setAdditionalManaCost("4");
|
||||
kicker.setKickerAbility(true);
|
||||
kicker.setBeforePayMana(CardFactoryUtil.input_targetCreaturePlayer(kicker, true, false));
|
||||
kicker.setDescription("Kicker: 4");
|
||||
|
||||
card.clearSpellAbility();
|
||||
card.addSpellAbility(spell);
|
||||
card.addSpellAbility(kicker);
|
||||
|
||||
spell.setBeforePayMana(CardFactoryUtil.input_targetCreaturePlayer(spell, true, false));
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*****************************START*******************************
|
||||
else if(cardName.equals("Twiddle") || cardName.equals("Twitch")) {
|
||||
@@ -2118,96 +1995,6 @@ public class CardFactory_Instants {
|
||||
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Agony Warp")) {
|
||||
final Card[] target = new Card[2];
|
||||
final SpellAbility spell = new Spell(card) {
|
||||
private static final long serialVersionUID = 3818559481920103914L;
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
|
||||
final Command untilEOTAtt = new Command() {
|
||||
private static final long serialVersionUID = 7327217065460047190L;
|
||||
|
||||
public void execute() {
|
||||
if(AllZone.GameAction.isCardInPlay(target[0])) {
|
||||
target[0].addTempAttackBoost(3);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
final Command untilEOTDef = new Command() {
|
||||
private static final long serialVersionUID = -5195474401697095394L;
|
||||
|
||||
public void execute() {
|
||||
if(AllZone.GameAction.isCardInPlay(target[1])) {
|
||||
target[1].addTempDefenseBoost(3);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
if(AllZone.GameAction.isCardInPlay(target[0]) && CardFactoryUtil.canTarget(card, target[0])) {
|
||||
target[0].addTempAttackBoost(-3);
|
||||
AllZone.EndOfTurn.addUntil(untilEOTAtt);
|
||||
}
|
||||
if(AllZone.GameAction.isCardInPlay(target[1]) && CardFactoryUtil.canTarget(card, target[1])) {
|
||||
target[1].addTempDefenseBoost(-3);
|
||||
AllZone.EndOfTurn.addUntil(untilEOTDef);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
final Input runtime = new Input() {
|
||||
private static final long serialVersionUID = -6933844881209733696L;
|
||||
boolean firstTarget = true;
|
||||
|
||||
@Override
|
||||
public void showMessage() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if(firstTarget) sb.append(card.getName()).append(" - Select target creature to get -3/-0");
|
||||
else sb.append(card.getName()).append(" - Select target creature to get -0/-3");
|
||||
AllZone.Display.showMessage(sb.toString());
|
||||
ButtonUtil.enableOnlyCancel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void selectButtonCancel() {
|
||||
stop();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void selectCard(Card c, PlayerZone zone) {
|
||||
if(zone.is(Constant.Zone.Battlefield) && CardFactoryUtil.canTarget(card, c) &&
|
||||
c.isCreature()) {
|
||||
if(null == target[0]) {
|
||||
target[0] = c;
|
||||
firstTarget = false;
|
||||
showMessage();
|
||||
}
|
||||
else if(null == target[1]) {
|
||||
target[1] = c;
|
||||
stopSetNext(new Input_PayManaCost(spell));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
spell.setDescription("Target creature gets -3/-0 until end of turn.\n\nTarget creature gets -0/-3 until end of turn.");
|
||||
spell.setStackDescription(cardName+" - Target creature gets -3/-0 until end of turn.\n\nTarget creature gets -0/-3 until end of turn.");
|
||||
spell.setBeforePayMana(runtime);
|
||||
|
||||
card.clearSpellAbility();
|
||||
card.addSpellAbility(spell);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Cryptic Command")) {
|
||||
final SpellAbility[] m_spell = new SpellAbility[1];
|
||||
|
||||
Reference in New Issue
Block a user