Rumbling Aftershocks implemented

This commit is contained in:
Maxmtg
2013-04-16 19:42:41 +00:00
parent 89b81fc689
commit 4d7b221eb5
3 changed files with 19 additions and 2 deletions

1
.gitattributes vendored
View File

@@ -8889,6 +8889,7 @@ res/cardsfolder/r/ruinous_minotaur.txt svneol=native#text/plain
res/cardsfolder/r/ruins_of_trokair.txt svneol=native#text/plain
res/cardsfolder/r/rukh_egg.txt svneol=native#text/plain
res/cardsfolder/r/rule_of_law.txt -text
res/cardsfolder/r/rumbling_aftershocks.txt -text
res/cardsfolder/r/rumbling_crescendo.txt svneol=native#text/plain
res/cardsfolder/r/rumbling_slum.txt svneol=native#text/plain
res/cardsfolder/r/rumbling_slum_avatar.txt -text

View File

@@ -0,0 +1,9 @@
Name:Rumbling Aftershocks
ManaCost:4 R
Types:Enchantment
T:Mode$ SpellCast | ValidCard$ Card.YouCtrl+kicked | Execute$ DamageSomeone | OptionalDecider$ You | TriggerDescription$ Whenever you cast a kicked spell, you may have CARDNAME deal damage to target creature or player equal to the number of times that spell was kicked.
SVar:DamageSomeone:AB$ DealDamage | Cost$ 0 | ValidTgts$ Creature,Player | References$ X | NumDmg$ X | TgtPrompt$ Select target creature or player
SVar:X:TriggeredSpellAbility$Count$TimesKicked
SVar:Picture:http://www.wizards.com/global/images/magic/general/rumbling_aftershocks.jpg
Oracle:Whenever you cast a kicked spell, you may have Rumbling Aftershocks deal damage to target creature or player equal to the number of times that spell was kicked.
SetInfo:WWK Uncommon

View File

@@ -304,7 +304,9 @@ public class AbilityUtils {
// Try to fetch variable, try ability first, then card.
String svarval = null;
if (ability != null) {
if (amount.indexOf('$') > 0 ) // when there is a dollar sign, it's not a reference, it's a raw value!
svarval = amount;
else if (ability != null) {
svarval = ability.getSVar(amount);
}
if (StringUtils.isBlank(svarval)) {
@@ -339,7 +341,7 @@ public class AbilityUtils {
}
// Parse Object$Property string
final String[] calcX = svarval.split("\\$");
final String[] calcX = svarval.split("\\$", 2);
// Incorrect parses mean zero.
if ((calcX.length == 1) || calcX[1].equals("none")) {
@@ -500,6 +502,11 @@ public class AbilityUtils {
}
return CardFactoryUtil.playerXCount(players, calcX[1], card) * multiplier;
}
if(calcX[0].equals("TriggeredSpellAbility")) {
final SpellAbility root = ability.getRootAbility();
SpellAbility sat = (SpellAbility) root.getTriggeringObject("SpellAbility");
return calculateAmount(sat.getSourceCard(), calcX[1], sat);
}
// Added on 9/30/12 (ArsenalNut) - Ended up not using but might be useful in future
/*
if (calcX[0].startsWith("EnchantedController")) {