From 8b1fa4ee5d2a4ca30199e9bef3c17e10a0d96d2f Mon Sep 17 00:00:00 2001 From: Tim Mocny Date: Sat, 5 Feb 2022 05:39:17 +0000 Subject: [PATCH] NEO: Voltage Surge and Generic Kicker tweaks --- .../src/main/java/forge/game/card/Card.java | 30 ++++++++++++------- forge-gui/res/cardsfolder/d/dragons_fire.txt | 2 +- forge-gui/res/cardsfolder/u/undergrowth.txt | 4 +-- .../cardsfolder/upcoming/voltage_surge.txt | 9 ++++++ 4 files changed, 32 insertions(+), 13 deletions(-) create mode 100644 forge-gui/res/cardsfolder/upcoming/voltage_surge.txt diff --git a/forge-game/src/main/java/forge/game/card/Card.java b/forge-game/src/main/java/forge/game/card/Card.java index a0ef066a22f..6669ebbc1ef 100644 --- a/forge-game/src/main/java/forge/game/card/Card.java +++ b/forge-game/src/main/java/forge/game/card/Card.java @@ -2007,11 +2007,11 @@ public class Card extends GameEntity implements Comparable, IHasSVars { sbLong.append(" (").append(inst.getReminderText()).append(")").append("\r\n"); } } else if (keyword.startsWith("Kicker")) { + final StringBuilder sbx = new StringBuilder(); + final String[] n = keyword.split(":"); + final Cost cost = new Cost(n[1], false); if (!keyword.endsWith("Generic")) { - final StringBuilder sbx = new StringBuilder(); - final String[] n = keyword.split(":"); sbx.append("Kicker "); - final Cost cost = new Cost(n[1], false); sbx.append(cost.toSimpleString()); if (Lists.newArrayList(n).size() > 2) { sbx.append(" and/or "); @@ -2019,8 +2019,13 @@ public class Card extends GameEntity implements Comparable, IHasSVars { sbx.append(cost2.toSimpleString()); } sbx.append(" (").append(inst.getReminderText()).append(")"); - sbLong.append(sbx).append("\r\n"); + } else { + sbx.append("As an additional cost to cast this spell, you may "); + String costS = StringUtils.uncapitalize(cost.toSimpleString()); + sbx.append(cost.hasManaCost() ? "pay " + costS : costS); + sbx.append("."); } + sbLong.append(sbx).append("\r\n"); } else if (keyword.startsWith("Trample:")) { sbLong.append("Trample over planeswalkers").append(" (").append(inst.getReminderText()).append(")").append("\r\n"); } else if (keyword.startsWith("Hexproof:")) { @@ -2545,20 +2550,25 @@ public class Card extends GameEntity implements Comparable, IHasSVars { sbBefore.append("Multikicker ").append(cost.toSimpleString()).append(" (").append(inst.getReminderText()).append(")").append("\r\n"); } } else if (keyword.startsWith("Kicker")) { + final StringBuilder sbx = new StringBuilder(); + final String[] n = keyword.split(":"); + final Cost cost = new Cost(n[1], false); if (!keyword.endsWith("Generic")) { - final StringBuilder sbx = new StringBuilder(); - final String[] n = keyword.split(":"); sbx.append("Kicker "); - final Cost cost = new Cost(n[1], false); sbx.append(cost.toSimpleString()); if (Lists.newArrayList(n).size() > 2) { - sbx.append(" and/or "); - final Cost cost2 = new Cost(n[2], false); + sbx.append(" and/or "); + final Cost cost2 = new Cost(n[2], false); sbx.append(cost2.toSimpleString()); } sbx.append(" (").append(inst.getReminderText()).append(")"); - sbBefore.append(sbx).append("\r\n"); + } else { + sbx.append("As an additional cost to cast this spell, you may "); + String costS = StringUtils.uncapitalize(cost.toSimpleString()); + sbx.append(cost.hasManaCost() ? "pay " + costS : costS); + sbx.append(".\r\n"); } + sbBefore.append(sbx).append("\r\n"); } else if (keyword.startsWith("AlternateAdditionalCost")) { final String[] k = keyword.split(":"); final Cost cost1 = new Cost(k[1], false); diff --git a/forge-gui/res/cardsfolder/d/dragons_fire.txt b/forge-gui/res/cardsfolder/d/dragons_fire.txt index 5d2e78c928c..bb01c2684ea 100644 --- a/forge-gui/res/cardsfolder/d/dragons_fire.txt +++ b/forge-gui/res/cardsfolder/d/dragons_fire.txt @@ -2,7 +2,7 @@ Name:Dragon's Fire ManaCost:1 R Types:Instant K:Kicker:RevealOrChoose<1/Dragon>:Generic -A:SP$ DealDamage | ValidTgts$ Creature,Planeswalker | TgtPrompt$ Select target creature or planeswalker | NumDmg$ Y | CostDesc$ As an additional cost to cast this spell, you may reveal a Dragon card from your hand or choose a Dragon you control. | SpellDescription$ CARDNAME deals 3 damage to target creature or planeswalker. If you revealed a Dragon card or chose a Dragon as you cast this spell, CARDNAME deals damage equal to the power of that card or creature instead. +A:SP$ DealDamage | ValidTgts$ Creature,Planeswalker | TgtPrompt$ Select target creature or planeswalker | NumDmg$ Y | SpellDescription$ CARDNAME deals 3 damage to target creature or planeswalker. If you revealed a Dragon card or chose a Dragon as you cast this spell, CARDNAME deals damage equal to the power of that card or creature instead. SVar:Y:Count$OptionalGenericCostPaid.X.3 SVar:X:Revealed$CardPower Oracle:As an additional cost to cast this spell, you may reveal a Dragon card from your hand or choose a Dragon you control.\nDragon's Fire deals 3 damage to target creature or planeswalker. If you revealed a Dragon card or chose a Dragon as you cast this spell, Dragon's Fire deals damage equal to the power of that card or creature instead. diff --git a/forge-gui/res/cardsfolder/u/undergrowth.txt b/forge-gui/res/cardsfolder/u/undergrowth.txt index c7ed2f66121..39da4640c63 100644 --- a/forge-gui/res/cardsfolder/u/undergrowth.txt +++ b/forge-gui/res/cardsfolder/u/undergrowth.txt @@ -2,8 +2,8 @@ Name:Undergrowth ManaCost:G Types:Instant K:Kicker:2 R:Generic -A:SP$ Fog | Cost$ G | CostDesc$ As an additional cost to cast this spell, you may pay {2}{R}. | Condition$ OptionalCost | ConditionOptionalPaid$ False | SubAbility$ DBEffect | SpellDescription$ Prevent all combat damage that would be dealt this turn. If this spell's additional cost was paid, this effect doesn't affect combat damage that would be dealt by red creatures. | StackDescription$ SpellDescription -SVar:DBEffect:DB$ Effect | Condition$ OptionalCost | ConditionOptionalPaid$ True | Name$ Undergrowth Effect | StaticAbilities$ KWPump +A:SP$ Fog | Condition$ OptionalCost | ConditionOptionalPaid$ False | SubAbility$ DBEffect | SpellDescription$ Prevent all combat damage that would be dealt this turn. If this spell's additional cost was paid, this effect doesn't affect combat damage that would be dealt by red creatures. | StackDescription$ SpellDescription +SVar:DBEffect:DB$ Effect | Condition$ OptionalCost | ConditionOptionalPaid$ True | StaticAbilities$ KWPump SVar:KWPump:Mode$ Continuous | EffectZone$ Command | AffectedZone$ Battlefield | Affected$ Creature.nonRed | AddKeyword$ Prevent all combat damage that would be dealt by CARDNAME. | Description$ Prevent all combat damage this turn except that from red creatures. AI:RemoveDeck:All DeckHints:Color$Red diff --git a/forge-gui/res/cardsfolder/upcoming/voltage_surge.txt b/forge-gui/res/cardsfolder/upcoming/voltage_surge.txt new file mode 100644 index 00000000000..f714af15807 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/voltage_surge.txt @@ -0,0 +1,9 @@ +Name:Voltage Surge +ManaCost:R +Types:Instant +K:Kicker:Sac<1/Artifact>:Generic +A:SP$ DealDamage | NumDmg$ X | ValidTgts$ Creature,Planeswalker | TgtPrompt$ Select target creature or planeswalker | SpellDescription$ CARDNAME deals 2 damage to target creature or planeswalker. If this spell's additional cost was paid, CARDNAME deals 4 damage instead. +SVar:X:Count$OptionalGenericCostPaid.4.2 +DeckHints:Type$Artifact +DeckHas:Ability$Sacrifice +Oracle:As an additional cost to cast this spell, you may sacrifice an artifact.\nVoltage Surge deals 2 damage to target creature or planeswalker. If this spell's additional cost was paid, Voltage Surge deals 4 damage instead.