Added SpellCastAllTriggeredAbility, some minor formatting.

This commit is contained in:
LevelX2 2013-08-23 15:01:52 +02:00
parent 7cf2b0cc97
commit dbc7fec977
6 changed files with 126 additions and 7 deletions

View file

@ -34,7 +34,7 @@ import mage.constants.CardType;
import mage.constants.Rarity;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SpellCastTriggeredAbility;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.common.delayed.AtEndOfTurnDelayedTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ReturnFromExileEffect;
@ -62,8 +62,11 @@ public class HikariTwilightGuardian extends CardImpl<HikariTwilightGuardian> {
this.color.setWhite(true);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// Flying
this.addAbility(FlyingAbility.getInstance());
this.addAbility(new SpellCastTriggeredAbility(new HikariTwilightGuardianEffect(), filter, true));
// Whenever you cast a Spirit or Arcane spell, you may exile Hikari, Twilight Guardian. If you do, return it to the battlefield under its owner's control at the beginning of the next end step.
this.addAbility(new SpellCastControllerTriggeredAbility(new HikariTwilightGuardianEffect(), filter, true));
}
public HikariTwilightGuardian (final HikariTwilightGuardian card) {

View file

@ -100,7 +100,7 @@ class FoldIntoAEtherEffect extends OneShotEffect<FoldIntoAEtherEffect> {
&& player.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) {
Card card = game.getCard(target.getFirstTarget());
if (card != null) {
card.putOntoBattlefield(game, Zone.HAND, source.getId(), source.getControllerId());
card.putOntoBattlefield(game, Zone.HAND, source.getId(), player.getId());
}
}
return true;

View file

@ -35,7 +35,7 @@ import mage.constants.Rarity;
import mage.constants.Zone;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SpellCastTriggeredAbility;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.costs.common.RemoveCountersSourceCost;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.effects.OneShotEffect;
@ -72,7 +72,7 @@ public class QuestForTheHolyRelic extends CardImpl<QuestForTheHolyRelic> {
this.color.setWhite(true);
// Whenever you cast a creature spell, you may put a quest counter on Quest for the Holy Relic.
this.addAbility(new SpellCastTriggeredAbility(new AddCountersSourceEffect(CounterType.QUEST.createInstance()), filter, true));
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.QUEST.createInstance()), filter, true));
// Remove five quest counters from Quest for the Holy Relic and sacrifice it: Search your library for an Equipment card, put it onto the battlefield, and attach it to a creature you control. Then shuffle your library.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new QuestForTheHolyRelicEffect(), new RemoveCountersSourceCost(CounterType.QUEST.createInstance(5)));
ability.addCost(new SacrificeSourceCost());