mirror of
https://github.com/correl/mage.git
synced 2024-12-27 03:00:13 +00:00
Merge pull request #3616 from spjspj/master
Fix for Solemnity (tested with Dark Depths, Ichor Rats, Sunset Pyrami…
This commit is contained in:
commit
e408cb84ab
1 changed files with 10 additions and 3 deletions
|
@ -139,15 +139,22 @@ class SolemnityEffect2 extends ReplacementEffectImpl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checksEventType(GameEvent event, Game game) {
|
public boolean checksEventType(GameEvent event, Game game) {
|
||||||
return event.getType() == EventType.ADD_COUNTER;
|
return event.getType() == EventType.ADD_COUNTER || event.getType() == EventType.ADD_COUNTERS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||||
MageObject object = game.getObject(event.getTargetId());
|
MageObject object = game.getObject(event.getTargetId());
|
||||||
if (object instanceof Permanent && filter.match((Permanent) object, game)) {
|
Permanent permanent = game.getPermanentEntering(event.getSourceId());
|
||||||
|
if (object != null && object instanceof Permanent) {
|
||||||
|
if (filter.match((Permanent) object, game)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
} else if (permanent != null) {
|
||||||
|
if (filter.match(permanent, game)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue