+ inferno trap

This commit is contained in:
Maxmtg
2013-05-08 09:03:27 +00:00
parent d1b415e39f
commit 8cdcb5e01d
4 changed files with 22 additions and 0 deletions

1
.gitattributes vendored
View File

@@ -5330,6 +5330,7 @@ res/cardsfolder/i/infernal_tutor.txt -text
res/cardsfolder/i/inferno.txt svneol=native#text/plain res/cardsfolder/i/inferno.txt svneol=native#text/plain
res/cardsfolder/i/inferno_elemental.txt -text res/cardsfolder/i/inferno_elemental.txt -text
res/cardsfolder/i/inferno_titan.txt svneol=native#text/plain res/cardsfolder/i/inferno_titan.txt svneol=native#text/plain
res/cardsfolder/i/inferno_trap.txt -text
res/cardsfolder/i/infest.txt svneol=native#text/plain res/cardsfolder/i/infest.txt svneol=native#text/plain
res/cardsfolder/i/infested_roothold.txt svneol=native#text/plain res/cardsfolder/i/infested_roothold.txt svneol=native#text/plain
res/cardsfolder/i/infiltrate.txt svneol=native#text/plain res/cardsfolder/i/infiltrate.txt svneol=native#text/plain

View File

@@ -0,0 +1,11 @@
Name:Inferno Trap
ManaCost:3 R
Types:Instant Trap
A:SP$ DealDamage | Cost$ 3 R | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ 4 | SpellDescription$ CARDNAME deals 4 damage to target creature.
A:SP$ DealDamage | Cost$ R | CheckSVar$ CreaturesAttacked | SVarCompare$ GE2 | ValidTgts$ Creature | References$ CreaturesAttacked | TgtPrompt$ Select target creature | NumDmg$ 4 | SpellDescription$ (Pay only {R}) CARDNAME deals 4 damage to target creature.
SVar:CreaturesAttacked:Count$YourDamageSourcesThisTurn Creature
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/inferno_trap.jpg
Oracle:If you've been dealt damage by two or more creatures this turn, you may pay {R} rather than pay CARDNAME's mana cost.\nCARDNAME deals 4 damage to target creature.
SetInfo:ZEN Uncommon
SetInfo:ARC Uncommon

View File

@@ -1298,6 +1298,12 @@ public class CardFactoryUtil {
// Count$YourTypeDamageThisTurn Type // Count$YourTypeDamageThisTurn Type
if (sq[0].contains("YourTypeDamageThisTurn")) return doXMath(cc.getAssignedDamage(sq[0].split(" ")[1]), m, c); if (sq[0].contains("YourTypeDamageThisTurn")) return doXMath(cc.getAssignedDamage(sq[0].split(" ")[1]), m, c);
if (sq[0].contains("YourDamageSourcesThisTurn")) {
Iterable<Card> allSrc = cc.getAssignedDamageSources();
String restriction = sq[0].split(" ")[1];
List<Card> filtered = CardLists.getValidCards(allSrc, restriction, cc, c);
return doXMath(filtered.size(), m, c);
}
if (sq[0].contains("YourLandsPlayed")) return doXMath(cc.getNumLandsPlayed(), m, c); if (sq[0].contains("YourLandsPlayed")) return doXMath(cc.getNumLandsPlayed(), m, c);
if (sq[0].contains("OppLandsPlayed")) return doXMath(ccOpp.getNumLandsPlayed(), m, c); if (sq[0].contains("OppLandsPlayed")) return doXMath(ccOpp.getNumLandsPlayed(), m, c);

View File

@@ -937,6 +937,10 @@ public abstract class Player extends GameEntity implements Comparable<Player> {
} }
return num; return num;
} }
public final Iterable<Card> getAssignedDamageSources() {
return assignedDamage.keySet();
}
/** /**
* <p> * <p>