Some minor fixes/formatting.

This commit is contained in:
LevelX2 2013-11-30 23:28:03 +01:00
parent b1250353ee
commit 9602ac4e76
3 changed files with 15 additions and 15 deletions

View file

@ -29,18 +29,18 @@
package mage.sets.gatecrash; package mage.sets.gatecrash;
import java.util.UUID; import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.Mode; import mage.abilities.Mode;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.RequirementEffect; import mage.abilities.effects.RequirementEffect;
import mage.abilities.effects.common.continious.GainAbilityControlledEffect; import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
@ -65,8 +65,10 @@ public class HellraiserGoblin extends CardImpl<HellraiserGoblin> {
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
// Creatures you control have haste and attack each combat if able. // Creatures you control have haste and attack each combat if able.
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent())); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent("Creatures")));
ability.addEffect(new AttacksIfAbleAllEffect(Duration.WhileOnBattlefield)); Effect effect = new AttacksIfAbleAllEffect(Duration.WhileOnBattlefield);
effect.setText("and attack each combat if able");
ability.addEffect(effect);
this.addAbility(ability); this.addAbility(ability);
} }
@ -106,10 +108,7 @@ class AttacksIfAbleAllEffect extends RequirementEffect<AttacksIfAbleAllEffect> {
@Override @Override
public boolean applies(Permanent permanent, Ability source, Game game) { public boolean applies(Permanent permanent, Ability source, Game game) {
if (filter.match(permanent, source.getSourceId(), source.getControllerId(), game)) { return filter.match(permanent, source.getSourceId(), source.getControllerId(), game);
return true;
}
return false;
} }
@Override @Override
@ -124,6 +123,9 @@ class AttacksIfAbleAllEffect extends RequirementEffect<AttacksIfAbleAllEffect> {
@Override @Override
public String getText(Mode mode) { public String getText(Mode mode) {
if (!staticText.isEmpty()) {
return staticText;
}
return filter.getMessage() + " attack each combat if able"; return filter.getMessage() + " attack each combat if able";
} }

View file

@ -68,7 +68,7 @@ public class SowerOfTemptation extends CardImpl<SowerOfTemptation> {
ConditionalContinousEffect effect = new ConditionalContinousEffect( ConditionalContinousEffect effect = new ConditionalContinousEffect(
new GainControlTargetEffect(Duration.Custom, true), new GainControlTargetEffect(Duration.Custom, true),
new PermanentOnBattelfieldCondition(), new PermanentOnBattelfieldCondition(),
"gain control of target creature for as long as Sower of Temptation remains on the battlefield"); "gain control of target creature for as long as {this} remains on the battlefield");
Ability ability = new EntersBattlefieldTriggeredAbility(effect, false); Ability ability = new EntersBattlefieldTriggeredAbility(effect, false);
ability.addTarget(new TargetCreaturePermanent()); ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability); this.addAbility(ability);

View file

@ -33,13 +33,11 @@ import mage.abilities.common.AttacksAttachedTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.ScryEffect; import mage.abilities.effects.common.ScryEffect;
import mage.abilities.effects.common.continious.GainAbilityAttachedEffect; import mage.abilities.effects.common.combat.UnblockableAttachedEffect;
import mage.abilities.keyword.EnchantAbility; import mage.abilities.keyword.EnchantAbility;
import mage.abilities.keyword.UnblockableAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.constants.AttachmentType; import mage.constants.AttachmentType;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.Rarity; import mage.constants.Rarity;
import mage.constants.Zone; import mage.constants.Zone;
@ -66,7 +64,7 @@ public class AqueousForm extends CardImpl<AqueousForm> {
Ability ability = new EnchantAbility(auraTarget.getTargetName()); Ability ability = new EnchantAbility(auraTarget.getTargetName());
this.addAbility(ability); this.addAbility(ability);
// Enchanted creature can't be blocked. // Enchanted creature can't be blocked.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(new UnblockableAbility(), AttachmentType.AURA, Duration.WhileOnBattlefield))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new UnblockableAttachedEffect(AttachmentType.AURA)));
// Whenever enchanted creature attacks, scry 1. // Whenever enchanted creature attacks, scry 1.
this.addAbility(new AttacksAttachedTriggeredAbility(new ScryEffect(1), AttachmentType.AURA,false)); this.addAbility(new AttacksAttachedTriggeredAbility(new ScryEffect(1), AttachmentType.AURA,false));