mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 12:02:01 -08:00
Allow trigger to recognize double digit P/T
This commit is contained in:
parent
4910d17272
commit
8538e6d157
1 changed files with 6 additions and 4 deletions
|
|
@ -157,13 +157,14 @@ class BaronVonCountTriggeredAbility extends TriggeredAbilityImpl {
|
|||
}
|
||||
Integer doomNumber = (Integer) game.getState().getValue(mageObject.getId() + "_doom");
|
||||
if (spell != null && sourcePermanent != null && mageObject != null) {
|
||||
if (spell.getCard().getManaCost().getText().contains(doomNumber.toString())
|
||||
|| spell.getPower().getBaseValue() == doomNumber
|
||||
|| spell.getToughness().getBaseValue() == doomNumber) {
|
||||
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(doomNumber.toString())) {
|
||||
if (string.contains(doomString)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -200,6 +201,7 @@ class BaronVonCountMoveDoomCounterEffect extends OneShotEffect {
|
|||
}
|
||||
Integer doomNumber = (Integer) game.getState().getValue(mageObject.getId() + "_doom");
|
||||
if (doomNumber <= 1) {
|
||||
// not completely sure if counter should be moving here or not (relevant in case the second trigger gets countered)
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.CUSTOM_EVENT, source.getSourceId(), source.getSourceId(), controller.getId(), "DoomCounterReset", 1));
|
||||
} else {
|
||||
doomNumber--;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue