mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Kill some unnecessary custom effects
This commit is contained in:
parent
e2ab416015
commit
0cdbf8cca0
3 changed files with 35 additions and 121 deletions
|
@ -30,17 +30,14 @@ package mage.sets.alarareborn;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.MulticoloredPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -48,17 +45,23 @@ import mage.game.stack.Spell;
|
|||
*/
|
||||
public class GloryscaleViashino extends CardImpl {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("a multicolored spell");
|
||||
|
||||
static {
|
||||
filter.add(new MulticoloredPredicate());
|
||||
}
|
||||
|
||||
public GloryscaleViashino (UUID ownerId) {
|
||||
super(ownerId, 120, "Gloryscale Viashino", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{R}{G}{W}");
|
||||
this.expansionSetCode = "ARB";
|
||||
this.subtype.add("Viashino");
|
||||
this.subtype.add("Soldier");
|
||||
|
||||
|
||||
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
this.addAbility(new GloryscaleViashinoAbility());
|
||||
|
||||
// Whenever you cast a multicolored spell, Gloryscale Viashino gets +3/+3 until end of turn.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new BoostSourceEffect(3, 3, Duration.EndOfTurn), filter, false));
|
||||
}
|
||||
|
||||
public GloryscaleViashino (final GloryscaleViashino card) {
|
||||
|
@ -69,36 +72,4 @@ public class GloryscaleViashino extends CardImpl {
|
|||
public GloryscaleViashino copy() {
|
||||
return new GloryscaleViashino(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class GloryscaleViashinoAbility extends TriggeredAbilityImpl {
|
||||
public GloryscaleViashinoAbility() {
|
||||
super(Zone.BATTLEFIELD, new BoostSourceEffect(3, 3, Duration.EndOfTurn));
|
||||
}
|
||||
|
||||
public GloryscaleViashinoAbility(final GloryscaleViashinoAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GloryscaleViashinoAbility copy() {
|
||||
return new GloryscaleViashinoAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.SPELL_CAST;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Spell spell = game.getStack().getSpell(event.getTargetId());
|
||||
return spell != null && spell.getColor(game).isMulticolored() && event.getPlayerId().equals(getControllerId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever you cast a multicolored spell, {this} gets +3/+3 until end of turn.";
|
||||
}
|
||||
}
|
|
@ -30,8 +30,8 @@ package mage.sets.returntoravnica;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.common.DamagePlayersEffect;
|
||||
import mage.abilities.effects.common.UntapSourceEffect;
|
||||
|
@ -41,10 +41,8 @@ import mage.constants.CardType;
|
|||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.MulticoloredPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -52,6 +50,12 @@ import mage.game.stack.Spell;
|
|||
*/
|
||||
public class LobberCrew extends CardImpl {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("a multicolored spell");
|
||||
|
||||
static {
|
||||
filter.add(new MulticoloredPredicate());
|
||||
}
|
||||
|
||||
public LobberCrew (UUID ownerId) {
|
||||
super(ownerId, 99, "Lobber Crew", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R}");
|
||||
this.expansionSetCode = "RTR";
|
||||
|
@ -66,7 +70,7 @@ public class LobberCrew extends CardImpl {
|
|||
// {T}: Lobber Crew deals 1 damage to each opponent.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamagePlayersEffect(1, TargetController.OPPONENT), new TapSourceCost()));
|
||||
// Whenever you cast a multicolored spell, untap Lobber Crew.
|
||||
this.addAbility(new LobberCrewTriggeredAbility());
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new UntapSourceEffect(), filter, false));
|
||||
}
|
||||
|
||||
public LobberCrew (final LobberCrew card) {
|
||||
|
@ -78,37 +82,3 @@ public class LobberCrew extends CardImpl {
|
|||
return new LobberCrew(this);
|
||||
}
|
||||
}
|
||||
|
||||
class LobberCrewTriggeredAbility extends TriggeredAbilityImpl {
|
||||
public LobberCrewTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new UntapSourceEffect());
|
||||
}
|
||||
|
||||
public LobberCrewTriggeredAbility(final LobberCrewTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LobberCrewTriggeredAbility copy() {
|
||||
return new LobberCrewTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.SPELL_CAST;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Spell spell = game.getStack().getSpell(event.getTargetId());
|
||||
if (spell != null && spell.getColor(game).isMulticolored() && event.getPlayerId().equals(getControllerId())) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever you cast a multicolored spell, untap {this}.";
|
||||
}
|
||||
}
|
|
@ -29,16 +29,14 @@
|
|||
package mage.sets.returntoravnica;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.MulticoloredPredicate;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
|
||||
/**
|
||||
|
@ -47,13 +45,20 @@ import mage.target.common.TargetCreatureOrPlayer;
|
|||
*/
|
||||
public class Pyroconvergence extends CardImpl {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("a multicolored spell");
|
||||
|
||||
static {
|
||||
filter.add(new MulticoloredPredicate());
|
||||
}
|
||||
|
||||
public Pyroconvergence(UUID ownerId) {
|
||||
super(ownerId, 103, "Pyroconvergence", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{4}{R}");
|
||||
this.expansionSetCode = "RTR";
|
||||
|
||||
|
||||
// Whenever you cast a multicolored spell, Pyroconvergence deals 2 damage to target creature or player.
|
||||
this.addAbility(new PyroconvergenceTriggeredAbility());
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(new DamageTargetEffect(2), filter, false);
|
||||
ability.addTarget(new TargetCreatureOrPlayer());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public Pyroconvergence(final Pyroconvergence card) {
|
||||
|
@ -65,35 +70,3 @@ public class Pyroconvergence extends CardImpl {
|
|||
return new Pyroconvergence(this);
|
||||
}
|
||||
}
|
||||
class PyroconvergenceTriggeredAbility extends TriggeredAbilityImpl {
|
||||
public PyroconvergenceTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new DamageTargetEffect(2));
|
||||
TargetCreatureOrPlayer target = new TargetCreatureOrPlayer();
|
||||
this.addTarget(target);
|
||||
}
|
||||
|
||||
public PyroconvergenceTriggeredAbility(final PyroconvergenceTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PyroconvergenceTriggeredAbility copy() {
|
||||
return new PyroconvergenceTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.SPELL_CAST;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Spell spell = game.getStack().getSpell(event.getTargetId());
|
||||
return spell != null && spell.getColor(game).isMulticolored() && event.getPlayerId().equals(getControllerId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever you cast a multicolored spell, {this} deals 2 damage to target creature or player.";
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue