Commit 35075643 authored by Ryan Wiedemann's avatar Ryan Wiedemann

add incorrectly not staged changes

parent ad067b74
......@@ -64,7 +64,7 @@ public class TriggerAdapt extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Card, getRunParams().get("Card"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Card);
}
@Override
......
......@@ -85,11 +85,14 @@ public class TriggerAttackerBlocked extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Attacker, getRunParams().get("Attacker"));
sa.setTriggeringObject(AbilityKey.Blockers, getRunParams().get("Blockers"));
sa.setTriggeringObject(AbilityKey.Defender, getRunParams().get("Defender"));
sa.setTriggeringObject(AbilityKey.DefendingPlayer, getRunParams().get("DefendingPlayer"));
sa.setTriggeringObject(AbilityKey.NumBlockers, getRunParams().get("NumBlockers"));
sa.setTriggeringObjectsFrom(
this,
AbilityKey.Attacker,
AbilityKey.Blockers,
AbilityKey.Defender,
AbilityKey.DefendingPlayer,
AbilityKey.NumBlockers
);
}
@Override
......
......@@ -36,7 +36,7 @@ public class TriggerBecomeMonarch extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Player, this.getRunParams().get("Player"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Player);
}
@Override
......
......@@ -65,8 +65,7 @@ public class TriggerBecomeMonstrous extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Card, getRunParams().get("Card"));
sa.setTriggeringObject(AbilityKey.MonstrosityAmount, getRunParams().get("MonstrosityAmount"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Card, AbilityKey.MonstrosityAmount);
}
@Override
......
......@@ -63,7 +63,7 @@ public class TriggerBecomeRenowned extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Card, this.getRunParams().get("Card"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Card);
}
@Override
......
......@@ -89,9 +89,8 @@ public class TriggerBecomesTarget extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.SourceSA, this.getRunParams().get("SourceSA"));
sa.setTriggeringObject(AbilityKey.Source, ((SpellAbility) this.getRunParams().get("SourceSA")).getHostCard());
sa.setTriggeringObject(AbilityKey.Target, this.getRunParams().get("Target"));
sa.setTriggeringObject(AbilityKey.Source, ((SpellAbility) getFromRunParams(AbilityKey.SourceSA)).getHostCard());
sa.setTriggeringObjectsFrom(this, AbilityKey.SourceSA, AbilityKey.Target);
}
@Override
......
......@@ -81,9 +81,8 @@ public class TriggerBecomesTargetOnce extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.SourceSA, this.getRunParams().get("SourceSA"));
sa.setTriggeringObject(AbilityKey.Source, ((SpellAbility) this.getRunParams().get("SourceSA")).getHostCard());
sa.setTriggeringObject(AbilityKey.Targets, this.getRunParams().get("Targets"));
sa.setTriggeringObjectsFrom(this, AbilityKey.SourceSA, AbilityKey.Targets);
sa.setTriggeringObject(AbilityKey.Source, ((SpellAbility) getFromRunParams(AbilityKey.SourceSA)).getHostCard());
}
@Override
......
......@@ -71,7 +71,7 @@ public class TriggerChangesController extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Card, this.getRunParams().get("Card"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Card);
}
@Override
......
......@@ -218,7 +218,7 @@ public class TriggerChangesZone extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Card, this.getRunParams().get("Card"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Card);
}
@Override
......
......@@ -23,7 +23,7 @@ public class TriggerChangesZoneAll extends Trigger {
@Override
public void setTriggeringObjects(SpellAbility sa) {
final CardZoneTable table = (CardZoneTable) getRunParams().get("Cards");
final CardZoneTable table = (CardZoneTable) getFromRunParams(AbilityKey.Cards);
CardCollection allCards = this.filterCards(table);
......
......@@ -121,10 +121,7 @@ public class TriggerCounterAdded extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
if (this.getRunParams().containsKey("Card"))
sa.setTriggeringObject(AbilityKey.Card, this.getRunParams().get("Card"));
if (this.getRunParams().containsKey("Player"))
sa.setTriggeringObject(AbilityKey.Player, this.getRunParams().get("Player"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Card, AbilityKey.Player);
}
@Override
......
......@@ -25,7 +25,7 @@ public class TriggerCounterAddedAll extends Trigger {
@Override
public void setTriggeringObjects(SpellAbility sa) {
final GameEntityCounterTable table = (GameEntityCounterTable) getRunParams().get("Objects");
final GameEntityCounterTable table = (GameEntityCounterTable) getFromRunParams(AbilityKey.Objects);
Map<GameEntity, Integer> all = this.filterTable(table);
......
......@@ -106,11 +106,8 @@ public class TriggerCounterAddedOnce extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
if (this.getRunParams().containsKey("Card"))
sa.setTriggeringObject(AbilityKey.Card, this.getRunParams().get("Card"));
if (this.getRunParams().containsKey("Player"))
sa.setTriggeringObject(AbilityKey.Player, this.getRunParams().get("Player"));
sa.setTriggeringObject(AbilityKey.Amount, this.getRunParams().get("CounterAmount"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Card, AbilityKey.Player);
sa.setTriggeringObject(AbilityKey.Amount, getFromRunParams(AbilityKey.CounterAmount));
}
@Override
......
......@@ -83,7 +83,7 @@ public class TriggerCounterRemoved extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Card, this.getRunParams().get("Card"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Card);
}
@Override
......
......@@ -50,7 +50,7 @@ public class TriggerCycled extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Card, this.getRunParams().get("Card"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Card);
}
@Override
......
......@@ -119,11 +119,14 @@ public class TriggerDamageDone extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Source, CardUtil.getLKICopy((Card)this.getRunParams().get("DamageSource")));
sa.setTriggeringObject(AbilityKey.Target, this.getRunParams().get("DamageTarget"));
sa.setTriggeringObject(AbilityKey.DamageAmount, this.getRunParams().get("DamageAmount"));
// This parameter is here because LKI information related to combat doesn't work properly
sa.setTriggeringObject(AbilityKey.DefendingPlayer, this.getRunParams().get("DefendingPlayer"));
sa.setTriggeringObject(AbilityKey.Source, CardUtil.getLKICopy((Card)getFromRunParams(AbilityKey.DamageSource)));
sa.setTriggeringObject(AbilityKey.Target, getFromRunParams(AbilityKey.DamageTarget));
sa.setTriggeringObjectsFrom(
this,
AbilityKey.DamageAmount,
// This parameter is here because LKI information related to combat doesn't work properly
AbilityKey.DefendingPlayer
);
}
@Override
......
......@@ -58,15 +58,9 @@ public class TriggerDamageDoneOnce extends Trigger {
@Override
public void setTriggeringObjects(SpellAbility sa) {
if (this.getRunParams().containsKey("DamageTarget")) {
sa.setTriggeringObject(AbilityKey.Target, this.getRunParams().get("DamageTarget"));
}
if (this.getRunParams().containsKey("DamageSources")) {
sa.setTriggeringObject(AbilityKey.Sources, this.getRunParams().get("DamageSources"));
}
sa.setTriggeringObject(AbilityKey.DamageAmount, this.getRunParams().get("DamageAmount"));
sa.setTriggeringObject(AbilityKey.Target, getFromRunParams(AbilityKey.DamageTarget));
sa.setTriggeringObject(AbilityKey.Sources, getFromRunParams(AbilityKey.DamageSources));
sa.setTriggeringObjectsFrom(this, AbilityKey.DamageAmount);
}
@Override
......
......@@ -103,9 +103,9 @@ public class TriggerDamagePrevented extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Source, CardUtil.getLKICopy((Card)this.getRunParams().get("DamageSource")));
sa.setTriggeringObject(AbilityKey.Target, this.getRunParams().get("DamageTarget"));
sa.setTriggeringObject(AbilityKey.DamageAmount, this.getRunParams().get("DamageAmount"));
sa.setTriggeringObject(AbilityKey.Source, CardUtil.getLKICopy((Card)getFromRunParams(AbilityKey.DamageSource)));
sa.setTriggeringObject(AbilityKey.Target, getFromRunParams(AbilityKey.DamageTarget));
sa.setTriggeringObjectsFrom(this, AbilityKey.DamageAmount);
}
@Override
......
......@@ -94,8 +94,8 @@ public class TriggerDamagePreventedOnce extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Target, this.getRunParams().get("DamageTarget"));
sa.setTriggeringObject(AbilityKey.DamageAmount, this.getRunParams().get("DamageAmount"));
sa.setTriggeringObject(AbilityKey.Target, getFromRunParams(AbilityKey.DamageTarget));
sa.setTriggeringObjectsFrom(this, AbilityKey.DamageAmount);
}
@Override
......
......@@ -68,8 +68,7 @@ public class TriggerDestroyed extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Card, this.getRunParams().get("Card"));
sa.setTriggeringObject(AbilityKey.Causer, this.getRunParams().get("Causer"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Card, AbilityKey.Causer);
}
@Override
......
......@@ -61,7 +61,7 @@ public class TriggerDevoured extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Devoured, this.getRunParams().get("Devoured"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Devoured);
}
@Override
......
......@@ -86,8 +86,7 @@ public class TriggerDiscarded extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Card, this.getRunParams().get("Card"));
sa.setTriggeringObject(AbilityKey.Cause, this.getRunParams().get("Cause"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Card, AbilityKey.Cause);
}
@Override
......
......@@ -81,8 +81,7 @@ public class TriggerDrawn extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Card, getRunParams().get("Card"));
sa.setTriggeringObject(AbilityKey.Player, getRunParams().get("Player"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Card, AbilityKey.Player);
}
@Override
......
......@@ -62,7 +62,7 @@ public class TriggerEvolved extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Card, getRunParams().get("Card"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Card);
}
@Override
......
......@@ -33,8 +33,7 @@ public class TriggerExerted extends Trigger {
@Override
public void setTriggeringObjects(SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Card, this.getRunParams().get("Card"));
sa.setTriggeringObject(AbilityKey.Player, this.getRunParams().get("Player"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Card, AbilityKey.Player);
}
@Override
......
......@@ -97,7 +97,7 @@ public class TriggerExiled extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Card, this.getRunParams().get("Card"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Card);
}
@Override
......
......@@ -72,8 +72,7 @@ public class TriggerExploited extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Exploited, this.getRunParams().get("Exploited"));
sa.setTriggeringObject(AbilityKey.Card, this.getRunParams().get("Card"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Exploited, AbilityKey.Card);
}
@Override
......
......@@ -62,7 +62,7 @@ public class TriggerExplores extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Explorer, this.getRunParams().get("Card"));
sa.setTriggeringObject(AbilityKey.Explorer, getFromRunParams(AbilityKey.Card));
}
@Override
......
......@@ -63,7 +63,7 @@ public class TriggerFight extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Fighter, this.getRunParams().get("Fighter"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Fighter);
}
@Override
......
......@@ -70,7 +70,7 @@ public class TriggerFlippedCoin extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Player, this.getRunParams().get("Player"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Player);
}
@Override
......
......@@ -60,7 +60,7 @@ public class TriggerInvestigated extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Player, this.getRunParams().get("Player"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Player);
}
/** {@inheritDoc} */
......
......@@ -52,7 +52,7 @@ public class TriggerLandPlayed extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Card, this.getRunParams().get("Card"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Card);
}
@Override
......
......@@ -74,8 +74,7 @@ public class TriggerLifeGained extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.LifeAmount, getRunParams().get("LifeAmount"));
sa.setTriggeringObject(AbilityKey.Player, getRunParams().get("Player"));
sa.setTriggeringObjectsFrom(this, AbilityKey.LifeAmount, AbilityKey.Player);
}
@Override
......
......@@ -71,8 +71,7 @@ public class TriggerLifeLost extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.LifeAmount, this.getRunParams().get("LifeAmount"));
sa.setTriggeringObject(AbilityKey.Player, this.getRunParams().get("Player"));
sa.setTriggeringObjectsFrom(this, AbilityKey.LifeAmount, AbilityKey.Player);
}
@Override
......
......@@ -39,7 +39,7 @@ public class TriggerLosesGame extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Player, this.getRunParams().get("Player"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Player);
}
@Override
......
......@@ -70,8 +70,7 @@ public class TriggerPayCumulativeUpkeep extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Card, this.getRunParams().get("Card"));
sa.setTriggeringObject(AbilityKey.PayingMana, this.getRunParams().get("PayingMana"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Card, AbilityKey.PayingMana);
}
@Override
......
......@@ -70,7 +70,7 @@ public class TriggerPayEcho extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Card, this.getRunParams().get("Card"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Card);
}
@Override
......
......@@ -61,8 +61,7 @@ public class TriggerPayLife extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.LifeAmount, getRunParams().get("LifeAmount"));
sa.setTriggeringObject(AbilityKey.Player, getRunParams().get("Player"));
sa.setTriggeringObjectsFrom(this, AbilityKey.LifeAmount, AbilityKey.Player);
}
@Override
......
......@@ -60,7 +60,7 @@ public class TriggerPhase extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Player, this.getRunParams().get("Player"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Player);
}
@Override
......
......@@ -28,7 +28,7 @@ public class TriggerPhaseIn extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Card, this.getRunParams().get("Card"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Card);
}
@Override
......
......@@ -36,7 +36,7 @@ public class TriggerPhaseOut extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Card, this.getRunParams().get("Card"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Card);
}
@Override
......
......@@ -56,7 +56,7 @@ public class TriggerPlanarDice extends Trigger {
*/
@Override
public void setTriggeringObjects(SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Player, this.getRunParams().get("Player"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Player);
}
@Override
......
......@@ -53,7 +53,7 @@ public class TriggerPlaneswalkedFrom extends Trigger {
*/
@Override
public void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Cards, this.getRunParams().get("Cards"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Cards);
}
@Override
......
......@@ -53,7 +53,7 @@ public class TriggerPlaneswalkedTo extends Trigger {
*/
@Override
public void setTriggeringObjects(SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Cards, this.getRunParams().get("Cards"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Cards);
}
@Override
......
......@@ -68,8 +68,7 @@ public class TriggerRegenerated extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Card, this.getRunParams().get("Card"));
sa.setTriggeringObject(AbilityKey.Cause, this.getRunParams().get("Cause"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Card, AbilityKey.Cause);
}
@Override
......
......@@ -32,7 +32,7 @@ public class TriggerRevealed extends Trigger {
@Override
public void setTriggeringObjects(SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Card, this.getRunParams().get("Card"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Card);
}
@Override
......
......@@ -126,7 +126,7 @@ public class TriggerSacrificed extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Card, this.getRunParams().get("Card"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Card);
}
@Override
......
......@@ -62,7 +62,7 @@ public class TriggerScry extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Player, this.getRunParams().get("Player"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Player);
}
@Override
......
......@@ -74,7 +74,7 @@ public class TriggerSearchedLibrary extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Player, this.getRunParams().get("Player"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Player);
}
@Override
......
......@@ -77,7 +77,7 @@ public class TriggerSetInMotion extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Scheme, this.getRunParams().get("Scheme"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Scheme);
}
@Override
......
......@@ -74,7 +74,7 @@ public class TriggerShuffled extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Player, this.getRunParams().get("Player"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Player);
}
@Override
......
......@@ -264,17 +264,20 @@ public class TriggerSpellAbilityCast extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
final SpellAbility castSA = (SpellAbility) getRunParams().get("CastSA");
final SpellAbility castSA = (SpellAbility) getFromRunParams(AbilityKey.CastSA);
final SpellAbilityStackInstance si = sa.getHostCard().getGame().getStack().getInstanceFromSpellAbility(castSA);
sa.setTriggeringObject(AbilityKey.Card, castSA.getHostCard());
sa.setTriggeringObject(AbilityKey.SpellAbility, castSA);
sa.setTriggeringObject(AbilityKey.StackInstance, si);
sa.setTriggeringObject(AbilityKey.SpellAbilityTargetingCards, (si != null ? si.getSpellAbility(true) : castSA).getTargets().getTargetCards());
sa.setTriggeringObject(AbilityKey.Player, getRunParams().get("Player"));
sa.setTriggeringObject(AbilityKey.Activator, getRunParams().get("Activator"));
sa.setTriggeringObject(AbilityKey.CurrentStormCount, getRunParams().get("CurrentStormCount"));
sa.setTriggeringObject(AbilityKey.CurrentCastSpells, getRunParams().get("CurrentCastSpells"));
sa.setTriggeringObject(AbilityKey.CastSACMC, getRunParams().get("CastSACMC"));
sa.setTriggeringObjectsFrom(
this,
AbilityKey.Player,
AbilityKey.Activator,
AbilityKey.CurrentStormCount,
AbilityKey.CurrentCastSpells,
AbilityKey.CastSACMC
);
}
@Override
......
......@@ -91,7 +91,7 @@ public class TriggerSpellAbilityCopy extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
final SpellAbility copySA = (SpellAbility) getRunParams().get("CopySA");
final SpellAbility copySA = (SpellAbility) getFromRunParams(AbilityKey.CopySA);
final SpellAbilityStackInstance si = sa.getHostCard().getGame().getStack().getInstanceFromSpellAbility(copySA);
sa.setTriggeringObject(AbilityKey.Card, copySA.getHostCard());
sa.setTriggeringObject(AbilityKey.SpellAbility, copySA);
......
......@@ -56,7 +56,7 @@ public class TriggerSurveil extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Player, this.getRunParams().get("Player"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Player);
}
/** {@inheritDoc} */
......
......@@ -78,7 +78,7 @@ public class TriggerTaps extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject(AbilityKey.Card, getRunParams().get("Card"));
sa.setTriggeringObjectsFrom(this, AbilityKey.Card);
}
@Override
......
......@@ -59,7 +59,7 @@ public class TriggerTransformed extends Trigger {