fix supertype on the client

This commit is contained in:
ingmargoudt 2017-03-27 22:20:19 +02:00
parent 0879298e92
commit 5cd1b5880f
9 changed files with 64 additions and 117 deletions

View file

@ -31,11 +31,7 @@ import mage.MageObjectReference;
import mage.abilities.Ability;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.cards.repository.CardRepository;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Layer;
import mage.constants.Outcome;
import mage.constants.SubLayer;
import mage.constants.*;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.Token;
@ -101,10 +97,9 @@ public class BecomesCreatureAttachedWithActivatedAbilityOrSpellEffect extends Co
switch (layer) {
case TypeChangingEffects_4:
if (sublayer == SubLayer.NA) {
for (String superType : token.getSupertype()) {
if (!permanentAttachedTo.getSupertype().contains(superType)) {
permanentAttachedTo.getSupertype().add(superType);
}
for (SuperType superType : token.getSuperType()) {
permanentAttachedTo.addSuperType(superType);
}
// card type
switch (loseType) {

View file

@ -5,11 +5,21 @@ package mage.constants;
*/
public enum SuperType {
BASIC,
ELITE,
LEGENDARY,
ONGOING,
SNOW,
WORLD
BASIC("Basic"),
ELITE("Elite"),
LEGENDARY("Legendary"),
ONGOING("Ongoing"),
SNOW("Snow"),
WORLD("World");
String text;
SuperType(String text){
this.text = text;
}
public String toString(){
return text;
}
}