mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
Fix cards depending on damage dealt to opponents for multiplayer games.
Remove unused Count nr of lands played by opponent.
This commit is contained in:
@@ -999,10 +999,11 @@ public class CardFactoryUtil {
|
||||
if (sq[0].equals("TotalDamageReceivedThisTurn")) return doXMath(c.getTotalDamageRecievedThisTurn(), m, c);
|
||||
|
||||
if (sq[0].contains("YourPoisonCounters")) return doXMath(cc.getPoisonCounters(), m, c);
|
||||
if (sq[0].contains("TotalOppPoisonCounters")) return doXMath(cc.getOpponentsTotalPoisonCounters(), m, c);
|
||||
if (sq[0].contains("TotalOppPoisonCounters")) return doXMath(cc.getOpponentsTotalPoisonCounters(), m, c);
|
||||
|
||||
if (sq[0].contains("OppDamageThisTurn")) return doXMath(ccOpp.getAssignedDamage(), m, c);
|
||||
if (sq[0].contains("YourDamageThisTurn")) return doXMath(cc.getAssignedDamage(), m, c);
|
||||
if (sq[0].contains("TotalOppDamageThisTurn")) return doXMath(cc.getOpponentsAssignedDamage(), m, c);
|
||||
if (sq[0].contains("MaxOppDamageThisTurn")) return doXMath(cc.getMaxOpponentAssignedDamage(), m, c);
|
||||
|
||||
// Count$YourTypeDamageThisTurn Type
|
||||
if (sq[0].contains("YourTypeDamageThisTurn")) return doXMath(cc.getAssignedDamage(sq[0].split(" ")[1]), m, c);
|
||||
@@ -1014,7 +1015,6 @@ public class CardFactoryUtil {
|
||||
}
|
||||
|
||||
if (sq[0].contains("YourLandsPlayed")) return doXMath(cc.getNumLandsPlayed(), m, c);
|
||||
if (sq[0].contains("OppLandsPlayed")) return doXMath(ccOpp.getNumLandsPlayed(), m, c);
|
||||
|
||||
// Count$TopOfLibraryCMC
|
||||
if (sq[0].contains("TopOfLibraryCMC")) {
|
||||
|
||||
@@ -1023,6 +1023,24 @@ public class Player extends GameEntity implements Comparable<Player> {
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the total damage assigned to this player's opponents this turn.
|
||||
*
|
||||
* @return the total damage assigned to this player's opponents this turn.
|
||||
*/
|
||||
public final int getOpponentsAssignedDamage() {
|
||||
return Aggregates.sum(this.getOpponents(), Accessors.FN_GET_ASSIGNED_DAMAGE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the greatest amount of damage assigned to a single opponent this turn.
|
||||
*
|
||||
* @return the greatest amount of damage assigned to a single opponent this turn.
|
||||
*/
|
||||
public final int getMaxOpponentAssignedDamage() {
|
||||
return Aggregates.max(this.getOpponents(), Accessors.FN_GET_ASSIGNED_DAMAGE);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -2738,6 +2756,12 @@ public class Player extends GameEntity implements Comparable<Player> {
|
||||
return input.getPoisonCounters();
|
||||
}
|
||||
};
|
||||
public static final Function<Player, Integer> FN_GET_ASSIGNED_DAMAGE = new Function<Player, Integer>() {
|
||||
@Override
|
||||
public Integer apply(Player input) {
|
||||
return input.getAssignedDamage();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,6 +3,6 @@ ManaCost:R
|
||||
Types:Creature Goblin Berserker
|
||||
PT:2/2
|
||||
S:Mode$ Continuous | Affected$ Card.Self | AddKeyword$ CARDNAME can't attack. | CheckSVar$ X | SVarCompare$ LT1 | Description$ CARDNAME can't attack unless an opponent has been dealt damage this turn.
|
||||
SVar:X:Count$OppDamageThisTurn
|
||||
SVar:X:Count$TotalOppDamageThisTurn
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/bloodcrazed_goblin.jpg
|
||||
Oracle:Bloodcrazed Goblin can't attack unless an opponent has been dealt damage this turn.
|
||||
|
||||
@@ -4,7 +4,7 @@ Types:Tribal Sorcery Rogue
|
||||
SVar:AltCost:Cost$ 5 U | Activation$ Prowl | Description$ Prowl {5}{U} (You may cast this for its prowl cost if you dealt combat damage to a player this turn with a Rogue.)
|
||||
A:SP$ Token | Cost$ 3 U | TokenAmount$ X | References$ X | TokenColors$ Black | TokenTypes$ Faerie,Rogue,Creature | TokenName$ Faerie Rogue | TokenOwner$ You | TokenPower$ 1 | TokenToughness$ 1 | TokenKeywords$ Flying | SubAbility$ DBTakeTurn | SpellDescription$ Put X 1/1 black Faerie Rogue creature tokens with flying onto the battlefield, where X is the damage dealt to your opponents this turn. If CARDNAME's prowl cost was paid, take an extra turn after this one.
|
||||
SVar:DBTakeTurn:DB$ AddTurn | NumTurns$ 1 | Condition$ AltCost
|
||||
SVar:X:Count$OppDamageThisTurn
|
||||
SVar:X:Count$TotalOppDamageThisTurn
|
||||
SVar:RemAIDeck:True
|
||||
SVar:RemRandomDeck:True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/notorious_throng.jpg
|
||||
|
||||
@@ -4,7 +4,7 @@ Types:Creature Phoenix
|
||||
PT:3/3
|
||||
K:Bloodthirst 3
|
||||
K:Flying
|
||||
A:AB$ ChangeZone | Cost$ R R R | Origin$ Graveyard | Destination$ Hand | ActivationZone$ Graveyard | CheckSVar$ OppDamaged | SVarCompare$ GE1 | SpellDescription$ Return CARDNAME from your graveyard to your hand. Activate this ability only if an opponent was dealt damage this turn.
|
||||
SVar:OppDamaged:Count$OppDamageThisTurn
|
||||
A:AB$ ChangeZone | Cost$ R R R | Origin$ Graveyard | Destination$ Hand | ActivationZone$ Graveyard | CheckSVar$ OppDamaged | SVarCompare$ GE1 | References$ OppDamaged | SpellDescription$ Return CARDNAME from your graveyard to your hand. Activate this ability only if an opponent was dealt damage this turn.
|
||||
SVar:OppDamaged:Count$TotalOppDamageThisTurn
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/skarrgan_firebird.jpg
|
||||
Oracle:Bloodthirst 3 (If an opponent was dealt damage this turn, this creature enters the battlefield with three +1/+1 counters on it.)\nFlying\n{R}{R}{R}: Return Skarrgan Firebird from your graveyard to your hand. Activate this ability only if an opponent was dealt damage this turn.
|
||||
|
||||
@@ -6,7 +6,7 @@ T:Mode$ ChangesZone | Destination$ Battlefield | ValidCard$ Card.Self | Execute$
|
||||
SVar:TrigDig:AB$ Dig | Cost$ 0 | Defined$ You | DigNum$ 4 | DestinationZone$ Exile | ExileFaceDown$ True | RememberChanged$ True
|
||||
A:AB$ Mana | Cost$ T | Produced$ R | SpellDescription$ Add {R} to your mana pool.
|
||||
A:AB$ Play | Cost$ R T | Defined$ Remembered | Amount$ All | Controller$ You | WithoutManaCost$ True | Optional$ True | ConditionCheckSVar$ X | ConditionSVarCompare$ GE7 | References$ X | ForgetRemembered$ True | SpellDescription$ You may play the exiled card without paying its mana cost if an opponent was dealt 7 or more damage this turn.
|
||||
SVar:X:Count$OppDamageThisTurn
|
||||
SVar:X:Count$MaxOppDamageThisTurn
|
||||
SVar:RemRandomDeck:True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/spinerock_knoll.jpg
|
||||
Oracle:Hideaway (This land enters the battlefield tapped. When it does, look at the top four cards of your library, exile one face down, then put the rest on the bottom of your library.)\n{T}: Add {R} to your mana pool.\n{R}, {T}: You may play the exiled card without paying its mana cost if an opponent was dealt 7 or more damage this turn.
|
||||
|
||||
@@ -4,7 +4,7 @@ Types:Creature Elemental
|
||||
PT:1/1
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigSac | TriggerDescription$ When CARDNAME enters the battlefield, sacrifice it unless an opponent was dealt damage this turn.
|
||||
SVar:TrigSac:AB$ Sacrifice | Cost$ 0 | Defined$ Self | ConditionCheckSVar$ WarElementalX | ConditionSVarCompare$ EQ0 | References$ WarElementalX
|
||||
SVar:WarElementalX:Count$OppDamageThisTurn
|
||||
SVar:WarElementalX:Count$TotalOppDamageThisTurn
|
||||
T:Mode$ DamageDone | ValidSource$ Card | ValidTarget$ Opponent | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ Whenever an opponent is dealt damage, put that many +1/+1 counters on CARDNAME.
|
||||
SVar:TrigPutCounter:AB$ PutCounter | Cost$ 0 | Defined$ Self | CounterType$ P1P1 | CounterNum$ WarElementalY | References$ WarElementalY
|
||||
SVar:WarElementalY:TriggerCount$DamageAmount
|
||||
|
||||
Reference in New Issue
Block a user