Merge pull request #4797 from spjspj/master

Fix for TrugaJunglePlane (Adding in new condition).
This commit is contained in:
spjspj 2018-04-19 18:59:22 +10:00 committed by GitHub
commit 6a3b579a43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View file

@ -70,7 +70,7 @@ public class AkoumPlane extends Plane {
this.setExpansionSetCodeForImage("PCA"); this.setExpansionSetCodeForImage("PCA");
// Players may cast enchantment spells as if they had flash // Players may cast enchantment spells as if they had flash
SimpleStaticAbility ability = new SimpleStaticAbility(Zone.COMMAND, new CastAsThoughItHadFlashAllEffect(Duration.Custom, filterCard, false)); SimpleStaticAbility ability = new SimpleStaticAbility(Zone.COMMAND, new CastAsThoughItHadFlashAllEffect(Duration.Custom, filterCard, true));
this.getAbilities().add(ability); this.getAbilities().add(ability);
// Active player can roll the planar die: Whenever you roll {CHAOS}, destroy target creature that isn't enchanted // Active player can roll the planar die: Whenever you roll {CHAOS}, destroy target creature that isn't enchanted

View file

@ -29,11 +29,12 @@ package mage.game.command.planes;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import mage.abilities.Ability;
import mage.abilities.common.ActivateIfConditionActivatedAbility; import mage.abilities.common.ActivateIfConditionActivatedAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.IsStillOnPlaneCondition;
import mage.abilities.condition.common.MainPhaseStackEmptyCondition; import mage.abilities.condition.common.MainPhaseStackEmptyCondition;
import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.RevealLibraryPutIntoHandEffect; import mage.abilities.effects.common.RevealLibraryPutIntoHandEffect;
import mage.abilities.effects.common.RollPlanarDieEffect; import mage.abilities.effects.common.RollPlanarDieEffect;
@ -54,12 +55,17 @@ import mage.watchers.common.PlanarRollWatcher;
*/ */
public class TrugaJunglePlane extends Plane { public class TrugaJunglePlane extends Plane {
private static final String rule = "All lands have '{t}: Add one mana of any color to your mana pool";
public TrugaJunglePlane() { public TrugaJunglePlane() {
this.setName("Plane - Truga Jungle"); this.setName("Plane - Truga Jungle");
this.setExpansionSetCodeForImage("PCA"); this.setExpansionSetCodeForImage("PCA");
// All lands have '{t}: Add one mana of any color to your mana pool" SimpleStaticAbility ability
Ability ability = new SimpleStaticAbility(Zone.COMMAND, new GainAbilityAllEffect(new AnyColorManaAbility(), Duration.Custom, StaticFilters.FILTER_LANDS, false)); = new SimpleStaticAbility(Zone.COMMAND, new ConditionalContinuousEffect(
new GainAbilityAllEffect(new AnyColorManaAbility(), Duration.Custom, StaticFilters.FILTER_LANDS),
new IsStillOnPlaneCondition(this.getName()),
rule));
this.getAbilities().add(ability); 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. // 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.