- Added Needlebite Trap

This commit is contained in:
swordshine
2013-04-22 01:35:58 +00:00
parent ca2ae9014c
commit cc4833c014
6 changed files with 46 additions and 1 deletions

1
.gitattributes vendored
View File

@@ -7177,6 +7177,7 @@ res/cardsfolder/n/need_for_speed.txt svneol=native#text/plain
res/cardsfolder/n/needle_drop.txt -text
res/cardsfolder/n/needle_specter.txt svneol=native#text/plain
res/cardsfolder/n/needle_storm.txt svneol=native#text/plain
res/cardsfolder/n/needlebite_trap.txt -text
res/cardsfolder/n/needlebug.txt svneol=native#text/plain
res/cardsfolder/n/needlepeak_spider.txt svneol=native#text/plain
res/cardsfolder/n/needleshot_gourna.txt svneol=native#text/plain

View File

@@ -0,0 +1,10 @@
Name:Needlebite Trap
ManaCost:5 B B
Types:Instant Trap
SVar:AltCost:Cost$ B | CheckSVar$ OppLifeGained | Description$ If an opponent gained life this turn, you may pay B rather than pay CARDNAME's mana cost.
SVar:OppLifeGained:PlayerCountOpponents$LifeGainedThisTurn
A:SP$ LoseLife | Cost$ 5 B B | ValidTgts$ Player | TgtPrompt$ Select target player | LifeAmount$ 5 | SubAbility$ DBGainLife | SpellDescription$ Target player loses 5 life and you gain 5 life.
SVar:DBGainLife:DB$ GainLife | Defined$ You | LifeAmount$ 5
SVar:Picture:http://www.wizards.com/global/images/magic/general/needlebite_trap.jpg
Oracle:If an opponent gained life this turn, you may pay {B} rather than pay Needlebite Trap's mana cost.\nTarget player loses 5 life and you gain 5 life.
SetInfo:ZEN Uncommon

View File

@@ -2,7 +2,7 @@ Name:Swords to Plowshares
ManaCost:W
Types:Instant
A:SP$ ChangeZone | Cost$ W | ValidTgts$ Creature | TgtPrompt$ Select target creature | Origin$ Battlefield | Destination$ Exile | SpellDescription$ Exile target creature. Its controller gains life equal to its power. | SubAbility$ DBGainLife
SVar:DBGainLife:DB$GainLife | Defined$ TargetedController | LifeAmount$ X
SVar:DBGainLife:DB$ GainLife | Defined$ TargetedController | LifeAmount$ X | References$ X
SVar:X:Targeted$CardPower
SVar:Picture:http://resources.wizards.com/magic/cards/br/en-us/card21172.jpg
Oracle:Exile target creature. Its controller gains life equal to its power.

View File

@@ -1042,6 +1042,12 @@ public class CardFactoryUtil {
}
}
if (sq[0].contains("LifeGainedThisTurn")) {
if (players.size() > 0) {
return doXMath(players.get(0).getLifeGainedThisTurn(), m, source);
}
}
if (sq[0].contains("PoisonCounters")) {
if (players.size() > 0) {
return doXMath(players.get(0).getPoisonCounters(), m, source);

View File

@@ -539,6 +539,7 @@ public class PhaseHandler extends MyObservable implements java.io.Serializable {
p.resetProwl();
p.setLifeLostThisTurn(0);
p.setLifeGainedThisTurn(0);
p.removeKeyword("At the beginning of this turn's end step, you lose the game.");
p.removeKeyword("Skip the untap step of this turn.");

View File

@@ -99,6 +99,9 @@ public abstract class Player extends GameEntity implements Comparable<Player> {
/** The life lost this turn. */
private int lifeLostThisTurn = 0;
/** The life Gained this turn. */
private int lifeGainedThisTurn = 0;
/** The num power surge lands. */
private int numPowerSurgeLands;
@@ -458,6 +461,7 @@ public abstract class Player extends GameEntity implements Comparable<Player> {
this.addLife(lifeGain);
newLifeSet = true;
this.updateObservers();
this.lifeGainedThisTurn += lifeGain;
// Run triggers
final HashMap<String, Object> runParams = new HashMap<String, Object>();
@@ -2575,6 +2579,29 @@ public abstract class Player extends GameEntity implements Comparable<Player> {
this.numLandsPlayed = n;
}
/**
* <p>
* Getter for the field <code>lifeGainedThisTurn</code>.
* </p>
*
* @return a int.
*/
public final int getLifeGainedThisTurn() {
return this.lifeGainedThisTurn;
}
/**
* <p>
* Setter for the field <code>lifeGainedThisTurn</code>.
* </p>
*
* @param n
* a int.
*/
public final void setLifeGainedThisTurn(final int n) {
this.lifeGainedThisTurn = n;
}
/**
* <p>
* Getter for the field <code>lifeLostThisTurn</code>.