mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
* Leonin Arbiter - Fixed a bug if Leonin Arbiter left battlefield.
This commit is contained in:
parent
92d1e2c652
commit
88ca0cb495
1 changed files with 10 additions and 5 deletions
|
@ -161,12 +161,16 @@ class LeoninArbiterCantSearchEffect extends ContinuousRuleModifyingEffectImpl {
|
|||
this.keyString = effect.keyString;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return EventType.SEARCH_LIBRARY.equals(event.getType());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
boolean applies = false;
|
||||
if (EventType.SEARCH_LIBRARY.equals(event.getType())) {
|
||||
applies = true;
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null) {
|
||||
boolean applies = true;
|
||||
String key = permanent.getId() + keyString;
|
||||
Map.Entry<Long, Set<UUID>> turnIgnoringPlayersPair = (Map.Entry<Long, Set<UUID>>) game.getState().getValue(key);
|
||||
if (turnIgnoringPlayersPair != null) {
|
||||
|
@ -177,8 +181,9 @@ class LeoninArbiterCantSearchEffect extends ContinuousRuleModifyingEffectImpl {
|
|||
applies = !turnIgnoringPlayersPair.getValue().contains(event.getPlayerId());
|
||||
}
|
||||
}
|
||||
return applies;
|
||||
}
|
||||
return applies;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue