Some small improvements to text generation

This commit is contained in:
LevelX 2012-02-11 14:25:21 +01:00
parent fa587ce7b7
commit ef5594cdd3
3 changed files with 17 additions and 9 deletions

View file

@ -57,9 +57,9 @@ public class VaultOfTheArchangel extends CardImpl<VaultOfTheArchangel> {
this.addAbility(new ColorlessManaAbility()); this.addAbility(new ColorlessManaAbility());
// {2}{W}{B}, {tap}: Creatures you control gain deathtouch and lifelink until end of turn. // {2}{W}{B}, {tap}: Creatures you control gain deathtouch and lifelink until end of turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
new GainAbilityControlledEffect(DeathtouchAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent(), false), new GainAbilityControlledEffect(DeathtouchAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent("Creatures"), false),
new ManaCostsImpl("{2}{W}{B}")); new ManaCostsImpl("{2}{W}{B}"));
ability.addEffect(new GainAbilityControlledEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent(), false)); ability.addEffect(new GainAbilityControlledEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent("Creatures"), false));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -58,7 +58,7 @@ import mage.target.common.TargetCreaturePermanent;
public class CaptivatingVampire extends CardImpl<CaptivatingVampire> { public class CaptivatingVampire extends CardImpl<CaptivatingVampire> {
private static final FilterCreaturePermanent filter1 = new FilterCreaturePermanent("Vampire creatures"); private static final FilterCreaturePermanent filter1 = new FilterCreaturePermanent("Vampire creatures");
private static final FilterControlledCreaturePermanent filter2 = new FilterControlledCreaturePermanent("untapped Vampire"); private static final FilterControlledCreaturePermanent filter2 = new FilterControlledCreaturePermanent("untapped Vampires you control");
static { static {
filter1.getSubtype().add("Vampire"); filter1.getSubtype().add("Vampire");

View file

@ -77,12 +77,20 @@ public class GainAbilityAttachedEffect extends ContinuousEffectImpl<GainAbilityA
} }
private void setText() { private void setText() {
String prefix = ""; StringBuilder sb = new StringBuilder();
if (attachmentType == AttachmentType.AURA) if (attachmentType == AttachmentType.AURA) {
prefix = "Enchanted"; sb.append("Enchanted");
else if (attachmentType == AttachmentType.EQUIPMENT) } else if (attachmentType == AttachmentType.EQUIPMENT) {
prefix = "Equipped"; sb.append("Equipped");
staticText = prefix + " creature gains " + ability.getRule(); }
sb.append(" creature ");
if (duration == Duration.WhileOnBattlefield) {
sb.append("has ");
} else {
sb.append("gains ");
}
sb.append(ability.getRule());
staticText = sb.toString();
} }
} }