mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +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;
|
return this.spellAbility;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final void setSpellAbility(SpellAbility sa) {
|
||||||
|
this.spellAbility.clear();
|
||||||
|
this.spellAbility.add(sa);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the intrinsic ability.
|
* Gets the intrinsic ability.
|
||||||
|
|||||||
@@ -210,6 +210,7 @@ public class CardFactory {
|
|||||||
subSA = copySubSA.getSubAbility();
|
subSA = copySubSA.getSubAbility();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
c.getCharacteristics().setSpellAbility(copySA);
|
||||||
copySA.setCopied(true);
|
copySA.setCopied(true);
|
||||||
//remove all costs
|
//remove all costs
|
||||||
if (!copySA.isTrigger()) {
|
if (!copySA.isTrigger()) {
|
||||||
|
|||||||
@@ -203,17 +203,18 @@ public class CostExile extends CostPartWithList {
|
|||||||
@Override
|
@Override
|
||||||
protected void doPayment(SpellAbility ability, Card targetCard) {
|
protected void doPayment(SpellAbility ability, Card targetCard) {
|
||||||
Game game = targetCard.getGame();
|
Game game = targetCard.getGame();
|
||||||
game.getAction().exile(targetCard);
|
|
||||||
|
|
||||||
if (this.from.equals(ZoneType.Stack)) {
|
if (this.from.equals(ZoneType.Stack)) {
|
||||||
ArrayList<SpellAbility> spells = targetCard.getSpellAbilities();
|
ArrayList<SpellAbility> spells = targetCard.getSpellAbilities();
|
||||||
for (SpellAbility spell : spells) {
|
for (SpellAbility spell : spells) {
|
||||||
if (targetCard.isInZone(ZoneType.Exile)) {
|
final SpellAbilityStackInstance si = game.getStack().getInstanceFromSpellAbility(spell);
|
||||||
final SpellAbilityStackInstance si = game.getStack().getInstanceFromSpellAbility(spell);
|
if (si != null) {
|
||||||
game.getStack().remove(si);
|
game.getStack().remove(si);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
game.getAction().exile(targetCard);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String HashListKey = "Exiled";
|
public static final String HashListKey = "Exiled";
|
||||||
|
|||||||
Reference in New Issue
Block a user