more CHK and first flipped card - Budoka Gardener

This commit is contained in:
Loki 2011-07-06 21:38:19 +03:00
parent df7bcbbeb9
commit 0ef227087e
18 changed files with 932 additions and 20 deletions

View file

@ -0,0 +1,157 @@
/*
* 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.championsofkamigawa;
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.common.SimpleStaticAbility;
import mage.abilities.condition.common.Flipped;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalContinousEffect;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CopyTokenEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.continious.BoostSourceEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.common.FilterLandCard;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.Token;
import mage.target.common.TargetCardInHand;
/**
* @author Loki
*/
public class BudokaGardener extends CardImpl<BudokaGardener> {
public BudokaGardener(UUID ownerId) {
super(ownerId, 202, "Budoka Gardener", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{G}");
this.expansionSetCode = "CHK";
this.subtype.add("Human");
this.subtype.add("Monk");
this.color.setGreen(true);
this.power = new MageInt(2);
this.toughness = new MageInt(1);
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BudokaGardenerEffect(), new TapSourceCost());
ability.addTarget(new TargetCardInHand(new FilterLandCard()));
this.addAbility(ability);
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new CopyTokenEffect(new DokaiWeaverofLife()), Flipped.getInstance(), "")));
}
public BudokaGardener(final BudokaGardener card) {
super(card);
}
@Override
public BudokaGardener copy() {
return new BudokaGardener(this);
}
}
class BudokaGardenerEffect extends OneShotEffect<BudokaGardenerEffect> {
BudokaGardenerEffect() {
super(Constants.Outcome.PutLandInPlay);
}
BudokaGardenerEffect(final BudokaGardenerEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
Card c = game.getCard(targetPointer.getFirst(source));
if (c != null) {
c.moveToZone(Constants.Zone.BATTLEFIELD, source.getSourceId(), game, false);
}
if (game.getBattlefield().count(DokaiWeaverofLifeToken.filterLands, source.getControllerId(), game) >= 10) {
Permanent p = game.getPermanent(source.getSourceId());
if (p != null) {
p.flip(game);
}
}
return false;
}
@Override
public BudokaGardenerEffect copy() {
return new BudokaGardenerEffect(this);
}
@Override
public String getText(Ability source) {
return "You may put a land card from your hand onto the battlefield. If you control ten or more lands, flip Budoka Gardener.";
}
}
class DokaiWeaverofLife extends Token {
DokaiWeaverofLife() {
super("Dokai, Weaver of Life", "");
supertype.add("Legendary");
cardType.add(CardType.CREATURE);
color.setGreen(true);
subtype.add("Human");
subtype.add("Monk");
power = new MageInt(3);
toughness = new MageInt(3);
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new CreateTokenEffect(new DokaiWeaverofLifeToken()), new ManaCostsImpl("{4}{G}{G}"));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}
}
class DokaiWeaverofLifeToken extends Token {
final static FilterControlledPermanent filterLands = new FilterControlledPermanent("lands");
static {
filterLands.getCardType().add(CardType.LAND);
filterLands.setScopeCardType(Filter.ComparisonScope.Any);
}
DokaiWeaverofLifeToken() {
super("Elemental", "a X/X green Elemental creature token onto the battlefield, where X is the number of lands you control");
cardType.add(CardType.CREATURE);
color.setGreen(true);
subtype.add("Elemental");
power = new MageInt(0);
toughness = new MageInt(0);
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new BoostSourceEffect(new PermanentsOnBattlefieldCount(filterLands), new PermanentsOnBattlefieldCount(filterLands), Constants.Duration.WhileOnBattlefield)));
}
}

View file

@ -0,0 +1,80 @@
/*
* 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.championsofkamigawa;
import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ColoredManaCost;
import mage.abilities.effects.common.PreventDamageTargetEffect;
import mage.abilities.mana.WhiteManaAbility;
import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent;
import mage.target.TargetPermanent;
/**
* @author Loki
*/
public class EiganjoCastle extends CardImpl<EiganjoCastle> {
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("legendary creature");
static {
filter.getSupertype().add("Legendary");
filter.setScopeSupertype(Filter.ComparisonScope.Any);
}
public EiganjoCastle(UUID ownerId) {
super(ownerId, 275, "Eiganjo Castle", Rarity.RARE, new CardType[]{CardType.LAND}, null);
this.expansionSetCode = "CHK";
this.supertype.add("Legendary");
this.addAbility(new WhiteManaAbility());
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new PreventDamageTargetEffect(Constants.Duration.EndOfTurn, 2), new ColoredManaCost(Constants.ColoredManaSymbol.W));
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetPermanent(filter));
this.addAbility(ability);
}
public EiganjoCastle(final EiganjoCastle card) {
super(card);
}
@Override
public EiganjoCastle copy() {
return new EiganjoCastle(this);
}
}

