diff --git a/Mage.Sets/src/mage/sets/worldwake/DeathforgeShaman.java b/Mage.Sets/src/mage/sets/worldwake/DeathforgeShaman.java new file mode 100644 index 00000000000..02f17b9b7a4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/worldwake/DeathforgeShaman.java @@ -0,0 +1,111 @@ +/* + * 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.worldwake; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.MultikickerCount; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.MultikickerAbility; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetPlayer; + +/** + * + * @author jeffwadsworth + */ +public class DeathforgeShaman extends CardImpl { + + public DeathforgeShaman(UUID ownerId) { + super(ownerId, 80, "Deathforge Shaman", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{R}"); + this.expansionSetCode = "WWK"; + this.subtype.add("Ogre"); + this.subtype.add("Shaman"); + + this.color.setRed(true); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Multikicker {R} + this.addAbility(new MultikickerAbility(new ManaCostsImpl("{R}"))); + + // When Deathforge Shaman enters the battlefield, it deals damage to target player equal to twice the number of times it was kicked. + Ability ability = new EntersBattlefieldTriggeredAbility(new DeathforgeShamanEffect()); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public DeathforgeShaman(final DeathforgeShaman card) { + super(card); + } + + @Override + public DeathforgeShaman copy() { + return new DeathforgeShaman(this); + } +} + +class DeathforgeShamanEffect extends OneShotEffect { + + public DeathforgeShamanEffect() { + super(Outcome.Damage); + staticText = "it deals damage to target player equal to twice the number of times it was kicked"; + } + + public DeathforgeShamanEffect(final DeathforgeShamanEffect effect) { + super(effect); + } + + @Override + public DeathforgeShamanEffect copy() { + return new DeathforgeShamanEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + DynamicValue value = new MultikickerCount(); + int damage = value.calculate(game, source) * 2; + + Player player = game.getPlayer(source.getFirstTarget()); + if (player != null) { + player.damage(damage, id, game, false, true); + return true; + } + return false; + } + +} diff --git a/Mage.Sets/src/mage/sets/worldwake/GrotagThrasher.java b/Mage.Sets/src/mage/sets/worldwake/GrotagThrasher.java new file mode 100644 index 00000000000..9dea1f70cab --- /dev/null +++ b/Mage.Sets/src/mage/sets/worldwake/GrotagThrasher.java @@ -0,0 +1,69 @@ +/* + * 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.worldwake; + +import java.util.UUID; +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.common.CantBlockTargetEffect; +import mage.cards.CardImpl; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author jeffwadsworth + */ +public class GrotagThrasher extends CardImpl { + + public GrotagThrasher(UUID ownerId) { + super(ownerId, 83, "Grotag Thrasher", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{R}"); + this.expansionSetCode = "WWK"; + this.subtype.add("Lizard"); + + this.color.setRed(true); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Whenever Grotag Thrasher attacks, target creature can't block this turn. + AttacksTriggeredAbility ability = new AttacksTriggeredAbility(new CantBlockTargetEffect(Constants.Duration.EndOfTurn), false); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public GrotagThrasher(final GrotagThrasher card) { + super(card); + } + + @Override + public GrotagThrasher copy() { + return new GrotagThrasher(this); + } +} diff --git a/Mage.Sets/src/mage/sets/worldwake/QuestForTheGoblinLord.java b/Mage.Sets/src/mage/sets/worldwake/QuestForTheGoblinLord.java new file mode 100644 index 00000000000..e496d0f5c13 --- /dev/null +++ b/Mage.Sets/src/mage/sets/worldwake/QuestForTheGoblinLord.java @@ -0,0 +1,117 @@ +/* + * 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.worldwake; + +import java.util.UUID; +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.TargetController; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.HasCounterCondition; +import mage.abilities.decorator.ConditionalContinousEffect; +import mage.abilities.effects.common.continious.BoostAllEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.ZoneChangeEvent; +import mage.game.permanent.Permanent; + +/** + * + * @author jeffwadsworth + */ +public class QuestForTheGoblinLord extends CardImpl { + + final static private FilterCreaturePermanent filter = new FilterCreaturePermanent(); + + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + String rule = "As long as Quest for the Goblin Lord has five or more quest counters on it, creatures you control get +2/+0."; + + public QuestForTheGoblinLord(UUID ownerId) { + super(ownerId, 86, "Quest for the Goblin Lord", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{R}"); + this.expansionSetCode = "WWK"; + + this.color.setRed(true); + + // Whenever a Goblin enters the battlefield under your control, you may put a quest counter on Quest for the Goblin Lord. + this.addAbility(new QuestForTheGoblinLordTriggeredAbility()); + + // As long as Quest for the Goblin Lord has five or more quest counters on it, creatures you control get +2/+0. + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new BoostAllEffect(2, 0, Constants.Duration.WhileOnBattlefield, filter, false), new HasCounterCondition(CounterType.QUEST, 5, Integer.MAX_VALUE), rule))); + } + + public QuestForTheGoblinLord(final QuestForTheGoblinLord card) { + super(card); + } + + @Override + public QuestForTheGoblinLord copy() { + return new QuestForTheGoblinLord(this); + } +} + +class QuestForTheGoblinLordTriggeredAbility extends TriggeredAbilityImpl { + + QuestForTheGoblinLordTriggeredAbility() { + super(Constants.Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.QUEST.createInstance()), true); + } + + QuestForTheGoblinLordTriggeredAbility(final QuestForTheGoblinLordTriggeredAbility ability) { + super(ability); + } + + @Override + public QuestForTheGoblinLordTriggeredAbility copy() { + return new QuestForTheGoblinLordTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.ZONE_CHANGE && ((ZoneChangeEvent) event).getToZone() == Constants.Zone.BATTLEFIELD) { + Permanent permanent = game.getPermanent(event.getTargetId()); + if (permanent != null && permanent.getSubtype().contains("Goblin") && permanent.getControllerId().equals(super.getControllerId())) { + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever a Goblin enters the battlefield under your control, you may put a quest counter on {this}."; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/worldwake/ShorelineSalvager.java b/Mage.Sets/src/mage/sets/worldwake/ShorelineSalvager.java new file mode 100644 index 00000000000..7ed40158ce0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/worldwake/ShorelineSalvager.java @@ -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.worldwake; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.TargetController; +import mage.MageInt; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.condition.common.ControlsPermanentCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.DrawCardControllerEffect; +import mage.cards.CardImpl; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author jeffwadsworth + */ +public class ShorelineSalvager extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Island"); + + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + filter.add(new SubtypePredicate("Island")); + } + + String rule = "Whenever Shoreline Salvager deals combat damage to a player, if you control an Island, you may draw a card."; + + public ShorelineSalvager(UUID ownerId) { + super(ownerId, 67, "Shoreline Salvager", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "WWK"; + this.subtype.add("Surrakar"); + + this.color.setBlack(true); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Whenever Shoreline Salvager deals combat damage to a player, if you control an Island, you may draw a card. + this.addAbility(new ConditionalTriggeredAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new DrawCardControllerEffect(1), true), new ControlsPermanentCondition(filter), rule, true)); + } + + public ShorelineSalvager(final ShorelineSalvager card) { + super(card); + } + + @Override + public ShorelineSalvager copy() { + return new ShorelineSalvager(this); + } +}