Improved some source related filters in effects:

* Fixed that some cards ignore range of influence or source related filters;
* Improved ChosenSubtypePredicate to work with gain abilities;
This commit is contained in:
Oleg Agafonov 2020-12-25 19:05:49 +04:00
parent fdcf2c616b
commit a307e5934f
32 changed files with 291 additions and 197 deletions

View file

@ -50,7 +50,7 @@ class GideonOfTheTrialsCantLoseEffect extends ContinuousRuleModifyingEffectImpl
public boolean applies(GameEvent event, Ability source, Game game) {
if ((event.getType() == GameEvent.EventType.WINS && game.getOpponents(source.getControllerId()).contains(event.getPlayerId()))
|| (event.getType() == GameEvent.EventType.LOSES && event.getPlayerId().equals(source.getControllerId()))) {
return game.getBattlefield().contains(filter, source.getControllerId(), 1, game);
return game.getBattlefield().containsControlled(filter, source, game, 1);
}
return false;
}