mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
* 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:
parent
c108030779
commit
7985e2456d
2 changed files with 22 additions and 11 deletions
|
@ -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),
|
||||
|
|
|
@ -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,9 +96,10 @@ 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:
|
||||
if (sublayer == SubLayer.NA) {
|
||||
|
@ -116,6 +121,10 @@ public class BecomesCreatureSourceEffect extends ContinuousEffectImpl<BecomesCre
|
|||
}
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
if (duration.equals(Duration.Custom)) {
|
||||
this.discard();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -126,11 +135,13 @@ 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
|
||||
public boolean hasLayer(Layer layer) {
|
||||
|
|
Loading…
Reference in a new issue