Merge branch 'fixing' into 'master'

Card fixes

See merge request core-developers/forge!6008
This commit is contained in:
Hans Mackowiak
2022-01-03 10:03:33 +00:00
11 changed files with 16 additions and 18 deletions

View File

@@ -519,7 +519,7 @@ public abstract class SpellAbilityEffect {
String valid = sa.getParamOrDefault("ReplaceDyingValid", "Card.IsRemembered"); String valid = sa.getParamOrDefault("ReplaceDyingValid", "Card.IsRemembered");
String repeffstr = "Event$ Moved | ValidCard$ " + valid + String repeffstr = "Event$ Moved | ValidLKI$ " + valid +
"| Origin$ Battlefield | Destination$ Graveyard " + "| Origin$ Battlefield | Destination$ Graveyard " +
"| Description$ If that permanent would die this turn, exile it instead."; "| Description$ If that permanent would die this turn, exile it instead.";
String effect = "DB$ ChangeZone | Defined$ ReplacedCard | Origin$ Battlefield | Destination$ " + zone; String effect = "DB$ ChangeZone | Defined$ ReplacedCard | Origin$ Battlefield | Destination$ " + zone;

View File

@@ -24,7 +24,6 @@ public class ReplaceCounterEffect extends SpellAbilityEffect {
@Override @Override
public void resolve(SpellAbility sa) { public void resolve(SpellAbility sa) {
final Card card = sa.getHostCard(); final Card card = sa.getHostCard();
// outside of Replacement Effect, unwanted result // outside of Replacement Effect, unwanted result
@@ -64,8 +63,6 @@ public class ReplaceCounterEffect extends SpellAbilityEffect {
counterTable.get(p).put(e.getKey(), value); counterTable.get(p).put(e.getKey(), value);
} }
} }
} else { } else {
for (Map.Entry<Optional<Player>, Map<CounterType, Integer>> e : counterTable.entrySet()) { for (Map.Entry<Optional<Player>, Map<CounterType, Integer>> e : counterTable.entrySet()) {
if (!sa.matchesValidParam("ValidSource", e.getKey().orNull())) { if (!sa.matchesValidParam("ValidSource", e.getKey().orNull())) {

View File

@@ -2968,7 +2968,7 @@ public class CardFactoryUtil {
final String manacost = k[1]; final String manacost = k[1];
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("AB$ PutCounter| Cost$ ").append(manacost); sb.append("AB$ PutCounter | Cost$ ").append(manacost);
sb.append(" | PrecostDesc$ Level Up | CostDesc$ ").append(ManaCostParser.parse(manacost)); sb.append(" | PrecostDesc$ Level Up | CostDesc$ ").append(ManaCostParser.parse(manacost));
sb.append(" | SorcerySpeed$ True | LevelUp$ True | CounterNum$ 1 | CounterType$ LEVEL"); sb.append(" | SorcerySpeed$ True | LevelUp$ True | CounterNum$ 1 | CounterType$ LEVEL");
if (card.hasSVar("maxLevel")) { if (card.hasSVar("maxLevel")) {

View File

@@ -1935,12 +1935,7 @@ public class Player extends GameEntity implements Comparable<Player> {
return getOutcome().lossState != null; return getOutcome().lossState != null;
} }
// Rule 704.5a - If a player has 0 or less life, he or she loses the game. // check this first because of Lich's Mirror (704.7)
final boolean hasNoLife = getLife() <= 0;
if (hasNoLife && !cantLoseForZeroOrLessLife()) {
return loseConditionMet(GameLossReason.LifeReachedZero, null);
}
// Rule 704.5b - If a player attempted to draw a card from a library with no cards in it // Rule 704.5b - If a player attempted to draw a card from a library with no cards in it
// since the last time state-based actions were checked, he or she loses the game. // since the last time state-based actions were checked, he or she loses the game.
if (triedToDrawFromEmptyLibrary) { if (triedToDrawFromEmptyLibrary) {
@@ -1951,6 +1946,12 @@ public class Player extends GameEntity implements Comparable<Player> {
} }
} }
// Rule 704.5a - If a player has 0 or less life, he or she loses the game.
final boolean hasNoLife = getLife() <= 0;
if (hasNoLife && !cantLoseForZeroOrLessLife()) {
return loseConditionMet(GameLossReason.LifeReachedZero, null);
}
// Rule 704.5c - If a player has ten or more poison counters, he or she loses the game. // Rule 704.5c - If a player has ten or more poison counters, he or she loses the game.
if (getCounters(CounterEnumType.POISON) >= 10) { if (getCounters(CounterEnumType.POISON) >= 10) {
return loseConditionMet(GameLossReason.Poisoned, null); return loseConditionMet(GameLossReason.Poisoned, null);

View File

@@ -2,7 +2,7 @@ Name:Gisa, Glorious Resurrector
ManaCost:2 B B ManaCost:2 B B
Types:Legendary Creature Human Wizard Types:Legendary Creature Human Wizard
PT:4/4 PT:4/4
R:Event$ Moved | ActiveZones$ Battlefield | CheckSelfLKIZone$ True | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Creature.OppCtrl | ReplaceWith$ Exile | Description$ If a creature an opponent controls would die, exile it instead. R:Event$ Moved | ActiveZones$ Battlefield | CheckSelfLKIZone$ True | Origin$ Battlefield | Destination$ Graveyard | ValidLKI$ Creature.OppCtrl | ReplaceWith$ Exile | Description$ If a creature an opponent controls would die, exile it instead.
SVar:Exile:DB$ ChangeZone | Hidden$ True | Origin$ All | Destination$ Exile | Defined$ ReplacedCard SVar:Exile:DB$ ChangeZone | Hidden$ True | Origin$ All | Destination$ Exile | Defined$ ReplacedCard
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | IsPresent$ Card.ExiledWithSource | PresentZone$ Exile | Execute$ TrigChange | TriggerDescription$ At the beginning of your upkeep, put all creature cards exiled with CARDNAME onto the battlefield under your control. They gain decayed. (A creature with decayed can't block. When it attacks, sacrifice it at end of combat.) T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | IsPresent$ Card.ExiledWithSource | PresentZone$ Exile | Execute$ TrigChange | TriggerDescription$ At the beginning of your upkeep, put all creature cards exiled with CARDNAME onto the battlefield under your control. They gain decayed. (A creature with decayed can't block. When it attacks, sacrifice it at end of combat.)
SVar:TrigChange:DB$ ChangeZoneAll | ChangeType$ Card.ExiledWithSource | Origin$ Exile | Destination$ Battlefield | GainControl$ True | RememberChanged$ True | SubAbility$ DBPump SVar:TrigChange:DB$ ChangeZoneAll | ChangeType$ Card.ExiledWithSource | Origin$ Exile | Destination$ Battlefield | GainControl$ True | RememberChanged$ True | SubAbility$ DBPump

View File

@@ -1,7 +1,7 @@
Name:Hardened Scales Name:Hardened Scales
ManaCost:G ManaCost:G
Types:Enchantment Types:Enchantment
R:Event$ AddCounter | ActiveZones$ Battlefield | ValidCard$ Creature.YouCtrl+InZoneBattlefield | ValidCounterType$ P1P1 | ReplaceWith$ AddOneMoreCounters | Description$ If one or more +1/+1 counters would be put on a creature you control, that many plus one +1/+1 counters are put on it instead. R:Event$ AddCounter | ActiveZones$ Battlefield | ValidCard$ Creature.YouCtrl+inZoneBattlefield | ValidCounterType$ P1P1 | ReplaceWith$ AddOneMoreCounters | Description$ If one or more +1/+1 counters would be put on a creature you control, that many plus one +1/+1 counters are put on it instead.
SVar:AddOneMoreCounters:DB$ ReplaceCounter | ValidCounterType$ P1P1 | ChooseCounter$ True | Amount$ X SVar:AddOneMoreCounters:DB$ ReplaceCounter | ValidCounterType$ P1P1 | ChooseCounter$ True | Amount$ X
SVar:X:ReplaceCount$CounterNum/Plus.1 SVar:X:ReplaceCount$CounterNum/Plus.1
AI:RemoveDeck:Random AI:RemoveDeck:Random

View File

@@ -1,7 +1,7 @@
Name:Rite of Flame Name:Rite of Flame
ManaCost:R ManaCost:R
Types:Sorcery Types:Sorcery
A:SP$ Mana | Produced$ R | Amount$ 2 | AILogic$ ManaRitual | AINoRecursiveCheck$ True | SpellDescription$ Add {R}{R}, then add {R} for each card named CARDNAME in each graveyard. A:SP$ Mana | Produced$ R | Amount$ 2 | AILogic$ ManaRitual | AINoRecursiveCheck$ True | SubAbility$ SubMana | SpellDescription$ Add {R}{R}, then add {R} for each card named CARDNAME in each graveyard.
SVar:SubMana:DB$ Mana | Produced$ R | Amount$ X SVar:SubMana:DB$ Mana | Produced$ R | Amount$ X
SVar:X:Count$NamedInAllYards.Rite of Flame SVar:X:Count$NamedInAllYards.Rite of Flame
DeckHints:Name$Rite of Flame DeckHints:Name$Rite of Flame

View File

@@ -2,5 +2,5 @@ Name:Submerged Boneyard
ManaCost:no cost ManaCost:no cost
Types:Land Types:Land
K:CARDNAME enters the battlefield tapped. K:CARDNAME enters the battlefield tapped.
A:AB$ Mana | Cost$ T | Produced$ Combo U | SpellDescription$ Add {U} or {B}. A:AB$ Mana | Cost$ T | Produced$ Combo U B | SpellDescription$ Add {U} or {B}.
Oracle:Submerged Boneyard enters the battlefield tapped.\n{T}: Add {U} or {B}. Oracle:Submerged Boneyard enters the battlefield tapped.\n{T}: Add {U} or {B}.

View File

@@ -4,7 +4,7 @@ Types:Legendary Creature Vampire Warlock
PT:1/1 PT:1/1
K:Menace K:Menace
K:Lifelink K:Lifelink
R:Event$ Moved | ActiveZones$ Battlefield | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Creature+nonToken+OppOwn | ReplaceWith$ Exile | Description$ If a nontoken creature an opponent controls would die, exile it instead. When you do, you may pay {2}. If you do, create a 1/1 black and green Pest creature token with "When this creature dies, you gain 1 life." R:Event$ Moved | ActiveZones$ Battlefield | Origin$ Battlefield | Destination$ Graveyard | ValidLKI$ Card.Creature+nonToken+OppOwn | ReplaceWith$ Exile | Description$ If a nontoken creature an opponent controls would die, exile it instead. When you do, you may pay {2}. If you do, create a 1/1 black and green Pest creature token with "When this creature dies, you gain 1 life."
SVar:Exile:DB$ ChangeZone | Hidden$ True | Origin$ All | Destination$ Exile | Defined$ ReplacedCard | SubAbility$ DBImmediateTrigger SVar:Exile:DB$ ChangeZone | Hidden$ True | Origin$ All | Destination$ Exile | Defined$ ReplacedCard | SubAbility$ DBImmediateTrigger
SVar:DBImmediateTrigger:DB$ ImmediateTrigger | Execute$ TrigToken | TriggerDescription$ If a nontoken creature an opponent controls would die, exile it instead. When you do, you may pay {2}. If you do, create a 1/1 black and green Pest creature token with "When this creature dies, you gain 1 life." SVar:DBImmediateTrigger:DB$ ImmediateTrigger | Execute$ TrigToken | TriggerDescription$ If a nontoken creature an opponent controls would die, exile it instead. When you do, you may pay {2}. If you do, create a 1/1 black and green Pest creature token with "When this creature dies, you gain 1 life."
SVar:TrigToken:AB$ Token | Cost$ 2 | TokenAmount$ 1 | TokenScript$ bg_1_1_pest_lifegain | TokenOwner$ You SVar:TrigToken:AB$ Token | Cost$ 2 | TokenAmount$ 1 | TokenScript$ bg_1_1_pest_lifegain | TokenOwner$ You

View File

@@ -3,7 +3,7 @@ ManaCost:4 B B
Types:Creature Horror Types:Creature Horror
PT:4/5 PT:4/5
K:Trample K:Trample
R:Event$ Moved | ActiveZones$ Battlefield | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Creature.Other | ReplaceWith$ Exile | Description$ If another creature would die, exile it instead. R:Event$ Moved | ActiveZones$ Battlefield | Origin$ Battlefield | Destination$ Graveyard | ValidLKI$ Creature.Other | ReplaceWith$ Exile | Description$ If another creature would die, exile it instead.
SVar:Exile:DB$ ChangeZone | Hidden$ True | Origin$ All | Destination$ Exile | Defined$ ReplacedCard | SubAbility$ DBRemember | RememberChanged$ True SVar:Exile:DB$ ChangeZone | Hidden$ True | Origin$ All | Destination$ Exile | Defined$ ReplacedCard | SubAbility$ DBRemember | RememberChanged$ True
SVar:DBRemember:DB$ Pump | ConditionDefined$ Remembered | ConditionPresent$ Card.inZoneExile | ConditionCompare$ GE1 SVar:DBRemember:DB$ Pump | ConditionDefined$ Remembered | ConditionPresent$ Card.inZoneExile | ConditionCompare$ GE1
T:Mode$ ChangesZone | Origin$ Exile | Destination$ Any | Static$ True | ValidCard$ Card.IsRemembered+ExiledWithSource | Execute$ DBForget T:Mode$ ChangesZone | Origin$ Exile | Destination$ Any | Static$ True | ValidCard$ Card.IsRemembered+ExiledWithSource | Execute$ DBForget

View File

@@ -3,7 +3,7 @@ ManaCost:1
Types:Legendary Artifact Creature Insect Types:Legendary Artifact Creature Insect
PT:0/0 PT:0/0
K:Modular:1 K:Modular:1
R:Event$ AddCounter | ActiveZones$ Battlefield | ValidCause$ Triggered.Modular | ValidCard$ Creature.YouCtrl+InZoneBattlefield | ValidCounterType$ P1P1 | ReplaceWith$ AddOneMoreCounter | Description$ If a modular triggered ability would put one or more +1/+1 counters on a creature you control, that many plus one +1/+1 counters are put on it instead. R:Event$ AddCounter | ActiveZones$ Battlefield | ValidCause$ Triggered.Modular | ValidCard$ Creature.YouCtrl+inZoneBattlefield | ValidCounterType$ P1P1 | ReplaceWith$ AddOneMoreCounter | Description$ If a modular triggered ability would put one or more +1/+1 counters on a creature you control, that many plus one +1/+1 counters are put on it instead.
SVar:AddOneMoreCounter:DB$ ReplaceCounter | ValidCounterType$ P1P1 | ChooseCounter$ True | Amount$ X SVar:AddOneMoreCounter:DB$ ReplaceCounter | ValidCounterType$ P1P1 | ChooseCounter$ True | Amount$ X
SVar:X:ReplaceCount$CounterNum/Plus.1 SVar:X:ReplaceCount$CounterNum/Plus.1
A:AB$ Destroy | Cost$ R | ValidTgts$ Artifact.YouCtrl | TgtPrompt$ Choose target artifact you control | SpellDescription$ Destroy target artifact you control. A:AB$ Destroy | Cost$ R | ValidTgts$ Artifact.YouCtrl | TgtPrompt$ Choose target artifact you control | SpellDescription$ Destroy target artifact you control.