forked from External/mage
[SNC] Implemented Revelation of Power
This commit is contained in:
parent
441c3dffa3
commit
8218d8fa38
2 changed files with 76 additions and 0 deletions
75
Mage.Sets/src/mage/cards/r/RevelationOfPower.java
Normal file
75
Mage.Sets/src/mage/cards/r/RevelationOfPower.java
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
package mage.cards.r;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.LifelinkAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.counters.Counter;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class RevelationOfPower extends CardImpl {
|
||||
|
||||
public RevelationOfPower(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}");
|
||||
|
||||
// Target creature gets +2/+2 until end of turn. If it has a counter on it, it also gains flying and lifelink until end of turn.
|
||||
this.getSpellAbility().addEffect(new BoostTargetEffect(2, 2));
|
||||
this.getSpellAbility().addEffect(new RevelationOfPowerEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
}
|
||||
|
||||
private RevelationOfPower(final RevelationOfPower card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RevelationOfPower copy() {
|
||||
return new RevelationOfPower(this);
|
||||
}
|
||||
}
|
||||
|
||||
class RevelationOfPowerEffect extends OneShotEffect {
|
||||
|
||||
public RevelationOfPowerEffect() {
|
||||
super(Outcome.BoostCreature);
|
||||
this.staticText = "If it has a counter on it, it also gains flying and lifelink until end of turn";
|
||||
}
|
||||
|
||||
private RevelationOfPowerEffect(final RevelationOfPowerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RevelationOfPowerEffect copy() {
|
||||
return new RevelationOfPowerEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent targetCreature = game.getPermanent(source.getFirstTarget());
|
||||
if (targetCreature != null) {
|
||||
for (Counter counter : targetCreature.getCounters(game).values()) {
|
||||
if (counter.getCount() > 0) {
|
||||
game.addEffect(new GainAbilityTargetEffect(FlyingAbility.getInstance()), source);
|
||||
game.addEffect(new GainAbilityTargetEffect(LifelinkAbility.getInstance()), source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -183,6 +183,7 @@ public final class StreetsOfNewCapenna extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Refuse to Yield", 27, Rarity.UNCOMMON, mage.cards.r.RefuseToYield.class));
|
||||
cards.add(new SetCardInfo("Reservoir Kraken", 56, Rarity.RARE, mage.cards.r.ReservoirKraken.class));
|
||||
cards.add(new SetCardInfo("Revel Ruiner", 91, Rarity.COMMON, mage.cards.r.RevelRuiner.class));
|
||||
cards.add(new SetCardInfo("Revelation of Power", 28, Rarity.COMMON, mage.cards.r.RevelationOfPower.class));
|
||||
cards.add(new SetCardInfo("Riveteers Charm", 217, Rarity.UNCOMMON, mage.cards.r.RiveteersCharm.class));
|
||||
cards.add(new SetCardInfo("Riveteers Decoy", 156, Rarity.UNCOMMON, mage.cards.r.RiveteersDecoy.class));
|
||||
cards.add(new SetCardInfo("Riveteers Initiate", 120, Rarity.COMMON, mage.cards.r.RiveteersInitiate.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue