[BOK] Added 10 cards.

This commit is contained in:
LevelX2 2013-10-28 23:50:54 +01:00
parent 9dce38a0a9
commit 6b48fe225f
11 changed files with 1264 additions and 0 deletions

View file

@ -0,0 +1,128 @@
/*
* 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.betrayersofkamigawa;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.CostImpl;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.PreventCombatDamageSourceEffect;
import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
import mage.abilities.keyword.EquipAbility;
import mage.cards.CardImpl;
import mage.constants.AttachmentType;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.permanent.Permanent;
/**
*
* @author LevelX2
*/
public class BlindingPowder extends CardImpl<BlindingPowder> {
public BlindingPowder(UUID ownerId) {
super(ownerId, 153, "Blinding Powder", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{1}");
this.expansionSetCode = "BOK";
this.subtype.add("Equipment");
// Equipped creature has "Unattach Blinding Powder: Prevent all combat damage that would be dealt to this creature this turn."
Effect effect = new PreventCombatDamageSourceEffect(Duration.EndOfTurn);
effect.setText("Prevent all combat damage that would be dealt to this creature this turn");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new BlindingPowderUnattachCost());
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ability, AttachmentType.EQUIPMENT, Duration.WhileOnBattlefield)));
// Equip {2}
this.addAbility(new EquipAbility(Outcome.PreventDamage, new GenericManaCost(2)));
}
public BlindingPowder(final BlindingPowder card) {
super(card);
}
@Override
public BlindingPowder copy() {
return new BlindingPowder(this);
}
}
class BlindingPowderUnattachCost extends CostImpl<BlindingPowderUnattachCost> {
public BlindingPowderUnattachCost() {
this.text = "Unattach Blinding Powder";
}
public BlindingPowderUnattachCost(final BlindingPowderUnattachCost cost) {
super(cost);
}
@Override
public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) {
Permanent permanent = game.getPermanent(sourceId);
if (permanent != null) {
for (UUID attachmentId :permanent.getAttachments()) {
Permanent attachment = game.getPermanent(attachmentId);
if (attachment != null && attachment.getName().equals("Blinding Powder")) {
paid = permanent.removeAttachment(attachmentId, game);
if (paid) {
break;
}
}
}
}
return paid;
}
@Override
public boolean canPay(UUID sourceId, UUID controllerId, Game game) {
Permanent permanent = game.getPermanent(sourceId);
if (permanent != null) {
for (UUID attachmentId :permanent.getAttachments()) {
Permanent attachment = game.getPermanent(attachmentId);
if (attachment != null && attachment.getName().equals("Blinding Powder")) {
return true;
}
}
}
return false;
}
@Override
public BlindingPowderUnattachCost copy() {
return new BlindingPowderUnattachCost(this);
}
}

View file

@ -0,0 +1,124 @@
/*
* 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.betrayersofkamigawa;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.OnEventTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.condition.common.FlippedCondition;
import mage.abilities.condition.common.HasCounterCondition;
import mage.abilities.costs.common.RemoveCountersSourceCost;
import mage.abilities.decorator.ConditionalContinousEffect;
import mage.abilities.decorator.ConditionalTriggeredAbility;
import mage.abilities.effects.common.CopyTokenEffect;
import mage.abilities.effects.common.FlipSourceEffect;
import mage.abilities.effects.common.continious.BoostTargetEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.common.FilterSpiritOrArcaneCard;
import mage.game.events.GameEvent;
import mage.game.permanent.token.Token;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author LevelX2
*/
public class BudokaPupil extends CardImpl<BudokaPupil> {
private static final FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
public BudokaPupil(UUID ownerId) {
super(ownerId, 122, "Budoka Pupil", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{G}{G}");
this.expansionSetCode = "BOK";
this.subtype.add("Human");
this.subtype.add("Monk");
this.color.setGreen(true);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
this.flipCard = true;
this.flipCardName = "Ichiga, Who Topples Oaks";
// Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Budoka Pupil.
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), filter, true));
// At the beginning of the end step, if there are two or more ki counters on Budoka Pupil, you may flip it.
this.addAbility(new ConditionalTriggeredAbility(
new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new FlipSourceEffect()),
new HasCounterCondition(CounterType.KI, 2, Integer.MAX_VALUE),
"At the beginning of the end step, if there are two or more ki counters on {this}, you may flip it.", true));
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new CopyTokenEffect(new IchigaWhoTopplesOaks()), FlippedCondition.getInstance(), ""));
ability.setRuleVisible(false);
this.addAbility(ability);
}
public BudokaPupil(final BudokaPupil card) {
super(card);
}
@Override
public BudokaPupil copy() {
return new BudokaPupil(this);
}
}
class IchigaWhoTopplesOaks extends Token {
IchigaWhoTopplesOaks() {
super("Ichiga, Who Topples Oaks", "");
supertype.add("Legendary");
cardType.add(CardType.CREATURE);
color.setGreen(true);
subtype.add("Spirit");
power = new MageInt(4);
toughness = new MageInt(3);
// Trample.
this.addAbility(TrampleAbility.getInstance());
// Remove a ki counter from Ichiga, Who Topples Oaks: Target creature gets +2/+2 until end of turn.
Ability ability = new SimpleActivatedAbility(
Zone.BATTLEFIELD,
new BoostTargetEffect(2,2, Duration.EndOfTurn),
new RemoveCountersSourceCost(CounterType.KI.createInstance()));
ability.addTarget(new TargetCreaturePermanent(true));
this.addAbility(ability);
}
}

View file

@ -0,0 +1,120 @@
/*
* 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.betrayersofkamigawa;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.OnEventTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.condition.common.FlippedCondition;
import mage.abilities.condition.common.HasCounterCondition;
import mage.abilities.costs.common.RemoveCountersSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.decorator.ConditionalContinousEffect;
import mage.abilities.decorator.ConditionalTriggeredAbility;
import mage.abilities.effects.common.CopyTokenEffect;
import mage.abilities.effects.common.CounterUnlessPaysEffect;
import mage.abilities.effects.common.FlipSourceEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.common.FilterSpiritOrArcaneCard;
import mage.game.events.GameEvent;
import mage.game.permanent.token.Token;
import mage.target.TargetSpell;
/**
*
* @author LevelX2
*/
public class CallowJushi extends CardImpl<CallowJushi> {
private static final FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
public CallowJushi(UUID ownerId) {
super(ownerId, 31, "Callow Jushi", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{U}{U}");
this.expansionSetCode = "BOK";
this.subtype.add("Human");
this.subtype.add("Wizard");
this.color.setBlue(true);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
this.flipCard = true;
this.flipCardName = "Jaraku the Interloper";
// Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Callow Jushi.
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), filter, true));
// At the beginning of the end step, if there are two or more ki counters on Callow Jushi, you may flip it.
this.addAbility(new ConditionalTriggeredAbility(
new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new FlipSourceEffect()),
new HasCounterCondition(CounterType.KI, 2, Integer.MAX_VALUE),
"At the beginning of the end step, if there are two or more ki counters on {this}, you may flip it.", true));
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new CopyTokenEffect(new JarakuTheInterloper()), FlippedCondition.getInstance(), ""));
ability.setRuleVisible(false);
this.addAbility(ability);
}
public CallowJushi(final CallowJushi card) {
super(card);
}
@Override
public CallowJushi copy() {
return new CallowJushi(this);
}
}
class JarakuTheInterloper extends Token {
JarakuTheInterloper() {
super("Jaraku the Interloper", "");
supertype.add("Legendary");
cardType.add(CardType.CREATURE);
color.setBlue(true);
subtype.add("Spirit");
power = new MageInt(3);
toughness = new MageInt(4);
// Remove a ki counter from Jaraku the Interloper: Counter target spell unless its controller pays {2}.
Ability ability = new SimpleActivatedAbility(
Zone.BATTLEFIELD,
new CounterUnlessPaysEffect(new GenericManaCost(2)),
new RemoveCountersSourceCost(CounterType.KI.createInstance()));
ability.addTarget(new TargetSpell());
this.addAbility(ability);
}
}

View file

@ -0,0 +1,120 @@
/*
* 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.betrayersofkamigawa;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.OnEventTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.condition.common.FlippedCondition;
import mage.abilities.condition.common.HasCounterCondition;
import mage.abilities.costs.common.RemoveCountersSourceCost;
import mage.abilities.decorator.ConditionalContinousEffect;
import mage.abilities.decorator.ConditionalTriggeredAbility;
import mage.abilities.effects.common.CopyTokenEffect;
import mage.abilities.effects.common.FlipSourceEffect;
import mage.abilities.effects.common.continious.GainControlTargetEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.common.FilterSpiritOrArcaneCard;
import mage.game.events.GameEvent;
import mage.game.permanent.token.Token;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author LevelX2
*/
public class CunningBandit extends CardImpl<CunningBandit> {
private static final FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
public CunningBandit(UUID ownerId) {
super(ownerId, 99, "Cunning Bandit", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{R}{R}");
this.expansionSetCode = "BOK";
this.subtype.add("Human");
this.subtype.add("Warrior");
this.color.setRed(true);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
this.flipCard = true;
this.flipCardName = "Azamuki, Treachery Incarnate";
// Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Cunning Bandit.
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), filter, true));
// At the beginning of the end step, if there are two or more ki counters on Cunning Bandit, you may flip it.
this.addAbility(new ConditionalTriggeredAbility(
new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new FlipSourceEffect()),
new HasCounterCondition(CounterType.KI, 2, Integer.MAX_VALUE),
"At the beginning of the end step, if there are two or more ki counters on {this}, you may flip it.", true));
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new CopyTokenEffect(new AzamukiTreacheryIncarnate()), FlippedCondition.getInstance(), ""));
ability.setRuleVisible(false);
this.addAbility(ability);
}
public CunningBandit(final CunningBandit card) {
super(card);
}
@Override
public CunningBandit copy() {
return new CunningBandit(this);
}
}
class AzamukiTreacheryIncarnate extends Token {
AzamukiTreacheryIncarnate() {
super("Azamuki, Treachery Incarnate", "");
supertype.add("Legendary");
cardType.add(CardType.CREATURE);
color.setRed(true);
subtype.add("Spirit");
power = new MageInt(5);
toughness = new MageInt(2);
// Remove a ki counter from Azamuki, Treachery Incarnate: Gain control of target creature until end of turn.
Ability ability = new SimpleActivatedAbility(
Zone.BATTLEFIELD,
new GainControlTargetEffect(Duration.EndOfTurn),
new RemoveCountersSourceCost(CounterType.KI.createInstance()));
ability.addTarget(new TargetCreaturePermanent(true));
this.addAbility(ability);
}
}

View file

@ -0,0 +1,76 @@
/*
* 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.betrayersofkamigawa;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.keyword.ProtectionAbility;
import mage.abilities.keyword.SoulshiftAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate;
/**
*
* @author LevelX2
*/
public class HarbingerOfSpring extends CardImpl<HarbingerOfSpring> {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Spirit creatures");
static {
filter.add(Predicates.not(new SubtypePredicate("Spirit")));
}
public HarbingerOfSpring(UUID ownerId) {
super(ownerId, 128, "Harbinger of Spring", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{G}");
this.expansionSetCode = "BOK";
this.subtype.add("Spirit");
this.color.setGreen(true);
this.power = new MageInt(2);
this.toughness = new MageInt(1);
// Protection from non-Spirit creatures
this.addAbility(new ProtectionAbility(filter));
// Soulshift 4
this.addAbility(new SoulshiftAbility(4));
}
public HarbingerOfSpring(final HarbingerOfSpring card) {
super(card);
}
@Override
public HarbingerOfSpring copy() {
return new HarbingerOfSpring(this);
}
}

View file

@ -0,0 +1,123 @@
/*
* 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.betrayersofkamigawa;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.OnEventTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.condition.common.FlippedCondition;
import mage.abilities.condition.common.HasCounterCondition;
import mage.abilities.costs.common.RemoveCountersSourceCost;
import mage.abilities.decorator.ConditionalContinousEffect;
import mage.abilities.decorator.ConditionalTriggeredAbility;
import mage.abilities.effects.common.CopyTokenEffect;
import mage.abilities.effects.common.FlipSourceEffect;
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
import mage.abilities.effects.common.continious.GainControlTargetEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.FearAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.common.FilterSpiritOrArcaneCard;
import mage.game.events.GameEvent;
import mage.game.permanent.token.Token;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author LevelX2
*/
public class HiredMuscle extends CardImpl<HiredMuscle> {
private static final FilterSpiritOrArcaneCard filter = new FilterSpiritOrArcaneCard();
public HiredMuscle(UUID ownerId) {
super(ownerId, 69, "Hired Muscle", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{B}{B}");
this.expansionSetCode = "BOK";
this.subtype.add("Human");
this.subtype.add("Warrior");
this.color.setBlack(true);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
this.flipCard = true;
this.flipCardName = "Scarmaker";
// Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Hired Muscle.
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), filter, true));
// At the beginning of the end step, if there are two or more ki counters on Hired Muscle, you may flip it.
this.addAbility(new ConditionalTriggeredAbility(
new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new FlipSourceEffect()),
new HasCounterCondition(CounterType.KI, 2, Integer.MAX_VALUE),
"At the beginning of the end step, if there are two or more ki counters on {this}, you may flip it.", true));
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new CopyTokenEffect(new Scarmaker()), FlippedCondition.getInstance(), ""));
ability.setRuleVisible(false);
this.addAbility(ability);
}
public HiredMuscle(final HiredMuscle card) {
super(card);
}
@Override
public HiredMuscle copy() {
return new HiredMuscle(this);
}
}
class Scarmaker extends Token {
Scarmaker() {
super("Scarmaker", "");
supertype.add("Legendary");
cardType.add(CardType.CREATURE);
color.setBlack(true);
subtype.add("Spirit");
power = new MageInt(4);
toughness = new MageInt(4);
// Remove a ki counter from Scarmaker: Target creature gains fear until end of turn.
Ability ability = new SimpleActivatedAbility(
Zone.BATTLEFIELD,
new GainAbilityTargetEffect(FearAbility.getInstance(), Duration.EndOfTurn),
new RemoveCountersSourceCost(CounterType.KI.createInstance()));
ability.addTarget(new TargetCreaturePermanent(true));
this.addAbility(ability);
}
}

