mirror of
https://github.com/correl/mage.git
synced 2024-12-25 19:25:41 +00:00
* Palladia-Mors, the Ruiner - Fixed possible exception.
This commit is contained in:
parent
da92cd745e
commit
f3d4194add
1 changed files with 2 additions and 2 deletions
|
@ -79,7 +79,7 @@ enum PalladiaMorsTheRuinerCondition implements Condition {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId());
|
Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId());
|
||||||
PalladiaMorsTheRuinerWatcher watcher = (PalladiaMorsTheRuinerWatcher) game.getState().getWatchers().get(PalladiaMorsTheRuinerWatcher.class.getSimpleName());
|
PalladiaMorsTheRuinerWatcher watcher = (PalladiaMorsTheRuinerWatcher) game.getState().getWatchers().get(PalladiaMorsTheRuinerWatcher.class.getSimpleName());
|
||||||
return !watcher.getDamagers().contains(new MageObjectReference(permanent, game));
|
return permanent != null && !watcher.getDamagers().contains(new MageObjectReference(permanent, game));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -91,7 +91,7 @@ enum PalladiaMorsTheRuinerCondition implements Condition {
|
||||||
|
|
||||||
class PalladiaMorsTheRuinerWatcher extends Watcher {
|
class PalladiaMorsTheRuinerWatcher extends Watcher {
|
||||||
|
|
||||||
private Set<MageObjectReference> damagers = new HashSet();
|
private final Set<MageObjectReference> damagers = new HashSet();
|
||||||
|
|
||||||
public PalladiaMorsTheRuinerWatcher() {
|
public PalladiaMorsTheRuinerWatcher() {
|
||||||
super(PalladiaMorsTheRuinerWatcher.class.getSimpleName(), WatcherScope.GAME);
|
super(PalladiaMorsTheRuinerWatcher.class.getSimpleName(), WatcherScope.GAME);
|
||||||
|
|
Loading…
Reference in a new issue