mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
* Instill Energy - Fixed that the enchanted creature could not attack (but should be able) the turn it came into play.
This commit is contained in:
parent
2b94ed232a
commit
37ffeac23d
4 changed files with 9 additions and 16 deletions
|
@ -36,12 +36,10 @@ import mage.abilities.costs.mana.GenericManaCost;
|
|||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.UntapEnchantedEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AsThoughEffectType;
|
||||
import mage.constants.AttachmentType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
|
@ -58,7 +56,7 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
public class InstillEnergy extends CardImpl {
|
||||
|
||||
public InstillEnergy(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}");
|
||||
this.subtype.add("Aura");
|
||||
|
||||
// Enchant creature
|
||||
|
@ -68,9 +66,7 @@ public class InstillEnergy extends CardImpl {
|
|||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
this.addAbility(ability);
|
||||
// Enchanted creature can attack as though it had haste.
|
||||
Ability asThough = new SimpleStaticAbility(Zone.BATTLEFIELD, new CanAttackAsThoughItHadHasteEnchantedEffect(Duration.WhileOnBattlefield));
|
||||
Ability haste = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(asThough, AttachmentType.AURA, Duration.WhileOnBattlefield, "Enchanted creature can attack as though it had haste."));
|
||||
this.addAbility(haste);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CanAttackAsThoughItHadHasteEnchantedEffect(Duration.WhileOnBattlefield)));
|
||||
// {0}: Untap enchanted creature. Activate this ability only during your turn and only once each turn.
|
||||
this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new UntapEnchantedEffect(), new GenericManaCost(0), 1, MyTurnCondition.instance));
|
||||
}
|
||||
|
@ -88,7 +84,7 @@ public class InstillEnergy extends CardImpl {
|
|||
class CanAttackAsThoughItHadHasteEnchantedEffect extends AsThoughEffectImpl {
|
||||
|
||||
public CanAttackAsThoughItHadHasteEnchantedEffect(Duration duration) {
|
||||
super(AsThoughEffectType.ATTACK, duration, Outcome.Benefit);
|
||||
super(AsThoughEffectType.ATTACK_AS_HASTE, duration, Outcome.Benefit);
|
||||
staticText = "Enchanted creature can attack as though it had haste";
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
*/
|
||||
package mage.cards.u;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.AuraAttachedCount;
|
||||
|
@ -39,8 +40,6 @@ import mage.constants.Duration;
|
|||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
|
@ -48,23 +47,20 @@ import java.util.UUID;
|
|||
public class UrilTheMiststalker extends CardImpl {
|
||||
|
||||
public UrilTheMiststalker(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{G}{W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{G}{W}");
|
||||
addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add("Beast");
|
||||
|
||||
|
||||
|
||||
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// Hexproof
|
||||
this.addAbility(HexproofAbility.getInstance());
|
||||
|
||||
|
||||
// Uril, the Miststalker gets +2/+2 for each Aura attached to it.
|
||||
AuraAttachedCount count = new AuraAttachedCount(2);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(count, count, Duration.WhileOnBattlefield)));
|
||||
|
||||
|
||||
}
|
||||
|
||||
public UrilTheMiststalker(final UrilTheMiststalker card) {
|
||||
|
|
|
@ -7,6 +7,7 @@ package mage.constants;
|
|||
public enum AsThoughEffectType {
|
||||
|
||||
ATTACK,
|
||||
ATTACK_AS_HASTE,
|
||||
ACTIVATE_HASTE,
|
||||
BLOCK_TAPPED,
|
||||
BLOCK_SHADOW,
|
||||
|
|
|
@ -1037,7 +1037,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
if (tapped) {
|
||||
return false;
|
||||
}
|
||||
if (hasSummoningSickness()) {
|
||||
if (hasSummoningSickness() && !game.getContinuousEffects().asThough(this.objectId, AsThoughEffectType.ATTACK_AS_HASTE, this.getControllerId(), game)) {
|
||||
return false;
|
||||
}
|
||||
//20101001 - 508.1c
|
||||
|
|
Loading…
Reference in a new issue