View file

@ -0,0 +1,63 @@
/*
* 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.betrayersofkamigawa;
import java.util.UUID;
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
import mage.abilities.effects.common.GainLifeEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterLandPermanent;
/**
*
* @author LevelX2
*/
public class Lifegift extends CardImpl<Lifegift> {
public Lifegift(UUID ownerId) {
super(ownerId, 132, "Lifegift", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
this.expansionSetCode = "BOK";
this.color.setGreen(true);
// Whenever a land enters the battlefield, you may gain 1 life.
this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new GainLifeEffect(1), new FilterLandPermanent("a land"), true));
}
public Lifegift(final Lifegift card) {
super(card);
}
@Override
public Lifegift copy() {
return new Lifegift(this);
}
}

View file

@ -0,0 +1,81 @@
/*
* 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.betrayersofkamigawa;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.DealsDamageToACreatureAttachedTriggeredAbility;
import mage.abilities.common.DealsDamageToAPlayerAttachedTriggeredAbility;
import mage.abilities.condition.common.PermanentOnBattelfieldCondition;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.decorator.ConditionalReplacementEffect;
import mage.abilities.effects.ReplacementEffect;
import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.abilities.effects.common.SkipUntapTargetEffect;
import mage.abilities.effects.common.TapTargetEffect;
import mage.abilities.keyword.EquipAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
/**
*
* @author LevelX2
*/
public class NekoTe extends CardImpl<NekoTe> {
public NekoTe(UUID ownerId) {
super(ownerId, 155, "Neko-Te", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{3}");
this.expansionSetCode = "BOK";
this.subtype.add("Equipment");
// Whenever equipped creature deals damage to a creature, tap that creature. That creature doesn't untap during its controller's untap step for as long as Neko-Te remains on the battlefield.
ReplacementEffect skipUntapEffect = new SkipUntapTargetEffect(Duration.WhileOnBattlefield);
skipUntapEffect.setText("That creature doesn't untap during its controller's untap step for as long as {this} remains on the battlefield");
ConditionalReplacementEffect effect = new ConditionalReplacementEffect(skipUntapEffect, new PermanentOnBattelfieldCondition(), false);
Ability ability = new DealsDamageToACreatureAttachedTriggeredAbility(new TapTargetEffect("that creature"), false, "equipped creature", false, true);
ability.addEffect(effect);
this.addAbility(ability);
// Whenever equipped creature deals damage to a player, that player loses 1 life.
this.addAbility(new DealsDamageToAPlayerAttachedTriggeredAbility(new LoseLifeTargetEffect(1), "equipped creature", false, true, false));
// Equip {2}
this.addAbility(new EquipAbility(Outcome.Benefit, new GenericManaCost(2)));
}
public NekoTe(final NekoTe card) {
super(card);
}
@Override
public NekoTe copy() {
return new NekoTe(this);
}
}

View file

@ -0,0 +1,267 @@
/*
* 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.betrayersofkamigawa;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.Cost;
import mage.abilities.costs.CostImpl;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
import mage.abilities.keyword.EquipAbility;
import mage.cards.CardImpl;
import mage.constants.AttachmentType;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Layer;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.SubLayer;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.common.TargetCreaturePermanent;
import mage.target.targetpointer.FixedTarget;
/**
*
* @author LevelX2
*/
public class Shuriken extends CardImpl<Shuriken> {
public Shuriken(UUID ownerId) {
super(ownerId, 160, "Shuriken", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{1}");
this.expansionSetCode = "BOK";
this.subtype.add("Equipment");
// Equipped creature has "{tap}, Unattach Shuriken: Shuriken deals 2 damage to target creature. That creature's controller gains control of Shuriken unless it was unattached from a Ninja."
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ShurikenDamageEffect(), new TapSourceCost());
ability.addTarget(new TargetCreaturePermanent());
ability.addCost(new ShurikenUnattachCost());
ability.addEffect(new ShurikenControlEffect());
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ability, AttachmentType.EQUIPMENT, Duration.WhileOnBattlefield)));
// Equip {2}
this.addAbility(new EquipAbility(Outcome.PreventDamage, new GenericManaCost(2)));
}
public Shuriken(final Shuriken card) {
super(card);
}
@Override
public Shuriken copy() {
return new Shuriken(this);
}
}
class ShurikenDamageEffect extends OneShotEffect<ShurikenDamageEffect> {
public ShurikenDamageEffect() {
super(Outcome.Damage);
this.staticText = "Shuriken deals 2 damage to target creature";
}
public ShurikenDamageEffect(final ShurikenDamageEffect effect) {
super(effect);
}
@Override
public ShurikenDamageEffect copy() {
return new ShurikenDamageEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Permanent equipment = null;
for(Cost cost : source.getCosts()) {
if (cost instanceof ShurikenUnattachCost) {
equipment = ((ShurikenUnattachCost) cost).getEquipment();
break;
}
}
if (equipment != null) {
Permanent creature = game.getPermanent(this.getTargetPointer().getFirst(game, source));
if (creature != null) {
creature.damage(2, equipment.getId(), game, true, false);
}
return true;
}
return false;
}
}
class ShurikenUnattachCost extends CostImpl<ShurikenUnattachCost> {
Permanent equipment;
public ShurikenUnattachCost() {
this.text = "Unattach Shuriken";
}
public ShurikenUnattachCost(final ShurikenUnattachCost cost) {
super(cost);
this.equipment = cost.equipment;
}
@Override
public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) {
Permanent permanent = game.getPermanent(sourceId);
if (permanent != null) {
for (UUID attachmentId :permanent.getAttachments()) {
Permanent attachment = game.getPermanent(attachmentId);
if (attachment != null && attachment.getName().equals("Shuriken")) {
paid = permanent.removeAttachment(attachmentId, game);
if (paid) {
equipment = attachment;
break;
}
}
}
}
return paid;
}
@Override
public boolean canPay(UUID sourceId, UUID controllerId, Game game) {
Permanent permanent = game.getPermanent(sourceId);
if (permanent != null) {
for (UUID attachmentId :permanent.getAttachments()) {
Permanent attachment = game.getPermanent(attachmentId);
if (attachment != null && attachment.getName().equals("Shuriken")) {
return true;
}
}
}
return false;
}
@Override
public ShurikenUnattachCost copy() {
return new ShurikenUnattachCost(this);
}
public Permanent getEquipment() {
return equipment;
}
}
class ShurikenControlEffect extends OneShotEffect<ShurikenControlEffect> {
public ShurikenControlEffect() {
super(Outcome.Benefit);
this.staticText = "That creature's controller gains control of Shuriken unless it was unattached from a Ninja";
}
public ShurikenControlEffect(final ShurikenControlEffect effect) {
super(effect);
}
@Override
public ShurikenControlEffect copy() {
return new ShurikenControlEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Permanent equipment = null;
for(Cost cost : source.getCosts()) {
if (cost instanceof ShurikenUnattachCost) {
equipment = ((ShurikenUnattachCost) cost).getEquipment();
}
}
if (equipment != null) {
Permanent creature = game.getPermanent(source.getSourceId());
if (creature != null) {
if (!creature.hasSubtype("Ninja")) {
Permanent damagedCreature = game.getPermanent(this.getTargetPointer().getFirst(game, source));
if (damagedCreature == null) {
damagedCreature = (Permanent) game.getLastKnownInformation(this.getTargetPointer().getFirst(game, source), Zone.BATTLEFIELD);
}
if (damagedCreature != null) {
ContinuousEffect effect = new ShurikenGainControlEffect(Duration.EndOfGame, damagedCreature.getControllerId());
effect.setTargetPointer(new FixedTarget(equipment.getId()));
game.addEffect(effect, source);
return true;
} else {
return false;
}
}
return true;
}
}
return false;
}
}
class ShurikenGainControlEffect extends ContinuousEffectImpl<ShurikenGainControlEffect> {
UUID controller;
public ShurikenGainControlEffect(Duration duration, UUID controller) {
super(duration, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl);
this.controller = controller;
}
public ShurikenGainControlEffect(final ShurikenGainControlEffect effect) {
super(effect);
this.controller = effect.controller;
}
@Override
public ShurikenGainControlEffect copy() {
return new ShurikenGainControlEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(source.getFirstTarget());
if (targetPointer != null) {
permanent = game.getPermanent(targetPointer.getFirst(game, source));
}
if (permanent != null) {
return permanent.changeControllerId(controller, game);
}
return false;
}
@Override
public String getText(Mode mode) {
return "Gain control of Shuriken";
}
}

