mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
2 NPH
This commit is contained in:
parent
0633a2667f
commit
b4defa21aa
3 changed files with 156 additions and 2 deletions
69
Mage.Sets/src/mage/sets/newphyrexia/FurnaceScamp.java
Normal file
69
Mage.Sets/src/mage/sets/newphyrexia/FurnaceScamp.java
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
/*
|
||||||
|
* 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.newphyrexia;
|
||||||
|
|
||||||
|
import mage.Constants.CardType;
|
||||||
|
import mage.Constants.Rarity;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||||
|
import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
|
import mage.abilities.effects.common.SacrificeSourceEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Loki
|
||||||
|
*/
|
||||||
|
public class FurnaceScamp extends CardImpl<FurnaceScamp> {
|
||||||
|
|
||||||
|
public FurnaceScamp(UUID ownerId) {
|
||||||
|
super(ownerId, 84, "Furnace Scamp", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{R}");
|
||||||
|
this.expansionSetCode = "NPH";
|
||||||
|
this.subtype.add("Beast");
|
||||||
|
|
||||||
|
this.color.setRed(true);
|
||||||
|
this.power = new MageInt(1);
|
||||||
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
|
Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new SacrificeSourceEffect(), true, true);
|
||||||
|
ability.addEffect(new DamageTargetEffect(3, true, "that player"));
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public FurnaceScamp(final FurnaceScamp card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FurnaceScamp copy() {
|
||||||
|
return new FurnaceScamp(this);
|
||||||
|
}
|
||||||
|
}
|
71
Mage.Sets/src/mage/sets/newphyrexia/ImpalerShrike.java
Normal file
71
Mage.Sets/src/mage/sets/newphyrexia/ImpalerShrike.java
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
/*
|
||||||
|
* 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.newphyrexia;
|
||||||
|
|
||||||
|
import mage.Constants.CardType;
|
||||||
|
import mage.Constants.Rarity;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||||
|
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||||
|
import mage.abilities.effects.common.SacrificeSourceEffect;
|
||||||
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Loki
|
||||||
|
*/
|
||||||
|
public class ImpalerShrike extends CardImpl<ImpalerShrike> {
|
||||||
|
|
||||||
|
public ImpalerShrike(UUID ownerId) {
|
||||||
|
super(ownerId, 36, "Impaler Shrike", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U}{U}");
|
||||||
|
this.expansionSetCode = "NPH";
|
||||||
|
this.subtype.add("Bird");
|
||||||
|
|
||||||
|
this.color.setBlue(true);
|
||||||
|
this.power = new MageInt(3);
|
||||||
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new SacrificeSourceEffect(), true);
|
||||||
|
ability.addEffect(new DrawCardControllerEffect(3));
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImpalerShrike(final ImpalerShrike card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ImpalerShrike copy() {
|
||||||
|
return new ImpalerShrike(this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -47,6 +47,7 @@ public class DamageTargetEffect extends OneShotEffect<DamageTargetEffect> {
|
||||||
|
|
||||||
protected DynamicValue amount;
|
protected DynamicValue amount;
|
||||||
protected boolean preventable;
|
protected boolean preventable;
|
||||||
|
protected String targetDescription;
|
||||||
|
|
||||||
public DamageTargetEffect(int amount) {
|
public DamageTargetEffect(int amount) {
|
||||||
this(new StaticValue(amount), true);
|
this(new StaticValue(amount), true);
|
||||||
|
@ -56,14 +57,23 @@ public class DamageTargetEffect extends OneShotEffect<DamageTargetEffect> {
|
||||||
this(new StaticValue(amount), preventable);
|
this(new StaticValue(amount), preventable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DamageTargetEffect(int amount, boolean preventable, String targetDescription) {
|
||||||
|
this(new StaticValue(amount), preventable, targetDescription);
|
||||||
|
}
|
||||||
|
|
||||||
public DamageTargetEffect(DynamicValue amount) {
|
public DamageTargetEffect(DynamicValue amount) {
|
||||||
this(amount, true);
|
this(amount, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DamageTargetEffect(DynamicValue amount, boolean preventable) {
|
public DamageTargetEffect(DynamicValue amount, boolean preventable) {
|
||||||
|
this(amount, preventable, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
public DamageTargetEffect(DynamicValue amount, boolean preventable, String targetDescription) {
|
||||||
super(Outcome.Damage);
|
super(Outcome.Damage);
|
||||||
this.amount = amount;
|
this.amount = amount;
|
||||||
this.preventable = preventable;
|
this.preventable = preventable;
|
||||||
|
this.targetDescription = targetDescription;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getAmount() {
|
public int getAmount() {
|
||||||
|
@ -78,6 +88,7 @@ public class DamageTargetEffect extends OneShotEffect<DamageTargetEffect> {
|
||||||
super(effect);
|
super(effect);
|
||||||
this.amount = effect.amount.clone();
|
this.amount = effect.amount.clone();
|
||||||
this.preventable = effect.preventable;
|
this.preventable = effect.preventable;
|
||||||
|
this.targetDescription = effect.targetDescription;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -108,8 +119,11 @@ public class DamageTargetEffect extends OneShotEffect<DamageTargetEffect> {
|
||||||
if (message.isEmpty() || !message.equals("1")) {
|
if (message.isEmpty() || !message.equals("1")) {
|
||||||
sb.append(amount);
|
sb.append(amount);
|
||||||
}
|
}
|
||||||
sb.append(" damage to target ");
|
sb.append(" damage to ");
|
||||||
sb.append(mode.getTargets().get(0).getTargetName());
|
if (targetDescription.length() > 0)
|
||||||
|
sb.append(targetDescription);
|
||||||
|
else
|
||||||
|
sb.append("target ").append(mode.getTargets().get(0).getTargetName());
|
||||||
if (message.length() > 0) {
|
if (message.length() > 0) {
|
||||||
sb.append(message.equals("1") ? " equal to the number of " : " for each ");
|
sb.append(message.equals("1") ? " equal to the number of " : " for each ");
|
||||||
sb.append(message);
|
sb.append(message);
|
||||||
|
|
Loading…
Reference in a new issue