View file

@ -29,6 +29,7 @@
package mage.sets.championsofkamigawa;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.abilities.effects.common.DamageAllEffect;
@ -37,25 +38,24 @@ import mage.cards.CardImpl;
import mage.filter.common.FilterCreaturePermanent;
/**
*
* @author Loki
*/
public class GaleForce extends CardImpl<GaleForce> {
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with flying");
static {
filter.getAbilities().add(FlyingAbility.getInstance());
}
static {
filter.getAbilities().add(FlyingAbility.getInstance());
}
public GaleForce (UUID ownerId) {
public GaleForce(UUID ownerId) {
super(ownerId, 209, "Gale Force", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{4}{G}");
this.expansionSetCode = "CHK";
this.color.setGreen(true);
this.color.setGreen(true);
this.getSpellAbility().addEffect(new DamageAllEffect(5, filter));
}
public GaleForce (final GaleForce card) {
public GaleForce(final GaleForce card) {
super(card);
}

View file

@ -30,6 +30,7 @@ package mage.sets.championsofkamigawa;
import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.MageInt;

View file

@ -0,0 +1,126 @@
/*
* 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.championsofkamigawa;
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.TapSourceCost;
import mage.abilities.effects.PreventionEffectImpl;
import mage.abilities.effects.common.PreventAllCombatDamageEffect;
import mage.abilities.effects.common.PreventDamageTargetEffect;
import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.target.common.TargetCreatureOrPlayer;
import mage.target.common.TargetCreaturePermanent;
/**
* @author Loki
*/
public class KitsuneHealer extends CardImpl<KitsuneHealer> {
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("legendary creature");
static {
filter.getSupertype().add("Legendary");
filter.setScopeSupertype(Filter.ComparisonScope.Any);
}
public KitsuneHealer(UUID ownerId) {
super(ownerId, 27, "Kitsune Healer", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{W}");
this.expansionSetCode = "CHK";
this.subtype.add("Fox");
this.subtype.add("Cleric");
this.color.setWhite(true);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
Ability firstAbility = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new PreventDamageTargetEffect(Constants.Duration.EndOfTurn, 1), new TapSourceCost());
firstAbility.addTarget(new TargetCreatureOrPlayer());
this.addAbility(firstAbility);
Ability secondAbility = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new KitsuneHealerEffect(Constants.Duration.EndOfTurn), new TapSourceCost());
secondAbility.addTarget(new TargetCreaturePermanent(filter));
this.addAbility(secondAbility);
}
public KitsuneHealer(final KitsuneHealer card) {
super(card);
}
@Override
public KitsuneHealer copy() {
return new KitsuneHealer(this);
}
}
class KitsuneHealerEffect extends PreventionEffectImpl<KitsuneHealerEffect> {
public KitsuneHealerEffect(Constants.Duration duration) {
super(duration);
}
public KitsuneHealerEffect(final PreventAllCombatDamageEffect effect) {
super(effect);
}
@Override
public KitsuneHealerEffect copy() {
return new KitsuneHealerEffect(Constants.Duration.EndOfTurn);
}
@Override
public boolean apply(Game game, Ability source) {
return true;
}
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
GameEvent preventEvent = new GameEvent(GameEvent.EventType.PREVENT_DAMAGE, source.getFirstTarget(), source.getId(), source.getControllerId(), event.getAmount(), false);
if (!game.replaceEvent(preventEvent)) {
int damage = event.getAmount();
event.setAmount(0);
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.PREVENTED_DAMAGE, source.getFirstTarget(), source.getId(), source.getControllerId(), damage));
}
return false;
}
@Override
public String getText(Ability source) {
return "Prevent all damage that would be dealt to target legendary creature" +
" " + duration.toString();
}
}

View file

@ -0,0 +1,75 @@
/*
* 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.championsofkamigawa;
import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.MustBlockSourceEffect;
import mage.abilities.effects.common.continious.BoostEnchantedEffect;
import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author Loki
*/
public class Lure extends CardImpl<Lure> {
public Lure (UUID ownerId) {
super(ownerId, 226, "Lure", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}{G}");
this.expansionSetCode = "CHK";
this.subtype.add("Aura");
this.color.setGreen(true);
TargetPermanent auraTarget = new TargetCreaturePermanent();
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Constants.Outcome.AddAbility));
Ability ability = new EnchantAbility(auraTarget.getTargetName());
this.addAbility(ability);
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityAttachedEffect(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new MustBlockSourceEffect()), Constants.AttachmentType.AURA)));
}
public Lure (final Lure card) {
super(card);
}
@Override
public Lure copy() {
return new Lure(this);
}
}

View file

@ -88,6 +88,7 @@ class MelokutheCloudedMirrorToken extends Token {
MelokutheCloudedMirrorToken() {
super("", "a 1/1 blue Illusion creature token with flying");
cardType.add(CardType.CREATURE);
color.setBlue(true);
subtype.add("Illusion");
power = new MageInt(1);
toughness = new MageInt(1);

View file

@ -41,7 +41,7 @@ import mage.abilities.effects.common.UntapTargetEffect;
import mage.abilities.mana.BlueManaAbility;
import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.FilterPermanent;
import mage.target.TargetPermanent;
/**
@ -50,7 +50,7 @@ import mage.target.TargetPermanent;
*/
public class MinamoSchoolatWatersEdge extends CardImpl<MinamoSchoolatWatersEdge> {
private final static FilterControlledPermanent filter = new FilterControlledPermanent("legendary permanent");
private final static FilterPermanent filter = new FilterPermanent("legendary permanent");
static {
filter.getSupertype().add("Legendary");
@ -59,7 +59,7 @@ public class MinamoSchoolatWatersEdge extends CardImpl<MinamoSchoolatWatersEdge>
public MinamoSchoolatWatersEdge (UUID ownerId) {
super(ownerId, 279, "Minamo, School at Water's Edge", Rarity.RARE, new CardType[]{CardType.LAND}, "");
super(ownerId, 279, "Minamo, School at Water's Edge", Rarity.RARE, new CardType[]{CardType.LAND}, null);
this.expansionSetCode = "CHK";
this.subtype.add("Legendary");
this.addAbility(new BlueManaAbility());

View file

@ -41,7 +41,7 @@ import mage.abilities.effects.common.continious.BoostTargetEffect;
import mage.abilities.mana.GreenManaAbility;
import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.target.TargetPermanent;
/**
@ -49,7 +49,7 @@ import mage.target.TargetPermanent;
*/
public class OkinaTempletotheGrandfathers extends CardImpl<OkinaTempletotheGrandfathers> {
private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("legendary creature");
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("legendary creature");
static {
filter.getSupertype().add("Legendary");

View file

@ -0,0 +1,75 @@
package mage.sets.championsofkamigawa;
/*
* 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.
*/
import mage.Constants;
import mage.MageInt;
import mage.abilities.common.PutIntoGraveFromBattlefieldTriggeredAbility;
import mage.abilities.effects.common.DamageAllEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.filter.common.FilterCreaturePermanent;
import java.util.UUID;
/**
* @author Loki
*/
public class RyuseiTheFallingStar extends CardImpl<RyuseiTheFallingStar> {
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("creature without flying");
static {
filter.getAbilities().add(FlyingAbility.getInstance());
filter.setNotAbilities(true);
}
public RyuseiTheFallingStar(UUID ownerID) {
super(ownerID, 185, "Ryusei, The Falling Star", Constants.Rarity.RARE, new Constants.CardType[]{Constants.CardType.CREATURE}, "{5}{R}");
this.expansionSetCode = "CHK";
this.supertype.add("Legendary");
this.subtype.add("Dragon");
this.subtype.add("Spirit");
this.color.setRed(true);
this.power = new MageInt(5);
this.toughness = new MageInt(5);
this.addAbility(FlyingAbility.getInstance());
this.addAbility(new PutIntoGraveFromBattlefieldTriggeredAbility(new DamageAllEffect(5, filter)));
}
public RyuseiTheFallingStar(final RyuseiTheFallingStar card) {
super(card);
}
@Override
public RyuseiTheFallingStar copy() {
return new RyuseiTheFallingStar(this);
}
}

View file

@ -0,0 +1,85 @@
/*
* 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.championsofkamigawa;
import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.MageInt;
import mage.Mana;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.ManaEffect;
import mage.abilities.effects.common.continious.BoostControlledEffect;
import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent;
/**
* @author Loki
*/
public class SachiDaughterofSeshiro extends CardImpl<SachiDaughterofSeshiro> {
private final static FilterCreaturePermanent snakeFilter = new FilterCreaturePermanent("Snakes");
private final static FilterCreaturePermanent shamanFilter = new FilterCreaturePermanent("Smahans");
static {
snakeFilter.getSubtype().add("Snake");
shamanFilter.getSubtype().add("Shaman");
}
public SachiDaughterofSeshiro(UUID ownerId) {
super(ownerId, 238, "Sachi, Daughter of Seshiro", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}{G}");
this.expansionSetCode = "CHK";
this.supertype.add("Legendary");
this.subtype.add("Snake");
this.subtype.add("Shaman");
this.color.setGreen(true);
this.power = new MageInt(1);
this.toughness = new MageInt(3);
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new BoostControlledEffect(0, 1, Constants.Duration.WhileOnBattlefield, snakeFilter, true)));
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityControlledEffect(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new ManaEffect(new Mana(0, 2, 0, 0, 0, 0, 0)), new TapSourceCost()), Constants.Duration.WhileOnBattlefield, shamanFilter, false)));
}
public SachiDaughterofSeshiro(final SachiDaughterofSeshiro card) {
super(card);
}
@Override
public SachiDaughterofSeshiro copy() {
return new SachiDaughterofSeshiro(this);
}
}

View file

@ -0,0 +1,75 @@
package mage.sets.championsofkamigawa;
/*
* 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.
*/
import mage.Constants;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterCard;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterBasicLandCard;
import mage.game.Game;
import mage.target.common.TargetCardInHand;
import mage.target.common.TargetCardInLibrary;
import java.util.UUID;
/**
* @author Loki
*/
public class SakuraTribeElder extends CardImpl<SakuraTribeElder> {
final static FilterBasicLandCard filterLands = new FilterBasicLandCard();
public SakuraTribeElder(UUID ownerId) {
super(ownerId, 239, "Sakura-Tribe Elder", Constants.Rarity.COMMON, new Constants.CardType[]{Constants.CardType.CREATURE}, "{1}{G}");
this.expansionSetCode = "CHK";
this.subtype.add("Snake");
this.subtype.add("Shaman");
this.color.setGreen(true);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
TargetCardInLibrary target = new TargetCardInLibrary(filterLands);
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new SearchLibraryPutInPlayEffect(target, true, Constants.Outcome.PutLandInPlay), new SacrificeSourceCost()));
}
public SakuraTribeElder(final SakuraTribeElder card) {
super(card);
}
@Override
public SakuraTribeElder copy() {
return new SakuraTribeElder(this);
}
}

