mirror of
https://github.com/correl/mage.git
synced 2024-12-28 11:14:13 +00:00
[NEO] Implemented Regent's Authority
This commit is contained in:
parent
8224a3608b
commit
8d2db4815d
2 changed files with 74 additions and 0 deletions
73
Mage.Sets/src/mage/cards/r/RegentsAuthority.java
Normal file
73
Mage.Sets/src/mage/cards/r/RegentsAuthority.java
Normal file
|
@ -0,0 +1,73 @@
|
|||
package mage.cards.r;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
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.Outcome;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class RegentsAuthority extends CardImpl {
|
||||
|
||||
public RegentsAuthority(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}");
|
||||
|
||||
// Target creature gets +2/+2 until end of turn. If it's an enchantment creature or legendary creature, instead put a +1/+1 counter on it and it gets +1/+1 until end of turn.
|
||||
this.getSpellAbility().addEffect(new RegentsAuthorityEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
}
|
||||
|
||||
private RegentsAuthority(final RegentsAuthority card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RegentsAuthority copy() {
|
||||
return new RegentsAuthority(this);
|
||||
}
|
||||
}
|
||||
|
||||
class RegentsAuthorityEffect extends OneShotEffect {
|
||||
|
||||
RegentsAuthorityEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "target creature gets +2/+2 until end of turn. If it's an enchantment creature " +
|
||||
"or legendary creature, instead put a +1/+1 counter on it and it gets +1/+1 until end of turn";
|
||||
}
|
||||
|
||||
private RegentsAuthorityEffect(final RegentsAuthorityEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RegentsAuthorityEffect copy() {
|
||||
return new RegentsAuthorityEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
if (!permanent.isEnchantment(game)
|
||||
&& (!permanent.isCreature(game)
|
||||
|| !permanent.isLegendary())) {
|
||||
game.addEffect(new BoostTargetEffect(2, 2), source);
|
||||
return true;
|
||||
}
|
||||
permanent.addCounters(CounterType.P1P1.createInstance(), source, game);
|
||||
game.addEffect(new BoostTargetEffect(1, 1), source);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -198,6 +198,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Raiyuu, Storm's Edge", 232, Rarity.RARE, mage.cards.r.RaiyuuStormsEdge.class));
|
||||
cards.add(new SetCardInfo("Reality Heist", 75, Rarity.UNCOMMON, mage.cards.r.RealityHeist.class));
|
||||
cards.add(new SetCardInfo("Reckoner Bankbuster", 255, Rarity.RARE, mage.cards.r.ReckonerBankbuster.class));
|
||||
cards.add(new SetCardInfo("Regent's Authority", 32, Rarity.COMMON, mage.cards.r.RegentsAuthority.class));
|
||||
cards.add(new SetCardInfo("Reinforced Ronin", 158, Rarity.UNCOMMON, mage.cards.r.ReinforcedRonin.class));
|
||||
cards.add(new SetCardInfo("Reito Sentinel", 256, Rarity.UNCOMMON, mage.cards.r.ReitoSentinel.class));
|
||||
cards.add(new SetCardInfo("Repel the Vile", 33, Rarity.COMMON, mage.cards.r.RepelTheVile.class));
|
||||
|
|
Loading…
Reference in a new issue