mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
[CLB] Implemented Monster Manual
This commit is contained in:
parent
c48da7f369
commit
ab3a3f0d99
2 changed files with 92 additions and 0 deletions
91
Mage.Sets/src/mage/cards/m/MonsterManual.java
Normal file
91
Mage.Sets/src/mage/cards/m/MonsterManual.java
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
package mage.cards.m;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.PutCardFromHandOntoBattlefieldEffect;
|
||||||
|
import mage.cards.*;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.TargetCard;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class MonsterManual extends AdventureCard {
|
||||||
|
|
||||||
|
public MonsterManual(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, new CardType[]{CardType.SORCERY}, "{3}{G}", "Zoological Study", "{2}{G}");
|
||||||
|
|
||||||
|
// {1}{G}, {T}: You may put a creature card from your hand onto the battlefield.
|
||||||
|
Ability ability = new SimpleActivatedAbility(
|
||||||
|
new PutCardFromHandOntoBattlefieldEffect(StaticFilters.FILTER_CARD_CREATURE_A),
|
||||||
|
new ManaCostsImpl<>("{1}{G}")
|
||||||
|
);
|
||||||
|
ability.addCost(new TapSourceCost());
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
// Zoological Study
|
||||||
|
// Mill five cards, then return a creature card milled this way to your hand.
|
||||||
|
this.getSpellAbility().addEffect(new ZoologicalStudyEffect());
|
||||||
|
}
|
||||||
|
|
||||||
|
private MonsterManual(final MonsterManual card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MonsterManual copy() {
|
||||||
|
return new MonsterManual(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ZoologicalStudyEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
ZoologicalStudyEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "mill five cards, then return a creature card milled this way to your hand";
|
||||||
|
}
|
||||||
|
|
||||||
|
private ZoologicalStudyEffect(final ZoologicalStudyEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ZoologicalStudyEffect copy() {
|
||||||
|
return new ZoologicalStudyEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
|
if (player == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Cards cards = new CardsImpl(player
|
||||||
|
.millCards(5, source, game)
|
||||||
|
.getCards(StaticFilters.FILTER_CARD_CREATURE, game));
|
||||||
|
Card card;
|
||||||
|
switch (cards.size()) {
|
||||||
|
case 0:
|
||||||
|
return true;
|
||||||
|
case 1:
|
||||||
|
card = cards.getRandom(game);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
TargetCard target = new TargetCard(Zone.ALL, StaticFilters.FILTER_CARD_CREATURE);
|
||||||
|
player.choose(outcome, cards, target, game);
|
||||||
|
card = cards.get(target.getFirstTarget(), game);
|
||||||
|
}
|
||||||
|
player.moveCards(card, Zone.HAND, source, game);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
|
@ -72,6 +72,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Mahadi, Emporium Master", 282, Rarity.UNCOMMON, mage.cards.m.MahadiEmporiumMaster.class));
|
cards.add(new SetCardInfo("Mahadi, Emporium Master", 282, Rarity.UNCOMMON, mage.cards.m.MahadiEmporiumMaster.class));
|
||||||
cards.add(new SetCardInfo("Marble Diamond", 320, Rarity.COMMON, mage.cards.m.MarbleDiamond.class));
|
cards.add(new SetCardInfo("Marble Diamond", 320, Rarity.COMMON, mage.cards.m.MarbleDiamond.class));
|
||||||
cards.add(new SetCardInfo("Minsc & Boo, Timeless Heroes", 285, Rarity.MYTHIC, mage.cards.m.MinscBooTimelessHeroes.class));
|
cards.add(new SetCardInfo("Minsc & Boo, Timeless Heroes", 285, Rarity.MYTHIC, mage.cards.m.MinscBooTimelessHeroes.class));
|
||||||
|
cards.add(new SetCardInfo("Monster Manual", 242, Rarity.RARE, mage.cards.m.MonsterManual.class));
|
||||||
cards.add(new SetCardInfo("Morphic Pool", 357, Rarity.RARE, mage.cards.m.MorphicPool.class));
|
cards.add(new SetCardInfo("Morphic Pool", 357, Rarity.RARE, mage.cards.m.MorphicPool.class));
|
||||||
cards.add(new SetCardInfo("Moss Diamond", 327, Rarity.COMMON, mage.cards.m.MossDiamond.class));
|
cards.add(new SetCardInfo("Moss Diamond", 327, Rarity.COMMON, mage.cards.m.MossDiamond.class));
|
||||||
cards.add(new SetCardInfo("Mountain", 463, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Mountain", 463, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
|
||||||
|
|
Loading…
Reference in a new issue