[ONE] Implement Jor Kadeen, First Goldwarden

This commit is contained in:
theelk801 2023-01-16 14:51:45 -05:00
parent 880383004b
commit 0e4483dd7c
3 changed files with 79 additions and 9 deletions

View file

@ -1,4 +1,3 @@
package mage.abilities.condition.common;
import mage.abilities.Ability;
@ -14,8 +13,8 @@ import mage.game.permanent.Permanent;
*/
public class SourceMatchesFilterCondition implements Condition {
private FilterPermanent FILTER;
private String text;
private final FilterPermanent FILTER;
private final String text;
public SourceMatchesFilterCondition(FilterPermanent filter) {
this(null, filter);
@ -28,12 +27,8 @@ public class SourceMatchesFilterCondition implements Condition {
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId());
if (FILTER.match(permanent, permanent.getControllerId(), source, game)) {
return true;
}
return false;
Permanent permanent = source.getSourcePermanentOrLKI(game);
return FILTER.match(permanent, permanent.getControllerId(), source, game);
}
@Override