mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
[AFC] Implemented Robe of Stars
This commit is contained in:
parent
33f4ff9e1e
commit
20245f32f6
2 changed files with 78 additions and 0 deletions
77
Mage.Sets/src/mage/cards/r/RobeOfStars.java
Normal file
77
Mage.Sets/src/mage/cards/r/RobeOfStars.java
Normal file
|
@ -0,0 +1,77 @@
|
|||
package mage.cards.r;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class RobeOfStars extends CardImpl {
|
||||
|
||||
public RobeOfStars(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}{W}");
|
||||
|
||||
this.subtype.add(SubType.EQUIPMENT);
|
||||
|
||||
// Equipped creature gets +0/+3.
|
||||
this.addAbility(new SimpleStaticAbility(new BoostEquippedEffect(0, 3)));
|
||||
|
||||
// Astral Projection — {1}{W}: Equipped creature phases out.
|
||||
this.addAbility(new SimpleActivatedAbility(
|
||||
new RobeOfStarsEffect(), new ManaCostsImpl<>("{1}{W}")
|
||||
).withFlavorWord("Astral Projection"));
|
||||
|
||||
// Equip {1}
|
||||
this.addAbility(new EquipAbility(1));
|
||||
}
|
||||
|
||||
private RobeOfStars(final RobeOfStars card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RobeOfStars copy() {
|
||||
return new RobeOfStars(this);
|
||||
}
|
||||
}
|
||||
|
||||
class RobeOfStarsEffect extends OneShotEffect {
|
||||
|
||||
RobeOfStarsEffect() {
|
||||
super(Outcome.Exile);
|
||||
staticText = "equipped creature phases out";
|
||||
}
|
||||
|
||||
private RobeOfStarsEffect(final RobeOfStarsEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RobeOfStarsEffect copy() {
|
||||
return new RobeOfStarsEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = source.getSourcePermanentOrLKI(game);
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
Permanent equipped = game.getPermanent(permanent.getAttachedTo());
|
||||
return equipped != null && permanent.phaseOut(game);
|
||||
}
|
||||
}
|
|
@ -181,6 +181,7 @@ public final class ForgottenRealmsCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Rile", 136, Rarity.COMMON, mage.cards.r.Rile.class));
|
||||
cards.add(new SetCardInfo("Rishkar's Expertise", 170, Rarity.RARE, mage.cards.r.RishkarsExpertise.class));
|
||||
cards.add(new SetCardInfo("Riverwise Augur", 93, Rarity.UNCOMMON, mage.cards.r.RiverwiseAugur.class));
|
||||
cards.add(new SetCardInfo("Robe of Stars", 11, Rarity.RARE, mage.cards.r.RobeOfStars.class));
|
||||
cards.add(new SetCardInfo("Ronom Unicorn", 71, Rarity.COMMON, mage.cards.r.RonomUnicorn.class));
|
||||
cards.add(new SetCardInfo("Savage Ventmaw", 191, Rarity.UNCOMMON, mage.cards.s.SavageVentmaw.class));
|
||||
cards.add(new SetCardInfo("Scourge of Valkas", 137, Rarity.RARE, mage.cards.s.ScourgeOfValkas.class));
|
||||
|
|
Loading…
Reference in a new issue