- Fixed Lotus Vale and Scorched Ruins allowing to sacrifice one land when resolving the spell (before going to graveyard).

This commit is contained in:
Agetian
2015-12-06 15:19:45 +00:00
parent df7b6716f2
commit 088e05ae96
3 changed files with 13 additions and 5 deletions

View File

@@ -91,9 +91,17 @@ public class SacrificeEffect extends SpellAbilityEffect {
} }
else { else {
boolean isOptional = sa.hasParam("Optional"); boolean isOptional = sa.hasParam("Optional");
boolean isStrict = sa.hasParam("StrictAmount");
int minTargets = isOptional ? 0 : amount;
boolean notEnoughTargets = isStrict && validTargets.size() < minTargets;
if (!notEnoughTargets) {
choosenToSacrifice = destroy ? choosenToSacrifice = destroy ?
p.getController().choosePermanentsToDestroy(sa, isOptional ? 0 : amount, amount, validTargets, msg) : p.getController().choosePermanentsToDestroy(sa, minTargets, amount, validTargets, msg) :
p.getController().choosePermanentsToSacrifice(sa, isOptional ? 0 : amount, amount, validTargets, msg); p.getController().choosePermanentsToSacrifice(sa, minTargets, amount, validTargets, msg);
} else {
choosenToSacrifice = CardCollection.EMPTY;
}
} }
for (Card sac : choosenToSacrifice) { for (Card sac : choosenToSacrifice) {

View File

@@ -3,7 +3,7 @@ ManaCost:no cost
Types:Land Types:Land
A:AB$ Mana | Cost$ T | Produced$ Any | Amount$ 3 | SpellDescription$ Add three mana of any one color to your mana pool. A:AB$ Mana | Cost$ T | Produced$ Any | Amount$ 3 | SpellDescription$ Add three mana of any one color to your mana pool.
R:Event$ Moved | Destination$ Battlefield | ValidCard$ Card.Self | ReplaceWith$ PayBeforeETB | Description$ If CARDNAME would enter the battlefield, sacrifice two untapped lands instead. If you do, put CARDNAME onto the battlefield. If you don't, put it into its owner's graveyard. R:Event$ Moved | Destination$ Battlefield | ValidCard$ Card.Self | ReplaceWith$ PayBeforeETB | Description$ If CARDNAME would enter the battlefield, sacrifice two untapped lands instead. If you do, put CARDNAME onto the battlefield. If you don't, put it into its owner's graveyard.
SVar:PayBeforeETB:AB$ Sacrifice | Cost$ 0 | SacValid$ Land.untapped | Defined$ You | RememberSacrificed$ True | Amount$ 2 | SubAbility$ MoveToGraveyard SVar:PayBeforeETB:AB$ Sacrifice | Cost$ 0 | SacValid$ Land.untapped | Defined$ You | RememberSacrificed$ True | Amount$ 2 | StrictAmount$ True | SubAbility$ MoveToGraveyard
SVar:MoveToGraveyard:DB$ ChangeZone | Origin$ All | Destination$ Graveyard | Defined$ ReplacedCard | ConditionCheckSVar$ X | ConditionSVarCompare$ LT2 | SubAbility$ MoveToBattlefield SVar:MoveToGraveyard:DB$ ChangeZone | Origin$ All | Destination$ Graveyard | Defined$ ReplacedCard | ConditionCheckSVar$ X | ConditionSVarCompare$ LT2 | SubAbility$ MoveToBattlefield
SVar:MoveToBattlefield:DB$ ChangeZone | Origin$ All | Destination$ Battlefield | Defined$ ReplacedCard | ConditionCheckSVar$ X | ConditionSVarCompare$ GE2 | SubAbility$ DBCleanup SVar:MoveToBattlefield:DB$ ChangeZone | Origin$ All | Destination$ Battlefield | Defined$ ReplacedCard | ConditionCheckSVar$ X | ConditionSVarCompare$ GE2 | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True

View File

@@ -3,7 +3,7 @@ ManaCost:no cost
Types:Land Types:Land
A:AB$ Mana | Cost$ T | Produced$ 1 | Amount$ 4 | SpellDescription$ Add {4} to your mana pool. A:AB$ Mana | Cost$ T | Produced$ 1 | Amount$ 4 | SpellDescription$ Add {4} to your mana pool.
R:Event$ Moved | Destination$ Battlefield | ValidCard$ Card.Self | ReplaceWith$ PayBeforeETB | Description$ If CARDNAME would enter the battlefield, sacrifice two untapped lands instead. If you do, put CARDNAME onto the battlefield. If you don't, put it into its owner's graveyard. R:Event$ Moved | Destination$ Battlefield | ValidCard$ Card.Self | ReplaceWith$ PayBeforeETB | Description$ If CARDNAME would enter the battlefield, sacrifice two untapped lands instead. If you do, put CARDNAME onto the battlefield. If you don't, put it into its owner's graveyard.
SVar:PayBeforeETB:AB$ Sacrifice | Cost$ 0 | SacValid$ Land.untapped | Defined$ You | RememberSacrificed$ True | Amount$ 2 | SubAbility$ MoveToGraveyard SVar:PayBeforeETB:AB$ Sacrifice | Cost$ 0 | SacValid$ Land.untapped | Defined$ You | RememberSacrificed$ True | Amount$ 2 | StrictAmount$ True | SubAbility$ MoveToGraveyard
SVar:MoveToGraveyard:DB$ ChangeZone | Origin$ All | Destination$ Graveyard | Defined$ ReplacedCard | ConditionCheckSVar$ X | ConditionSVarCompare$ LT2 | SubAbility$ MoveToBattlefield SVar:MoveToGraveyard:DB$ ChangeZone | Origin$ All | Destination$ Graveyard | Defined$ ReplacedCard | ConditionCheckSVar$ X | ConditionSVarCompare$ LT2 | SubAbility$ MoveToBattlefield
SVar:MoveToBattlefield:DB$ ChangeZone | Origin$ All | Destination$ Battlefield | Defined$ ReplacedCard | ConditionCheckSVar$ X | ConditionSVarCompare$ GE2 | SubAbility$ DBCleanup SVar:MoveToBattlefield:DB$ ChangeZone | Origin$ All | Destination$ Battlefield | Defined$ ReplacedCard | ConditionCheckSVar$ X | ConditionSVarCompare$ GE2 | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True