forked from External/mage
Refactoring subtypes to make Maskwood Nexus work (ready for review) (#7432)
* removed and renamed SubTypeList * updated subtype test * refactored Changeling to be an ability that actually does something * moved isAllCreatureTypes into SubTypes class * renamed copyTo method to copyFrom * added removeAllCreatureTypes where usable * replaced some subtype methods * replaced some more subtype methods * replaced subtype mass add/remove methods * updated more subtype methods * fixed some errors * made common shared creature type predicate * refactored another card involving subtypes * Added usage of object attribute in subTypes's write operations; * Refactor: use same param styles in subtype methods * Refactor: simplified usage of copy appliers; * Refactor: fixed code usage in CopyApplier Co-authored-by: Oleg Agafonov <jaydi85@gmail.com>
This commit is contained in:
parent
6f42b90305
commit
dacf30f4b9
259 changed files with 1857 additions and 1922 deletions
|
|
@ -16,8 +16,8 @@ import mage.game.permanent.Permanent;
|
|||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.util.functions.ApplyToPermanent;
|
||||
import mage.util.functions.EmptyApplyToPermanent;
|
||||
import mage.util.functions.CopyApplier;
|
||||
import mage.util.functions.EmptyCopyApplier;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ import java.util.UUID;
|
|||
public class CopyPermanentEffect extends OneShotEffect {
|
||||
|
||||
private final FilterPermanent filter;
|
||||
private final ApplyToPermanent applier;
|
||||
private final CopyApplier applier;
|
||||
private final boolean useTargetOfAbility;
|
||||
private Permanent bluePrintPermanent;
|
||||
private Duration duration = Duration.Custom;
|
||||
|
|
@ -36,19 +36,19 @@ public class CopyPermanentEffect extends OneShotEffect {
|
|||
this(StaticFilters.FILTER_PERMANENT_CREATURE);
|
||||
}
|
||||
|
||||
public CopyPermanentEffect(ApplyToPermanent applier) {
|
||||
public CopyPermanentEffect(CopyApplier applier) {
|
||||
this(StaticFilters.FILTER_PERMANENT_CREATURE, applier);
|
||||
}
|
||||
|
||||
public CopyPermanentEffect(FilterPermanent filter) {
|
||||
this(filter, new EmptyApplyToPermanent());
|
||||
this(filter, new EmptyCopyApplier());
|
||||
}
|
||||
|
||||
public CopyPermanentEffect(FilterPermanent filter, ApplyToPermanent applier) {
|
||||
public CopyPermanentEffect(FilterPermanent filter, CopyApplier applier) {
|
||||
this(filter, applier, false);
|
||||
}
|
||||
|
||||
public CopyPermanentEffect(FilterPermanent filter, ApplyToPermanent applier, boolean useTarget) {
|
||||
public CopyPermanentEffect(FilterPermanent filter, CopyApplier applier, boolean useTarget) {
|
||||
super(Outcome.Copy);
|
||||
this.applier = applier;
|
||||
this.filter = filter;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue