mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
Add XChoice to CostDiscard
Convert Firestorm and Vengeful Dreams to Script
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
Name:Firestorm
|
||||
ManaCost:R
|
||||
Types:Instant
|
||||
Text:As an additional cost to cast CARDNAME, discard X cards.\r\n\r\nCARDNAME deals X damage to each of X target creatures and/or players.
|
||||
Text:no text
|
||||
A:SP$ DealDamage | Cost$ R Discard<X/Card> | Tgt$ TgtCP | TargetMin$ 0 | TargetMax$ MaxTgts | NumDmg$ X | SpellDescription$ CARDNAME deals X damage to each of X target creatures and/or players.
|
||||
SVar:X:Targeted$Amount
|
||||
SVar:MaxTgts:Count$Valid Creature/Plus.2
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/firestorm.jpg
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
Name:Vengeful Dreams
|
||||
ManaCost:W W
|
||||
Types:Instant
|
||||
Text:As an additional cost to cast Vengeful Dreams, discard X cards.\r\n\r\nExile X target attacking creatures.
|
||||
Text:no text
|
||||
A:SP$ ChangeZone | Cost$ W W Discard<X/Card> | Origin$ Battlefield | Destination$ Exile | TargetMin$ 0 | TargetMax$ MaxTgts | ValidTgts$ Creature.attacking | TgtPrompt$ Select target attacking creature | SpellDescription$ Exile X target attacking creatures.
|
||||
SVar:X:Targeted$Amount
|
||||
SVar:MaxTgts:Count$Valid Creature.attacking
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/vengeful_dreams.jpg
|
||||
|
||||
@@ -1017,6 +1017,7 @@ public class CardFactory_Instants {
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
/*
|
||||
else if (cardName.equals("Vengeful Dreams")) {
|
||||
final CardList targets = new CardList();
|
||||
final SpellAbility spell = new Spell(card) {
|
||||
@@ -1094,8 +1095,8 @@ public class CardFactory_Instants {
|
||||
|
||||
card.addSpellAbility(spell);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
*/
|
||||
/*
|
||||
//*************** START *********** START **************************
|
||||
else if (cardName.equals("Firestorm")) {
|
||||
final ArrayList<Object> targets = new ArrayList<Object>();
|
||||
@@ -1187,7 +1188,7 @@ public class CardFactory_Instants {
|
||||
|
||||
card.addSpellAbility(spell);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
*/
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if (cardName.equals("Cryptic Command")) {
|
||||
|
||||
@@ -175,6 +175,10 @@ public class CostDiscard extends CostPartWithList {
|
||||
else{
|
||||
Integer c = convertAmount();
|
||||
if (c == null){
|
||||
String sVar = source.getSVar(amount);
|
||||
if (sVar.equals("XChoice")){
|
||||
return false;
|
||||
}
|
||||
c = AbilityFactory.calculateAmount(source, amount, ability);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user