mirror of
https://github.com/correl/mage.git
synced 2025-03-13 01:09:53 -09:00
Fixed a problem of DiesTriggeredAbility that produced null pointer exception.
This commit is contained in:
parent
8b880bfd47
commit
7a1245e2fe
2 changed files with 60 additions and 56 deletions
Mage/src/main/java/mage/abilities
|
@ -64,7 +64,7 @@ public class DiesTriggeredAbility extends ZoneChangeTriggeredAbility {
|
|||
return false;
|
||||
}
|
||||
// check now it is in graveyard
|
||||
if (before.getZoneChangeCounter(game) + 1 == game.getState().getZoneChangeCounter(source.getId())) {
|
||||
if (before.getZoneChangeCounter(game) + 1 == game.getState().getZoneChangeCounter(sourceId)) {
|
||||
Zone after = game.getState().getZone(sourceId);
|
||||
return after != null && Zone.GRAVEYARD.match(after);
|
||||
} else {
|
||||
|
|
|
@ -49,7 +49,11 @@ public class BoostAllOfChosenSubtypeEffect extends BoostAllEffect {
|
|||
@Override
|
||||
protected void setRuntimeData(Ability source, Game game) {
|
||||
String s = (String) game.getState().getValue(source.getSourceId() + "_type");
|
||||
if (subtype != null) {
|
||||
subtype = SubType.byDescription(s);
|
||||
} else {
|
||||
discard();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue