* Figure of Destiny - Fixed that the activated updates also lasts if Figure left battlefield and returned to it in some way.

This commit is contained in:
LevelX2 2013-08-18 10:04:04 +02:00
parent c108030779
commit 7985e2456d
2 changed files with 22 additions and 11 deletions

View file

@ -28,10 +28,6 @@
package mage.sets.eventide;
import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.condition.common.SourceMatchesFilterCondition;
@ -41,6 +37,10 @@ import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.permanent.token.Token;
@ -71,13 +71,13 @@ public class FigureOfDestiny extends CardImpl<FigureOfDestiny> {
// {RW}: Figure of Destiny becomes a 2/2 Kithkin Spirit.
this.addAbility(new SimpleActivatedAbility(
Zone.BATTLEFIELD,
new BecomesCreatureSourceEffect(new FigureOfDestiny.FigureOfDestinyToken1(), "", Duration.WhileOnBattlefield),
new BecomesCreatureSourceEffect(new FigureOfDestiny.FigureOfDestinyToken1(), "", Duration.Custom),
new ManaCostsImpl("{R/W}")));
// {RW}{RW}{RW}: If Figure of Destiny is a Spirit, it becomes a 4/4 Kithkin Spirit Warrior.
this.addAbility(new SimpleActivatedAbility(
Zone.BATTLEFIELD,
new ConditionalContinousEffect(
new BecomesCreatureSourceEffect(new FigureOfDestiny.FigureOfDestinyToken2(), "", Duration.WhileOnBattlefield),
new BecomesCreatureSourceEffect(new FigureOfDestiny.FigureOfDestinyToken2(), "", Duration.Custom),
new SourceMatchesFilterCondition(filter2),
"If Figure of Destiny is a Spirit, it becomes a 4/4 Kithkin Spirit Warrior",
true),
@ -87,7 +87,7 @@ public class FigureOfDestiny extends CardImpl<FigureOfDestiny> {
this.addAbility(new SimpleActivatedAbility(
Zone.BATTLEFIELD,
new ConditionalContinousEffect(
new BecomesCreatureSourceEffect(new FigureOfDestiny.FigureOfDestinyToken3(), "", Duration.WhileOnBattlefield),
new BecomesCreatureSourceEffect(new FigureOfDestiny.FigureOfDestinyToken3(), "", Duration.Custom),
new SourceMatchesFilterCondition(filter3),
"If Figure of Destiny is a Warrior, it becomes an 8/8 Kithkin Spirit Warrior Avatar with flying and first strike",
true),

View file

@ -28,9 +28,13 @@
package mage.abilities.effects.common.continious;
import mage.constants.*;
import mage.abilities.Ability;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Layer;
import mage.constants.Outcome;
import mage.constants.SubLayer;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.Token;
@ -92,8 +96,9 @@ public class BecomesCreatureSourceEffect extends ContinuousEffectImpl<BecomesCre
break;
case ColorChangingEffects_5:
if (sublayer == SubLayer.NA) {
if (token.getColor().hasColor())
if (token.getColor().hasColor()) {
permanent.getColor().setColor(token.getColor());
}
}
break;
case AbilityAddingRemovingEffects_6:
@ -116,6 +121,10 @@ public class BecomesCreatureSourceEffect extends ContinuousEffectImpl<BecomesCre
}
}
return true;
} else {
if (duration.equals(Duration.Custom)) {
this.discard();
}
}
return false;
}
@ -126,10 +135,12 @@ public class BecomesCreatureSourceEffect extends ContinuousEffectImpl<BecomesCre
}
private void setText() {
if (type.length() > 0)
if (type.length() > 0) {
staticText = duration.toString() + " {this} becomes a " + token.getDescription() + " that's still a " + this.type;
else
}
else {
staticText = duration.toString() + " {this} becomes a " + token.getDescription();
}
}
@Override