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
|
|
@ -10,7 +10,7 @@ import mage.game.Game;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.PermanentCard;
|
||||
import mage.game.permanent.PermanentToken;
|
||||
import mage.util.functions.ApplyToPermanent;
|
||||
import mage.util.functions.CopyApplier;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ public class CopyEffect extends ContinuousEffectImpl {
|
|||
protected MageObject copyFromObject;
|
||||
|
||||
protected UUID copyToObjectId;
|
||||
protected ApplyToPermanent applier;
|
||||
protected CopyApplier applier;
|
||||
|
||||
public CopyEffect(MageObject copyFromObject, UUID copyToObjectId) {
|
||||
this(Duration.Custom, copyFromObject, copyToObjectId);
|
||||
|
|
@ -105,8 +105,7 @@ public class CopyEffect extends ContinuousEffectImpl {
|
|||
}
|
||||
|
||||
permanent.removeAllSubTypes(game);
|
||||
permanent.getSubtype(game).addAll(copyFromObject.getSubtype(game));
|
||||
permanent.setIsAllCreatureTypes(copyFromObject.isAllCreatureTypes());
|
||||
permanent.copySubTypesFrom(game, copyFromObject);
|
||||
|
||||
permanent.getSuperType().clear();
|
||||
for (SuperType type : copyFromObject.getSuperType()) {
|
||||
|
|
@ -165,11 +164,11 @@ public class CopyEffect extends ContinuousEffectImpl {
|
|||
return copyToObjectId;
|
||||
}
|
||||
|
||||
public ApplyToPermanent getApplier() {
|
||||
public CopyApplier getApplier() {
|
||||
return applier;
|
||||
}
|
||||
|
||||
public void setApplier(ApplyToPermanent applier) {
|
||||
public void setApplier(CopyApplier applier) {
|
||||
this.applier = applier;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue