Add Deathless Knight

This commit is contained in:
swordshine
2019-09-21 19:17:28 +08:00
parent 70398d8d15
commit facb93945e
3 changed files with 20 additions and 0 deletions

View File

@@ -999,6 +999,9 @@ public class CardFactoryUtil {
if (sq[0].contains("LifeYourTeamGainedThisTurn")) {
return doXMath(cc.getLifeGainedByTeamThisTurn(), m, c);
}
if (sq[0].contains("LifeYouGainedTimesThisTurn")) {
return doXMath(cc.getLifeGainedTimesThisTurn(), m, c);
}
if (sq[0].contains("LifeOppsLostThisTurn")) {
return doXMath(cc.getOpponentLostLifeThisTurn(), m, c);
}

View File

@@ -93,6 +93,7 @@ public class Player extends GameEntity implements Comparable<Player> {
private int lifeLostThisTurn = 0;
private int lifeLostLastTurn = 0;
private int lifeGainedThisTurn = 0;
private int lifeGainedTimesThisTurn = 0;
private int lifeGainedByTeamThisTurn = 0;
private int numPowerSurgeLands;
private int numLibrarySearchedOwn = 0; //The number of times this player has searched his library
@@ -440,6 +441,7 @@ public class Player extends GameEntity implements Comparable<Player> {
view.updateLife(this);
newLifeSet = true;
lifeGainedThisTurn += lifeGain;
lifeGainedTimesThisTurn++;
// team mates need to be notified about life gained
for (final Player p : getTeamMates(true)) {
@@ -2242,6 +2244,10 @@ public class Player extends GameEntity implements Comparable<Player> {
lifeGainedThisTurn = n;
}
public final int getLifeGainedTimesThisTurn() {
return lifeGainedTimesThisTurn;
}
public final int getLifeLostThisTurn() {
return lifeLostThisTurn;
}
@@ -2935,6 +2941,7 @@ public class Player extends GameEntity implements Comparable<Player> {
setLifeLostLastTurn(getLifeLostThisTurn());
setLifeLostThisTurn(0);
lifeGainedThisTurn = 0;
lifeGainedTimesThisTurn = 0;
lifeGainedByTeamThisTurn = 0;
setLibrarySearched(0);
setNumManaConversion(0);

View File

@@ -0,0 +1,10 @@
Name:Deathless Knight
ManaCost:B/G B/G B/G B/G
Types:Creature Skeleton Knight
PT:4/2
K:Haste
T:Mode$ LifeGained | ValidPlayer$ You | TriggerZones$ Graveyard | CheckSVar$ X | SVarCompare$ EQ1 | NoResolvingCheck$ True | Execute$ TrigReturn | TriggerDescription$ Whenever you gain life for the first time each turn, return CARDNAME from your graveyard to your hand.
SVar:TrigReturn:DB$ ChangeZone | Defined$ Self | Origin$ Graveyard | Destination$ Hand
SVar:X:Count$LifeYouGainedTimesThisTurn
DeckHints:Ability$LifeGain
Oracle:Haste\nWhenever you gain life for the first time each turn, return Deathless Knight from your graveyard to your hand.