mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Fix Primal Wellspring trigger not working with Chun-Li (#6971)
Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
This commit is contained in:
@@ -322,16 +322,13 @@ public class AbilityManaPart implements java.io.Serializable {
|
|||||||
return this.triggersWhenSpent != null;
|
return this.triggersWhenSpent != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addTriggersWhenSpent(SpellAbility saBeingPaid, Card card) {
|
public void addTriggersWhenSpent(SpellAbility saBeingPaid) {
|
||||||
if (this.triggersWhenSpent == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
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.addRemembered(saBeingPaid);
|
||||||
trig.setSpawningAbility((SpellAbility) sVarHolder);
|
if (getSourceSA() != null) {
|
||||||
|
trig.setSpawningAbility(getSourceSA());
|
||||||
}
|
}
|
||||||
handler.registerOneTrigger(trig);
|
saBeingPaid.getHostCard().getGame().getTriggerHandler().registerThisTurnDelayedTrigger(trig);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SpellAbility getSourceSA() {
|
public SpellAbility getSourceSA() {
|
||||||
|
|||||||
@@ -838,7 +838,7 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
|
|||||||
|
|
||||||
for (Mana mana : getPayingMana()) {
|
for (Mana mana : getPayingMana()) {
|
||||||
if (mana.triggersWhenSpent()) {
|
if (mana.triggersWhenSpent()) {
|
||||||
mana.getManaAbility().addTriggersWhenSpent(this, host);
|
mana.getManaAbility().addTriggersWhenSpent(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mana.addsCounters(this)) {
|
if (mana.addsCounters(this)) {
|
||||||
|
|||||||
@@ -251,6 +251,13 @@ public class TriggerSpellAbilityCastOrCopy extends Trigger {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (getSpawningAbility() != null && getSpawningAbility().hasParam("TriggersWhenSpent")) {
|
||||||
|
if (!getTriggerRemembered().contains(spellAbility)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1295,8 +1295,8 @@ lblFullControl=Full Control
|
|||||||
lblFullControlDetails=This feature lets you skip different helpers that streamline gameplay by avoiding somewhat annoying GUI interactions and instead use AI logic to make reasonable decisions for beginners.\nUseful for certain corner cases or if you want to challenge yourself with the Comprehensive Rules:\ne.g. the opposite cost order is needed if activating an animated "Halo Fountain" that's also tapped.
|
lblFullControlDetails=This feature lets you skip different helpers that streamline gameplay by avoiding somewhat annoying GUI interactions and instead use AI logic to make reasonable decisions for beginners.\nUseful for certain corner cases or if you want to challenge yourself with the Comprehensive Rules:\ne.g. the opposite cost order is needed if activating an animated "Halo Fountain" that's also tapped.
|
||||||
lblChooseCostOrder=Choose cost order
|
lblChooseCostOrder=Choose cost order
|
||||||
lblChooseCostReductionOrder=Choose cost reduction order & amount
|
lblChooseCostReductionOrder=Choose cost reduction order & amount
|
||||||
lblNoPaymentFromManaAbility=Don\'t attempt paying when generating mana
|
lblNoPaymentFromManaAbility=Don''t attempt paying when generating mana
|
||||||
lblNoFreeCombatCostHandling=Don\'t accept attack/block costs of \{0\}
|
lblNoFreeCombatCostHandling=Don''t accept attack/block costs of \{0\}
|
||||||
lblAllowPaymentStartWithMissingResources=Allow payment start when cost seems unaffordable
|
lblAllowPaymentStartWithMissingResources=Allow payment start when cost seems unaffordable
|
||||||
lblLayerTimestampOrder=Finetune layer timestamp order
|
lblLayerTimestampOrder=Finetune layer timestamp order
|
||||||
lblOrderCosts=Order costs
|
lblOrderCosts=Order costs
|
||||||
|
|||||||
Reference in New Issue
Block a user