Remove Alternative Cost KW (#5050)

This commit is contained in:
tool4ever
2024-04-16 16:00:16 +02:00
committed by GitHub
parent 4ccbc9baa6
commit bcaadd0765
6 changed files with 24 additions and 30 deletions

View File

@@ -3,5 +3,6 @@ ManaCost:1 W
Types:Legendary Creature Human Samurai
PT:2/1
K:Bushido:1
S:Mode$ Continuous | Affected$ Card.Samurai+YouCtrl | AddKeyword$ Alternative Cost:ConvertedManaCost | AffectedZone$ Hand,Graveyard,Exile,Library,Command | Description$ You may pay {X} rather than pay the mana cost for Samurai spells you cast, where X is that spell's mana value.
S:Mode$ AlternativeCost | ValidSA$ Spell.Samurai | ValidPlayer$ You | Cost$ X | Description$ You may pay {X} rather than pay the mana cost for Samurai spells you cast, where X is that spell's mana value.
SVar:X:Count$CardManaCost
Oracle:Bushido 1 (Whenever this creature blocks or becomes blocked, it gets +1/+1 until end of turn.)\nYou may pay {X} rather than pay the mana cost for Samurai spells you cast, where X is that spell's mana value.

View File

@@ -3,8 +3,9 @@ ManaCost:4 B
Types:Creature Vampire Warlock
PT:3/5
K:Flying
A:AB$ Effect | Cost$ 1 B T | StaticAbilities$ ReduceCost | Triggers$ TrigCastSpell
SVar:ReduceCost:Mode$ Continuous | Affected$ Card.nonLand+YouCtrl | AddKeyword$ Alternative Cost:PayLife<ConvertedManaCost> | AffectedZone$ Hand,Graveyard,Exile,Library,Command | EffectZone$ Command | Description$ Rather than pay the mana cost of the next spell you cast this turn, you may pay life equal to that spell's mana value.
A:AB$ Effect | Cost$ 1 B T | StaticAbilities$ ReduceCost | Triggers$ TrigCastSpell | SpellDescription$ Rather than pay the mana cost of the next spell you cast this turn, you may pay life equal to that spell's mana value.
SVar:ReduceCost:Mode$ AlternativeCost | ValidSA$ Spell | ValidPlayer$ You | Cost$ PayLife<X> | Description$ Rather than pay the mana cost of the next spell you cast this turn, you may pay life equal to that spell's mana value.
SVar:TrigCastSpell:Mode$ SpellCast | ValidActivatingPlayer$ You | TriggerZones$ Command | Execute$ RemoveEffect | Static$ True
SVar:RemoveEffect:DB$ ChangeZone | Origin$ Command | Destination$ Exile
SVar:X:Count$CardManaCost
Oracle:Flying\n{1}{B}, {T}: Rather than pay the mana cost of the next spell you cast this turn, you may pay life equal to that spell's mana value.

View File

@@ -264,7 +264,10 @@ public class HumanPlaySpellAbility {
if (needX) {
if (cost.hasXInAnyCostPart()) {
final String sVar = ability.getSVar("X"); //only prompt for new X value if card doesn't determine it another way
if ("Count$xPaid".equals(sVar) || sVar.isEmpty()) {
// check if X != 0 is even allowed or the X shard got removed
boolean replacedXshard = ability.isSpell() && ability.getHostCard().getManaCost().countX() > 0 &&
(cost.hasNoManaCost() || cost.getCostMana().getAmountOfX() == 0);
if (("Count$xPaid".equals(sVar) && !replacedXshard) || sVar.isEmpty()) {
final Integer value = controller.announceRequirements(ability, "X");
if (value == null) {
return false;