mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
[NCC] Implemented Cephalid Facetaker
This commit is contained in:
parent
04dbdcc1db
commit
1aac9548c7
2 changed files with 95 additions and 0 deletions
94
Mage.Sets/src/mage/cards/c/CephalidFacetaker.java
Normal file
94
Mage.Sets/src/mage/cards/c/CephalidFacetaker.java
Normal file
|
@ -0,0 +1,94 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfCombatTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect;
|
||||
import mage.abilities.keyword.CantBeBlockedSourceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.util.functions.CopyApplier;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class CephalidFacetaker extends CardImpl {
|
||||
|
||||
public CephalidFacetaker(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}");
|
||||
|
||||
this.subtype.add(SubType.CEPHALID);
|
||||
this.subtype.add(SubType.ROGUE);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Cephalid Facetaker can't be blocked.
|
||||
this.addAbility(new CantBeBlockedSourceAbility());
|
||||
|
||||
// At the beginning of combat on your turn, you may have Cephalid Facetaker become a copy of another target creature until end of turn, except its a 1/4 and has "This creature can't be blocked."
|
||||
Ability ability = new BeginningOfCombatTriggeredAbility(
|
||||
new CephalidFacetakerEffect(), TargetController.YOU, true
|
||||
);
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private CephalidFacetaker(final CephalidFacetaker card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CephalidFacetaker copy() {
|
||||
return new CephalidFacetaker(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CephalidFacetakerEffect extends OneShotEffect {
|
||||
|
||||
private static final CopyApplier copyApplier = new CopyApplier() {
|
||||
@Override
|
||||
public boolean apply(Game game, MageObject blueprint, Ability source, UUID targetObjectId) {
|
||||
blueprint.getPower().modifyBaseValue(1);
|
||||
blueprint.getToughness().modifyBaseValue(4);
|
||||
blueprint.getAbilities().add(new SimpleStaticAbility(
|
||||
new CantBeBlockedSourceEffect().setText("this creature can't be blocked")
|
||||
));
|
||||
}
|
||||
};
|
||||
|
||||
CephalidFacetakerEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "you may have {this} become a copy of another target creature until end of turn, " +
|
||||
"except its a 1/4 and has \"This creature can't be blocked.\"";
|
||||
}
|
||||
|
||||
private CephalidFacetakerEffect(final CephalidFacetakerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CephalidFacetakerEffect copy() {
|
||||
return new CephalidFacetakerEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent sourcePermanent = source.getSourcePermanentIfItStillExists(game);
|
||||
Permanent creature = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||
if (sourcePermanent == null || creature == null) {
|
||||
return false;
|
||||
}
|
||||
game.copyPermanent(Duration.EndOfTurn, creature, sourcePermanent.getId(), source, copyApplier);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -67,6 +67,7 @@ public final class NewCapennaCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Cascade Bluffs", 390, Rarity.RARE, mage.cards.c.CascadeBluffs.class));
|
||||
cards.add(new SetCardInfo("Castle Ardenvale", 391, Rarity.RARE, mage.cards.c.CastleArdenvale.class));
|
||||
cards.add(new SetCardInfo("Castle Embereth", 392, Rarity.RARE, mage.cards.c.CastleEmbereth.class));
|
||||
cards.add(new SetCardInfo("Cephalid Facetaker", 23, Rarity.RARE, mage.cards.c.CephalidFacetaker.class));
|
||||
cards.add(new SetCardInfo("Chain Reaction", 265, Rarity.RARE, mage.cards.c.ChainReaction.class));
|
||||
cards.add(new SetCardInfo("Champion of Lambholt", 284, Rarity.RARE, mage.cards.c.ChampionOfLambholt.class));
|
||||
cards.add(new SetCardInfo("Champion of Wits", 213, Rarity.RARE, mage.cards.c.ChampionOfWits.class));
|
||||
|
|
Loading…
Reference in a new issue