mirror of
https://github.com/correl/mage.git
synced 2024-11-16 03:00:12 +00:00
Merge pull request #4661 from Zzooouhh/master
Implemented Drought, Monsoon, Leshrac's Sigil, Lim-Dûl's Hex
This commit is contained in:
commit
05e526aa08
5 changed files with 415 additions and 0 deletions
118
Mage.Sets/src/mage/cards/d/Drought.java
Normal file
118
Mage.Sets/src/mage/cards/d/Drought.java
Normal 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.cards.d;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect;
|
||||||
|
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.AbilityType;
|
||||||
|
import mage.constants.CostModificationType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.TargetController;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author L_J
|
||||||
|
*/
|
||||||
|
public class Drought extends CardImpl {
|
||||||
|
|
||||||
|
public Drought(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}");
|
||||||
|
|
||||||
|
// At the beginning of your upkeep, sacrifice Drought unless you pay {W}{W}.
|
||||||
|
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ManaCostsImpl("{W}{W}")), TargetController.YOU, false));
|
||||||
|
|
||||||
|
// Spells cost an additional "Sacrifice a Swamp" to cast for each black mana symbol in their mana costs.
|
||||||
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DroughtAdditionalCostEffect(true)));
|
||||||
|
|
||||||
|
// Activated abilities cost an additional "Sacrifice a Swamp" to activate for each black mana symbol in their activation costs.
|
||||||
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DroughtAdditionalCostEffect(false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Drought(final Drought card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Drought copy() {
|
||||||
|
return new Drought(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class DroughtAdditionalCostEffect extends CostModificationEffectImpl {
|
||||||
|
|
||||||
|
private boolean appliesToSpells;
|
||||||
|
private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Swamp");
|
||||||
|
static{
|
||||||
|
filter.add(new SubtypePredicate(SubType.SWAMP));
|
||||||
|
}
|
||||||
|
|
||||||
|
DroughtAdditionalCostEffect(boolean appliesToSpells) {
|
||||||
|
super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.INCREASE_COST);
|
||||||
|
this.staticText = (appliesToSpells ? "Spells" : "Activated abilities") + " cost an additional \"Sacrifice a Swamp\" to activate for each black mana symbol in their " + (appliesToSpells ? "mana" : "activation") + " costs";
|
||||||
|
this.appliesToSpells = appliesToSpells;
|
||||||
|
}
|
||||||
|
|
||||||
|
DroughtAdditionalCostEffect(DroughtAdditionalCostEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
appliesToSpells = effect.appliesToSpells;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source, Ability abilityToModify) {
|
||||||
|
int blackSymbols = abilityToModify.getManaCosts().getMana().getBlack();
|
||||||
|
abilityToModify.addCost(new SacrificeTargetCost(new TargetControlledPermanent(blackSymbols, blackSymbols, filter, true)));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean applies(Ability abilityToModify, Ability source, Game game) {
|
||||||
|
return (appliesToSpells && abilityToModify.getAbilityType() == AbilityType.SPELL)
|
||||||
|
|| (!appliesToSpells && (abilityToModify.getAbilityType() == AbilityType.ACTIVATED || abilityToModify.getAbilityType() == AbilityType.MANA));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DroughtAdditionalCostEffect copy() {
|
||||||
|
return new DroughtAdditionalCostEffect(this);
|
||||||
|
}
|
||||||
|
}
|
77
Mage.Sets/src/mage/cards/l/LeshracsSigil.java
Normal file
77
Mage.Sets/src/mage/cards/l/LeshracsSigil.java
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
/*
|
||||||
|
* 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.cards.l;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.ObjectColor;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.common.SpellCastOpponentTriggeredAbility;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.common.DoIfCostPaid;
|
||||||
|
import mage.abilities.effects.common.ReturnToHandSourceEffect;
|
||||||
|
import mage.abilities.effects.common.discard.DiscardCardYouChooseTargetEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SetTargetPointer;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.FilterSpell;
|
||||||
|
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801 & L_J
|
||||||
|
*/
|
||||||
|
public class LeshracsSigil extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterSpell filter = new FilterSpell("a green spell");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new ColorPredicate(ObjectColor.GREEN));
|
||||||
|
}
|
||||||
|
|
||||||
|
public LeshracsSigil(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{B}{B}");
|
||||||
|
|
||||||
|
// Whenever an opponent casts a green spell, you may pay {B}{B}. If you do, look at that player's hand and choose a card from it. The player discards that card.
|
||||||
|
this.addAbility(new SpellCastOpponentTriggeredAbility(
|
||||||
|
Zone.BATTLEFIELD, new DoIfCostPaid(new DiscardCardYouChooseTargetEffect(), new ManaCostsImpl("{B}{B}")), filter, false, SetTargetPointer.PLAYER));
|
||||||
|
|
||||||
|
// {B}{B}: Return Leshrac's Sigil to its owner's hand.
|
||||||
|
this.addAbility(new SimpleActivatedAbility(new ReturnToHandSourceEffect(true), new ManaCostsImpl("{B}{B}")));
|
||||||
|
}
|
||||||
|
|
||||||
|
public LeshracsSigil(final LeshracsSigil card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LeshracsSigil copy() {
|
||||||
|
return new LeshracsSigil(this);
|
||||||
|
}
|
||||||
|
}
|
106
Mage.Sets/src/mage/cards/l/LimDulsHex.java
Normal file
106
Mage.Sets/src/mage/cards/l/LimDulsHex.java
Normal file
|
@ -0,0 +1,106 @@
|
||||||
|
/*
|
||||||
|
* 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.cards.l;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||||
|
import mage.abilities.costs.OrCost;
|
||||||
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.TargetController;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author L_J
|
||||||
|
*/
|
||||||
|
public class LimDulsHex extends CardImpl {
|
||||||
|
|
||||||
|
public LimDulsHex(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}");
|
||||||
|
|
||||||
|
// At the beginning of your upkeep, for each player, Lim-Dûl's Hex deals 1 damage to that player unless he or she pays {B} or {3}.
|
||||||
|
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new LimDulsHexEffect(), TargetController.YOU, false));
|
||||||
|
}
|
||||||
|
|
||||||
|
public LimDulsHex(final LimDulsHex card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LimDulsHex copy() {
|
||||||
|
return new LimDulsHex(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class LimDulsHexEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
public LimDulsHexEffect() {
|
||||||
|
super(Outcome.Damage);
|
||||||
|
this.staticText = "for each player, {this} deals 1 damage to that player unless he or she pays {B} or {3}";
|
||||||
|
}
|
||||||
|
|
||||||
|
public LimDulsHexEffect(final LimDulsHexEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LimDulsHexEffect copy() {
|
||||||
|
return new LimDulsHexEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||||
|
if (sourcePermanent != null) {
|
||||||
|
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
||||||
|
Player player = game.getPlayer(playerId);
|
||||||
|
if (player != null) {
|
||||||
|
OrCost costToPay = new OrCost(new ManaCostsImpl("{B}"), new ManaCostsImpl("{3}"), "{B} or {3}");
|
||||||
|
costToPay.clearPaid();
|
||||||
|
String message = "Would you like to pay " + costToPay.getText() + " to prevent 1 damage from " + sourcePermanent.getLogName() + "?";
|
||||||
|
if (!(player.chooseUse(Outcome.Benefit, message, source, game) && costToPay.pay(source, game, source.getSourceId(), player.getId(), false, null))) {
|
||||||
|
game.informPlayers(player.getLogName() + " chooses not to pay " + costToPay.getText() + " to prevent 1 damage from " + sourcePermanent.getLogName());
|
||||||
|
player.damage(1, sourcePermanent.getId(), game, false, true);
|
||||||
|
} else {
|
||||||
|
game.informPlayers(player.getLogName() + " chooses to pay " + costToPay.getText() + " to prevent 1 damage from " + sourcePermanent.getLogName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
110
Mage.Sets/src/mage/cards/m/Monsoon.java
Normal file
110
Mage.Sets/src/mage/cards/m/Monsoon.java
Normal file
|
@ -0,0 +1,110 @@
|
||||||
|
/*
|
||||||
|
* 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.cards.m;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.TriggeredAbility;
|
||||||
|
import mage.abilities.common.OnEventTriggeredAbility;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
|
import mage.filter.predicate.permanent.TappedPredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.events.GameEvent;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author L_J
|
||||||
|
*/
|
||||||
|
public class Monsoon extends CardImpl {
|
||||||
|
|
||||||
|
public Monsoon(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}{G}");
|
||||||
|
|
||||||
|
// At the beginning of each player's end step, tap all untapped Islands that player controls and Monsoon deals X damage to the player, where X is the number of Islands tapped this way.
|
||||||
|
TriggeredAbility ability = new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of each player's end step", true, new MonsoonEffect());
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Monsoon(final Monsoon card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Monsoon copy() {
|
||||||
|
return new Monsoon(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class MonsoonEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
private static final FilterPermanent filter = new FilterPermanent();
|
||||||
|
static {
|
||||||
|
filter.add(new SubtypePredicate(SubType.ISLAND));
|
||||||
|
filter.add(Predicates.not(new TappedPredicate()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public MonsoonEffect() {
|
||||||
|
super(Outcome.Damage);
|
||||||
|
this.staticText = "tap all untapped Islands that player controls and {this} deals X damage to the player, where X is the number of Islands tapped this way";
|
||||||
|
}
|
||||||
|
|
||||||
|
public MonsoonEffect(Outcome outcome) {
|
||||||
|
super(outcome);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player player = game.getPlayer(game.getActivePlayerId());
|
||||||
|
if (player != null) {
|
||||||
|
int damage = 0;
|
||||||
|
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, player.getId(), game)) {
|
||||||
|
permanent.tap(game);
|
||||||
|
damage++;
|
||||||
|
}
|
||||||
|
player.damage(damage, source.getSourceId(), game, false, true);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Effect copy() {
|
||||||
|
return new MonsoonEffect();
|
||||||
|
}
|
||||||
|
}
|
|
@ -112,6 +112,7 @@ public class IceAge extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Dire Wolves", 118, Rarity.COMMON, mage.cards.d.DireWolves.class));
|
cards.add(new SetCardInfo("Dire Wolves", 118, Rarity.COMMON, mage.cards.d.DireWolves.class));
|
||||||
cards.add(new SetCardInfo("Disenchant", 244, Rarity.COMMON, mage.cards.d.Disenchant.class));
|
cards.add(new SetCardInfo("Disenchant", 244, Rarity.COMMON, mage.cards.d.Disenchant.class));
|
||||||
cards.add(new SetCardInfo("Drift of the Dead", 11, Rarity.UNCOMMON, mage.cards.d.DriftOfTheDead.class));
|
cards.add(new SetCardInfo("Drift of the Dead", 11, Rarity.UNCOMMON, mage.cards.d.DriftOfTheDead.class));
|
||||||
|
cards.add(new SetCardInfo("Drought", 245, Rarity.UNCOMMON, mage.cards.d.Drought.class));
|
||||||
cards.add(new SetCardInfo("Dwarven Armory", 182, Rarity.RARE, mage.cards.d.DwarvenArmory.class));
|
cards.add(new SetCardInfo("Dwarven Armory", 182, Rarity.RARE, mage.cards.d.DwarvenArmory.class));
|
||||||
cards.add(new SetCardInfo("Earthlore", 119, Rarity.COMMON, mage.cards.e.Earthlore.class));
|
cards.add(new SetCardInfo("Earthlore", 119, Rarity.COMMON, mage.cards.e.Earthlore.class));
|
||||||
cards.add(new SetCardInfo("Earthlink", 363, Rarity.RARE, mage.cards.e.Earthlink.class));
|
cards.add(new SetCardInfo("Earthlink", 363, Rarity.RARE, mage.cards.e.Earthlink.class));
|
||||||
|
@ -219,6 +220,8 @@ public class IceAge extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Lava Tubes", 339, Rarity.RARE, mage.cards.l.LavaTubes.class));
|
cards.add(new SetCardInfo("Lava Tubes", 339, Rarity.RARE, mage.cards.l.LavaTubes.class));
|
||||||
cards.add(new SetCardInfo("Legions of Lim-Dul", 30, Rarity.COMMON, mage.cards.l.LegionsOfLimDul.class));
|
cards.add(new SetCardInfo("Legions of Lim-Dul", 30, Rarity.COMMON, mage.cards.l.LegionsOfLimDul.class));
|
||||||
cards.add(new SetCardInfo("Leshrac's Rite", 31, Rarity.UNCOMMON, mage.cards.l.LeshracsRite.class));
|
cards.add(new SetCardInfo("Leshrac's Rite", 31, Rarity.UNCOMMON, mage.cards.l.LeshracsRite.class));
|
||||||
|
cards.add(new SetCardInfo("Leshrac's Sigil", 32, Rarity.UNCOMMON, mage.cards.l.LeshracsSigil.class));
|
||||||
|
cards.add(new SetCardInfo("Lim-Dûl's Hex", 34, Rarity.UNCOMMON, mage.cards.l.LimDulsHex.class));
|
||||||
cards.add(new SetCardInfo("Lhurgoyf", 140, Rarity.RARE, mage.cards.l.Lhurgoyf.class));
|
cards.add(new SetCardInfo("Lhurgoyf", 140, Rarity.RARE, mage.cards.l.Lhurgoyf.class));
|
||||||
cards.add(new SetCardInfo("Lightning Blow", 266, Rarity.RARE, mage.cards.l.LightningBlow.class));
|
cards.add(new SetCardInfo("Lightning Blow", 266, Rarity.RARE, mage.cards.l.LightningBlow.class));
|
||||||
cards.add(new SetCardInfo("Lure", 141, Rarity.UNCOMMON, mage.cards.l.Lure.class));
|
cards.add(new SetCardInfo("Lure", 141, Rarity.UNCOMMON, mage.cards.l.Lure.class));
|
||||||
|
@ -235,6 +238,7 @@ public class IceAge extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Minion of Leshrac", 38, Rarity.RARE, mage.cards.m.MinionOfLeshrac.class));
|
cards.add(new SetCardInfo("Minion of Leshrac", 38, Rarity.RARE, mage.cards.m.MinionOfLeshrac.class));
|
||||||
cards.add(new SetCardInfo("Minion of Tevesh Szat", 39, Rarity.RARE, mage.cards.m.MinionOfTeveshSzat.class));
|
cards.add(new SetCardInfo("Minion of Tevesh Szat", 39, Rarity.RARE, mage.cards.m.MinionOfTeveshSzat.class));
|
||||||
cards.add(new SetCardInfo("Mole Worms", 40, Rarity.UNCOMMON, mage.cards.m.MoleWorms.class));
|
cards.add(new SetCardInfo("Mole Worms", 40, Rarity.UNCOMMON, mage.cards.m.MoleWorms.class));
|
||||||
|
cards.add(new SetCardInfo("Monsoon", 376, Rarity.RARE, mage.cards.m.Monsoon.class));
|
||||||
cards.add(new SetCardInfo("Moor Fiend", 41, Rarity.COMMON, mage.cards.m.MoorFiend.class));
|
cards.add(new SetCardInfo("Moor Fiend", 41, Rarity.COMMON, mage.cards.m.MoorFiend.class));
|
||||||
cards.add(new SetCardInfo("Mountain", 340, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Mountain", 340, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
|
||||||
cards.add(new SetCardInfo("Mountain", 341, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Mountain", 341, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
|
||||||
|
|
Loading…
Reference in a new issue