mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Fixed 3 cards
This commit is contained in:
parent
f577a4b614
commit
2db6ff1825
3 changed files with 8 additions and 4 deletions
|
@ -40,6 +40,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.*;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.abilities.effects.Effect;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -59,8 +60,11 @@ public class Cagemail extends CardImpl {
|
|||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
this.addAbility(ability);
|
||||
// Enchanted creature gets +2/+2 and can't block.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 2, Duration.WhileOnBattlefield)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBlockAttachedEffect(AttachmentType.AURA)));
|
||||
Ability ability1 = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 2, Duration.WhileOnBattlefield));
|
||||
Effect effect = new CantBlockAttachedEffect(AttachmentType.AURA);
|
||||
effect.setText("and can't block.");
|
||||
ability1.addEffect(effect);
|
||||
this.addAbility(ability1);
|
||||
}
|
||||
|
||||
public Cagemail(final Cagemail card) {
|
||||
|
|
|
@ -99,7 +99,7 @@ class PreventDamageToSourceByEnchantedCreatures extends PreventAllDamageToSource
|
|||
}
|
||||
|
||||
public boolean isEnchantedCreature(MageObject input, Game game) {
|
||||
if (!input.getCardType().contains(CardType.CREATURE)) {
|
||||
if (input != null && !input.getCardType().contains(CardType.CREATURE)) {
|
||||
return false;
|
||||
}
|
||||
for (UUID attachmentId : ((Permanent)input).getAttachments()) {
|
||||
|
|
|
@ -45,7 +45,7 @@ import mage.game.permanent.Permanent;
|
|||
public class CantAttackUnlessPaysAttachedEffect extends PayCostToAttackBlockEffectImpl {
|
||||
|
||||
public CantAttackUnlessPaysAttachedEffect(ManaCosts manaCosts, AttachmentType attachmentType) {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Detriment, RestrictType.ATTACK_AND_BLOCK, manaCosts);
|
||||
super(Duration.WhileOnBattlefield, Outcome.Detriment, RestrictType.ATTACK, manaCosts);
|
||||
staticText = (attachmentType.equals(AttachmentType.AURA) ? "Enchanted " : "Equipped ")
|
||||
+ "creature can't attack unless its controller pays "
|
||||
+ (manaCosts == null ? "" : manaCosts.getText());
|
||||
|
|
Loading…
Reference in a new issue