This commit is contained in:
BetaSteward 2010-05-02 15:16:50 +00:00
parent 2f32d2e6cf
commit c5bf01b308
16 changed files with 254 additions and 16 deletions

View file

@ -51,6 +51,7 @@ public class Conflux extends ExpansionSet {
this.cards.add(MartialCoup.class);
this.cards.add(NobleHierarch.class);
this.cards.add(PathToExile.class);
this.cards.add(QuenchableFire.class);
this.cards.add(Thornling.class);
}

View file

@ -47,6 +47,7 @@ public class Worldwake extends ExpansionSet {
this.name = "Worldwake";
this.cards.add(BasiliskCollar.class);
this.cards.add(CelestialColonnade.class);
this.cards.add(LavaclawReaches.class);
this.cards.add(RagingRavine.class);
this.cards.add(SearingBlaze.class);
this.cards.add(SejiriSteppe.class);

View file

@ -71,16 +71,18 @@ class FinestHourAbility extends TriggeredAbilityImpl {
}
@Override
public void checkTrigger(GameEvent event, Game game) {
public boolean checkTrigger(GameEvent event, Game game) {
if (checkIfClause(game) && game.getActivePlayerId().equals(this.controllerId)) {
if (event.getType() == EventType.DECLARED_ATTACKERS) {
if (game.getCombat().attacksAlone()) {
this.targets.add(new TargetCreaturePermanent());
this.targets.get(0).getTargets().add(game.getCombat().getAttackers().get(0));
trigger(game, event.getPlayerId());
return true;
}
}
}
return false;
}
@Override

View file

@ -62,12 +62,14 @@ class FontOfMythosAbility extends TriggeredAbilityImpl {
}
@Override
public void checkTrigger(GameEvent event, Game game) {
public boolean checkTrigger(GameEvent event, Game game) {
if (event.getType() == EventType.DRAW_STEP_PRE) {
this.targets.add(new TargetPlayer());
this.targets.get(0).getTargets().add(event.getPlayerId());
trigger(game, event.getPlayerId());
return true;
}
return false;
}
@Override

View file

@ -51,7 +51,7 @@ public class HellsparkElemental extends CardImpl {
this.expansionSetId = Conflux.getInstance().getId();
this.subtype.add("Elemental");
this.color.setRed(true);
this.art = "";
this.art = "118669_typ_reg_sty_010.jpg";
this.power = new MageInt(3);
this.toughness = new MageInt(1);

View file

@ -0,0 +1,133 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.conflux;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Outcome;
import mage.abilities.DelayedTriggeredAbility;
import mage.abilities.SpecialAction;
import mage.abilities.costs.mana.ManaCosts;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.RemoveDelayedTriggeredAbilityEffect;
import mage.abilities.effects.common.RemoveSpecialActionEffect;
import mage.cards.CardImpl;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.sets.Conflux;
import mage.target.TargetPlayer;
/**
*
* @author BetaSteward_at_googlemail.com
*/
public class QuenchableFire extends CardImpl {
public QuenchableFire(UUID ownerId) {
super(ownerId, "Quenchable Fire", new CardType[]{CardType.SORCERY}, "{3}{R}");
this.expansionSetId = Conflux.getInstance().getId();
this.color.setRed(true);
this.art = "118698_typ_reg_sty_010.jpg";
this.getSpellAbility().addTarget(new TargetPlayer());
this.getSpellAbility().addEffect(new DamageTargetEffect(3));
this.getSpellAbility().addEffect(new QuenchableFireEffect());
}
}
class QuenchableFireEffect extends OneShotEffect {
public QuenchableFireEffect() {
super(Outcome.Damage);
}
@Override
public boolean apply(Game game) {
//create delayed triggereda ability
QuenchableFireDelayedTriggeredAbility delayedAbility = new QuenchableFireDelayedTriggeredAbility();
delayedAbility.setSourceId(this.source.getSourceId());
delayedAbility.setControllerId(this.source.getControllerId());
delayedAbility.getTargets().addAll(this.source.getTargets());
game.getState().addDelayedTriggeredAbility(delayedAbility);
//create special action
QuenchableFireSpecialAction newAction = new QuenchableFireSpecialAction(delayedAbility.getId());
delayedAbility.setSpecialActionId(newAction.getId());
newAction.setSourceId(this.source.getSourceId());
newAction.setControllerId(this.source.getFirstTarget());
newAction.getTargets().addAll(this.source.getTargets());
game.getState().getSpecialActions().add(newAction);
return true;
}
}
class QuenchableFireDelayedTriggeredAbility extends DelayedTriggeredAbility {
private UUID specialActionId;
public QuenchableFireDelayedTriggeredAbility() {
super(new DamageTargetEffect(3));
}
public void setSpecialActionId(UUID specialActionId) {
this.specialActionId = specialActionId;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (event.getType() == EventType.UPKEEP_STEP_PRE && event.getPlayerId().equals(this.controllerId)) {
trigger(game, event.getPlayerId());
for (SpecialAction action: game.getState().getSpecialActions()) {
if (action.getId().equals(specialActionId)) {
game.getState().getSpecialActions().remove(action);
break;
}
}
return true;
}
return false;
}
@Override
public String getRule() {
return "{this} deals an additional 3 damage to that player at the beginning of your next upkeep step unless he or she pays {U} before that step";
}
}
class QuenchableFireSpecialAction extends SpecialAction {
public QuenchableFireSpecialAction(UUID effectId) {
this.addCost(new ManaCosts("{U}"));
this.addEffect(new RemoveDelayedTriggeredAbilityEffect(effectId));
this.addEffect(new RemoveSpecialActionEffect(this.getId()));
}
}

View file

@ -62,12 +62,14 @@ class HowlingMineAbility extends TriggeredAbilityImpl {
}
@Override
public void checkTrigger(GameEvent event, Game game) {
public boolean checkTrigger(GameEvent event, Game game) {
if (event.getType() == EventType.DRAW_STEP_PRE) {
this.targets.add(new TargetPlayer());
this.targets.get(0).getTargets().add(event.getPlayerId());
trigger(game, event.getPlayerId());
return true;
}
return false;
}
@Override

View file

@ -69,12 +69,15 @@ class SoulWardenAbility extends TriggeredAbilityImpl {
}
@Override
public void checkTrigger(GameEvent event, Game game) {
public boolean checkTrigger(GameEvent event, Game game) {
if (event.getType() == EventType.ZONE_CHANGE && ((ZoneChangeEvent)event).getToZone() == Zone.BATTLEFIELD) {
Permanent permanent = game.getPermanent(event.getTargetId());
if (permanent.getCardType().contains(CardType.CREATURE) && !permanent.getId().equals(this.getSourceId()))
if (permanent.getCardType().contains(CardType.CREATURE) && !permanent.getId().equals(this.getSourceId())) {
trigger(game, this.controllerId);
return true;
}
}
return false;
}
@Override

View file

@ -52,7 +52,7 @@ public class HellsThunder extends CardImpl {
this.expansionSetId = ShardsOfAlara.getInstance().getId();
this.subtype.add("Elemental");
this.color.setRed(true);
this.art = "";
this.art = "115234_typ_reg_sty_010.jpg";
this.power = new MageInt(4);
this.toughness = new MageInt(4);

View file

@ -79,13 +79,15 @@ class KnightOfTheWhiteOrchidAbility extends EntersBattlefieldTriggeredAbility {
}
@Override
public void checkTrigger(GameEvent event, Game game) {
public boolean checkTrigger(GameEvent event, Game game) {
if (event.getType() == EventType.ZONE_CHANGE && event.getTargetId().equals(this.getSourceId()) ) {
ZoneChangeEvent zEvent = (ZoneChangeEvent)event;
if (zEvent.getToZone() == Zone.BATTLEFIELD) {
trigger(game, this.controllerId);
return true;
}
}
return false;
}
@Override

View file

@ -75,14 +75,16 @@ class RafiqOfTheManyAbility extends TriggeredAbilityImpl {
}
@Override
public void checkTrigger(GameEvent event, Game game) {
if (event.getType() == EventType.DECLARED_ATTACKERS ) {
public boolean checkTrigger(GameEvent event, Game game) {
if (event.getType() == EventType.DECLARED_ATTACKERS && game.getActivePlayerId().equals(this.controllerId) ) {
if (game.getCombat().attacksAlone()) {
this.targets.add(new TargetCreaturePermanent());
this.targets.get(0).getTargets().add(game.getCombat().getAttackers().get(0));
trigger(game, event.getPlayerId());
return true;
}
}
return false;
}
@Override

View file

@ -0,0 +1,79 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.worldwake;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Zone;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldStaticAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCosts;
import mage.abilities.effects.common.BecomesCreatureSourceEOTEffect;
import mage.abilities.effects.common.BoostPowerSourceVariableEffect;
import mage.abilities.effects.common.EntersBattlefieldTappedEffect;
import mage.abilities.mana.BlackManaAbility;
import mage.abilities.mana.RedManaAbility;
import mage.cards.CardImpl;
import mage.game.permanent.token.Token;
import mage.sets.Worldwake;
/**
*
* @author BetaSteward_at_googlemail.com
*/
public class LavaclawReaches extends CardImpl {
public LavaclawReaches(UUID ownerId) {
super(ownerId, "Lavaclaw Reaches", new CardType[]{CardType.LAND}, null);
this.expansionSetId = Worldwake.getInstance().getId();
this.art = "126532_typ_reg_sty_010.jpg";
this.addAbility(new EntersBattlefieldStaticAbility(new EntersBattlefieldTappedEffect()));
this.addAbility(new BlackManaAbility());
this.addAbility(new RedManaAbility());
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new LavaclawReachesToken()), new ManaCosts("{1}{B}{R}")));
}
}
class LavaclawReachesToken extends Token {
public LavaclawReachesToken() {
super("", "2/2 black and red Elemental creature with \"{X}: This creature gets +X/+0 until end of turn.\"");
cardType.add(CardType.CREATURE);
subtype.add("Elemental");
color.setRed(true);
color.setBlack(true);
power = new MageInt(2);
toughness = new MageInt(2);
addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostPowerSourceVariableEffect(Duration.EndOfTurn), new ManaCosts("{X}")));
}
}

View file

@ -54,10 +54,11 @@ public class SearingBlaze extends CardImpl {
super(ownerId, "Searing Blaze", new CardType[]{CardType.INSTANT}, "{R}{R}");
this.expansionSetId = Worldwake.getInstance().getId();
this.color.setRed(true);
this.art = "";
this.art = "126476_typ_reg_sty_010.jpg";
this.getSpellAbility().addTarget(new TargetPlayer());
//TODO: change this to only allow creatures controlled by first target
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new SearingBlazeEffect());
this.watchers.add(new SearingBlazeWatcher(ownerId));
}
@ -66,7 +67,7 @@ public class SearingBlaze extends CardImpl {
class SearingBlazeWatcher extends WatcherImpl {
public SearingBlazeWatcher(UUID controllerId) {
super(controllerId, "LandPlayed");
super("LandPlayed");
}
@Override
@ -107,4 +108,8 @@ class SearingBlazeEffect extends OneShotEffect {
return true;
}
@Override
public String getText() {
return "{this} deals 1 damage to target player and 1 damage to target creature that player controls. \nLandfall — If you had a land enter the battlefield under your control this turn, {this} deals 3 damage to that player and 3 damage to that creature instead.";
}
}

View file

@ -56,15 +56,15 @@ public class ArchiveTrap extends CardImpl {
this.getSpellAbility().addTarget(new TargetOpponent());
this.getSpellAbility().addEffect(new PutLibraryIntoGraveTargetEffect(13));
this.getSpellAbility().addAlternativeCost(new ArchiveTrapAlternativeCost());
this.watchers.add(new ArchiveTrapWatcher(ownerId));
this.watchers.add(new ArchiveTrapWatcher());
}
}
class ArchiveTrapWatcher extends WatcherImpl {
public ArchiveTrapWatcher(UUID controllerId) {
super(controllerId, "LibrarySearched");
public ArchiveTrapWatcher() {
super("LibrarySearched");
}
@Override

View file

@ -96,4 +96,8 @@ class GoblinGuideEffect extends OneShotEffect {
return false;
}
@Override
public String getText() {
return "defending player reveals the top card of his or her library. If it's a land card, that player puts it into his or her hand";
}
}

View file

@ -69,10 +69,12 @@ class ScuteMobAbility extends TriggeredAbilityImpl {
}
@Override
public void checkTrigger(GameEvent event, Game game) {
public boolean checkTrigger(GameEvent event, Game game) {
if (event.getType() == EventType.UPKEEP_STEP_PRE && event.getPlayerId().equals(this.controllerId)) {
trigger(game, this.controllerId);
return true;
}
return false;
}
@Override