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

View file

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