mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
Updated Control of the Court, Goblin Lore, Sisay's RIng, Ur Golem's Eye, Dragon Mage, and Helm of Possession
This commit is contained in:
parent
31feb14bc0
commit
b3e9731549
6 changed files with 94 additions and 230 deletions
|
@ -1,79 +1,65 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.sets.darksteel;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.Mana;
|
||||
import mage.abilities.effects.common.BasicManaEffect;
|
||||
import mage.abilities.mana.BasicManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Loki
|
||||
*/
|
||||
public class UrGolemsEye extends CardImpl {
|
||||
|
||||
public UrGolemsEye (UUID ownerId) {
|
||||
super(ownerId, 155, "Ur-Golem's Eye", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{4}");
|
||||
this.expansionSetCode = "DST";
|
||||
this.addAbility(new UrGolemsEyeAbility());
|
||||
}
|
||||
|
||||
public UrGolemsEye (final UrGolemsEye card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UrGolemsEye copy() {
|
||||
return new UrGolemsEye(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class UrGolemsEyeAbility extends BasicManaAbility {
|
||||
|
||||
public UrGolemsEyeAbility() {
|
||||
super(new BasicManaEffect(new Mana(0, 0, 0, 0, 0, 2, 0)));
|
||||
this.netMana.add(new Mana(0, 0, 0, 0, 0, 2, 0));
|
||||
}
|
||||
|
||||
public UrGolemsEyeAbility(final UrGolemsEyeAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UrGolemsEyeAbility copy() {
|
||||
return new UrGolemsEyeAbility(this);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.sets.darksteel;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.Mana;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.mana.SimpleManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.Zone;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Loki
|
||||
*/
|
||||
public class UrGolemsEye extends CardImpl {
|
||||
|
||||
public UrGolemsEye (UUID ownerId) {
|
||||
super(ownerId, 155, "Ur-Golem's Eye", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{4}");
|
||||
this.expansionSetCode = "DST";
|
||||
|
||||
// {tap}: Add {2} to your mana pool.
|
||||
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0,0,0,0,0,2,0), new TapSourceCost()));
|
||||
}
|
||||
|
||||
public UrGolemsEye (final UrGolemsEye card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UrGolemsEye copy() {
|
||||
return new UrGolemsEye(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -28,16 +28,12 @@
|
|||
package mage.sets.portalthreekingdoms;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.discard.DiscardControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.Cards;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -50,7 +46,10 @@ public class ControlOfTheCourt extends CardImpl {
|
|||
this.expansionSetCode = "PTK";
|
||||
|
||||
// Draw four cards, then discard three cards at random.
|
||||
this.getSpellAbility().addEffect(new ControlOfTheCourtEffect());
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(4));
|
||||
Effect effect = new DiscardControllerEffect(3, true);
|
||||
effect.setText("then discard three cards at random");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
}
|
||||
|
||||
public ControlOfTheCourt(final ControlOfTheCourt card) {
|
||||
|
@ -61,38 +60,4 @@ public class ControlOfTheCourt extends CardImpl {
|
|||
public ControlOfTheCourt copy() {
|
||||
return new ControlOfTheCourt(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ControlOfTheCourtEffect extends OneShotEffect {
|
||||
|
||||
public ControlOfTheCourtEffect() {
|
||||
super(Outcome.DrawCard);
|
||||
this.staticText = "Draw four cards, then discard three cards at random";
|
||||
}
|
||||
|
||||
public ControlOfTheCourtEffect(final ControlOfTheCourtEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ControlOfTheCourtEffect copy() {
|
||||
return new ControlOfTheCourtEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
player.drawCards(4, game);
|
||||
Cards hand = player.getHand();
|
||||
for (int i = 0; i < 3; i++) {
|
||||
Card card = hand.getRandom(game);
|
||||
if (card != null) {
|
||||
player.discard(card, source, game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -31,16 +31,13 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.discard.DiscardEachPlayerEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DrawCardAllEffect;
|
||||
import mage.abilities.effects.common.discard.DiscardHandAllEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -59,7 +56,11 @@ public class DragonMage extends CardImpl {
|
|||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// Whenever Dragon Mage deals combat damage to a player, each player discards his or her hand and draws seven cards.
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new DragonMageEffect(), false));
|
||||
Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new DiscardHandAllEffect(), false);
|
||||
Effect effect = new DrawCardAllEffect(7);
|
||||
effect.setText("and draws seven cards");
|
||||
ability.addEffect(effect);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public DragonMage(final DragonMage card) {
|
||||
|
@ -70,40 +71,4 @@ public class DragonMage extends CardImpl {
|
|||
public DragonMage copy() {
|
||||
return new DragonMage(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DragonMageEffect extends OneShotEffect {
|
||||
|
||||
public DragonMageEffect() {
|
||||
super(Outcome.DrawCard);
|
||||
this.staticText = "Each player discards his or her hand, then draws seven cards";
|
||||
}
|
||||
|
||||
public DragonMageEffect(final DragonMageEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DragonMageEffect copy() {
|
||||
return new DragonMageEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
for (UUID playerId : controller.getInRange()) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
for (Card card : player.getHand().getCards(game)) {
|
||||
player.discard(card, source, game);
|
||||
}
|
||||
|
||||
player.drawCards(7, game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -29,11 +29,12 @@ package mage.sets.seventhedition;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.Mana;
|
||||
import mage.abilities.effects.common.BasicManaEffect;
|
||||
import mage.abilities.mana.BasicManaAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.mana.SimpleManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -46,7 +47,7 @@ public class SisaysRing extends CardImpl {
|
|||
this.expansionSetCode = "7ED";
|
||||
|
||||
// {tap}: Add {2} to your mana pool.
|
||||
this.addAbility(new SisaysRingAbility());
|
||||
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0,0,0,0,0,2,0), new TapSourceCost()));
|
||||
}
|
||||
|
||||
public SisaysRing(final SisaysRing card) {
|
||||
|
@ -57,21 +58,4 @@ public class SisaysRing extends CardImpl {
|
|||
public SisaysRing copy() {
|
||||
return new SisaysRing(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SisaysRingAbility extends BasicManaAbility {
|
||||
|
||||
public SisaysRingAbility() {
|
||||
super(new BasicManaEffect(new Mana(0, 0, 0, 0, 0, 2, 0)));
|
||||
this.netMana.add(new Mana(0, 0, 0, 0, 0, 2, 0));
|
||||
}
|
||||
|
||||
public SisaysRingAbility(final SisaysRingAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SisaysRingAbility copy() {
|
||||
return new SisaysRingAbility(this);
|
||||
}
|
||||
}
|
|
@ -61,9 +61,9 @@ public class HelmOfPossession extends CardImpl {
|
|||
|
||||
// {2}, {tap}, Sacrifice a creature: Gain control of target creature for as long as you control Helm of Possession and Helm of Possession remains tapped.
|
||||
ConditionalContinousEffect effect = new ConditionalContinousEffect(
|
||||
new GainControlTargetEffect(Duration.OneUse),
|
||||
new GainControlTargetEffect(Duration.Custom),
|
||||
new HelmOfPossessionCondition(),
|
||||
"Gain control of target creature for as long as you control Helm of Possession and Helm of Possession remains tapped");
|
||||
"Gain control of target creature for as long as you control {this} and {this} remains tapped");
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent()));
|
||||
|
|
|
@ -29,15 +29,11 @@ package mage.sets.tenth;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.discard.DiscardControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.Cards;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -52,8 +48,10 @@ public class GoblinLore extends CardImpl {
|
|||
this.color.setRed(true);
|
||||
|
||||
// Draw four cards, then discard three cards at random.
|
||||
this.getSpellAbility().addEffect(new GoblinLoreEffect());
|
||||
}
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(4));
|
||||
Effect effect = new DiscardControllerEffect(3, true);
|
||||
effect.setText("then discard three cards at random");
|
||||
this.getSpellAbility().addEffect(effect); }
|
||||
|
||||
public GoblinLore(final GoblinLore card) {
|
||||
super(card);
|
||||
|
@ -63,38 +61,4 @@ public class GoblinLore extends CardImpl {
|
|||
public GoblinLore copy() {
|
||||
return new GoblinLore(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GoblinLoreEffect extends OneShotEffect {
|
||||
|
||||
public GoblinLoreEffect() {
|
||||
super(Outcome.DrawCard);
|
||||
this.staticText = "Draw four cards, then discard three cards at random";
|
||||
}
|
||||
|
||||
public GoblinLoreEffect(final GoblinLoreEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GoblinLoreEffect copy() {
|
||||
return new GoblinLoreEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
player.drawCards(4, game);
|
||||
Cards hand = player.getHand();
|
||||
for (int i = 0; i < 3; i++) {
|
||||
Card card = hand.getRandom(game);
|
||||
if (card != null) {
|
||||
player.discard(card, source, game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue