mirror of
https://github.com/magefree/mage.git
synced 2026-01-25 12:49:39 -08:00
- Requested. Added Anvil of Bogardan and Drowner of Secrets.
This commit is contained in:
parent
71a3cdb83f
commit
90ab9a759c
5 changed files with 332 additions and 78 deletions
|
|
@ -28,7 +28,6 @@
|
|||
package mage.sets.fifthedition;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -37,11 +36,8 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.Constants.Zone;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.MillTargetEffect;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.players.Player;
|
||||
import mage.cards.Card;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -54,7 +50,7 @@ public class Millstone extends CardImpl<Millstone> {
|
|||
this.expansionSetCode = "5ED";
|
||||
|
||||
// {2}, {tap}: Target player puts the top two cards of his or her library into his or her graveyard.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new MillstoneEffect(2), new GenericManaCost(2));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new MillTargetEffect(2), new GenericManaCost(2));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetPlayer());
|
||||
this.addAbility(ability);
|
||||
|
|
@ -68,42 +64,4 @@ public class Millstone extends CardImpl<Millstone> {
|
|||
public Millstone copy() {
|
||||
return new Millstone(this);
|
||||
}
|
||||
}
|
||||
|
||||
class MillstoneEffect extends OneShotEffect<MillstoneEffect> {
|
||||
|
||||
int count = 0;
|
||||
|
||||
public MillstoneEffect(final MillstoneEffect effect) {
|
||||
super(effect);
|
||||
this.count = effect.count;
|
||||
}
|
||||
|
||||
public MillstoneEffect(final int count) {
|
||||
super(Constants.Outcome.Detriment);
|
||||
this.count = count;
|
||||
this.staticText = "Target player puts the top " + count + " cards of his or her library into his or her graveyard";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player targetPlayer = game.getPlayer(source.getFirstTarget());
|
||||
if (targetPlayer != null) {
|
||||
for (int i = 0; i<count ; i++) {
|
||||
if (!targetPlayer.getLibrary().getCardList().isEmpty()) {
|
||||
Card card = targetPlayer.getLibrary().removeFromTop(game);
|
||||
if (card != null) {
|
||||
card.moveToZone(Zone.GRAVEYARD, source.getId(), game, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MillstoneEffect copy() {
|
||||
return new MillstoneEffect(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
84
Mage.Sets/src/mage/sets/lorwyn/DrownerOfSecrets.java
Normal file
84
Mage.Sets/src/mage/sets/lorwyn/DrownerOfSecrets.java
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
/*
|
||||
* 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.lorwyn;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapTargetCost;
|
||||
import mage.abilities.effects.common.MillTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class DrownerOfSecrets extends CardImpl<DrownerOfSecrets> {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("untapped Merfolk you control");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Merfolk"));
|
||||
filter.add(Predicates.not(new TappedPredicate()));
|
||||
}
|
||||
|
||||
public DrownerOfSecrets(UUID ownerId) {
|
||||
super(ownerId, 58, "Drowner of Secrets", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{U}");
|
||||
this.expansionSetCode = "LRW";
|
||||
this.subtype.add("Merfolk");
|
||||
this.subtype.add("Wizard");
|
||||
|
||||
this.color.setBlue(true);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Tap an untapped Merfolk you control: Target player puts the top card of his or her library into his or her graveyard.
|
||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new MillTargetEffect(1), new TapTargetCost(new TargetControlledPermanent(filter)));
|
||||
ability.addTarget(new TargetPlayer());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public DrownerOfSecrets(final DrownerOfSecrets card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DrownerOfSecrets copy() {
|
||||
return new DrownerOfSecrets(this);
|
||||
}
|
||||
}
|
||||
98
Mage.Sets/src/mage/sets/visions/AnvilOfBogardan.java
Normal file
98
Mage.Sets/src/mage/sets/visions/AnvilOfBogardan.java
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
/*
|
||||
* 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.visions;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfDrawTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continious.MaximumHandSizeControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class AnvilOfBogardan extends CardImpl<AnvilOfBogardan> {
|
||||
|
||||
public AnvilOfBogardan(UUID ownerId) {
|
||||
super(ownerId, 141, "Anvil of Bogardan", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||
this.expansionSetCode = "VIS";
|
||||
|
||||
// Players have no maximum hand size.
|
||||
Effect effect = new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Constants.Duration.WhileOnBattlefield, false, true);
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, effect));
|
||||
|
||||
// At the beginning of each player's draw step, that player draws an additional card, then discards a card.
|
||||
this.addAbility(new BeginningOfDrawTriggeredAbility(Constants.Zone.BATTLEFIELD, new AnvilOfBogardanEffect(), Constants.TargetController.ANY, false));
|
||||
}
|
||||
|
||||
public AnvilOfBogardan(final AnvilOfBogardan card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AnvilOfBogardan copy() {
|
||||
return new AnvilOfBogardan(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AnvilOfBogardanEffect extends OneShotEffect<AnvilOfBogardanEffect> {
|
||||
|
||||
public AnvilOfBogardanEffect(final AnvilOfBogardanEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
public AnvilOfBogardanEffect() {
|
||||
super(Constants.Outcome.Neutral);
|
||||
staticText = "that player draws an additional card, then discards a card";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source));
|
||||
if (targetPlayer != null) {
|
||||
targetPlayer.drawCards(1, game);
|
||||
targetPlayer.discard(1, source, game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AnvilOfBogardanEffect copy() {
|
||||
return new AnvilOfBogardanEffect(this);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue