mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Implement Miss Demeanour
This commit is contained in:
parent
64f9b95e10
commit
44214d65fc
4 changed files with 95 additions and 0 deletions
83
Mage.Sets/src/mage/cards/m/MissDemeanour.java
Normal file
83
Mage.Sets/src/mage/cards/m/MissDemeanour.java
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
|
||||||
|
package mage.cards.m;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.keyword.FirstStrikeAbility;
|
||||||
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.TargetController;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Ketsuban
|
||||||
|
*/
|
||||||
|
public final class MissDemeanour extends CardImpl {
|
||||||
|
|
||||||
|
public MissDemeanour(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.LADYOFPROPERETIQUETTE);
|
||||||
|
this.power = new MageInt(3);
|
||||||
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
|
// Flying
|
||||||
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
|
// First strike
|
||||||
|
this.addAbility(FirstStrikeAbility.getInstance());
|
||||||
|
|
||||||
|
// At the beginning of each other player's upkeep, you may compliment that player on their game play. If you don't, sacrifice Miss Demeanour.
|
||||||
|
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new MissDemeanourEffect(), TargetController.NOT_YOU, false, true));
|
||||||
|
}
|
||||||
|
|
||||||
|
public MissDemeanour(final MissDemeanour card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MissDemeanour copy() {
|
||||||
|
return new MissDemeanour(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class MissDemeanourEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
public MissDemeanourEffect() {
|
||||||
|
super(Outcome.Sacrifice);
|
||||||
|
this.staticText = "you may compliment that player on their game play. If you don't, sacrifice {this}";
|
||||||
|
}
|
||||||
|
|
||||||
|
public MissDemeanourEffect(final MissDemeanourEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MissDemeanourEffect copy() {
|
||||||
|
return new MissDemeanourEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
Permanent sourceObject = (Permanent) source.getSourceObjectIfItStillExists(game);
|
||||||
|
if (sourceObject != null) {
|
||||||
|
if (!controller.chooseUse(outcome, "Compliment " + game.getPlayer(game.getActivePlayerId()).getName() + " on their game play?", source, game)) {
|
||||||
|
sourceObject.sacrifice(source.getSourceId(), game);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
|
@ -46,6 +46,7 @@ public final class Unglued extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Jumbo Imp", 34, Rarity.UNCOMMON, mage.cards.j.JumboImp.class));
|
cards.add(new SetCardInfo("Jumbo Imp", 34, Rarity.UNCOMMON, mage.cards.j.JumboImp.class));
|
||||||
cards.add(new SetCardInfo("Krazy Kow", 48, Rarity.COMMON, mage.cards.k.KrazyKow.class));
|
cards.add(new SetCardInfo("Krazy Kow", 48, Rarity.COMMON, mage.cards.k.KrazyKow.class));
|
||||||
cards.add(new SetCardInfo("Mine, Mine, Mine!", 65, Rarity.RARE, mage.cards.m.MineMineMine.class));
|
cards.add(new SetCardInfo("Mine, Mine, Mine!", 65, Rarity.RARE, mage.cards.m.MineMineMine.class));
|
||||||
|
cards.add(new SetCardInfo("Miss Demeanour", 10, Rarity.UNCOMMON, mage.cards.m.MissDemeanour.class));
|
||||||
cards.add(new SetCardInfo("Mountain", 87, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(FrameStyle.UGL_FULL_ART_BASIC, false)));
|
cards.add(new SetCardInfo("Mountain", 87, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(FrameStyle.UGL_FULL_ART_BASIC, false)));
|
||||||
cards.add(new SetCardInfo("Once More with Feeling", 11, Rarity.RARE, mage.cards.o.OnceMoreWithFeeling.class));
|
cards.add(new SetCardInfo("Once More with Feeling", 11, Rarity.RARE, mage.cards.o.OnceMoreWithFeeling.class));
|
||||||
cards.add(new SetCardInfo("Paper Tiger", 78, Rarity.COMMON, mage.cards.p.PaperTiger.class));
|
cards.add(new SetCardInfo("Paper Tiger", 78, Rarity.COMMON, mage.cards.p.PaperTiger.class));
|
||||||
|
|
|
@ -70,6 +70,16 @@ public class BeginningOfUpkeepTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return yours;
|
return yours;
|
||||||
|
case NOT_YOU:
|
||||||
|
boolean notYours = !event.getPlayerId().equals(this.controllerId);
|
||||||
|
if (notYours && setTargetPointer) {
|
||||||
|
if (getTargets().isEmpty()) {
|
||||||
|
for (Effect effect : this.getEffects()) {
|
||||||
|
effect.setTargetPointer(new FixedTarget(event.getPlayerId()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return notYours;
|
||||||
case OPPONENT:
|
case OPPONENT:
|
||||||
if (game.getPlayer(this.controllerId).hasOpponent(event.getPlayerId(), game)) {
|
if (game.getPlayer(this.controllerId).hasOpponent(event.getPlayerId(), game)) {
|
||||||
if (setTargetPointer && getTargets().isEmpty()) {
|
if (setTargetPointer && getTargets().isEmpty()) {
|
||||||
|
|
|
@ -201,6 +201,7 @@ public enum SubType {
|
||||||
KOR("Kor", SubTypeSet.CreatureType),
|
KOR("Kor", SubTypeSet.CreatureType),
|
||||||
KRAKEN("Kraken", SubTypeSet.CreatureType),
|
KRAKEN("Kraken", SubTypeSet.CreatureType),
|
||||||
// L
|
// L
|
||||||
|
LADYOFPROPERETIQUETTE("Lady of Proper Etiquette", SubTypeSet.CreatureType), // Unglued
|
||||||
LAMIA("Lamia", SubTypeSet.CreatureType),
|
LAMIA("Lamia", SubTypeSet.CreatureType),
|
||||||
LAMMASU("Lammasu", SubTypeSet.CreatureType),
|
LAMMASU("Lammasu", SubTypeSet.CreatureType),
|
||||||
LEECH("Leech", SubTypeSet.CreatureType),
|
LEECH("Leech", SubTypeSet.CreatureType),
|
||||||
|
|
Loading…
Reference in a new issue