mirror of
https://github.com/correl/mage.git
synced 2024-11-21 19:18:40 +00:00
fix text: Silverskin Armor
This commit is contained in:
parent
98e40b2a8b
commit
5722ae27f6
3 changed files with 13 additions and 18 deletions
|
@ -2,6 +2,8 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.continuous.AddCardTypeAttachedEffect;
|
||||
|
@ -22,8 +24,9 @@ public final class SilverskinArmor extends CardImpl {
|
|||
this.subtype.add(SubType.EQUIPMENT);
|
||||
|
||||
// Equipped creature gets +1/+1 and is an artifact in addition to its other types.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1, Duration.WhileOnBattlefield)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AddCardTypeAttachedEffect(CardType.ARTIFACT, Duration.WhileOnBattlefield, AttachmentType.EQUIPMENT)));
|
||||
Ability ability = new SimpleStaticAbility(new BoostEquippedEffect(1, 1));
|
||||
ability.addEffect(new AddCardTypeAttachedEffect(CardType.ARTIFACT, AttachmentType.EQUIPMENT));
|
||||
this.addAbility(ability);
|
||||
|
||||
// Equip {2}
|
||||
this.addAbility(new EquipAbility(Outcome.BoostCreature, new ManaCostsImpl<>("{2}"), false));
|
||||
|
|
|
@ -7,7 +7,6 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.LicidAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continuous.AddCardTypeAttachedEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -15,8 +14,6 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.AttachmentType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -34,10 +31,8 @@ public final class TransmogrifyingLicid extends CardImpl {
|
|||
this.addAbility(new LicidAbility(new GenericManaCost(1), new GenericManaCost(1)));
|
||||
|
||||
// Enchanted creature gets +1/+1 and is an artifact in addition to its other types.
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 1));
|
||||
Effect effect = new AddCardTypeAttachedEffect(CardType.ARTIFACT, Duration.WhileOnBattlefield, AttachmentType.AURA);
|
||||
effect.setText("and is an artifact in addition to its other types");
|
||||
ability.addEffect(effect);
|
||||
Ability ability = new SimpleStaticAbility(new BoostEnchantedEffect(1, 1));
|
||||
ability.addEffect(new AddCardTypeAttachedEffect(CardType.ARTIFACT, AttachmentType.AURA));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import mage.abilities.effects.ContinuousEffectImpl;
|
|||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
* @author nantuko
|
||||
|
@ -15,11 +16,13 @@ public class AddCardTypeAttachedEffect extends ContinuousEffectImpl {
|
|||
private final CardType addedCardType;
|
||||
private final AttachmentType attachmentType;
|
||||
|
||||
public AddCardTypeAttachedEffect(CardType addedCardType, Duration duration, AttachmentType attachmentType) {
|
||||
super(duration, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Benefit);
|
||||
public AddCardTypeAttachedEffect(CardType addedCardType, AttachmentType attachmentType) {
|
||||
super(Duration.WhileOnBattlefield, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Benefit);
|
||||
this.addedCardType = addedCardType;
|
||||
this.attachmentType = attachmentType;
|
||||
setText();
|
||||
staticText = "and is " +
|
||||
CardUtil.addArticle(CardUtil.getTextWithFirstCharLowerCase(addedCardType.toString())) +
|
||||
" in addition to its other types";
|
||||
}
|
||||
|
||||
public AddCardTypeAttachedEffect(final AddCardTypeAttachedEffect effect) {
|
||||
|
@ -45,10 +48,4 @@ public class AddCardTypeAttachedEffect extends ContinuousEffectImpl {
|
|||
return new AddCardTypeAttachedEffect(this);
|
||||
}
|
||||
|
||||
private void setText() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(attachmentType.verb());
|
||||
sb.append(" creature becomes ").append(addedCardType.toString()).append(" in addition to its other types"); //TODO add attacked card type detection
|
||||
staticText = sb.toString();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue