forked from External/mage
Tarox Bladewing, Chameleon Colossus: remove custom effect
now using the same template as Yew Spirit, Feral Animist
This commit is contained in:
parent
a0ed2c2cdb
commit
7830dc1098
2 changed files with 9 additions and 73 deletions
|
|
@ -29,20 +29,15 @@ package mage.sets.futuresight;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.abilityword.GrandeurAbility;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Layer;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -66,7 +61,8 @@ public class TaroxBladewing extends CardImpl {
|
|||
this.addAbility(HasteAbility.getInstance());
|
||||
|
||||
// Grandeur - Discard another card named Tarox Bladewing: Tarox Bladewing gets +X/+X until end of turn, where X is its power.
|
||||
this.addAbility(new GrandeurAbility(new TaroxBladewingEffect(), "Tarox Bladewing"));
|
||||
SourcePermanentPowerCount x = new SourcePermanentPowerCount();
|
||||
this.addAbility(new GrandeurAbility(new BoostSourceEffect(x, x, Duration.EndOfTurn, true), "Tarox Bladewing"));
|
||||
}
|
||||
|
||||
public TaroxBladewing(final TaroxBladewing card) {
|
||||
|
|
@ -78,32 +74,3 @@ public class TaroxBladewing extends CardImpl {
|
|||
return new TaroxBladewing(this);
|
||||
}
|
||||
}
|
||||
|
||||
class TaroxBladewingEffect extends ContinuousEffectImpl {
|
||||
|
||||
TaroxBladewingEffect() {
|
||||
super(Duration.EndOfTurn, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature);
|
||||
staticText = "{this} gets +X/+X until end of turn, where X is its power";
|
||||
}
|
||||
|
||||
TaroxBladewingEffect(final TaroxBladewingEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TaroxBladewingEffect copy() {
|
||||
return new TaroxBladewingEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null) {
|
||||
int power = permanent.getPower().getValue();
|
||||
permanent.addPower(power);
|
||||
permanent.addToughness(power);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -28,26 +28,22 @@
|
|||
package mage.sets.morningtide;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Layer;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.keyword.ChangelingAbility;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -76,7 +72,8 @@ public class ChameleonColossus extends CardImpl {
|
|||
this.addAbility(new ProtectionAbility(filter));
|
||||
|
||||
// {2}{G}{G}: Chameleon Colossus gets +X/+X until end of turn, where X is its power.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ChameleonColossusEffect(), new ManaCostsImpl("{2}{G}{G}")));
|
||||
SourcePermanentPowerCount x = new SourcePermanentPowerCount();
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(x, x, Duration.EndOfTurn, true), new ManaCostsImpl("{2}{G}{G}")));
|
||||
}
|
||||
|
||||
public ChameleonColossus(final ChameleonColossus card) {
|
||||
|
|
@ -88,31 +85,3 @@ public class ChameleonColossus extends CardImpl {
|
|||
return new ChameleonColossus(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ChameleonColossusEffect extends ContinuousEffectImpl {
|
||||
public ChameleonColossusEffect() {
|
||||
super(Duration.EndOfTurn, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature);
|
||||
staticText = "{this} gets +X/+X until end of turn, where X is its power";
|
||||
}
|
||||
|
||||
public ChameleonColossusEffect(final ChameleonColossusEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChameleonColossusEffect copy() {
|
||||
return new ChameleonColossusEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||
if (sourcePermanent != null) {
|
||||
int power = sourcePermanent.getPower().getValue();
|
||||
sourcePermanent.addPower(power);
|
||||
sourcePermanent.addToughness(power);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue