mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 13:19:18 -08:00
[NEO] Implemented Lethal Exploit
This commit is contained in:
parent
ffe753fa91
commit
a64741ff49
4 changed files with 88 additions and 7 deletions
81
Mage.Sets/src/mage/cards/l/LethalExploit.java
Normal file
81
Mage.Sets/src/mage/cards/l/LethalExploit.java
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
package mage.cards.l;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.MageObject;
|
||||
import mage.MageObjectReference;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.watchers.common.ControlledModifiedCreatureAsSpellCastWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class LethalExploit extends CardImpl {
|
||||
|
||||
public LethalExploit(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}");
|
||||
|
||||
// Target creature gets -2/-2 until end of turn. It gets an additional -1/-1 until end of turn for each modified creature you controlled as you cast this spell.
|
||||
this.getSpellAbility().addEffect(new LethalExploitEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
this.getSpellAbility().addWatcher(new ControlledModifiedCreatureAsSpellCastWatcher());
|
||||
}
|
||||
|
||||
private LethalExploit(final LethalExploit card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LethalExploit copy() {
|
||||
return new LethalExploit(this);
|
||||
}
|
||||
}
|
||||
|
||||
class LethalExploitEffect extends ContinuousEffectImpl {
|
||||
|
||||
private int boostValue = -2;
|
||||
|
||||
public LethalExploitEffect() {
|
||||
super(Duration.EndOfTurn, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.UnboostCreature);
|
||||
this.staticText = "Target creature gets -2/-2 until end of turn. It gets an additional -1/-1 until end of turn for each modified creature you controlled as you cast this spell";
|
||||
}
|
||||
|
||||
private LethalExploitEffect(final LethalExploitEffect effect) {
|
||||
super(effect);
|
||||
this.boostValue = effect.boostValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LethalExploitEffect copy() {
|
||||
return new LethalExploitEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(Ability source, Game game) {
|
||||
super.init(source, game);
|
||||
ControlledModifiedCreatureAsSpellCastWatcher watcher = game.getState().getWatcher(ControlledModifiedCreatureAsSpellCastWatcher.class);
|
||||
MageObject sourceObject = source.getSourceObject(game);
|
||||
if (watcher != null && sourceObject != null) {
|
||||
boostValue -= watcher.getModifiedCreatureCount(new MageObjectReference(sourceObject, game));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent target = game.getPermanent(source.getFirstTarget());
|
||||
if (target == null) {
|
||||
return false;
|
||||
}
|
||||
target.addPower(boostValue);
|
||||
target.addToughness(boostValue);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -161,6 +161,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Kura, the Boundless Sky", 200, Rarity.MYTHIC, mage.cards.k.KuraTheBoundlessSky.class));
|
||||
cards.add(new SetCardInfo("Kyodai, Soul of Kamigawa", 23, Rarity.RARE, mage.cards.k.KyodaiSoulOfKamigawa.class));
|
||||
cards.add(new SetCardInfo("Leech Gauntlet", 106, Rarity.UNCOMMON, mage.cards.l.LeechGauntlet.class));
|
||||
cards.add(new SetCardInfo("Lethal Exploit", 107, Rarity.COMMON, mage.cards.l.LethalExploit.class));
|
||||
cards.add(new SetCardInfo("Life of Toshiro Umezawa", 108, Rarity.UNCOMMON, mage.cards.l.LifeOfToshiroUmezawa.class));
|
||||
cards.add(new SetCardInfo("Light the Way", 24, Rarity.COMMON, mage.cards.l.LightTheWay.class));
|
||||
cards.add(new SetCardInfo("Likeness of the Seeker", 172, Rarity.UNCOMMON, mage.cards.l.LikenessOfTheSeeker.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue