diff --git a/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java b/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java index 65a23f7192c..d1a66f88c5b 100644 --- a/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java +++ b/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java @@ -2627,8 +2627,10 @@ public class CardFactoryUtil { String[] k = keyword.split(":"); // Get cost string String equipCost = k[1]; - String valid = k.length > 2 ? k[2] : "Creature.YouCtrl"; - String vstr = k.length > 3 ? k[3] : "creature"; + String valid = k.length > 2 && !k[2].isEmpty() ? k[2] : "Creature.YouCtrl"; + String vstr = k.length > 3 && !k[3].isEmpty() ? k[3] : "creature"; + String extra = k.length > 4 ? k[4] : ""; + String extraDesc = k.length > 5 ? k[5] : ""; // Create attach ability string final StringBuilder abilityStr = new StringBuilder(); abilityStr.append("AB$ Attach | Cost$ "); @@ -2641,7 +2643,7 @@ public class CardFactoryUtil { abilityStr.append("| ").append(card.getSVar("AttachAi")); } abilityStr.append("| PrecostDesc$ Equip"); - if (k.length > 3) { + if (k.length > 3 && !k[3].isEmpty()) { abilityStr.append(" ").append(vstr); } Cost cost = new Cost(equipCost, true); @@ -2651,7 +2653,14 @@ public class CardFactoryUtil { abilityStr.append(" "); } abilityStr.append("| CostDesc$ ").append(cost.toSimpleString()).append(" "); - abilityStr.append("| SpellDescription$ (").append(inst.getReminderText()).append(")"); + abilityStr.append("| SpellDescription$ "); + if (!extraDesc.isEmpty()) { + abilityStr.append(". ").append(extraDesc).append(". "); + } + abilityStr.append("(").append(inst.getReminderText()).append(")"); + if (!extra.isEmpty()) { + abilityStr.append("| ").append(extra); + } // instantiate attach ability final SpellAbility newSA = AbilityFactory.getAbility(abilityStr.toString(), card); newSA.setIntrinsic(intrinsic); diff --git a/forge-game/src/main/java/forge/game/cost/Cost.java b/forge-game/src/main/java/forge/game/cost/Cost.java index 8772f6f85d5..a74bbdaed24 100644 --- a/forge-game/src/main/java/forge/game/cost/Cost.java +++ b/forge-game/src/main/java/forge/game/cost/Cost.java @@ -309,8 +309,9 @@ public class Cost implements Serializable { // Changes Cost by adding a Life Payment if (parse.startsWith("PayLife<")) { // PayLife - final String[] splitStr = abCostParse(parse, 1); - return new CostPayLife(splitStr[0]); + final String[] splitStr = abCostParse(parse, 2); + final String description = splitStr.length > 1 ? splitStr[1] : null; + return new CostPayLife(splitStr[0], description); } if (parse.startsWith("PayEnergy<")) { @@ -908,7 +909,7 @@ public class Cost implements Serializable { } else if (part instanceof CostAddMana) { costParts.add(new CostAddMana(amount, part.getType(), part.getTypeDescription())); } else if (part instanceof CostPayLife) { - costParts.add(new CostPayLife(amount)); + costParts.add(new CostPayLife(amount, part.getTypeDescription())); } toRemove.add(other); alreadyAdded = true; diff --git a/forge-game/src/main/java/forge/game/cost/CostPayLife.java b/forge-game/src/main/java/forge/game/cost/CostPayLife.java index 7953ec78f7e..b13b2b64a61 100644 --- a/forge-game/src/main/java/forge/game/cost/CostPayLife.java +++ b/forge-game/src/main/java/forge/game/cost/CostPayLife.java @@ -37,8 +37,8 @@ public class CostPayLife extends CostPart { * @param amount * the amount */ - public CostPayLife(final String amount) { - this.setAmount(amount); + public CostPayLife(final String amount, final String description) { + super(amount, "card", description); } @Override @@ -52,7 +52,13 @@ public class CostPayLife extends CostPart { @Override public final String toString() { final StringBuilder sb = new StringBuilder(); - sb.append("Pay ").append(this.getAmount()).append(" Life"); + sb.append("Pay "); + String desc = this.getTypeDescription(); + if (desc != null) { + sb.append(desc); + } else { + sb.append(this.getAmount()).append(" Life"); + } return sb.toString(); } diff --git a/forge-gui/res/cardsfolder/upcoming/belt_of_giant_strength.txt b/forge-gui/res/cardsfolder/upcoming/belt_of_giant_strength.txt new file mode 100644 index 00000000000..d482be36745 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/belt_of_giant_strength.txt @@ -0,0 +1,7 @@ +Name:Belt of Giant Strength +ManaCost:1 G +Types:Artifact Equipment +S:Mode$ Continuous | Affected$ Creature.EquippedBy | SetPower$ 10 | SetToughness$ 10 | Description$ Equipped creature has base power and toughness 10/10. +K:Equip:10:::ReduceCost$ X:This ability costs {X} less to activate where X is the power of the creature it targets. +SVar:X:Targeted$CardPower +Oracle:Equipped creature has base power and toughness 10/10.\nEquip {10}. This ability costs {X} less to activate where X is the power of the creature it targets. diff --git a/forge-gui/res/cardsfolder/upcoming/hand_of_vecna.txt b/forge-gui/res/cardsfolder/upcoming/hand_of_vecna.txt index 43cf723724b..aa76cc3946b 100644 --- a/forge-gui/res/cardsfolder/upcoming/hand_of_vecna.txt +++ b/forge-gui/res/cardsfolder/upcoming/hand_of_vecna.txt @@ -3,9 +3,9 @@ ManaCost:3 Types:Legendary Artifact Equipment T:Mode$Phase | Phase$ BeginCombat | ValidPlayer$ You | Execute$ TrigChoose | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of combat on your turn, equipped creature or a creature you control named Vecna gets +X/+X until end of turn, where X is the number of cards in your hand. SVar:TrigChoose:DB$ ChooseCard | Choices$ Creature.EquippedBy,Creature.YouCtrl+namedVecna | SubAbility$ DBPump -SVar:DBPump:DB$ Pump | Defined$ ChosenCard | NumAtt$ +X | NumDef$ +X | SubAbility$ DBCleanup +SVar:DBPump:DB$ Pump | Defined$ ChosenCard | NumAtt$ +X | NumDef$ +X | Mandatory$ True | SubAbility$ DBCleanup SVar:DBCleanup:DB$ Cleanup | ClearChosenCard$ True -K:Equip:PayLife +K:Equip:PayLife K:Equip:2 SVar:X:Count$CardsInYourHand DeckHints:Name$Eye of Vecna|The Book of Vile Darkness diff --git a/forge-gui/res/cardsfolder/upcoming/leather_armor.txt b/forge-gui/res/cardsfolder/upcoming/leather_armor.txt new file mode 100644 index 00000000000..2101fec9db7 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/leather_armor.txt @@ -0,0 +1,6 @@ +Name:Leather Armor +ManaCost:1 +Types:Artifact Equipment +S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddToughness$ 1 | AddKeyword$ Ward:1 | Description$ Equipped creature gets +0/+1 and has ward {1}. (Whenever equipped creature becomes the target of a spell or ability an opponent controls, counter it unless that player pays {1}.) +K:Equip:0:::ActivationLimit$ 1:Activate only once each turn +Oracle:Equipped creature gets +0/+1 and has ward {1}. (Whenever equipped creature becomes the target of a spell or ability an opponent controls, counter it unless that player pays {1}.)\nEquip {0}. Activate only once each turn. diff --git a/forge-gui/res/cardsfolder/upcoming/plate_armor.txt b/forge-gui/res/cardsfolder/upcoming/plate_armor.txt new file mode 100644 index 00000000000..0b3adb015a3 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/plate_armor.txt @@ -0,0 +1,7 @@ +Name:Plate Armor +ManaCost:2 W +Types:Artifact Equipment +S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddPower$ 3 | AddToughness$ 3 | AddKeyword$ Ward:1 | Description$ Equipped creature gets +3/+3 and has ward {1}. (Whenever equipped creature becomes the target of a spell or ability an opponent controls, counter it unless that player pays {1}.) +K:Equip:3:::ReduceCost$ Y:This ability costs {1} less to activate for each other Equipment you control +SVar:Y:Count$Valid Equipment.YouCtrl+Other +Oracle:Equipped creature gets +3/+3 and has ward {1}. (Whenever equipped creature becomes the target of a spell or ability an opponent controls, counter it unless that player pays {1}.)\nEquip {3}. This ability costs {1} less to activate for each other Equipment you control.