mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
- Fixed a potential NPE
This commit is contained in:
@@ -183,7 +183,7 @@ public class TokenAi extends SpellAbilityAi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//interrupt sacrifice effect
|
//interrupt sacrifice effect
|
||||||
if (sacOnStack) {
|
if (sacOnStack && game.getStack().peekAbility().hasParam("SacValid")) {
|
||||||
final int nTokens = AbilityUtils.calculateAmount(sa.getHostCard(), this.tokenAmount, sa);
|
final int nTokens = AbilityUtils.calculateAmount(sa.getHostCard(), this.tokenAmount, sa);
|
||||||
SpellAbility topStack = game.getStack().peekAbility();
|
SpellAbility topStack = game.getStack().peekAbility();
|
||||||
final String valid = topStack.getParam("SacValid");
|
final String valid = topStack.getParam("SacValid");
|
||||||
|
|||||||
Reference in New Issue
Block a user