Fixing issues with Changelings and general problems with creature types (ready to merge) (#7098)

* updated Changelings to use setIsAllCreatureTypes

* updated Dr Julius Jumblemorph and Mistform Ultimus to not use changeling

* added test for Mistform Ultimus

* updated effects which give all creature types to controlled creatures

* updated effects which give all creature types to targeted creatures

* Update LoseAllCreatureTypesTargetEffect.java

* updated effects which give all creature types to attached creatures

* Update EgoErasure.java

* added another test for changelings

* updated two tokens I left out before

* updated hasSubtype

* updated shareCreatureTypes

* fixed an incorrect test

* cleaned up some cards which check for shared creature types

* added new changeling test

* fixed issue with shareCreatureTypes

* fixed a text issue

* added new tests for subtype effects

* various individual card fixes and cleanups

* fixed and updated various effects

* many more fixes

* a few more fixes

* added test for One with the Stars

* added changeling verify test

* updated effects which add additional subtypes

* more miscellaneous fixes

* added additional test

* some fixes for card type checks

* updated methods for adding types to make it easier to avoid duplicates and illegal additions

* small test update

* fixed a recursive loop issue

* fixed another error

* fixed it for real this time

* streamlined type removal process

* streamlined subtype set generation
This commit is contained in:
Evan Kranzler 2020-10-30 22:32:59 -04:00 committed by GitHub
parent 42e00b7a37
commit 8617bc128e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
182 changed files with 2431 additions and 2820 deletions

View file

@ -1,10 +1,5 @@
package mage.abilities.effects.common;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;
import mage.MageObject;
import mage.ObjectColor;
import mage.abilities.Ability;
@ -25,6 +20,11 @@ import mage.util.CardUtil;
import mage.util.functions.ApplyToPermanent;
import mage.util.functions.EmptyApplyToPermanent;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;
/**
* @author LevelX2
*/
@ -179,10 +179,10 @@ public class CreateTokenCopyTargetEffect extends OneShotEffect {
token.getSuperType().remove(SuperType.LEGENDARY);
}
if (startingLoyalty!=-1){
if (startingLoyalty != -1) {
token.setStartingLoyalty(startingLoyalty);
}
if (additionalCardType != null && !token.getCardType().contains(additionalCardType)) {
if (additionalCardType != null) {
token.addCardType(additionalCardType);
}
if (hasHaste) {
@ -199,12 +199,12 @@ public class CreateTokenCopyTargetEffect extends OneShotEffect {
token.removePTCDA();
token.getToughness().modifyBaseValue(tokenToughness);
}
if (additionalSubType != null && !token.hasSubtype(additionalSubType, game)) {
token.getSubtype(game).add(additionalSubType);
if (onlySubType != null) {
token.removeAllCreatureTypes(game);
token.addSubType(game, onlySubType);
}
if (onlySubType != null && !token.hasSubtype(onlySubType, game)) {
token.getSubtype(game).clear();
token.getSubtype(game).add(onlySubType);
if (additionalSubType != null && !token.hasSubtype(additionalSubType, game)) {
token.addSubType(game, additionalSubType);
}
if (color != null) {
token.getColor(game).setColor(color);