View file

@ -0,0 +1,118 @@
/*
* 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.championsofkamigawa;
import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.MageInt;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DiscardTargetEffect;
import mage.abilities.effects.common.DrawCardControllerEffect;
import mage.abilities.effects.common.UntapAllLandsControllerEffect;
import mage.abilities.effects.common.continious.BoostControlledEffect;
import mage.cards.CardImpl;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game;
import mage.game.events.DamagedPlayerEvent;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.target.targetpointer.FixedTarget;
/**
* @author Loki
*/
public class SeshirotheAnointed extends CardImpl<SeshirotheAnointed> {
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Snakes");
static {
filter.getSubtype().add("Snake");
}
public SeshirotheAnointed(UUID ownerId) {
super(ownerId, 241, "Seshiro the Anointed", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{G}{G}");
this.expansionSetCode = "CHK";
this.supertype.add("Legendary");
this.subtype.add("Snake");
this.subtype.add("Monk");
this.color.setGreen(true);
this.power = new MageInt(3);
this.toughness = new MageInt(4);
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new BoostControlledEffect(2, 2, Constants.Duration.WhileOnBattlefield, filter, true)));
this.addAbility(new SeshirotheAnointedAbility());
}
public SeshirotheAnointed(final SeshirotheAnointed card) {
super(card);
}
@Override
public SeshirotheAnointed copy() {
return new SeshirotheAnointed(this);
}
}
class SeshirotheAnointedAbility extends TriggeredAbilityImpl<SeshirotheAnointedAbility> {
public SeshirotheAnointedAbility() {
super(Constants.Zone.BATTLEFIELD, new DrawCardControllerEffect(1), true);
}
public SeshirotheAnointedAbility(final SeshirotheAnointedAbility ability) {
super(ability);
}
@Override
public SeshirotheAnointedAbility copy() {
return new SeshirotheAnointedAbility(this);
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (event instanceof DamagedPlayerEvent) {
DamagedPlayerEvent damageEvent = (DamagedPlayerEvent)event;
Permanent p = game.getPermanent(event.getSourceId());
if (damageEvent.isCombatDamage() && p != null && p.getSubtype().contains("Snake")) {
return true;
}
}
return false;
}
@Override
public String getRule() {
return "Whenever a Snake you control deals combat damage to a player, you may draw a card.";
}
}

View file

