mirror of
https://github.com/correl/mage.git
synced 2025-03-12 17:00:08 -09:00
* Maelstrom Nexus - Fixed bug that for cascade effect of Maelstrom Nexus always the casting cost of Maelstrom Nexus itself were used to compare if cascade applies instead of the casting cost of the spell that triggered the effect.
This commit is contained in:
parent
e9f0ad3f7d
commit
eaba56568d
2 changed files with 10 additions and 1 deletions
|
@ -43,6 +43,7 @@ import mage.game.Game;
|
|||
import mage.game.events.GameEvent;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.players.Player;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.watchers.WatcherImpl;
|
||||
|
||||
/**
|
||||
|
@ -95,6 +96,7 @@ class MaelstromNexusTriggeredAbility extends TriggeredAbilityImpl<MaelstromNexus
|
|||
if (spell != null
|
||||
&& watcher != null
|
||||
&& watcher.conditionMet()) {
|
||||
this.getEffects().get(0).setTargetPointer(new FixedTarget(spell.getSourceId()));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -166,7 +168,11 @@ class CascadeEffect extends OneShotEffect<CascadeEffect> {
|
|||
Card card;
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
ExileZone exile = game.getExile().createZone(source.getSourceId(), player.getName() + " Cascade");
|
||||
int sourceCost = game.getCard(source.getSourceId()).getManaCost().convertedManaCost();
|
||||
Card stackCard = game.getCard(targetPointer.getFirst(game, source));
|
||||
if (stackCard == null) {
|
||||
return false;
|
||||
}
|
||||
int sourceCost = stackCard.getManaCost().convertedManaCost();
|
||||
do {
|
||||
card = player.getLibrary().removeFromTop(game);
|
||||
if (card == null) {
|
||||
|
|
|
@ -93,6 +93,9 @@ public class CascadeAbility extends TriggeredAbilityImpl<CascadeAbility> {
|
|||
}
|
||||
}
|
||||
|
||||
// !!! Changes to the cascade effect here have to be copied to the cascadeEffect of Maelstrom Nexus card eventually.
|
||||
// There is a functional copy of this effect
|
||||
|
||||
class CascadeEffect extends OneShotEffect<CascadeEffect> {
|
||||
|
||||
public CascadeEffect() {
|
||||
|
|
Loading…
Add table
Reference in a new issue