mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
- Fixed Horn of Plenty
This commit is contained in:
parent
5ca579b965
commit
05d4c0b1d4
1 changed files with 3 additions and 5 deletions
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.h;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -9,7 +8,6 @@ import mage.abilities.costs.Cost;
|
|||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
||||
import mage.abilities.effects.common.DrawCardTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -29,7 +27,7 @@ import mage.target.targetpointer.FixedTarget;
|
|||
public final class HornOfPlenty extends CardImpl {
|
||||
|
||||
public HornOfPlenty(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{6}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}");
|
||||
|
||||
// Whenever a player casts a spell, he or she may pay {1}. If that player does, he or she draws a card at the beginning of the next end step.
|
||||
this.addAbility(new SpellCastAllTriggeredAbility(new HornOfPlentyEffect(), new FilterSpell("a spell"), false, SetTargetPointer.PLAYER));
|
||||
|
|
@ -70,10 +68,10 @@ class HornOfPlentyEffect extends OneShotEffect {
|
|||
if (cost.pay(source, game, source.getSourceId(), caster.getId(), false, null)) {
|
||||
Effect effect = new DrawCardTargetEffect(1);
|
||||
effect.setTargetPointer(new FixedTarget(caster.getId()));
|
||||
return new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect, TargetController.ANY)).apply(game, source);
|
||||
game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect, TargetController.ANY), source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue