mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 14:32:06 -08:00
Merge origin/master
This commit is contained in:
commit
d9d9da1152
9 changed files with 445 additions and 6 deletions
|
|
@ -99,7 +99,9 @@
|
||||||
|Generate|PLANE:PCA|Plane - The Dark Barony|||TheDarkBaronyPlane|
|
|Generate|PLANE:PCA|Plane - The Dark Barony|||TheDarkBaronyPlane|
|
||||||
|Generate|PLANE:PCA|Plane - Tazeem|||TazeemPlane|
|
|Generate|PLANE:PCA|Plane - Tazeem|||TazeemPlane|
|
||||||
|Generate|PLANE:PCA|Plane - The Eon Fog|||TheEonFogPlane|
|
|Generate|PLANE:PCA|Plane - The Eon Fog|||TheEonFogPlane|
|
||||||
|
|Generate|PLANE:PCA|Plane - Truga Jungle|||TrugaJunglePlane|
|
||||||
|Generate|PLANE:PCA|Plane - Turri Island|||TurriIslandPlane|
|
|Generate|PLANE:PCA|Plane - Turri Island|||TurriIslandPlane|
|
||||||
|
|Generate|PLANE:PCA|Plane - Undercity Reaches|||UndercityReachesPlane|
|
||||||
|Generate|TOK:PCA|Eldrazi|||EldraziAnnihilatorToken|
|
|Generate|TOK:PCA|Eldrazi|||EldraziAnnihilatorToken|
|
||||||
|Generate|TOK:10E|Ape|||PongifyApeToken|
|
|Generate|TOK:10E|Ape|||PongifyApeToken|
|
||||||
|Generate|TOK:10E|Dragon|||DragonToken2|
|
|Generate|TOK:10E|Dragon|||DragonToken2|
|
||||||
|
|
|
||||||
|
|
@ -525,6 +525,7 @@ public class CardView extends SimpleCardView {
|
||||||
this.mageObjectType = MageObjectType.PLANE;
|
this.mageObjectType = MageObjectType.PLANE;
|
||||||
Plane plane = (Plane) object;
|
Plane plane = (Plane) object;
|
||||||
this.rarity = Rarity.SPECIAL;
|
this.rarity = Rarity.SPECIAL;
|
||||||
|
this.frameStyle = FrameStyle.M15_NORMAL;
|
||||||
// Display in landscape/rotated/on its side
|
// Display in landscape/rotated/on its side
|
||||||
this.rotate = true;
|
this.rotate = true;
|
||||||
this.rules = plane.getAbilities().getRules(plane.getName());
|
this.rules = plane.getAbilities().getRules(plane.getName());
|
||||||
|
|
@ -568,13 +569,13 @@ public class CardView extends SimpleCardView {
|
||||||
this(true);
|
this(true);
|
||||||
this.gameObject = true;
|
this.gameObject = true;
|
||||||
this.id = plane.getId();
|
this.id = plane.getId();
|
||||||
this.mageObjectType = MageObjectType.EMBLEM;
|
this.mageObjectType = MageObjectType.PLANE;
|
||||||
this.name = plane.getName();
|
this.name = plane.getName();
|
||||||
this.displayName = name;
|
this.displayName = name;
|
||||||
this.rules = plane.getRules();
|
this.rules = plane.getRules();
|
||||||
// Display the plane in landscape (similar to Fused cards)
|
// Display the plane in landscape (similar to Fused cards)
|
||||||
this.rotate = true;
|
this.rotate = true;
|
||||||
this.frameStyle = FrameStyle.MPRP_FULL_ART_BASIC;
|
this.frameStyle = FrameStyle.M15_NORMAL;
|
||||||
this.expansionSetCode = plane.getExpansionSetCode();
|
this.expansionSetCode = plane.getExpansionSetCode();
|
||||||
this.rarity = Rarity.COMMON;
|
this.rarity = Rarity.COMMON;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ public enum Planes {
|
||||||
PLANE_ACADEMY_AT_TOLARIA_WEST("AcademyAtTolariaWestPlane"),
|
PLANE_ACADEMY_AT_TOLARIA_WEST("AcademyAtTolariaWestPlane"),
|
||||||
PLANE_AGYREM("AgyremPlane"),
|
PLANE_AGYREM("AgyremPlane"),
|
||||||
PLANE_AKOUM("AkoumPlane"),
|
PLANE_AKOUM("AkoumPlane"),
|
||||||
|
PLANE_ASTRAL_ARENA("AstralArenaPlane"),
|
||||||
PLANE_BANT("BantPlane"),
|
PLANE_BANT("BantPlane"),
|
||||||
PLANE_EDGE_OF_MALACOL("EdgeOfMalacolPlane"),
|
PLANE_EDGE_OF_MALACOL("EdgeOfMalacolPlane"),
|
||||||
PLANE_FEEDING_GROUNDS("FeedingGroundsPlane"),
|
PLANE_FEEDING_GROUNDS("FeedingGroundsPlane"),
|
||||||
|
|
@ -42,10 +43,12 @@ public enum Planes {
|
||||||
PLANE_HEDRON_FIELDS_OF_AGADEEM("HedronFieldsOfAgadeemPlane"),
|
PLANE_HEDRON_FIELDS_OF_AGADEEM("HedronFieldsOfAgadeemPlane"),
|
||||||
PLANE_LETHE_LAKE("LetheLakePlane"),
|
PLANE_LETHE_LAKE("LetheLakePlane"),
|
||||||
PLANE_NAYA("NayaPlane"),
|
PLANE_NAYA("NayaPlane"),
|
||||||
PLANE_THE_DARK_BARONY("TheDarkBaronyPlane"),
|
|
||||||
PLANE_TAZEEM("TazeemPlane"),
|
PLANE_TAZEEM("TazeemPlane"),
|
||||||
|
PLANE_THE_DARK_BARONY("TheDarkBaronyPlane"),
|
||||||
PLANE_THE_EON_FOG("TheEonFogPlane"),
|
PLANE_THE_EON_FOG("TheEonFogPlane"),
|
||||||
PLANE_TURRI_ISLAND("TurriIslandPlane");
|
PLANE_TRUGA_JUNGLE("TrugaJunglePlane"),
|
||||||
|
PLANE_TURRI_ISLAND("TurriIslandPlane"),
|
||||||
|
PLANE_UNDERCITY_REACHES("UndercityReachesPlane");
|
||||||
|
|
||||||
private final String text;
|
private final String text;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,7 @@ public class Plane implements CommandObject {
|
||||||
|
|
||||||
public Plane() {
|
public Plane() {
|
||||||
this.id = UUID.randomUUID();
|
this.id = UUID.randomUUID();
|
||||||
|
this.frameStyle = FrameStyle.M15_NORMAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Plane(final Plane plane) {
|
public Plane(final Plane plane) {
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ class AgyremEffect extends OneShotEffect {
|
||||||
Effect effect = new ReturnToBattlefieldUnderOwnerControlTargetEffect();
|
Effect effect = new ReturnToBattlefieldUnderOwnerControlTargetEffect();
|
||||||
effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game)));
|
effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game)));
|
||||||
effect.setText("return that card to the battlefield under its owner's control at the beginning of the next end step");
|
effect.setText("return that card to the battlefield under its owner's control at the beginning of the next end step");
|
||||||
game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.ANY), source);
|
game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect, TargetController.ANY), source);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -153,7 +153,7 @@ class AgyremEffect2 extends OneShotEffect {
|
||||||
Effect effect = new ReturnFromGraveyardToHandTargetEffect();
|
Effect effect = new ReturnFromGraveyardToHandTargetEffect();
|
||||||
effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game)));
|
effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game)));
|
||||||
effect.setText("return it to its owner's hand at the beginning of the next end step");
|
effect.setText("return it to its owner's hand at the beginning of the next end step");
|
||||||
game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(Zone.HAND, effect, TargetController.ANY), source);
|
game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect, TargetController.ANY), source);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,140 @@
|
||||||
|
/*
|
||||||
|
* 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.game.command.planes;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.condition.common.MainPhaseStackEmptyCondition;
|
||||||
|
import mage.abilities.costs.mana.GenericManaCost;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
|
import mage.abilities.effects.RestrictionEffect;
|
||||||
|
import mage.abilities.effects.common.DamageAllEffect;
|
||||||
|
import mage.abilities.effects.common.RollPlanarDieEffect;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.TargetController;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.command.Plane;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.target.Target;
|
||||||
|
import mage.watchers.common.AttackedThisTurnWatcher;
|
||||||
|
import mage.watchers.common.PlanarRollWatcher;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author spjspj
|
||||||
|
*/
|
||||||
|
public class AstralArenaPlane extends Plane {
|
||||||
|
|
||||||
|
public AstralArenaPlane() {
|
||||||
|
this.setName("Plane - Astral Arena");
|
||||||
|
this.setExpansionSetCodeForImage("PCA");
|
||||||
|
|
||||||
|
// No more than one creature can attack each turn. No more than one creature can block each turn.
|
||||||
|
SimpleStaticAbility ability = new SimpleStaticAbility(Zone.COMMAND, new AstralArenaAttackRestrictionEffect());
|
||||||
|
ability.addWatcher(new AttackedThisTurnWatcher());
|
||||||
|
SimpleStaticAbility ability2 = new SimpleStaticAbility(Zone.COMMAND, new AstralArenaBlockRestrictionEffect());
|
||||||
|
ability2.addWatcher(new AttackedThisTurnWatcher());
|
||||||
|
this.getAbilities().add(ability);
|
||||||
|
this.getAbilities().add(ability2);
|
||||||
|
|
||||||
|
// Active player can roll the planar die: Whenever you roll {CHAOS}, {this} deals 2 damage to each creature
|
||||||
|
Effect chaosEffect = new DamageAllEffect(2, new FilterCreaturePermanent());
|
||||||
|
Target chaosTarget = null;
|
||||||
|
|
||||||
|
List<Effect> chaosEffects = new ArrayList<Effect>();
|
||||||
|
chaosEffects.add(chaosEffect);
|
||||||
|
List<Target> chaosTargets = new ArrayList<Target>();
|
||||||
|
chaosTargets.add(chaosTarget);
|
||||||
|
|
||||||
|
ActivateIfConditionActivatedAbility chaosAbility = new ActivateIfConditionActivatedAbility(Zone.COMMAND, new RollPlanarDieEffect(chaosEffects, chaosTargets), new GenericManaCost(0), MainPhaseStackEmptyCondition.instance);
|
||||||
|
chaosAbility.addWatcher(new PlanarRollWatcher());
|
||||||
|
this.getAbilities().add(chaosAbility);
|
||||||
|
chaosAbility.setMayActivate(TargetController.ANY);
|
||||||
|
this.getAbilities().add(new SimpleStaticAbility(Zone.ALL, new PlanarDieRollCostIncreasingEffect(chaosAbility.getOriginalId())));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class AstralArenaAttackRestrictionEffect extends RestrictionEffect {
|
||||||
|
|
||||||
|
AstralArenaAttackRestrictionEffect() {
|
||||||
|
super(Duration.WhileOnBattlefield);
|
||||||
|
staticText = "No more than one creature can attack each combat";
|
||||||
|
}
|
||||||
|
|
||||||
|
AstralArenaAttackRestrictionEffect(final AstralArenaAttackRestrictionEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AstralArenaAttackRestrictionEffect copy() {
|
||||||
|
return new AstralArenaAttackRestrictionEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean applies(Permanent permanent, Ability source, Game game) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canAttack(Permanent attacker, UUID defenderId, Ability source, Game game) {
|
||||||
|
return game.getCombat().getAttackers().isEmpty();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class AstralArenaBlockRestrictionEffect extends RestrictionEffect {
|
||||||
|
|
||||||
|
AstralArenaBlockRestrictionEffect() {
|
||||||
|
super(Duration.WhileOnBattlefield);
|
||||||
|
staticText = "No more than one creature can block each combat";
|
||||||
|
}
|
||||||
|
|
||||||
|
AstralArenaBlockRestrictionEffect(final AstralArenaBlockRestrictionEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AstralArenaBlockRestrictionEffect copy() {
|
||||||
|
return new AstralArenaBlockRestrictionEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean applies(Permanent permanent, Ability source, Game game) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
|
||||||
|
return game.getCombat().getBlockers().isEmpty();
|
||||||
|
}
|
||||||
|
}
|
||||||
81
Mage/src/main/java/mage/game/command/planes/TazeemPlane.java
Normal file
81
Mage/src/main/java/mage/game/command/planes/TazeemPlane.java
Normal 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.game.command.planes;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.condition.common.MainPhaseStackEmptyCondition;
|
||||||
|
import mage.abilities.costs.mana.GenericManaCost;
|
||||||
|
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
|
import mage.abilities.effects.common.RollPlanarDieEffect;
|
||||||
|
import mage.abilities.effects.common.combat.CantBlockAllEffect;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.TargetController;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.filter.common.FilterControlledLandPermanent;
|
||||||
|
import mage.game.command.Plane;
|
||||||
|
import mage.target.Target;
|
||||||
|
import mage.watchers.common.PlanarRollWatcher;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author spjspj
|
||||||
|
*/
|
||||||
|
public class TazeemPlane extends Plane {
|
||||||
|
|
||||||
|
public TazeemPlane() {
|
||||||
|
this.setName("Plane - Tazeem");
|
||||||
|
this.setExpansionSetCodeForImage("PCA");
|
||||||
|
|
||||||
|
// Creatures can't block
|
||||||
|
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBlockAllEffect(StaticFilters.FILTER_PERMANENT_CREATURES, Duration.WhileOnBattlefield));
|
||||||
|
this.getAbilities().add(ability);
|
||||||
|
|
||||||
|
// Active player can roll the planar die: Whenever you roll {CHAOS}, draw a card for each land you control
|
||||||
|
Effect chaosEffect = new DrawCardSourceControllerEffect(new PermanentsOnBattlefieldCount(new FilterControlledLandPermanent()));
|
||||||
|
Target chaosTarget = null;
|
||||||
|
|
||||||
|
List<Effect> chaosEffects = new ArrayList<Effect>();
|
||||||
|
chaosEffects.add(chaosEffect);
|
||||||
|
|
||||||
|
List<Target> chaosTargets = new ArrayList<Target>();
|
||||||
|
chaosTargets.add(chaosTarget);
|
||||||
|
|
||||||
|
ActivateIfConditionActivatedAbility chaosAbility = new ActivateIfConditionActivatedAbility(Zone.COMMAND, new RollPlanarDieEffect(chaosEffects, chaosTargets), new GenericManaCost(0), MainPhaseStackEmptyCondition.instance);
|
||||||
|
chaosAbility.addWatcher(new PlanarRollWatcher());
|
||||||
|
this.getAbilities().add(chaosAbility);
|
||||||
|
chaosAbility.setMayActivate(TargetController.ANY);
|
||||||
|
this.getAbilities().add(new SimpleStaticAbility(Zone.ALL, new PlanarDieRollCostIncreasingEffect(chaosAbility.getOriginalId())));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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.game.command.planes;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.condition.common.MainPhaseStackEmptyCondition;
|
||||||
|
import mage.abilities.costs.mana.GenericManaCost;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
|
import mage.abilities.effects.common.RevealLibraryPutIntoHandEffect;
|
||||||
|
import mage.abilities.effects.common.RollPlanarDieEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
|
||||||
|
import mage.abilities.mana.AnyColorManaAbility;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.TargetController;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.filter.common.FilterLandCard;
|
||||||
|
import mage.game.command.Plane;
|
||||||
|
import mage.target.Target;
|
||||||
|
import mage.watchers.common.PlanarRollWatcher;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author spjspj
|
||||||
|
*/
|
||||||
|
public class TrugaJunglePlane extends Plane {
|
||||||
|
|
||||||
|
public TrugaJunglePlane() {
|
||||||
|
this.setName("Plane - Truga Jungle");
|
||||||
|
this.setExpansionSetCodeForImage("PCA");
|
||||||
|
|
||||||
|
// All lands have '{t}: Add one mana of any color to your mana pool"
|
||||||
|
Ability ability = new SimpleStaticAbility(Zone.COMMAND, new GainAbilityAllEffect(new AnyColorManaAbility(), Duration.Custom, StaticFilters.FILTER_LANDS, false));
|
||||||
|
this.getAbilities().add(ability);
|
||||||
|
|
||||||
|
// Active player can roll the planar die: Whenever you roll {CHAOS}, reveal the top three cards of your libary. Put all land cards revealed this way into your hand the rest on the bottom of your library in any order.
|
||||||
|
Effect chaosEffect = new RevealLibraryPutIntoHandEffect(3, new FilterLandCard(), Zone.LIBRARY);
|
||||||
|
Target chaosTarget = null;
|
||||||
|
|
||||||
|
List<Effect> chaosEffects = new ArrayList<Effect>();
|
||||||
|
chaosEffects.add(chaosEffect);
|
||||||
|
List<Target> chaosTargets = new ArrayList<Target>();
|
||||||
|
chaosTargets.add(chaosTarget);
|
||||||
|
|
||||||
|
ActivateIfConditionActivatedAbility chaosAbility = new ActivateIfConditionActivatedAbility(Zone.COMMAND, new RollPlanarDieEffect(chaosEffects, chaosTargets), new GenericManaCost(0), MainPhaseStackEmptyCondition.instance);
|
||||||
|
chaosAbility.addWatcher(new PlanarRollWatcher());
|
||||||
|
this.getAbilities().add(chaosAbility);
|
||||||
|
chaosAbility.setMayActivate(TargetController.ANY);
|
||||||
|
this.getAbilities().add(new SimpleStaticAbility(Zone.ALL, new PlanarDieRollCostIncreasingEffect(chaosAbility.getOriginalId())));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,131 @@
|
||||||
|
/*
|
||||||
|
* 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.game.command.planes;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
|
import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.condition.common.MainPhaseStackEmptyCondition;
|
||||||
|
import mage.abilities.costs.mana.GenericManaCost;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
|
import mage.abilities.effects.common.RollPlanarDieEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect.HandSizeModification;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.TargetController;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.FilterCard;
|
||||||
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.command.Plane;
|
||||||
|
import mage.game.events.DamagedPlayerEvent;
|
||||||
|
import mage.game.events.GameEvent;
|
||||||
|
import mage.game.events.GameEvent.EventType;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.target.Target;
|
||||||
|
import mage.watchers.common.PlanarRollWatcher;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author spjspj
|
||||||
|
*/
|
||||||
|
public class UndercityReachesPlane extends Plane {
|
||||||
|
|
||||||
|
private static final FilterCard filter = new FilterCard("creature spells");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||||
|
}
|
||||||
|
|
||||||
|
public UndercityReachesPlane() {
|
||||||
|
this.setName("Plane - Undercity Reaches");
|
||||||
|
this.setExpansionSetCodeForImage("PCA");
|
||||||
|
|
||||||
|
// Whenever a creature deals combat damage to a player, its controller may a draw a card
|
||||||
|
Ability ability = new UndercityReachesTriggeredAbility();
|
||||||
|
|
||||||
|
this.getAbilities().add(ability);
|
||||||
|
|
||||||
|
// Active player can roll the planar die: Whenever you roll {CHAOS}, reveal the top three cards of your library. Put all creature cards revealed this way into your hand and the rest into your graveyard.
|
||||||
|
Effect chaosEffect = new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Duration.EndOfGame, HandSizeModification.SET);
|
||||||
|
Target chaosTarget = null;
|
||||||
|
|
||||||
|
List<Effect> chaosEffects = new ArrayList<Effect>();
|
||||||
|
chaosEffects.add(chaosEffect);
|
||||||
|
List<Target> chaosTargets = new ArrayList<Target>();
|
||||||
|
chaosTargets.add(chaosTarget);
|
||||||
|
|
||||||
|
ActivateIfConditionActivatedAbility chaosAbility = new ActivateIfConditionActivatedAbility(Zone.COMMAND, new RollPlanarDieEffect(chaosEffects, chaosTargets), new GenericManaCost(0), MainPhaseStackEmptyCondition.instance);
|
||||||
|
chaosAbility.addWatcher(new PlanarRollWatcher());
|
||||||
|
this.getAbilities().add(chaosAbility);
|
||||||
|
chaosAbility.setMayActivate(TargetController.ANY);
|
||||||
|
this.getAbilities().add(new SimpleStaticAbility(Zone.ALL, new PlanarDieRollCostIncreasingEffect(chaosAbility.getOriginalId())));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class UndercityReachesTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
|
public UndercityReachesTriggeredAbility() {
|
||||||
|
super(Zone.COMMAND, new DrawCardSourceControllerEffect(1), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public UndercityReachesTriggeredAbility(final UndercityReachesTriggeredAbility ability) {
|
||||||
|
super(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UndercityReachesTriggeredAbility copy() {
|
||||||
|
return new UndercityReachesTriggeredAbility(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkEventType(GameEvent event, Game game) {
|
||||||
|
return event.getType() == EventType.DAMAGED_PLAYER;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
|
if (((DamagedPlayerEvent) event).isCombatDamage()) {
|
||||||
|
Permanent creature = game.getPermanent(event.getSourceId());
|
||||||
|
if (creature != null) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getRule() {
|
||||||
|
return "Whenever a creature deals combat damage to a player, its controller may a draw a card";
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue