* Fixed 10 cards with "all permanents becomes" effect that it revoke colors instead doesn't change that;

* Affected cards: Jolrael, Empress of Beasts, Life // Death, Living Lands, Living Plane, Natural Affinity, Natural Emergence, Nature's Revolt, Rude Awakening,
Sylvan Awakening, Thelonite Druid
This commit is contained in:
Oleg Agafonov 2018-05-10 13:41:05 +04:00
parent cf421aba22
commit 256dc94c80
11 changed files with 35 additions and 34 deletions

View file

@ -105,7 +105,7 @@ class JolraelEmpressOfBeastsEffect extends OneShotEffect {
if (targetPlayer != null) {
FilterPermanent filter = new FilterLandPermanent();
filter.add(new ControllerIdPredicate(targetPlayer.getId()));
game.addEffect(new BecomesCreatureAllEffect(new CreatureToken(3, 3), "lands", filter, Duration.EndOfTurn), source);
game.addEffect(new BecomesCreatureAllEffect(new CreatureToken(3, 3), "lands", filter, Duration.EndOfTurn, false), source);
return true;
}
return false;

View file

@ -62,7 +62,7 @@ public class LifeDeath extends SplitCard {
// Life
// All lands you control become 1/1 creatures until end of turn. They're still lands.
getLeftHalfCard().getSpellAbility().addEffect(new BecomesCreatureAllEffect(new CreatureToken(1, 1), "lands",
new FilterControlledLandPermanent("lands you control"), Duration.EndOfTurn));
new FilterControlledLandPermanent("lands you control"), Duration.EndOfTurn, false));
// Death
// Return target creature card from your graveyard to the battlefield. You lose life equal to its converted mana cost.

View file

@ -58,7 +58,7 @@ public class LivingLands extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}");
// All Forests are 1/1 creatures that are still lands.
ContinuousEffect effect = new BecomesCreatureAllEffect(new CreatureToken(1, 1), "lands", filter, Duration.WhileOnBattlefield);
ContinuousEffect effect = new BecomesCreatureAllEffect(new CreatureToken(1, 1), "lands", filter, Duration.WhileOnBattlefield, false);
effect.getDependencyTypes().add(DependencyType.BecomeForest);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
}

View file

