Added Pulse of the Dross

Added Pulse of the Forge
CardFactoryUtil can now count life total and cards in hand of targeted players
This commit is contained in:
moomarc
2012-03-28 10:23:02 +00:00
parent cb1cfb24fb
commit 25277573fb
4 changed files with 60 additions and 1 deletions

2
.gitattributes vendored
View File

@@ -6813,7 +6813,9 @@ res/cardsfolder/p/pull_from_eternity.txt -text
res/cardsfolder/p/pull_under.txt svneol=native#text/plain
res/cardsfolder/p/pulling_teeth.txt svneol=native#text/plain
res/cardsfolder/p/pulsating_illusion.txt svneol=native#text/plain
res/cardsfolder/p/pulse_of_the_dross.txt -text
res/cardsfolder/p/pulse_of_the_fields.txt svneol=native#text/plain
res/cardsfolder/p/pulse_of_the_forge.txt -text
res/cardsfolder/p/pulse_of_the_grid.txt -text
res/cardsfolder/p/pulse_of_the_tangle.txt svneol=native#text/plain
res/cardsfolder/p/pulse_tracker.txt svneol=native#text/plain

View File

@@ -0,0 +1,13 @@
Name:Pulse of the Dross
ManaCost:1 B B
Types:Sorcery
Text:no text
A:SP$ Discard | Cost$ 1 B B | ValidTgts$ Player | TgtPrompt$ Select target player | Mode$ RevealYouChoose | RevealNumber$ 3 | NumCards$ 1 | SubAbility$ ReturnDross | SpellDescription$ Target player reveals three cards from his or her hand and you choose one of them. That player discards that card. Then if that player has more cards in hand than you, return CARDNAME to its owner's hand.
SVar:ReturnDross:DB$ ChangeZone | ConditionCheckSVar$ X | ConditionSVarCompare$ GTY | Defined$ Self | Origin$ Stack | Destination$ Hand
SVar:X:Count$InTargetedHand
SVar:Y:Count$InYourHand
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/pulse_of_the_dross.jpg
SetInfo:DST|Rare|http://magiccards.info/scans/en/ds/50.jpg
Oracle:Target player reveals three cards from his or her hand and you choose one of them. That player discards that card. Then if that player has more cards in hand than you, return Pulse of the Dross to its owner's hand.
End

View File

@@ -0,0 +1,12 @@
Name:Pulse of the Forge
ManaCost:1 R R
Types:Instant
Text:no text
A:SP$ DealDamage | Cost$ 1 R R | ValidTgts$ Player | TgtPrompt$ Select target player | NumDmg$ 4 | SubAbility$ ReheatTheForge | SpellDescription$ CARDNAME deals 4 damage to target player. Then if that player has more life than you, return CARDNAME to its owner's hand.
SVar:ReheatTheForge:DB$ ChangeZone | ConditionLifeTotal$ You | ConditionLifeAmount$ LTX | Defined$ Self | Origin$ Stack | Destination$ Hand | ConditionDescription$ If an opponent has more life than you,
SVar:X:Count$TargetedLifeTotal
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/pulse_of_the_forge.jpg
SetInfo:DST|Rare|http://magiccards.info/scans/en/ds/66.jpg
Oracle:Pulse of the Forge deals 4 damage to target player. Then if that player has more life than you, return Pulse of the Forge to its owner's hand.
End

View File

@@ -2894,6 +2894,22 @@ public class CardFactoryUtil {
return CardFactoryUtil.doXMath(oppController.getLife(), m, c);
}
// Count$TargetedLifeTotal (targeted player's life total)
if (sq[0].contains("TargetedLifeTotal")) {
for (final SpellAbility sa : c.getCharacteristics().getSpellAbility()) {
final SpellAbility parent = AbilityFactory.findParentsTargetedPlayer(sa);
if (parent != null) {
if (parent.getTarget() != null) {
for (final Object tgtP : parent.getTarget().getTargetPlayers()) {
if (tgtP instanceof Player) {
return CardFactoryUtil.doXMath(((Player) tgtP).getLife(), m, c);
}
}
}
}
}
}
if (sq[0].contains("LifeYouLostThisTurn")) {
return CardFactoryUtil.doXMath(cardController.getLifeLostThisTurn(), m, c);
}
@@ -3255,6 +3271,22 @@ public class CardFactoryUtil {
}
}
// Count$InTargetedHand (targeted player's cards in hand)
if (sq[0].contains("InTargetedHand")) {
for (final SpellAbility sa : c.getCharacteristics().getSpellAbility()) {
final SpellAbility parent = AbilityFactory.findParentsTargetedPlayer(sa);
if (parent != null) {
if (parent.getTarget() != null) {
for (final Object tgtP : parent.getTarget().getTargetPlayers()) {
if (tgtP instanceof Player) {
someCards.addAll(((Player) tgtP).getCardsIn(Zone.Hand));
}
}
}
}
}
}
// filter lists based on the specified quality
// "Clerics you control" - Count$TypeYouCtrl.Cleric
@@ -4098,7 +4130,7 @@ public class CardFactoryUtil {
* Copies stats like power, toughness, etc.
* </p>
*
* @param o
* @param sim
* a {@link java.lang.Object} object.
* @return a {@link forge.Card} object.
*/