- Added Volcano Hellion

This commit is contained in:
swordshine
2013-08-06 03:07:04 +00:00
parent 1b995b1c0d
commit 409dd8c250
5 changed files with 47 additions and 27 deletions

1
.gitattributes vendored
View File

@@ -12402,6 +12402,7 @@ res/cardsfolder/v/volcanic_spray.txt svneol=native#text/plain
res/cardsfolder/v/volcanic_strength.txt svneol=native#text/plain res/cardsfolder/v/volcanic_strength.txt svneol=native#text/plain
res/cardsfolder/v/volcanic_submersion.txt svneol=native#text/plain res/cardsfolder/v/volcanic_submersion.txt svneol=native#text/plain
res/cardsfolder/v/volcanic_wind.txt -text res/cardsfolder/v/volcanic_wind.txt -text
res/cardsfolder/v/volcano_hellion.txt -text
res/cardsfolder/v/volcano_imp.txt svneol=native#text/plain res/cardsfolder/v/volcano_imp.txt svneol=native#text/plain
res/cardsfolder/v/volition_reins.txt svneol=native#text/plain res/cardsfolder/v/volition_reins.txt svneol=native#text/plain
res/cardsfolder/v/volley_of_boulders.txt -text res/cardsfolder/v/volley_of_boulders.txt -text

View File

@@ -0,0 +1,14 @@
Name:Volcano Hellion
ManaCost:2 R R
Types:Creature Hellion
PT:6/5
Text:CARDNAME has echo X, where X is your life total.
K:Echo:X
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDmg | TriggerDescription$ When CARDNAME enters the battlefield, it deals an amount of damage of your choice to you and target creature. The damage can't be prevented.
SVar:TrigDmg:AB$ ChooseNumber | Cost$ 0 | ListTitle$ Choose an amount of damage to you and target creature | SubAbility$ DBDmg | AILogic$ Min
SVar:DBDmg:DB$ DealDamage | ValidTgts$ Creature | NumDmg$ Y | References$ Y | NoPrevention$ True | SubAbility$ DmgYou
SVar:DmgYou:DB$ DealDamage | Defined$ You | NumDmg$ Y | References$ Y | NoPrevention$ True
SVar:X:Count$YourLifeTotal
SVar:Y:Count$ChosenNumber
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/volcano_hellion.jpg

View File

@@ -183,14 +183,15 @@ public class PumpEffect extends SpellAbilityEffect {
final ArrayList<Card> untargetedCards = new ArrayList<Card>(); final ArrayList<Card> untargetedCards = new ArrayList<Card>();
final TargetRestrictions tgt = sa.getTargetRestrictions(); final TargetRestrictions tgt = sa.getTargetRestrictions();
final Game game = sa.getActivatingPlayer().getGame(); final Game game = sa.getActivatingPlayer().getGame();
final Card host = sa.getSourceCard();
String pumpRemembered = null; String pumpRemembered = null;
String pumpForget = null; String pumpForget = null;
String pumpImprint = null; String pumpImprint = null;
List<String> keywords = sa.hasParam("KW") ? Arrays.asList(sa.getParam("KW").split(" & ")) : new ArrayList<String>(); List<String> keywords = sa.hasParam("KW") ? Arrays.asList(sa.getParam("KW").split(" & ")) : new ArrayList<String>();
final int a = AbilityUtils.calculateAmount(sa.getSourceCard(), sa.getParam("NumAtt"), sa); final int a = AbilityUtils.calculateAmount(host, sa.getParam("NumAtt"), sa);
final int d = AbilityUtils.calculateAmount(sa.getSourceCard(), sa.getParam("NumDef"), sa); final int d = AbilityUtils.calculateAmount(host, sa.getParam("NumDef"), sa);
List<GameEntity> tgts = new ArrayList<GameEntity>(); List<GameEntity> tgts = new ArrayList<GameEntity>();
List<Card> tgtCards = getTargetCards(sa); List<Card> tgtCards = getTargetCards(sa);
@@ -200,7 +201,7 @@ public class PumpEffect extends SpellAbilityEffect {
if (sa.hasParam("DefinedChosenKW")) { if (sa.hasParam("DefinedChosenKW")) {
if (sa.getParam("DefinedChosenKW").equals("Type")) { if (sa.getParam("DefinedChosenKW").equals("Type")) {
final String t = sa.getSourceCard().getChosenType(); final String t = host.getChosenType();
for (int i = 0; i < keywords.size(); i++) { for (int i = 0; i < keywords.size(); i++) {
keywords.set(i, keywords.get(i).replaceAll("ChosenType", t)); keywords.set(i, keywords.get(i).replaceAll("ChosenType", t));
} }
@@ -208,7 +209,7 @@ public class PumpEffect extends SpellAbilityEffect {
} }
if (sa.hasParam("RandomKeyword")) { if (sa.hasParam("RandomKeyword")) {
final String num = sa.hasParam("RandomKWNum") ? sa.getParam("RandomKWNum") : "1"; final String num = sa.hasParam("RandomKWNum") ? sa.getParam("RandomKWNum") : "1";
final int numkw = AbilityUtils.calculateAmount(sa.getSourceCard(), num, sa); final int numkw = AbilityUtils.calculateAmount(host, num, sa);
List<String> choice = new ArrayList<String>(); List<String> choice = new ArrayList<String>();
List<String> total = new ArrayList<String>(keywords); List<String> total = new ArrayList<String>(keywords);
if (sa.hasParam("NoRepetition")) { if (sa.hasParam("NoRepetition")) {
@@ -241,9 +242,9 @@ public class PumpEffect extends SpellAbilityEffect {
} }
if (pumpRemembered != null) { if (pumpRemembered != null) {
for (final Object o : AbilityUtils.getDefinedObjects(sa.getSourceCard(), pumpRemembered, sa)) { for (final Object o : AbilityUtils.getDefinedObjects(host, pumpRemembered, sa)) {
if (!sa.getSourceCard().getRemembered().contains(o)) { if (!host.getRemembered().contains(o)) {
sa.getSourceCard().addRemembered(o); host.addRemembered(o);
} }
} }
} }
@@ -253,9 +254,9 @@ public class PumpEffect extends SpellAbilityEffect {
} }
if (pumpForget != null) { if (pumpForget != null) {
for (final Object o : AbilityUtils.getDefinedObjects(sa.getSourceCard(), pumpForget, sa)) { for (final Object o : AbilityUtils.getDefinedObjects(host, pumpForget, sa)) {
if (sa.getSourceCard().getRemembered().contains(o)) { if (host.getRemembered().contains(o)) {
sa.getSourceCard().removeRemembered(o); host.removeRemembered(o);
} }
} }
} }
@@ -264,23 +265,23 @@ public class PumpEffect extends SpellAbilityEffect {
} }
if (pumpImprint != null) { if (pumpImprint != null) {
for (final Card c : AbilityUtils.getDefinedCards(sa.getSourceCard(), pumpImprint, sa)) { for (final Card c : AbilityUtils.getDefinedCards(host, pumpImprint, sa)) {
if (!sa.getSourceCard().getImprinted().contains(c)) { if (!host.getImprinted().contains(c)) {
sa.getSourceCard().addImprinted(c); host.addImprinted(c);
} }
} }
} }
if (sa.hasParam("ForgetImprinted")) { if (sa.hasParam("ForgetImprinted")) {
for (final Card c : AbilityUtils.getDefinedCards(sa.getSourceCard(), sa.getParam("ForgetImprinted"), sa)) { for (final Card c : AbilityUtils.getDefinedCards(host, sa.getParam("ForgetImprinted"), sa)) {
if (sa.getSourceCard().getImprinted().contains(c)) { if (host.getImprinted().contains(c)) {
sa.getSourceCard().removeImprinted(c); host.removeImprinted(c);
} }
} }
} }
if (sa.hasParam("Radiance")) { if (sa.hasParam("Radiance")) {
for (final Card c : CardUtil.getRadiance(sa.getSourceCard(), tgtCards.get(0), sa.getParam("ValidTgts") for (final Card c : CardUtil.getRadiance(host, tgtCards.get(0), sa.getParam("ValidTgts")
.split(","))) { .split(","))) {
untargetedCards.add(c); untargetedCards.add(c);
} }

View File

@@ -900,6 +900,9 @@ public class AiController {
return min; return min;
} }
} }
if ("Min".equals(sa.getParam("AILogic"))) {
return min;
}
return max; return max;
} }
} }

View File

@@ -166,9 +166,10 @@ public class Upkeep extends Phase {
if (c.hasStartOfKeyword("(Echo unpaid)")) { if (c.hasStartOfKeyword("(Echo unpaid)")) {
final StringBuilder sb = new StringBuilder(); final StringBuilder sb = new StringBuilder();
sb.append("Echo for ").append(c).append("\n"); sb.append("Echo for ").append(c).append("\n");
String ref = "X".equals(c.getEchoCost()) ? " | References$ X" : "";
String effect = "AB$ Sacrifice | Cost$ 0 | SacValid$ Self | " String effect = "AB$ Sacrifice | Cost$ 0 | SacValid$ Self | "
+ "UnlessPayer$ You | UnlessCost$ " + c.getEchoCost(); + "UnlessPayer$ You | UnlessCost$ " + c.getEchoCost()
+ ref;
SpellAbility sacAbility = AbilityFactory.getAbility(effect, c); SpellAbility sacAbility = AbilityFactory.getAbility(effect, c);
sacAbility.setTrigger(true); sacAbility.setTrigger(true);