mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Allow Count$Compare to calculateAmount of SVars
- Convert Apocalypse Hydra to script
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
Name:Apocalypse Hydra
|
||||
ManaCost:X G R
|
||||
Types:Creature Hydra
|
||||
Text:Apocalypse Hydra enters the battlefield with X +1/+1 counters on it. If X is 5 or more, it enters the battlefield with an additional X +1/+1 counters on it.
|
||||
PT:0/0
|
||||
K:etbCounter:P1P1:Y:no condition:CARDNAME enters the battlefield with X +1/+1 counters on it. If X is 5 or more, it enters the battlefield with an additional X +1/+1 counters on it.
|
||||
A:AB$ DealDamage | Cost$ 1 R SubCounter<1/P1P1> | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ 1 | SpellDescription$ CARDNAME deals 1 damage to target creature or player.
|
||||
# This xPaid doesn't do anything, it's just needed to make Cost work properly
|
||||
SVar:X:Count$xPaid
|
||||
SVar:Y:Count$Compare X LT5.X.Z
|
||||
SVar:Z:Count$xPaid/Twice
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/apocalypse_hydra.jpg
|
||||
Oracle:Apocalypse Hydra enters the battlefield with X +1/+1 counters on it. If X is 5 or more, it enters the battlefield with an additional X +1/+1 counters on it.\n{1}{R}, Remove a +1/+1 counter from Apocalypse Hydra: Apocalypse Hydra deals 1 damage to target creature or player.
|
||||
SetInfo:CFX Mythic
|
||||
@@ -1228,9 +1228,9 @@ public class AbilityUtils {
|
||||
final int lhs = calculateAmount(c, compString[1], sa);
|
||||
final int rhs = calculateAmount(c, compString[2].substring(2), sa);
|
||||
if (Expressions.compare(lhs, compString[2], rhs)) {
|
||||
return CardFactoryUtil.doXMath(Integer.parseInt(sq[1]), expr, c);
|
||||
return CardFactoryUtil.doXMath(calculateAmount(c, sq[1], sa), expr, c);
|
||||
} else {
|
||||
return CardFactoryUtil.doXMath(Integer.parseInt(sq[2]), expr, c);
|
||||
return CardFactoryUtil.doXMath(calculateAmount(c, sq[2], sa), expr, c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -299,27 +299,6 @@ public class CardFactoryCreatures {
|
||||
card.addSpellAbility(ability);
|
||||
}
|
||||
|
||||
private static void getCard_ApocalypseHydra(final Card card) {
|
||||
final SpellAbility spell = new SpellPermanent(card) {
|
||||
private static final long serialVersionUID = -11489323313L;
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
int xCounters = card.getXManaCostPaid();
|
||||
final Card c = Singletons.getModel().getGame().getAction().moveToPlay(this.getSourceCard());
|
||||
|
||||
if (xCounters >= 5) {
|
||||
xCounters = 2 * xCounters;
|
||||
}
|
||||
c.addCounter(CounterType.P1P1, xCounters, true);
|
||||
}
|
||||
};
|
||||
// Do not remove SpellAbilities created by AbilityFactory or
|
||||
// Keywords.
|
||||
card.clearFirstSpell();
|
||||
card.addSpellAbility(spell);
|
||||
}
|
||||
|
||||
private static void getCard_KinsbaileBorderguard(final Card card) {
|
||||
final SpellAbility ability = new Ability(card, ManaCost.ZERO) {
|
||||
@Override
|
||||
@@ -530,8 +509,6 @@ public class CardFactoryCreatures {
|
||||
getCard_SphinxJwar(card);
|
||||
} else if (cardName.equals("Master of the Wild Hunt")) {
|
||||
getCard_MasterOfTheWildHunt(card);
|
||||
} else if (cardName.equals("Apocalypse Hydra")) {
|
||||
getCard_ApocalypseHydra(card);
|
||||
} else if (cardName.equals("Kinsbaile Borderguard")) {
|
||||
getCard_KinsbaileBorderguard(card);
|
||||
} else if (cardName.equals("Sutured Ghoul")) {
|
||||
|
||||
Reference in New Issue
Block a user