forked from External/mage
Implemented Rookie Mistake
This commit is contained in:
parent
c85ee88045
commit
34aa019cec
2 changed files with 81 additions and 0 deletions
80
Mage.Sets/src/mage/cards/r/RookieMistake.java
Normal file
80
Mage.Sets/src/mage/cards/r/RookieMistake.java
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
package mage.cards.r;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
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.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class RookieMistake extends CardImpl {
|
||||
|
||||
public RookieMistake(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}");
|
||||
|
||||
// Until end of turn, target creature gets +0/+2 and another target creature gets -2/-0.
|
||||
this.getSpellAbility().addEffect(new RookieMistakeEffect());
|
||||
TargetPermanent target = new TargetCreaturePermanent();
|
||||
target.setTargetTag(1);
|
||||
this.getSpellAbility().addTarget(target.withChooseHint("+0/+2"));
|
||||
target = new TargetCreaturePermanent();
|
||||
target.setTargetTag(2);
|
||||
this.getSpellAbility().addTarget(target.withChooseHint("-2/-0"));
|
||||
}
|
||||
|
||||
private RookieMistake(final RookieMistake card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RookieMistake copy() {
|
||||
return new RookieMistake(this);
|
||||
}
|
||||
}
|
||||
|
||||
class RookieMistakeEffect extends OneShotEffect {
|
||||
|
||||
RookieMistakeEffect() {
|
||||
super(Outcome.BoostCreature);
|
||||
this.staticText = "until end of turn, target creature gets +0/+2 and another target creature gets -2/-0";
|
||||
}
|
||||
|
||||
private RookieMistakeEffect(final RookieMistakeEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RookieMistakeEffect copy() {
|
||||
return new RookieMistakeEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (permanent != null) {
|
||||
ContinuousEffect effect = new BoostTargetEffect(0, 2, Duration.EndOfTurn);
|
||||
effect.setTargetPointer(new FixedTarget(permanent, game));
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
permanent = game.getPermanent(source.getTargets().get(1).getFirstTarget());
|
||||
if (permanent != null) {
|
||||
ContinuousEffect effect = new BoostTargetEffect(-2, 0, Duration.EndOfTurn);
|
||||
effect.setTargetPointer(new FixedTarget(permanent, game));
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -207,6 +207,7 @@ public final class CoreSet2021 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Rin and Seri, Inseparable", 278, Rarity.MYTHIC, mage.cards.r.RinAndSeriInseparable.class));
|
||||
cards.add(new SetCardInfo("Rise Again", 119, Rarity.COMMON, mage.cards.r.RiseAgain.class));
|
||||
cards.add(new SetCardInfo("Roaming Ghostlight", 65, Rarity.COMMON, mage.cards.r.RoamingGhostlight.class));
|
||||
cards.add(new SetCardInfo("Rookie Mistake", 66, Rarity.COMMON, mage.cards.r.RookieMistake.class));
|
||||
cards.add(new SetCardInfo("Rousing Read", 67, Rarity.COMMON, mage.cards.r.RousingRead.class));
|
||||
cards.add(new SetCardInfo("Rugged Highlands", 249, Rarity.COMMON, mage.cards.r.RuggedHighlands.class));
|
||||
cards.add(new SetCardInfo("Run Afoul", 201, Rarity.COMMON, mage.cards.r.RunAfoul.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue