mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 13:32:06 -08:00
Refactor: correct predicate packages
This commit is contained in:
parent
d343511d73
commit
2dfde7f41a
766 changed files with 771 additions and 830 deletions
|
|
@ -6,7 +6,7 @@ import mage.abilities.effects.Effect;
|
|||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.ZoneChangeEvent;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.condition.Condition;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.NamePredicate;
|
||||
import mage.filter.predicate.other.OwnerIdPredicate;
|
||||
import mage.filter.predicate.card.OwnerIdPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import mage.constants.Outcome;
|
|||
import mage.constants.Zone;
|
||||
import mage.filter.FilterImpl;
|
||||
import mage.filter.FilterInPlay;
|
||||
import mage.filter.predicate.mageobject.FromSetPredicate;
|
||||
import mage.filter.predicate.other.FromSetPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.CopiedStackObjectEvent;
|
||||
import mage.game.stack.Spell;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import mage.constants.Duration;
|
|||
import mage.constants.Outcome;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.EntersTheBattlefieldEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import mage.constants.Outcome;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.other.AuraCardCanAttachToPermanentId;
|
||||
import mage.filter.predicate.card.AuraCardCanAttachToPermanentId;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import mage.constants.Zone;
|
|||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import mage.cards.Card;
|
|||
import mage.constants.SpellAbilityType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.util.CardUtil;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import mage.filter.common.FilterControlledCreaturePermanent;
|
|||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
|||
import mage.abilities.effects.keyword.SupportEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import mage.filter.common.*;
|
|||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.KickedSpellPredicate;
|
||||
import mage.filter.predicate.mageobject.MulticoloredPredicate;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.predicate.permanent.AttackingPredicate;
|
||||
import mage.filter.predicate.permanent.TokenPredicate;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
|
||||
package mage.filter.predicate.other;
|
||||
package mage.filter.predicate.card;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.cards.Card;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package mage.filter.predicate.other;
|
||||
package mage.filter.predicate.card;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.cards.Card;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
package mage.filter.predicate.other;
|
||||
package mage.filter.predicate.card;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.cards.Card;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package mage.filter.predicate.mageobject;
|
||||
package mage.filter.predicate.card;
|
||||
|
||||
import mage.cards.Card;
|
||||
import mage.filter.predicate.ObjectPlayer;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package mage.filter.predicate.other;
|
||||
package mage.filter.predicate.card;
|
||||
|
||||
import mage.cards.AdventureCard;
|
||||
import mage.cards.Card;
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package mage.filter.predicate.other;
|
||||
package mage.filter.predicate.card;
|
||||
|
||||
import mage.cards.Card;
|
||||
import mage.constants.Zone;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package mage.filter.predicate.permanent;
|
||||
package mage.filter.predicate.card;
|
||||
|
||||
import mage.cards.Card;
|
||||
import mage.filter.predicate.ObjectPlayer;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
package mage.filter.predicate.other;
|
||||
package mage.filter.predicate.card;
|
||||
|
||||
import mage.cards.Card;
|
||||
import mage.filter.predicate.Predicate;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package mage.filter.predicate.other;
|
||||
package mage.filter.predicate.card;
|
||||
|
||||
import mage.abilities.keyword.MorphAbility;
|
||||
import mage.cards.Card;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package mage.filter.predicate.other;
|
||||
package mage.filter.predicate.card;
|
||||
|
||||
import mage.cards.Card;
|
||||
import mage.filter.predicate.Predicate;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
package mage.filter.predicate.other;
|
||||
package mage.filter.predicate.card;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.cards.Card;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
package mage.filter.predicate.permanent;
|
||||
package mage.filter.predicate.mageobject;
|
||||
|
||||
import mage.MageObject;
|
||||
import mage.filter.predicate.ObjectSourcePlayer;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package mage.filter.predicate.permanent;
|
||||
package mage.filter.predicate.mageobject;
|
||||
|
||||
import mage.MageObject;
|
||||
import mage.filter.predicate.Predicate;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package mage.filter.predicate.permanent;
|
||||
package mage.filter.predicate.mageobject;
|
||||
|
||||
import mage.MageObject;
|
||||
import mage.filter.predicate.Predicate;
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package mage.filter.predicate.other;
|
||||
package mage.filter.predicate.mageobject;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package mage.filter.predicate.other;
|
||||
package mage.filter.predicate.mageobject;
|
||||
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Mode;
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package mage.filter.predicate.other;
|
||||
package mage.filter.predicate.mageobject;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
package mage.filter.predicate.mageobject;
|
||||
package mage.filter.predicate.other;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageItem;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
package mage.filter.predicate.ability;
|
||||
package mage.filter.predicate.other;
|
||||
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.game.Game;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package mage.filter.predicate.permanent;
|
||||
package mage.filter.predicate.other;
|
||||
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.predicate.ObjectPlayer;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
package mage.filter.predicate.mageobject;
|
||||
package mage.filter.predicate.other;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package mage.filter.predicate.mageobject;
|
||||
package mage.filter.predicate.other;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Mode;
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
|
||||
package mage.filter.predicate.other;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.Target;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelIX
|
||||
*/
|
||||
public class PermanentCanTargetPermanentId implements Predicate<Permanent> {
|
||||
|
||||
private final UUID toBeCheckedPermanentId;
|
||||
|
||||
public PermanentCanTargetPermanentId(UUID toBeCheckedPermanentId) {
|
||||
this.toBeCheckedPermanentId = toBeCheckedPermanentId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Permanent input, Game game) {
|
||||
for (Target target : input.getSpellAbility().getTargets()) {
|
||||
if (target.canTarget(toBeCheckedPermanentId, input.getSpellAbility(), game)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "PermanentCanTargetPermanentId(" + toBeCheckedPermanentId + ')';
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package mage.filter.predicate.mageobject;
|
||||
package mage.filter.predicate.permanent;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.predicate.Predicate;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
package mage.filter.predicate.other;
|
||||
package mage.filter.predicate.permanent;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.filter.Filter;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package mage.filter.predicate.mageobject;
|
||||
package mage.filter.predicate.permanent;
|
||||
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.predicate.Predicate;
|
||||
|
|
@ -13,7 +13,7 @@ import mage.constants.Outcome;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import mage.target.TargetCard;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.predicate.other.OwnerIdPredicate;
|
||||
import mage.filter.predicate.card.OwnerIdPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue