mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Reimplemented Howling Mine with setValue.
This commit is contained in:
parent
0dc56b7858
commit
2c7a6bb7e6
2 changed files with 10 additions and 7 deletions
|
@ -28,20 +28,22 @@
|
|||
|
||||
package mage.sets.magic2010;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.common.DrawCardTargetEffect;
|
||||
import mage.abilities.effects.common.DrawCardEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class HowlingMine extends CardImpl<HowlingMine> {
|
||||
|
@ -66,7 +68,7 @@ public class HowlingMine extends CardImpl<HowlingMine> {
|
|||
class HowlingMineAbility extends TriggeredAbilityImpl<HowlingMineAbility> {
|
||||
|
||||
public HowlingMineAbility() {
|
||||
super(Zone.BATTLEFIELD, new DrawCardTargetEffect(1));
|
||||
super(Zone.BATTLEFIELD, new DrawCardEffect(1));
|
||||
}
|
||||
|
||||
public HowlingMineAbility(final HowlingMineAbility ability) {
|
||||
|
@ -81,8 +83,9 @@ class HowlingMineAbility extends TriggeredAbilityImpl<HowlingMineAbility> {
|
|||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == EventType.DRAW_STEP_PRE) {
|
||||
this.addTarget(new TargetPlayer());
|
||||
getTargets().get(0).add(event.getPlayerId(), game);
|
||||
List<UUID> targets = new ArrayList<UUID>();
|
||||
targets.add(event.getPlayerId());
|
||||
this.getEffects().get(0).setValue("players", targets);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -52,7 +52,7 @@ import mage.target.TargetPlayer;
|
|||
*/
|
||||
public class CallToTheGrave extends CardImpl<CallToTheGrave> {
|
||||
|
||||
private static final String ruleText = "At the beginning of the end step, if no creatures are on the battlefield, sacrifice Call to the Grave";
|
||||
private static final String ruleText = "At the beginning of the end step, if no creatures are on the battlefield, sacrifice Call to the Grave.";
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a non-Zombie creature");
|
||||
|
||||
static {
|
||||
|
|
Loading…
Reference in a new issue