mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
SpellAbilityStackInstance keeps original activating player and restores it on getSpellAbility call
This commit is contained in:
@@ -21,6 +21,7 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import forge.Card;
|
import forge.Card;
|
||||||
|
import forge.game.player.Player;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -44,6 +45,7 @@ public class SpellAbilityStackInstance {
|
|||||||
|
|
||||||
/** The sub instace. */
|
/** The sub instace. */
|
||||||
private SpellAbilityStackInstance subInstace = null;
|
private SpellAbilityStackInstance subInstace = null;
|
||||||
|
private final Player activator;
|
||||||
|
|
||||||
// When going to a SubAbility that SA has a Instance Choice object
|
// When going to a SubAbility that SA has a Instance Choice object
|
||||||
/** The tc. */
|
/** The tc. */
|
||||||
@@ -85,7 +87,8 @@ public class SpellAbilityStackInstance {
|
|||||||
// Base SA info
|
// Base SA info
|
||||||
this.ability = sa;
|
this.ability = sa;
|
||||||
this.stackDescription = this.ability.getStackDescription();
|
this.stackDescription = this.ability.getStackDescription();
|
||||||
|
this.activator = sa.getActivatingPlayer();
|
||||||
|
|
||||||
// Payment info
|
// Payment info
|
||||||
this.paidHash = this.ability.getPaidHash();
|
this.paidHash = this.ability.getPaidHash();
|
||||||
this.ability.resetPaidHash();
|
this.ability.resetPaidHash();
|
||||||
@@ -135,6 +138,7 @@ public class SpellAbilityStackInstance {
|
|||||||
this.ability.getTarget().resetTargets();
|
this.ability.getTarget().resetTargets();
|
||||||
this.ability.getTarget().setTargetChoices(this.tc);
|
this.ability.getTarget().setTargetChoices(this.tc);
|
||||||
}
|
}
|
||||||
|
this.ability.setActivatingPlayer(activator);
|
||||||
|
|
||||||
// Saved sub-SA needs to be reset on the way out
|
// Saved sub-SA needs to be reset on the way out
|
||||||
if (this.subInstace != null) {
|
if (this.subInstace != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user