mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
- NPE check with debug output added to TriggerSpellAbilityCast.
This commit is contained in:
@@ -55,6 +55,10 @@ public class TriggerSpellAbilityCast extends Trigger {
|
|||||||
@Override
|
@Override
|
||||||
public final boolean performTest(final java.util.Map<String, Object> runParams2) {
|
public final boolean performTest(final java.util.Map<String, Object> runParams2) {
|
||||||
final SpellAbility spellAbility = (SpellAbility) runParams2.get("CastSA");
|
final SpellAbility spellAbility = (SpellAbility) runParams2.get("CastSA");
|
||||||
|
if (spellAbility == null) {
|
||||||
|
System.out.println("TriggerSpellAbilityCast performTest encountered spellAbility == null. runParams2 = " + runParams2);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
final Card cast = spellAbility.getSourceCard();
|
final Card cast = spellAbility.getSourceCard();
|
||||||
final Game game = cast.getGame();
|
final Game game = cast.getGame();
|
||||||
final SpellAbilityStackInstance si = game.getStack().getInstanceFromSpellAbility(spellAbility);
|
final SpellAbilityStackInstance si = game.getStack().getInstanceFromSpellAbility(spellAbility);
|
||||||
|
|||||||
Reference in New Issue
Block a user