@ -53,7 +53,7 @@ public class LivingPlane extends CardImpl {
this.addSuperType(SuperType.WORLD);
// All lands are 1/1 creatures that are still lands.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BecomesCreatureAllEffect(new CreatureToken(1, 1), "lands", StaticFilters.FILTER_LANDS, Duration.WhileOnBattlefield)));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BecomesCreatureAllEffect(new CreatureToken(1, 1), "lands", StaticFilters.FILTER_LANDS, Duration.WhileOnBattlefield, false)));
}
public LivingPlane(final LivingPlane card) {

View file

@ -53,7 +53,7 @@ public class NaturalAffinity extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{G}");
// All lands become 2/2 creatures until end of turn. They're still lands.
this.getSpellAbility().addEffect(new BecomesCreatureAllEffect(new CreatureToken(2, 2), "lands", StaticFilters.FILTER_LANDS, Duration.EndOfTurn));
this.getSpellAbility().addEffect(new BecomesCreatureAllEffect(new CreatureToken(2, 2), "lands", StaticFilters.FILTER_LANDS, Duration.EndOfTurn, false));
}
public NaturalAffinity(final NaturalAffinity card) {

View file

@ -47,6 +47,7 @@ import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.game.permanent.token.TokenImpl;
import mage.game.permanent.token.Token;
import mage.game.permanent.token.custom.CreatureToken;
/**
*
@ -68,9 +69,11 @@ public class NaturalEmergence extends CardImpl {
Effect effect = new ReturnToHandChosenControlledPermanentEffect(filter);
effect.setText("return a red or green enchantment you control to its owner's hand");
this.addAbility(new EntersBattlefieldTriggeredAbility(effect, false));
// Lands you control are 2/2 creatures with first strike. They're still lands.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BecomesCreatureAllEffect(new NaturalEmergenceToken(),
"lands", new FilterControlledLandPermanent("lands you control"), Duration.WhileOnBattlefield)));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BecomesCreatureAllEffect(
new CreatureToken(2, 2, "2/2 creatures with first strike").withAbility(FirstStrikeAbility.getInstance()),
"lands", new FilterControlledLandPermanent("lands you control"), Duration.WhileOnBattlefield, false)));
}
public NaturalEmergence(final NaturalEmergence card) {
@ -81,22 +84,4 @@ public class NaturalEmergence extends CardImpl {
public NaturalEmergence copy() {
return new NaturalEmergence(this);
}
}
class NaturalEmergenceToken extends TokenImpl {
public NaturalEmergenceToken() {
super("Land", "2/2 creatures with first strike");
cardType.add(CardType.CREATURE);
power = new MageInt(2);
toughness = new MageInt(2);
this.addAbility(FirstStrikeAbility.getInstance());
}
public NaturalEmergenceToken(final NaturalEmergenceToken token) {
super(token);
}
public NaturalEmergenceToken copy() {
return new NaturalEmergenceToken(this);
}
}
}

View file

@ -53,7 +53,7 @@ public class NaturesRevolt extends CardImpl {
// All lands are 2/2 creatures that are still lands.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BecomesCreatureAllEffect(new CreatureToken(2, 2),
"lands", new FilterLandPermanent(), Duration.WhileOnBattlefield)));
"lands", new FilterLandPermanent(), Duration.WhileOnBattlefield, false)));
}
public NaturesRevolt(final NaturesRevolt card) {

View file

@ -58,7 +58,7 @@ public class RudeAwakening extends CardImpl {
this.getSpellAbility().addEffect(new UntapAllLandsControllerEffect());
// or until end of turn, lands you control become 2/2 creatures that are still lands.
Mode mode = new Mode();
mode.getEffects().add(new BecomesCreatureAllEffect(new CreatureToken(2, 2), "lands", new FilterControlledLandPermanent("lands you control"), Duration.EndOfTurn));
mode.getEffects().add(new BecomesCreatureAllEffect(new CreatureToken(2, 2), "lands", new FilterControlledLandPermanent("lands you control"), Duration.EndOfTurn, false));
this.getSpellAbility().getModes().addMode(mode);
// Entwine {2}{G}

View file

@ -55,7 +55,8 @@ public class SylvanAwakening extends CardImpl {
new SylvanAwakeningToken(),
"lands",
new FilterControlledLandPermanent("all lands you control"),
Duration.UntilYourNextTurn)
Duration.UntilYourNextTurn,
false)
);
}

View file

@ -68,7 +68,7 @@ public class TheloniteDruid extends CardImpl {
this.toughness = new MageInt(1);
// {1}{G}, {tap}, Sacrifice a creature: Forests you control become 2/3 creatures until end of turn. They're still lands.
ContinuousEffect effect = new BecomesCreatureAllEffect(new CreatureToken(2, 3), "Forests", filter, Duration.EndOfTurn);
ContinuousEffect effect = new BecomesCreatureAllEffect(new CreatureToken(2, 3), "Forests", filter, Duration.EndOfTurn, false);
effect.getDependencyTypes().add(DependencyType.BecomeForest);
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
effect,

View file

@ -54,19 +54,22 @@ public class BecomesCreatureAllEffect extends ContinuousEffectImpl {
protected Token token;
protected String type;
private final FilterPermanent filter;
private boolean loseColor = true;
public BecomesCreatureAllEffect(Token token, String type, FilterPermanent filter, Duration duration) {
public BecomesCreatureAllEffect(Token token, String type, FilterPermanent filter, Duration duration, boolean loseColor) {
super(duration, Outcome.BecomeCreature);
this.token = token;
this.type = type;
this.filter = filter;
this.loseColor = loseColor;
}
public BecomesCreatureAllEffect(final BecomesCreatureAllEffect effect) {
super(effect);
token = effect.token.copy();
type = effect.type;
this.token = effect.token.copy();
this.type = effect.type;
this.filter = effect.filter.copy();
this.loseColor = effect.loseColor;
}
@Override
@ -94,6 +97,7 @@ public class BecomesCreatureAllEffect extends ContinuousEffectImpl {
} else {
affectedPermanents = new HashSet<>(game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game));
}
for(Permanent permanent : affectedPermanents) {
if (permanent != null) {
switch (layer) {
@ -114,13 +118,22 @@ public class BecomesCreatureAllEffect extends ContinuousEffectImpl {
}
}
break;
case ColorChangingEffects_5:
if (sublayer == SubLayer.NA) {
if (this.loseColor) {
permanent.getColor(game).setBlack(false);
permanent.getColor(game).setGreen(false);
permanent.getColor(game).setBlue(false);
permanent.getColor(game).setWhite(false);
permanent.getColor(game).setRed(false);
}
if (token.getColor(game).hasColor()) {
permanent.getColor(game).setColor(token.getColor(game));
permanent.getColor(game).addColor(token.getColor(game));
}
}
break;
case AbilityAddingRemovingEffects_6:
if (sublayer == SubLayer.NA) {
if (!token.getAbilities().isEmpty()) {
@ -130,6 +143,7 @@ public class BecomesCreatureAllEffect extends ContinuousEffectImpl {
}
}
break;
case PTChangingEffects_7:
if (sublayer == SubLayer.SetPT_7b) {
int power = token.getPower().getValue();
@ -139,6 +153,7 @@ public class BecomesCreatureAllEffect extends ContinuousEffectImpl {
permanent.getToughness().setValue(toughness);
}
}
break;
}
}
}