Some fixes (#5230)

* Fix bad Discord change

* Fix Risen Executioner using X shard

* Fix Marshland Bloodcaster

* Clean up
This commit is contained in:
tool4ever
2024-05-12 14:11:06 +02:00
committed by GitHub
parent a20c0e8ccf
commit 9b54ecfe12
11 changed files with 17 additions and 17 deletions

View File

@@ -32,6 +32,7 @@ import org.apache.commons.lang3.StringUtils;
import forge.card.MagicColor;
import forge.card.mana.ManaCost;
import forge.game.ability.AbilityFactory;
import forge.game.ability.AbilityUtils;
import forge.game.ability.ApiType;
import forge.game.ability.SpellAbilityEffect;
import forge.game.card.CardPlayOption.PayManaCost;
@@ -317,6 +318,9 @@ public final class GameActionUtil {
if (o.getAbility().hasParam("ValidAfterStack")) {
newSA.getMapParams().put("ValidAfterStack", o.getAbility().getParam("ValidAfterStack"));
}
if (o.getAbility().hasParam("RaiseCost")) {
newSA.getMapParams().put("RaiseCost", Integer.toString(AbilityUtils.calculateAmount(host, o.getAbility().getParam("RaiseCost"), o.getAbility())));
}
final SpellAbilityRestriction sar = newSA.getRestrictions();
if (o.isWithFlash()) {

View File

@@ -170,8 +170,6 @@ public class PlayEffect extends SpellAbilityEffect {
Card card = Card.fromPaperCard(StaticData.instance().getCommonCards().getUniqueByName(name), controller);
// so it gets added to stack
card.setCopiedPermanent(card);
// Keeps adventures from leaving the recast effect
card.setCopiedSpell(true);
card.setToken(true);
tgtCards = new CardCollection(card);
} else {
@@ -287,7 +285,6 @@ public class PlayEffect extends SpellAbilityEffect {
tgtCard.setZone(zone);
// to fix the CMC
tgtCard.setCopiedPermanent(original);
tgtCard.setCopiedSpell(true);
if (zone != null) {
zone.add(tgtCard);
}

View File

@@ -4012,7 +4012,7 @@ public class CardFactoryUtil {
SpellAbility saExile = AbilityFactory.getAbility(abExile, card);
String abEffect = "DB$ Effect | RememberObjects$ Self | StaticAbilities$ Play | ForgetOnMoved$ Exile | Duration$ Permanent | ConditionDefined$ Self | ConditionPresent$ Card.nonCopiedSpell";
String abEffect = "DB$ Effect | RememberObjects$ Self | StaticAbilities$ Play | ForgetOnMoved$ Exile | Duration$ Permanent | ConditionDefined$ Self | ConditionPresent$ Card.nonCopiedSpell+nonToken";
AbilitySub saEffect = (AbilitySub)AbilityFactory.getAbility(abEffect, card);
StringBuilder sbPlay = new StringBuilder();

View File

@@ -39,6 +39,7 @@ public class StaticAbilityAlternativeCost {
newSA.setBasicSpell(false);
if (cost.hasXInAnyCostPart()) {
// TODO this is problematic for Spells that already have (non-mana) X SVar
newSA.setSVar("X", stAb.getSVar("X"));
}
@@ -50,7 +51,9 @@ public class StaticAbilityAlternativeCost {
newSA.putParam("ManaRestriction", stAb.getParam("ManaRestriction"));
}
if (stAb.hasParam("EffectZone") && !"All".equals(stAb.getParam("EffectZone"))) {
if (stAb.hasParam("AffectedZone")) {
newSA.getRestrictions().setZone(ZoneType.smartValueOf(stAb.getParam("AffectedZone")));
} else if (!stAb.getHostCard().isImmutable() && stAb.hasParam("EffectZone") && !"All".equals(stAb.getParam("EffectZone"))) {
newSA.getRestrictions().setZone(ZoneType.smartValueOf(stAb.getParam("EffectZone")));
}

View File

@@ -32,7 +32,6 @@ import forge.game.keyword.Keyword;
import forge.game.phase.PhaseHandler;
import forge.game.phase.PhaseType;
import forge.game.player.Player;
import forge.game.spellability.OptionalCost;
import forge.game.spellability.SpellAbility;
import forge.game.zone.CostPaymentStack;
import forge.game.zone.ZoneType;
@@ -398,11 +397,7 @@ public abstract class Trigger extends TriggerReplacementBase {
}
}
if ("AltCost".equals(condition)) {
final Card moved = (Card) runParams.get(AbilityKey.Card);
if (null != moved && !moved.isOptionalCostPaid(OptionalCost.AltCost))
return false;
} else if ("LifePaid".equals(condition)) {
if ("LifePaid".equals(condition)) {
final SpellAbility trigSA = (SpellAbility) runParams.get(AbilityKey.SpellAbility);
if (trigSA != null && trigSA.getAmountLifePaid() <= 0) {
return false;

View File

@@ -7,7 +7,7 @@ T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigExile | TriggerZones$ Batt
SVar:TrigExile:DB$ ChangeZone | TargetMin$ 0 | TargetMax$ 1 | Origin$ Graveyard | Destination$ Exile | TgtPrompt$ Choose up to one target instant or sorcery card in your graveyard | ValidTgts$ Instant.YouCtrl,Sorcery.YouCtrl | RememberChanged$ True | SubAbility$ DBPlay
SVar:DBPlay:DB$ Play | Defined$ Remembered | ValidSA$ Spell | Optional$ True | CopyCard$ True | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
S:Mode$ Continuous | Affected$ Card.Self | MayPlay$ True | AffectedZone$ Graveyard | EffectZone$ Graveyard | MayPlayAltManaCost$ U U U U ExileFromGrave<4/Instant;Sorcery/instant or sorcery cards> | ActivationZone$ Graveyard | Description$ You may cast CARDNAME from your graveyard by exiling four instant and/or sorcery cards from your graveyard in addition to paying its other costs.
S:Mode$ Continuous | Affected$ Card.Self | MayPlay$ True | AffectedZone$ Graveyard | EffectZone$ Graveyard | MayPlayAltManaCost$ U U U U ExileFromGrave<4/Instant;Sorcery/instant or sorcery cards> | Description$ You may cast CARDNAME from your graveyard by exiling four instant and/or sorcery cards from your graveyard in addition to paying its other costs.
SVar:X:Count$ThisTurnCast_Instant.YouCtrl,Sorcery.YouCtrl
DeckNeeds:Type$Instant|Sorcery
Oracle:This spell costs {U} less to cast for each instant and sorcery spell you've cast this turn.\nWhenever Demilich attacks, exile up to one target instant or sorcery card from your graveyard. Copy it. You may cast the copy.\nYou may cast Demilich from your graveyard by exiling four instant and/or sorcery cards from your graveyard in addition to paying its other costs.

View File

@@ -4,7 +4,7 @@ Types:Enchantment Aura
K:Enchant creature
A:SP$ Attach | Cost$ 1 B B | ValidTgts$ Creature | AILogic$ Pump
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddPower$ 3 | AddToughness$ 1 | AddKeyword$ Flying | AddType$ Demon | Description$ Enchanted creature gets +3/+1, has flying, and is a Demon in addition to its other types.
S:Mode$ Continuous | Affected$ Card.Self | MayPlay$ True | AffectedZone$ Graveyard | EffectZone$ Graveyard | MayPlayAltManaCost$ 1 B B PayLife<3> Discard<1/Card> | ActivationZone$ Graveyard | Description$ You may cast CARDNAME from your graveyard by paying 3 life and discarding a card in addition to paying its other costs.
S:Mode$ Continuous | Affected$ Card.Self | MayPlay$ True | AffectedZone$ Graveyard | EffectZone$ Graveyard | MayPlayAltManaCost$ 1 B B PayLife<3> Discard<1/Card> | Description$ You may cast CARDNAME from your graveyard by paying 3 life and discarding a card in addition to paying its other costs.
DeckHas:Ability$Discard|Graveyard
SVar:DiscardMe:1
Oracle:Enchant creature\nEnchanted creature gets +3/+1, has flying, and is a Demon in addition to its other types.\nYou may cast Demonic Embrace from your graveyard by paying 3 life and discarding a card in addition to paying its other costs.

View File

@@ -3,6 +3,6 @@ ManaCost:3 B R
Types:Artifact Creature Astartes Dreadnought
PT:5/4
K:Haste
S:Mode$ Continuous | Affected$ Card.Self | MayPlay$ True | AffectedZone$ Graveyard | EffectZone$ Graveyard | MayPlayAltManaCost$ 3 B R ExileFromGrave<1/Creature.Other/another creature card> | ActivationZone$ Graveyard | Description$ Sarcophagus — You may cast CARDNAME from your graveyard by exiling another creature card from your graveyard in addition to paying its other costs.
S:Mode$ Continuous | Affected$ Card.Self | MayPlay$ True | AffectedZone$ Graveyard | EffectZone$ Graveyard | MayPlayAltManaCost$ 3 B R ExileFromGrave<1/Creature.Other/another creature card> | Description$ Sarcophagus — You may cast CARDNAME from your graveyard by exiling another creature card from your graveyard in addition to paying its other costs.
DeckHas:Ability$Graveyard
Oracle:Haste\nSarcophagus — You may cast Helbrute from your graveyard by exiling another creature card from your graveyard in addition to paying its other costs.

View File

@@ -5,7 +5,7 @@ PT:3/3
T:Mode$ Phase | Phase$ BeginCombat | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigCounter | TriggerDescription$ At the beginning of combat on your turn, put your choice of a +1/+1, first strike, vigilance, or menace counter on CARDNAME.
SVar:TrigCounter:DB$ PutCounter | Defined$ Self | CounterType$ P1P1,First Strike,Vigilance,Menace | CounterNum$ 1
K:Counters remain on CARDNAME as it moves to any zone other than a player's hand or library.
S:Mode$ Continuous | Affected$ Card.Self | MayPlay$ True | AffectedZone$ Graveyard | EffectZone$ Graveyard | MayPlayAltManaCost$ 2 G U R Discard<2/Card> | ActivationZone$ Graveyard | Description$ You may cast NICKNAME from your graveyard by discarding two cards in addition to paying its other costs.
S:Mode$ Continuous | Affected$ Card.Self | MayPlay$ True | AffectedZone$ Graveyard | EffectZone$ Graveyard | MayPlayAltManaCost$ 2 G U R Discard<2/Card> | Description$ You may cast NICKNAME from your graveyard by discarding two cards in addition to paying its other costs.
DeckHas:Ability$Counters|Discard
DeckHints:Ability$Counters
Oracle:At the beginning of combat on your turn, put your choice of a +1/+1, first strike, vigilance, or menace counter on Me, the Immortal.\nCounters remain on Me as it moves to any zone other than a player's hand or library.\nYou may cast Me from your graveyard by discarding two cards in addition to paying its other costs.

View File

@@ -2,6 +2,7 @@ Name:Phyrexian Rebirth
ManaCost:4 W W
Types:Sorcery
A:SP$ DestroyAll | ValidCards$ Creature | RememberDestroyed$ True | SubAbility$ DBToken | SpellDescription$ Destroy all creatures, then create an X/X colorless Phyrexian Horror artifact creature token, where X is the number of creatures destroyed this way.
SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenScript$ c_x_x_a_phyrexian_horror | TokenOwner$ You | TokenPower$ X | TokenToughness$ X
SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenScript$ c_x_x_a_phyrexian_horror | TokenOwner$ You | TokenPower$ X | TokenToughness$ X | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Remembered$Amount
Oracle:Destroy all creatures, then create an X/X colorless Phyrexian Horror artifact creature token, where X is the number of creatures destroyed this way.

View File

@@ -4,7 +4,7 @@ Types:Creature Zombie Warrior
PT:4/3
K:CARDNAME can't block.
S:Mode$ Continuous | Affected$ Creature.Zombie+Other+YouCtrl | AddPower$ 1 | AddToughness$ 1 | Description$ Other Zombie creatures you control get +1/+1.
S:Mode$ Continuous | Affected$ Card.Self | MayPlay$ True | AffectedZone$ Graveyard | EffectZone$ Graveyard | MayPlayAltManaCost$ X 2 B B | ActivationZone$ Graveyard | Description$ You may cast CARDNAME from your graveyard if you pay {1} more to cast it for each other creature card in your graveyard.
S:Mode$ Continuous | Affected$ Card.Self | MayPlay$ True | AffectedZone$ Graveyard | EffectZone$ Graveyard | RaiseCost$ X | Description$ You may cast CARDNAME from your graveyard if you pay {1} more to cast it for each other creature card in your graveyard.
SVar:X:Count$ValidGraveyard Creature.Other+YouOwn
SVar:PlayMain1:TRUE
Oracle:Risen Executioner can't block.\nOther Zombie creatures you control get +1/+1.\nYou may cast Risen Executioner from your graveyard if you pay {1} more to cast it for each other creature card in your graveyard.