mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Fix for Baron triggering on playing Morph creatures
This commit is contained in:
parent
c6d27bb3c9
commit
6a23a0f707
1 changed files with 11 additions and 9 deletions
|
@ -157,15 +157,17 @@ class BaronVonCountTriggeredAbility extends TriggeredAbilityImpl {
|
|||
}
|
||||
Integer doomNumber = (Integer) game.getState().getValue(mageObject.getId() + "_doom");
|
||||
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)
|
||||
|| String.valueOf(spell.getToughness().getBaseValue()).contains(doomString)) {
|
||||
return true;
|
||||
} else {
|
||||
for (String string : spell.getCard().getRules()) {
|
||||
if (string.contains(doomString)) {
|
||||
return true;
|
||||
if (!spell.isFaceDown(game)) {
|
||||
String doomString = doomNumber.toString();
|
||||
if (spell.getCard().getManaCost().getText().contains(doomString)
|
||||
|| String.valueOf(spell.getPower().getBaseValue()).contains(doomString)
|
||||
|| String.valueOf(spell.getToughness().getBaseValue()).contains(doomString)) {
|
||||
return true;
|
||||
} else {
|
||||
for (String string : spell.getCard().getRules()) {
|
||||
if (string.contains(doomString)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue