mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 03:22:00 -08:00
[ONE] Implement Jor Kadeen, First Goldwarden
This commit is contained in:
parent
880383004b
commit
0e4483dd7c
3 changed files with 79 additions and 9 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue