mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
Merge branch 'sengir' into 'master'
CMR: Sengir, the Dark Baron + Curse of Vengeance Closes #1334, #50, and #1545 See merge request core-developers/forge!3391
This commit is contained in:
@@ -609,9 +609,15 @@ public class CardFactoryUtil {
|
||||
if (value.contains("LifeGainedThisTurn")) {
|
||||
return doXMath(player.getLifeGainedThisTurn(), m, source);
|
||||
}
|
||||
|
||||
if (value.contains("LifeGainedByTeamThisTurn")) {
|
||||
return doXMath(player.getLifeGainedByTeamThisTurn(), m, source);
|
||||
}
|
||||
|
||||
if (value.contains("LifeStartedThisTurnWith")) {
|
||||
return doXMath(player.getLifeStartedThisTurnWith(), m, source);
|
||||
}
|
||||
|
||||
if (value.contains("PoisonCounters")) {
|
||||
return doXMath(player.getPoisonCounters(), m, source);
|
||||
}
|
||||
|
||||
@@ -82,6 +82,7 @@ public class Player extends GameEntity implements Comparable<Player> {
|
||||
|
||||
private int life = 20;
|
||||
private int startingLife = 20;
|
||||
private int lifeStartedThisTurnWith = startingLife;
|
||||
private final Map<Card, Integer> assignedDamage = Maps.newHashMap();
|
||||
private final Map<Card, Integer> assignedCombatDamage = Maps.newHashMap();
|
||||
private int spellsCastThisTurn = 0;
|
||||
@@ -1660,6 +1661,13 @@ public class Player extends GameEntity implements Comparable<Player> {
|
||||
numCardsInHandStartedThisTurnWith = num;
|
||||
}
|
||||
|
||||
public int getLifeStartedThisTurnWith() {
|
||||
return lifeStartedThisTurnWith;
|
||||
}
|
||||
public void setLifeStartedThisTurnWith(int l) {
|
||||
lifeStartedThisTurnWith = l;
|
||||
}
|
||||
|
||||
public void addNoteForName(String notedFor, String noted) {
|
||||
if (!notes.containsKey(notedFor)) {
|
||||
notes.put(notedFor, new FCollection<>());
|
||||
@@ -2166,10 +2174,6 @@ public class Player extends GameEntity implements Comparable<Player> {
|
||||
|
||||
@Override
|
||||
public final boolean isValid(final String restriction, final Player sourceController, final Card source, SpellAbility spellAbility) {
|
||||
// if the current player has already lost the game, he can't be a valid target
|
||||
if (hasLost()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final String[] incR = restriction.split("\\.", 2);
|
||||
|
||||
@@ -3265,6 +3269,7 @@ public class Player extends GameEntity implements Comparable<Player> {
|
||||
lifeGainedThisTurn = 0;
|
||||
lifeGainedTimesThisTurn = 0;
|
||||
lifeGainedByTeamThisTurn = 0;
|
||||
setLifeStartedThisTurnWith(getLife());
|
||||
setLibrarySearched(0);
|
||||
setNumManaConversion(0);
|
||||
|
||||
|
||||
13
forge-gui/res/cardsfolder/c/curse_of_vengeance.txt
Normal file
13
forge-gui/res/cardsfolder/c/curse_of_vengeance.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
Name:Curse of Vengeance
|
||||
ManaCost:B
|
||||
Types:Enchantment Aura Curse
|
||||
K:Enchant player
|
||||
A:SP$ Attach | Cost$ B | ValidTgts$ Player | AILogic$ Curse
|
||||
T:Mode$ SpellCast | ValidCard$ Card | ValidActivatingPlayer$ Player.EnchantedBy | Execute$ TrigPutCounter | TriggerZones$ Battlefield | TriggerDescription$ Whenever enchanted player casts a spell, put a spite counter on CARDNAME.
|
||||
SVar:TrigPutCounter:DB$ PutCounter | Defined$ Self | CounterType$ SPITE | CounterNum$ 1
|
||||
T:Mode$ LosesGame | ValidPlayer$ Player.EnchantedBy | Execute$ TrigGainLife | TriggerDescription$ When enchanted player loses the game, you gain X life and draw X cards, where X is the number of spite counters on CARDNAME.
|
||||
SVar:TrigGainLife:DB$ GainLife | Defined$ You | LifeAmount$ X | References$ X | SubAbility$ DBDraw
|
||||
SVar:DBDraw:DB$ Draw | Defined$ You | NumCards$ X | References$ X
|
||||
SVar:X:Count$CardCounters.SPITE
|
||||
DeckHas:Ability$Counters & Ability$LifeGain
|
||||
Oracle:Enchant player\nWhenever enchanted player casts a spell, put a spite counter on Curse of Vengeance. When enchanted player loses the game, you gain X life and draw X cards, where X is the number of spite counters on Curse of Vengeance.
|
||||
13
forge-gui/res/cardsfolder/upcoming/sengir_the_dark_baron.txt
Normal file
13
forge-gui/res/cardsfolder/upcoming/sengir_the_dark_baron.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
Name:Sengir, the Dark Baron
|
||||
ManaCost:4 B B
|
||||
Types:Legendary Creature Vampire Noble
|
||||
PT:4/4
|
||||
K:Flying
|
||||
K:Partner
|
||||
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Creature.Other | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ Whenever another creature dies, put two +1/+1 counters on CARDNAME.
|
||||
SVar:TrigPutCounter:DB$ PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ 2
|
||||
T:Mode$ LosesGame | ValidPlayer$ Player.Other | Execute$ TrigGainLife | TriggerDescription$ Whenever another player loses the game, you gain life equal to that player's life total as the turn began.
|
||||
SVar:TrigGainLife:DB$ GainLife | Defined$ You | LifeAmount$ X | References$ X
|
||||
SVar:X:TriggeredPlayer$LifeStartedThisTurnWith
|
||||
DeckHas:Ability$Counters
|
||||
Oracle:Whenever another creature dies, put two +1/+1 counters on Sengir, the Dark Baron.\nWhenever another player loses the game, you gain life equal to that player's life total as the turn began.\nPartner (You can have two commanders if both have partner.)
|
||||
Reference in New Issue
Block a user