mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
*Converted Galvanic Blast to keyword.
*Added Metalcraft parameter to Count$
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
Name:Galvanic Blast
|
||||
ManaCost:R
|
||||
Types:Instant
|
||||
Text:Galvanic Blast deals 2 damage to target creature or player.\r\nMetalcraft - Galvanic Blast deals 4 damage to that creature or player instead if you control three or more artifacts.
|
||||
Text:no text
|
||||
K:spDamageTgtCP:X:Galvanic Blast deals 2 damage to target creature or player. Metalcraft - Galvanic Blast deals 4 damage to that creature or player instead if you control 3 or more artifacts.:Galvanic Blast - deals damage.
|
||||
SVar:X:Count$MetalCraft.4.2
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/galvanic_blast.jpg
|
||||
End
|
||||
#Uses Card-specific code!
|
||||
@@ -3739,6 +3739,15 @@ public class CardFactoryUtil {
|
||||
return doXMath(Integer.parseInt(sq[2]), m); // not Hellbent
|
||||
}
|
||||
|
||||
//Count$Metalcraft.<numMC>.<numNotMC>
|
||||
if(sq[0].contains("Metalcraft"))
|
||||
{
|
||||
if(cardController.hasMetalcraft())
|
||||
return doXMath(Integer.parseInt(sq[1]),m);
|
||||
else
|
||||
return doXMath(Integer.parseInt(sq[1]),m);
|
||||
}
|
||||
|
||||
if (sq[0].contains("Threshold"))
|
||||
{
|
||||
if (myYard.size() >= 7)
|
||||
|
||||
@@ -82,89 +82,7 @@ public class CardFactory_Instants {
|
||||
|
||||
}//*************** END ************ END **************************
|
||||
*/
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Galvanic Blast")) {
|
||||
SpellAbility spell = new Spell(card) {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 5792350922880305361L;
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
int damageToDo = 2;
|
||||
CardList artifacts = new CardList(AllZone.getZone(Constant.Zone.Play,card.getController()).getCards());
|
||||
|
||||
artifacts.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return c.getType().contains("Artifact");
|
||||
}
|
||||
});
|
||||
|
||||
if(artifacts.size() > 3) {
|
||||
damageToDo = 4;
|
||||
}
|
||||
|
||||
Card c = getTargetCard();
|
||||
if(c != null)
|
||||
{
|
||||
c.addDamage(damageToDo,card);
|
||||
}
|
||||
else
|
||||
{
|
||||
getTargetPlayer().addDamage(damageToDo,card);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean canPlay() {
|
||||
return true;//super.canPlay();
|
||||
}
|
||||
|
||||
public boolean canPlayAI() {
|
||||
final Integer[] damageToDo = new Integer[1];
|
||||
damageToDo[0] = 2;
|
||||
CardList artifacts = new CardList(AllZone.getZone(Constant.Zone.Play,AllZone.ComputerPlayer).getCards());
|
||||
CardList possibleTargets = new CardList(AllZone.getZone(Constant.Zone.Play,AllZone.HumanPlayer).getCards());
|
||||
|
||||
artifacts.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return c.getType().contains("Artifact");
|
||||
}
|
||||
});
|
||||
|
||||
if(artifacts.size() > 3) {
|
||||
damageToDo[0] = 4;
|
||||
}
|
||||
|
||||
possibleTargets.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
if(!c.isCreature())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return c.getNetDefense() <= damageToDo[0];
|
||||
}
|
||||
});
|
||||
if(possibleTargets.size() > 0) {
|
||||
setTargetCard(possibleTargets.get(0));
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
setTargetPlayer(AllZone.HumanPlayer);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
};
|
||||
card.clearSpellAbility();
|
||||
card.addSpellAbility(spell);
|
||||
|
||||
spell.setBeforePayMana(CardFactoryUtil.input_targetCreaturePlayer(spell,Command.Blank,true,false));
|
||||
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
//*************** START *********** START **************************
|
||||
//*************** START *********** START **************************
|
||||
else if (cardName.equals("Brave the Elements")) {
|
||||
/**
|
||||
* This card now works slightly better than it did before the spAllPump
|
||||
|
||||
Reference in New Issue
Block a user