Refactoring: replace custom creature tokens with basic class (1 card);

Added blink test;
This commit is contained in:
Oleg Agafonov 2018-08-15 06:47:33 +04:00
parent 3da2f98eac
commit 593df43758
3 changed files with 41 additions and 25 deletions

View file

@ -16,7 +16,6 @@ import mage.game.permanent.token.Token;
public class BecomesCreatureAttachedWithActivatedAbilityOrSpellEffect extends ContinuousEffectImpl {
public enum LoseType {
NONE, ALL, ALL_BUT_COLOR, ABILITIES, ABILITIES_SUBTYPE_AND_PT
}
@ -102,6 +101,7 @@ public class BecomesCreatureAttachedWithActivatedAbilityOrSpellEffect extends Co
}
break;
case ColorChangingEffects_5:
if (sublayer == SubLayer.NA) {
if (loseType == LoseType.ALL) {
@ -116,6 +116,7 @@ public class BecomesCreatureAttachedWithActivatedAbilityOrSpellEffect extends Co
}
}
break;
case AbilityAddingRemovingEffects_6:
if (sublayer == SubLayer.NA) {
switch (loseType) {
@ -132,12 +133,13 @@ public class BecomesCreatureAttachedWithActivatedAbilityOrSpellEffect extends Co
}
break;
case PTChangingEffects_7:
if (sublayer == SubLayer.SetPT_7b) {
permanentAttachedTo.getPower().setValue(token.getPower().getValue());
permanentAttachedTo.getToughness().setValue(token.getToughness().getValue());
break;
}
break;
}
}
if (!attachedExists) {