mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-14 09:48:02 +00:00
- Some safety fixes for Muck Drubb.
This commit is contained in:
@@ -4,8 +4,8 @@ Types:Creature Beast
|
||||
PT:3/3
|
||||
K:Flash
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigChange | TriggerDescription$ When CARDNAME enters the battlefield, change the target of target spell that targets only a single creature to Muck Drubb.
|
||||
SVar:TrigChange:AB$ ChangeTargets | Cost$ 0 | TargetType$ Spell | ValidTgts$ Card | Defined$ Self | TargetsSingleTarget$ True | ChangeSingleTarget$ True | TargetValidTargeting$ Creature
|
||||
SVar:TrigChange:AB$ ChangeTargets | Cost$ 0 | TargetType$ Spell | ValidTgts$ Card | Defined$ Self | TargetsSingleTarget$ True | TargetValidTargeting$ Creature
|
||||
K:Madness:2 B
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/muck_drubb.jpg
|
||||
Oracle:Flash (You may cast this spell any time you could cast an instant.)\nWhen Muck Drubb enters the battlefield, change the target of target spell that targets only a single creature to Muck Drubb.\nMadness {2}{B} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.)
|
||||
Oracle:Flash (You may cast this spell any time you could cast an instant.)\nWhen Muck Drubb enters the battlefield, change the target of target spell that targets only a single creature to Muck Drubb.\nMadness {2}{B} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.)
|
||||
@@ -30,7 +30,6 @@ public class ChangeTargetsEffect extends SpellAbilityEffect {
|
||||
public void resolve(SpellAbility sa) {
|
||||
final List<SpellAbility> sas = getTargetSpells(sa);
|
||||
final boolean remember = sa.hasParam("RememberTargetedCard");
|
||||
final boolean random = sa.hasParam("RandomTarget");
|
||||
|
||||
final MagicStack stack = sa.getActivatingPlayer().getGame().getStack();
|
||||
for (final SpellAbility tgtSA : sas) {
|
||||
@@ -86,18 +85,25 @@ public class ChangeTargetsEffect extends SpellAbilityEffect {
|
||||
} else {
|
||||
while(changingTgtSI != null) {
|
||||
SpellAbility changingTgtSA = changingTgtSI.getSpellAbility();
|
||||
if (!random) {
|
||||
// Update targets, with a potential new target
|
||||
TargetChoices newTarget = sa.getActivatingPlayer().getController().chooseNewTargetsFor(changingTgtSA);
|
||||
if (null != newTarget) {
|
||||
changingTgtSI.updateTarget(newTarget);
|
||||
}
|
||||
} else {
|
||||
if (sa.hasParam("RandomTarget")){
|
||||
changingTgtSA.resetTargets();
|
||||
List<GameObject> candidates = changingTgtSA.getTargetRestrictions().getAllCandidates(changingTgtSA, true);
|
||||
GameObject choice = Aggregates.random(candidates);
|
||||
changingTgtSA.getTargets().add(choice);
|
||||
changingTgtSI.updateTarget(changingTgtSA.getTargets());
|
||||
} else if (sa.hasParam("Defined")){
|
||||
GameObject newTarget = Iterables.getFirst(getDefinedCardsOrTargeted(sa), null);
|
||||
if(changingTgtSA.canTarget(newTarget)) {
|
||||
changingTgtSA.resetTargets();
|
||||
changingTgtSA.getTargets().add(newTarget);
|
||||
changingTgtSI.updateTarget(changingTgtSA.getTargets());
|
||||
}
|
||||
} else {
|
||||
// Update targets, with a potential new target
|
||||
TargetChoices newTarget = sa.getActivatingPlayer().getController().chooseNewTargetsFor(changingTgtSA);
|
||||
if (null != newTarget) {
|
||||
changingTgtSI.updateTarget(newTarget);
|
||||
}
|
||||
}
|
||||
changingTgtSI = changingTgtSI.getSubInstace();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user