- Fixed a bug when Nivmagus Elemental tries to exile copied spells.

This commit is contained in:
Sloth
2014-03-26 19:31:22 +00:00
parent d11b8fb546
commit ef6d1f440e
3 changed files with 12 additions and 6 deletions

View File

@@ -209,6 +209,10 @@ public class CardCharacteristics {
return this.spellAbility;
}
public final void setSpellAbility(SpellAbility sa) {
this.spellAbility.clear();
this.spellAbility.add(sa);
}
/**
* Gets the intrinsic ability.

View File

@@ -210,6 +210,7 @@ public class CardFactory {
subSA = copySubSA.getSubAbility();
}
}
c.getCharacteristics().setSpellAbility(copySA);
copySA.setCopied(true);
//remove all costs
if (!copySA.isTrigger()) {

View File

@@ -203,17 +203,18 @@ public class CostExile extends CostPartWithList {
@Override
protected void doPayment(SpellAbility ability, Card targetCard) {
Game game = targetCard.getGame();
game.getAction().exile(targetCard);
if (this.from.equals(ZoneType.Stack)) {
ArrayList<SpellAbility> spells = targetCard.getSpellAbilities();
for (SpellAbility spell : spells) {
if (targetCard.isInZone(ZoneType.Exile)) {
final SpellAbilityStackInstance si = game.getStack().getInstanceFromSpellAbility(spell);
game.getStack().remove(si);
}
final SpellAbilityStackInstance si = game.getStack().getInstanceFromSpellAbility(spell);
if (si != null) {
game.getStack().remove(si);
}
}
}
game.getAction().exile(targetCard);
}
public static final String HashListKey = "Exiled";