mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
[ZNR] Implemented Shell Shield
This commit is contained in:
parent
af598df288
commit
fdba488ab5
2 changed files with 73 additions and 0 deletions
72
Mage.Sets/src/mage/cards/s/ShellShield.java
Normal file
72
Mage.Sets/src/mage/cards/s/ShellShield.java
Normal file
|
@ -0,0 +1,72 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.KickedCondition;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.HexproofAbility;
|
||||
import mage.abilities.keyword.KickerAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ShellShield extends CardImpl {
|
||||
|
||||
public ShellShield(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}");
|
||||
|
||||
// Kicker {1}
|
||||
this.addAbility(new KickerAbility(new ManaCostsImpl<>("{1}")));
|
||||
|
||||
// Target creature you control gets +0/+3 until end of turn. If this spell was kicked, that creature also gains hexproof until end of turn.
|
||||
this.getSpellAbility().addEffect(new ShellShieldEffect());
|
||||
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
|
||||
}
|
||||
|
||||
private ShellShield(final ShellShield card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShellShield copy() {
|
||||
return new ShellShield(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ShellShieldEffect extends OneShotEffect {
|
||||
|
||||
ShellShieldEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "Target creature you control gets +0/+3 until end of turn. " +
|
||||
"If this spell was kicked, that creature also gains hexproof until end of turn.";
|
||||
}
|
||||
|
||||
private ShellShieldEffect(final ShellShieldEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShellShieldEffect copy() {
|
||||
return new ShellShieldEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
game.addEffect(new BoostTargetEffect(0, 3, Duration.EndOfTurn), source);
|
||||
if (KickedCondition.instance.apply(game, source)) {
|
||||
game.addEffect(new GainAbilityTargetEffect(HexproofAbility.getInstance(), Duration.EndOfTurn), source);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -33,5 +33,6 @@ public final class ZendikarRising extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Murasa Rootgrazer", 229, Rarity.UNCOMMON, mage.cards.m.MurasaRootgrazer.class));
|
||||
cards.add(new SetCardInfo("Nahiri, Heir of the Ancients", 230, Rarity.MYTHIC, mage.cards.n.NahiriHeirOfTheAncients.class));
|
||||
cards.add(new SetCardInfo("Ruin Crab", 75, Rarity.UNCOMMON, mage.cards.r.RuinCrab.class));
|
||||
cards.add(new SetCardInfo("Shell Shield", 79, Rarity.COMMON, mage.cards.s.ShellShield.class));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue