mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Merge pull request #5712 from ketsuban/rod-of-spanking
Implement Rod of Spanking
This commit is contained in:
commit
3e6131fce0
2 changed files with 81 additions and 0 deletions
80
Mage.Sets/src/mage/cards/r/RodOfSpanking.java
Normal file
80
Mage.Sets/src/mage/cards/r/RodOfSpanking.java
Normal file
|
@ -0,0 +1,80 @@
|
|||
|
||||
package mage.cards.r;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.UntapSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public final class RodOfSpanking extends CardImpl {
|
||||
|
||||
public RodOfSpanking(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[] { CardType.ARTIFACT }, "{1}");
|
||||
|
||||
// 2, T: Rod of Spanking deals 1 damage to target player. Then untap Rod of
|
||||
// Spanking unless that player says "Thank you, sir. May I have another?"
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RodOfSpankingEffect(), new GenericManaCost(2));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetPlayer());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public RodOfSpanking(final RodOfSpanking card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RodOfSpanking copy() {
|
||||
return new RodOfSpanking(this);
|
||||
}
|
||||
}
|
||||
|
||||
class RodOfSpankingEffect extends OneShotEffect {
|
||||
|
||||
public RodOfSpankingEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "{this} deals 1 damage to target player. Then untap {this} unless that player says \"Thank you, sir. May I have another?\"";
|
||||
}
|
||||
|
||||
public RodOfSpankingEffect(final RodOfSpankingEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RodOfSpankingEffect copy() {
|
||||
return new RodOfSpankingEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player target = game.getPlayer(source.getFirstTarget());
|
||||
new DamageTargetEffect(1).apply(game, source);
|
||||
if (target != null) {
|
||||
if (target.chooseUse(Outcome.Untap, "Say \"Thank you, sir. May I have another?\"", source, game)) {
|
||||
game.informPlayers(target.getLogName() + ": Thank you, sir. May I have another?");
|
||||
} else {
|
||||
new UntapSourceEffect().apply(game, source);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
|
@ -43,6 +43,7 @@ public final class Unhinged extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Old Fogey", 106, Rarity.RARE, mage.cards.o.OldFogey.class));
|
||||
cards.add(new SetCardInfo("Plains", 136, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(FrameStyle.UNH_FULL_ART_BASIC, false)));
|
||||
cards.add(new SetCardInfo("Rare-B-Gone", 119, Rarity.RARE, mage.cards.r.RareBGone.class));
|
||||
cards.add(new SetCardInfo("Rod of Spanking", 127, Rarity.UNCOMMON, mage.cards.r.RodOfSpanking.class));
|
||||
cards.add(new SetCardInfo("Six-y Beast", 89, Rarity.UNCOMMON, mage.cards.s.SixyBeast.class));
|
||||
cards.add(new SetCardInfo("Swamp", 138, Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(FrameStyle.UNH_FULL_ART_BASIC, false)));
|
||||
cards.add(new SetCardInfo("Symbol Status", 114, Rarity.UNCOMMON, mage.cards.s.SymbolStatus.class));
|
||||
|
|
Loading…
Reference in a new issue