Changes to first trigger

This commit is contained in:
Zzooouhh 2017-12-26 17:55:58 +01:00 committed by GitHub
parent 0ec629d6e5
commit 4e34b0d1d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -156,7 +156,7 @@ class BaronVonCountTriggeredAbility extends TriggeredAbilityImpl {
return false;
}
Integer doomNumber = (Integer) game.getState().getValue(mageObject.getId() + "_doom");
if (spell != null && sourcePermanent != null && mageObject != null) {
if (spell != null && sourcePermanent != null && mageObject != null && doomNumber > 0) {
String doomString = doomNumber.toString();
if (spell.getCard().getManaCost().getText().contains(doomString)
|| String.valueOf(spell.getPower().getBaseValue()).contains(doomString)