mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Fix TriggersWhenSpent affected by Veyran (#3586)
Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.59>
This commit is contained in:
@@ -19,7 +19,7 @@ public class AbilityApiBased extends AbilityActivated {
|
|||||||
effect = api.getSpellEffect();
|
effect = api.getSpellEffect();
|
||||||
|
|
||||||
if (api.equals(ApiType.Mana) || api.equals(ApiType.ManaReflected)) {
|
if (api.equals(ApiType.Mana) || api.equals(ApiType.ManaReflected)) {
|
||||||
this.setManaPart(new AbilityManaPart(sourceCard, mapParams));
|
this.setManaPart(new AbilityManaPart(this, mapParams));
|
||||||
this.setUndoable(true); // will try at least
|
this.setUndoable(true); // will try at least
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ public class SpellApiBased extends Spell {
|
|||||||
this.setIntrinsic(true);
|
this.setIntrinsic(true);
|
||||||
|
|
||||||
if (api.equals(ApiType.Mana) || api.equals(ApiType.ManaReflected)) {
|
if (api.equals(ApiType.Mana) || api.equals(ApiType.ManaReflected)) {
|
||||||
this.setManaPart(new AbilityManaPart(sourceCard, mapParams));
|
this.setManaPart(new AbilityManaPart(this, mapParams));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (api.equals(ApiType.ChangeZone) || api.equals(ApiType.ChangeZoneAll)) {
|
if (api.equals(ApiType.ChangeZone) || api.equals(ApiType.ChangeZoneAll)) {
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ public class AbilityManaPart implements java.io.Serializable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* Constructor for AbilityMana.
|
* Dev Mode Constructor for AbilityMana.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @param sourceCard
|
* @param sourceCard
|
||||||
@@ -320,6 +320,9 @@ public class AbilityManaPart implements java.io.Serializable {
|
|||||||
|
|
||||||
TriggerHandler handler = card.getGame().getTriggerHandler();
|
TriggerHandler handler = card.getGame().getTriggerHandler();
|
||||||
Trigger trig = TriggerHandler.parseTrigger(sVarHolder.getSVar(this.triggersWhenSpent), sourceCard, false, sVarHolder);
|
Trigger trig = TriggerHandler.parseTrigger(sVarHolder.getSVar(this.triggersWhenSpent), sourceCard, false, sVarHolder);
|
||||||
|
if (sVarHolder instanceof SpellAbility) {
|
||||||
|
trig.setSpawningAbility((SpellAbility) sVarHolder);
|
||||||
|
}
|
||||||
handler.registerOneTrigger(trig);
|
handler.registerOneTrigger(trig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ public final class AbilitySub extends SpellAbility implements java.io.Serializab
|
|||||||
effect = api.getSpellEffect();
|
effect = api.getSpellEffect();
|
||||||
|
|
||||||
if (api.equals(ApiType.Mana) || api.equals(ApiType.ManaReflected)) {
|
if (api.equals(ApiType.Mana) || api.equals(ApiType.ManaReflected)) {
|
||||||
this.setManaPart(new AbilityManaPart(ca, mapParams));
|
this.setManaPart(new AbilityManaPart(this, mapParams));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (api.equals(ApiType.ChangeZone) || api.equals(ApiType.ChangeZoneAll)) {
|
if (api.equals(ApiType.ChangeZone) || api.equals(ApiType.ChangeZoneAll)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user