Added Sakura-Tribe Scout.

This commit is contained in:
LevelX2 2014-04-28 00:06:54 +02:00
parent 46290a66fd
commit 60838ec386
5 changed files with 159 additions and 84 deletions

View file

@ -40,7 +40,6 @@ import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.FlipSourceEffect;
import mage.abilities.effects.common.continious.BoostSourceEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
@ -49,12 +48,9 @@ import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterControlledLandPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.common.FilterLandCard;
import mage.game.Game;
import mage.game.permanent.token.Token;
import mage.players.Player;
import mage.target.Target;
import mage.target.common.TargetCardInHand;
/**
* @author Loki
@ -73,7 +69,9 @@ public class BudokaGardener extends CardImpl<BudokaGardener> {
this.flipCardName = "Dokai, Weaver of Life";
// {T}: You may put a land card from your hand onto the battlefield. If you control ten or more lands, flip Budoka Gardener.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BudokaGardenerEffect(), new TapSourceCost()));
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BudokaGardenerEffect(), new TapSourceCost());
ability.addEffect(new BudokaGardenerEffect());
this.addAbility(ability);
}
public BudokaGardener(final BudokaGardener card) {
@ -91,7 +89,7 @@ class BudokaGardenerEffect extends OneShotEffect<BudokaGardenerEffect> {
BudokaGardenerEffect() {
super(Outcome.PutLandInPlay);
staticText = "You may put a land card from your hand onto the battlefield. If you control ten or more lands, flip {this}";
staticText = "If you control ten or more lands, flip {this}";
}
BudokaGardenerEffect(final BudokaGardenerEffect effect) {
@ -102,17 +100,6 @@ class BudokaGardenerEffect extends OneShotEffect<BudokaGardenerEffect> {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
Target target = new TargetCardInHand(new FilterLandCard());
target.setRequired(true);
target.setNotTarget(true);
if (target.canChoose(source.getSourceId(), source.getControllerId(), game)
&& controller.chooseUse(outcome, "Put land onto the battlefield?", game)
&& controller.chooseTarget(outcome, target, source, game)) {
Card card = game.getCard(target.getFirstTarget());
if (card != null) {
controller.putOntoBattlefieldWithInfo(card, game, Zone.HAND, source.getSourceId());
}
}
if (game.getBattlefield().count(DokaiWeaverofLifeToken.filterLands, source.getSourceId(), source.getControllerId(), game) >= 10) {
new FlipSourceEffect(new DokaiWeaverofLife()).apply(game, source);
}

View file

@ -0,0 +1,74 @@
/*
* 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.saviorsofkamigawa;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.PutLandFromHandOntoBattlefieldEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterLandCard;
import mage.target.common.TargetCardInHand;
/**
*
* @author LevelX2
*/
public class SakuraTribeScout extends CardImpl<SakuraTribeScout> {
public SakuraTribeScout(UUID ownerId) {
super(ownerId, 144, "Sakura-Tribe Scout", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{G}");
this.expansionSetCode = "SOK";
this.subtype.add("Snake");
this.subtype.add("Shaman");
this.subtype.add("Scout");
this.color.setGreen(true);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// {tap}: You may put a land card from your hand onto the battlefield.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutLandFromHandOntoBattlefieldEffect(), new TapSourceCost());
ability.addTarget(new TargetCardInHand(new FilterLandCard()));
this.addAbility(ability);
}
public SakuraTribeScout(final SakuraTribeScout card) {
super(card);
}
@Override
public SakuraTribeScout copy() {
return new SakuraTribeScout(this);
}
}

View file

@ -32,15 +32,12 @@ import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.abilities.effects.common.PutLandFromHandOntoBattlefieldEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterLandCard;
import mage.game.Game;
import mage.target.common.TargetCardInHand;
/**
@ -59,7 +56,7 @@ public class SkyshroudRanger extends CardImpl<SkyshroudRanger> {
this.toughness = new MageInt(1);
// {tap}: You may put a land card from your hand onto the battlefield. Activate this ability only any time you could cast a sorcery.
Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new SkyshroudRangerEffect(), new TapSourceCost());
Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new PutLandFromHandOntoBattlefieldEffect(), new TapSourceCost());
ability.addTarget(new TargetCardInHand(0, 1, new FilterLandCard()));
this.addAbility(ability);
@ -74,30 +71,3 @@ public class SkyshroudRanger extends CardImpl<SkyshroudRanger> {
return new SkyshroudRanger(this);
}
}
class SkyshroudRangerEffect extends OneShotEffect<SkyshroudRangerEffect> {
SkyshroudRangerEffect() {
super(Outcome.PutLandInPlay);
staticText = "You may put a land card from your hand onto the battlefield";
}
SkyshroudRangerEffect(final SkyshroudRangerEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
Card card = game.getCard(targetPointer.getFirst(game, source));
if (card != null) {
card.moveToZone(Zone.BATTLEFIELD, source.getSourceId(), game, false);
}
return true;
}
@Override
public SkyshroudRangerEffect copy() {
return new SkyshroudRangerEffect(this);
}
}

View file

@ -29,20 +29,16 @@
package mage.sets.worldwake;
import java.util.UUID;
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.TapSourceCost;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.abilities.effects.common.PutLandFromHandOntoBattlefieldEffect;
import mage.cards.CardImpl;
import mage.constants.Outcome;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterLandCard;
import mage.game.Game;
import mage.target.common.TargetCardInHand;
/**
@ -57,7 +53,8 @@ public class WalkingAtlas extends CardImpl<WalkingAtlas> {
this.subtype.add("Construct");
this.power = new MageInt(1);
this.toughness = new MageInt(1);
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new WalkingAtlasEffect(), new TapSourceCost());
// {tap}: You may put a land card from your hand onto the battlefield.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutLandFromHandOntoBattlefieldEffect(), new TapSourceCost());
ability.addTarget(new TargetCardInHand(new FilterLandCard()));
this.addAbility(ability);
}
@ -72,30 +69,3 @@ public class WalkingAtlas extends CardImpl<WalkingAtlas> {
}
}
class WalkingAtlasEffect extends OneShotEffect<WalkingAtlasEffect> {
WalkingAtlasEffect() {
super(Outcome.PutLandInPlay);
staticText = "You may put a land card from your hand onto the battlefield";
}
WalkingAtlasEffect(final WalkingAtlasEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
Card c = game.getCard(targetPointer.getFirst(game, source));
if (c != null) {
c.moveToZone(Zone.BATTLEFIELD, source.getSourceId(), game, false);
return true;
}
return false;
}
@Override
public WalkingAtlasEffect copy() {
return new WalkingAtlasEffect(this);
}
}