mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
Fix CostSacrifice paying from Effect
This commit is contained in:
committed by
Michael Kamensky
parent
33377abc9f
commit
a9f5ab8772
@@ -2,6 +2,6 @@ Name:Arrogant Poet
|
||||
ManaCost:1 B
|
||||
Types:Creature Human Warlock
|
||||
PT:2/1
|
||||
T:Mode$ Attacks | ValidCard$ Card.Self | OptionalDecider$ You | Execute$ TrigPump | TriggerDescription$ Whenever CARDNAME attacks, you may pay 2 life. If you do, it gains flying until end of turn.
|
||||
T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigPump | TriggerDescription$ Whenever CARDNAME attacks, you may pay 2 life. If you do, it gains flying until end of turn.
|
||||
SVar:TrigPump:AB$ Pump | Cost$ PayLife<2> | Defined$ Self | KW$ Flying
|
||||
Oracle:Whenever Arrogant Poet attacks, you may pay 2 life. If you do, it gains flying until end of turn.
|
||||
|
||||
@@ -2,7 +2,7 @@ Name:Awaken the Sky Tyrant
|
||||
ManaCost:3 R
|
||||
Types:Enchantment
|
||||
T:Mode$ DamageDone | ValidSource$ Card.OppCtrl | ValidTarget$ You | TriggerZones$ Battlefield | Execute$ TrigSac | TriggerDescription$ When a source an opponent controls deals damage to you, sacrifice CARDNAME. If you do, create a 5/5 red Dragon creature token with flying.
|
||||
SVar:TrigSac:AB$ Token | TokenAmount$ 1 | TokenScript$ r_5_5_dragon_flying | TokenOwner$ You | Cost$ Sac<1/CARDNAME> | CostMandatory$ True
|
||||
SVar:TrigSac:AB$ Token | TokenAmount$ 1 | TokenScript$ r_5_5_dragon_flying | TokenOwner$ You | Cost$ Mandatory Sac<1/CARDNAME>
|
||||
SVar:X:Remembered$Amount
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/awaken_the_sky_tyrant.jpg
|
||||
Oracle:When a source an opponent controls deals damage to you, sacrifice Awaken the Sky Tyrant. If you do, create a 5/5 red Dragon creature token with flying.
|
||||
@@ -2,7 +2,7 @@ Name:Standstill
|
||||
ManaCost:1 U
|
||||
Types:Enchantment
|
||||
T:Mode$ SpellCast | ValidActivatingPlayer$ Player | TriggerZones$ Battlefield | Execute$ TrigSac | TriggerDescription$ When a player casts a spell, sacrifice CARDNAME. If you do, each of that player's opponents draws three cards.
|
||||
SVar:TrigSac:AB$ Draw | NumCards$ 3 | Cost$ Sac<1/CARDNAME> | CostMandatory$ True | Defined$ TriggeredCardOpponent
|
||||
SVar:TrigSac:AB$ Draw | NumCards$ 3 | Cost$ Mandatory Sac<1/CARDNAME> | Defined$ TriggeredCardOpponent
|
||||
SVar:X:Remembered$Amount
|
||||
SVar:Y:Count$Valid Creature.YouCtrl
|
||||
SVar:Z:Count$Valid Creature.OppCtrl
|
||||
|
||||
@@ -567,7 +567,7 @@ public class HumanCostDecision extends CostDecisionMakerBase {
|
||||
}
|
||||
|
||||
// for costs declared mandatory, this is only reachable with a valid amount
|
||||
if (ability.getPayCosts().isMandatory() || (player.canPayLife(c) && player.getController().confirmPayment(cost, Localizer.getInstance().getMessage("lblPayNLifeConfirm", String.valueOf(c)),ability))) {
|
||||
if (ability.getPayCosts().isMandatory() || (player.canPayLife(c) && player.getController().confirmPayment(cost, Localizer.getInstance().getMessage("lblPayNLifeConfirm", String.valueOf(c)), ability))) {
|
||||
return PaymentDecision.number(c);
|
||||
}
|
||||
return null;
|
||||
@@ -1023,7 +1023,7 @@ public class HumanCostDecision extends CostDecisionMakerBase {
|
||||
|
||||
if (cost.payCostFromSource()) {
|
||||
if (source.getController() == ability.getActivatingPlayer() && source.isInPlay()) {
|
||||
return ability.hasParam("CostMandatory") || player.getController().confirmPayment(cost, Localizer.getInstance().getMessage("lblSacrificeCardConfirm", CardTranslation.getTranslatedName(source.getName())), ability) ? PaymentDecision.card(source) : null;
|
||||
return ability.getPayCosts().isMandatory() || player.getController().confirmPayment(cost, Localizer.getInstance().getMessage("lblSacrificeCardConfirm", CardTranslation.getTranslatedName(source.getName())), ability) ? PaymentDecision.card(source) : null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -1059,7 +1059,6 @@ public class HumanCostDecision extends CostDecisionMakerBase {
|
||||
}
|
||||
|
||||
return PaymentDecision.card(inp.getSelected());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user