View file

@ -0,0 +1,64 @@
/*
* 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.betrayersofkamigawa;
import java.util.UUID;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.keyword.SpliceOntoArcaneAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
/**
*
* @author LevelX2
*/
public class VitalSurge extends CardImpl<VitalSurge> {
public VitalSurge(UUID ownerId) {
super(ownerId, 150, "Vital Surge", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{G}");
this.expansionSetCode = "BOK";
this.subtype.add("Arcane");
this.color.setGreen(true);
// You gain 3 life.
this.getSpellAbility().addEffect(new GainLifeEffect(3));
// Splice onto Arcane {1}{G}
this.addAbility(new SpliceOntoArcaneAbility("{1}{G}"));
}
public VitalSurge(final VitalSurge card) {
super(card);
}
@Override
public VitalSurge copy() {
return new VitalSurge(this);
}
}

View 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.abilities.effects.common;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.effects.ReplacementEffectImpl;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.PhaseStep;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.game.permanent.Permanent;
/**
* @author BetaSteward_at_googlemail.com
*/
public class SkipUntapTargetEffect extends ReplacementEffectImpl<SkipUntapTargetEffect> {
public SkipUntapTargetEffect(Duration duration) {
super(duration, Outcome.Detriment);
}
public SkipUntapTargetEffect(final SkipUntapTargetEffect effect) {
super(effect);
}
@Override
public SkipUntapTargetEffect copy() {
return new SkipUntapTargetEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
return false;
}
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Permanent creature = game.getPermanent(event.getTargetId());
if (creature != null) {
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
creature.addInfo(source.getSourceId().toString(), new StringBuilder("Does not untap during untap step [").append(sourcePermanent.getName()).append("]").toString());
}
return true;
}
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
if (game.getTurn().getStepType() == PhaseStep.UNTAP && event.getType() == EventType.UNTAP) {
for (UUID targetId : targetPointer.getTargets(game, source)) {
if (event.getTargetId().equals(targetId)) {
return true;
}
}
}
return false;
}
@Override
public String getText(Mode mode) {
if (staticText != null) {
return staticText;
}
return new StringBuilder("Target ").append(mode.getTargets().get(0).getTargetName())
.append(" doesn't untap ")
.append(getDuration().toString()).toString();
}
}