@ -42,7 +42,7 @@ import mage.abilities.keyword.FirstStrikeAbility;
import mage.abilities.mana.RedManaAbility;
import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.target.TargetPermanent;
/**
@ -50,7 +50,7 @@ import mage.target.TargetPermanent;
*/
public class ShinkatheBloodsoakedKeep extends CardImpl<ShinkatheBloodsoakedKeep> {
private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("legendary creature");
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("legendary creature");
static {
filter.getSupertype().add("Legendary");
@ -58,7 +58,7 @@ public class ShinkatheBloodsoakedKeep extends CardImpl<ShinkatheBloodsoakedKeep>
}
public ShinkatheBloodsoakedKeep(UUID ownerId) {
super(ownerId, 282, "Shinka, the Bloodsoaked Keep", Rarity.RARE, new CardType[]{CardType.LAND}, "");
super(ownerId, 282, "Shinka, the Bloodsoaked Keep", Rarity.RARE, new CardType[]{CardType.LAND}, null);
this.expansionSetCode = "CHK";
this.supertype.add("Legendary");
this.addAbility(new RedManaAbility());

View file

@ -42,7 +42,7 @@ import mage.abilities.keyword.FearAbility;
import mage.abilities.mana.BlackManaAbility;
import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.target.TargetPermanent;
/**
@ -50,7 +50,7 @@ import mage.target.TargetPermanent;
*/
public class ShizoDeathsStorehouse extends CardImpl<ShizoDeathsStorehouse> {
private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("legendary creature");
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("legendary creature");
static {
filter.getSupertype().add("Legendary");
@ -58,7 +58,7 @@ public class ShizoDeathsStorehouse extends CardImpl<ShizoDeathsStorehouse> {
}
public ShizoDeathsStorehouse(UUID ownerId) {
super(ownerId, 283, "Shizo, Death's Storehouse", Rarity.RARE, new CardType[]{CardType.LAND}, "");
super(ownerId, 283, "Shizo, Death's Storehouse", Rarity.RARE, new CardType[]{CardType.LAND}, null);
this.expansionSetCode = "CHK";
this.subtype.add("Legendary");
this.addAbility(new BlackManaAbility());

View file

@ -44,8 +44,7 @@ public class CounseloftheSoratami extends mage.sets.championsofkamigawa.Counselo
super(ownerId);
this.expansionSetCode = "10E";
this.cardNumber = 76;
this.color.setBlue(true);
}
public CounseloftheSoratami (final CounseloftheSoratami card) {

View file

@ -0,0 +1,58 @@
/*
* 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.tenth;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.cards.CardImpl;
/**
*
* @author Loki>
*/
public class Lure extends mage.sets.championsofkamigawa.Lure {
public Lure (UUID ownerId) {
super(ownerId);
this.cardNumber = 276;
this.expansionSetCode = "10E";
}
public Lure (final Lure card) {
super(card);
}
@Override
public Lure copy() {
return new Lure(this);
}
}

View file

@ -0,0 +1,62 @@
package mage.abilities.effects.common;
import mage.Constants;
import mage.abilities.Ability;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.Token;
public class CopyTokenEffect extends ContinuousEffectImpl<CopyTokenEffect> {
protected Token token;
public CopyTokenEffect(Token token) {
super(Constants.Duration.WhileOnBattlefield, Constants.Layer.CopyEffects_1, Constants.SubLayer.NA, Constants.Outcome.BecomeCreature);
this.token = token.copy();
}
public CopyTokenEffect(final CopyTokenEffect effect) {
super(effect);
this.token = effect.token.copy();
}
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(source.getSourceId());
permanent.setName(token.getName());
permanent.getColor().setColor(token.getColor());
permanent.getCardType().clear();
for (Constants.CardType type: token.getCardType()) {
permanent.getCardType().add(type);
}
permanent.getSubtype().clear();
for (String type: token.getSubtype()) {
permanent.getSubtype().add(type);
}
permanent.getSupertype().clear();
for (String type: token.getSupertype()) {
permanent.getSupertype().add(type);
}
permanent.getAbilities().clear();
for (Ability ability: token.getAbilities()) {
permanent.addAbility(ability);
}
permanent.getPower().setValue(token.getPower().getValue());
permanent.getToughness().setValue(token.getToughness().getValue());
//permanent.getLoyalty().setValue(card.getLoyalty().getValue());
return true;
}
@Override
public CopyTokenEffect copy() {
return new CopyTokenEffect(this);
}
@Override
public String getText(Ability source) {
return "You may have {this} enter the battlefield as a copy of " + token.getDescription() + " on the battlefield";
}
}