mirror of
https://github.com/correl/mage.git
synced 2025-01-12 03:00:13 +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;
|
package mage.sets.magic2010;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.Constants.CardType;
|
import mage.Constants.CardType;
|
||||||
import mage.Constants.Rarity;
|
import mage.Constants.Rarity;
|
||||||
import mage.Constants.Zone;
|
import mage.Constants.Zone;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
import mage.abilities.effects.common.DrawCardTargetEffect;
|
import mage.abilities.effects.common.DrawCardEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.events.GameEvent.EventType;
|
import mage.game.events.GameEvent.EventType;
|
||||||
import mage.target.TargetPlayer;
|
import mage.target.TargetPlayer;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public class HowlingMine extends CardImpl<HowlingMine> {
|
public class HowlingMine extends CardImpl<HowlingMine> {
|
||||||
|
@ -66,7 +68,7 @@ public class HowlingMine extends CardImpl<HowlingMine> {
|
||||||
class HowlingMineAbility extends TriggeredAbilityImpl<HowlingMineAbility> {
|
class HowlingMineAbility extends TriggeredAbilityImpl<HowlingMineAbility> {
|
||||||
|
|
||||||
public HowlingMineAbility() {
|
public HowlingMineAbility() {
|
||||||
super(Zone.BATTLEFIELD, new DrawCardTargetEffect(1));
|
super(Zone.BATTLEFIELD, new DrawCardEffect(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
public HowlingMineAbility(final HowlingMineAbility ability) {
|
public HowlingMineAbility(final HowlingMineAbility ability) {
|
||||||
|
@ -81,8 +83,9 @@ class HowlingMineAbility extends TriggeredAbilityImpl<HowlingMineAbility> {
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
if (event.getType() == EventType.DRAW_STEP_PRE) {
|
if (event.getType() == EventType.DRAW_STEP_PRE) {
|
||||||
this.addTarget(new TargetPlayer());
|
List<UUID> targets = new ArrayList<UUID>();
|
||||||
getTargets().get(0).add(event.getPlayerId(), game);
|
targets.add(event.getPlayerId());
|
||||||
|
this.getEffects().get(0).setValue("players", targets);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -52,7 +52,7 @@ import mage.target.TargetPlayer;
|
||||||
*/
|
*/
|
||||||
public class CallToTheGrave extends CardImpl<CallToTheGrave> {
|
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");
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a non-Zombie creature");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
|
Loading…
Reference in a new issue