mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- Fixed a bug when Nivmagus Elemental tries to exile copied spells.
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -210,6 +210,7 @@ public class CardFactory {
|
||||
subSA = copySubSA.getSubAbility();
|
||||
}
|
||||
}
|
||||
c.getCharacteristics().setSpellAbility(copySA);
|
||||
copySA.setCopied(true);
|
||||
//remove all costs
|
||||
if (!copySA.isTrigger()) {
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user