mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
CardFactoryUtil: add Reinforce as Keyword
This commit is contained in:
@@ -1574,6 +1574,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
|| keyword.startsWith("Surge") || keyword.startsWith("Transmute") || keyword.startsWith("Suspend")
|
||||
|| keyword.equals("Undaunted") || keyword.startsWith("Monstrosity") || keyword.startsWith("Embalm")
|
||||
|| keyword.startsWith("Level up") || keyword.equals("Prowess") || keyword.startsWith("Eternalize")
|
||||
|| keyword.startsWith("Reinforce")
|
||||
|| keyword.startsWith("Cycling") || keyword.startsWith("TypeCycling")) {
|
||||
// keyword parsing takes care of adding a proper description
|
||||
} else if (keyword.startsWith("CantBeBlockedBy")) {
|
||||
|
||||
@@ -2005,6 +2005,9 @@ public class CardFactoryUtil {
|
||||
else if (keyword.startsWith("Ninjutsu")) {
|
||||
addSpellAbility(keyword, card, null);
|
||||
}
|
||||
else if (keyword.startsWith("Reinforce")) {
|
||||
addSpellAbility(keyword, card, null);
|
||||
}
|
||||
else if (keyword.startsWith("Scavenge")) {
|
||||
addSpellAbility(keyword, card, null);
|
||||
}
|
||||
@@ -4104,6 +4107,33 @@ public class CardFactoryUtil {
|
||||
final SpellAbility sa = AbilityFactory.getAbility(abilityStr.toString(), card);
|
||||
sa.setIntrinsic(intrinsic);
|
||||
|
||||
if (!intrinsic) {
|
||||
sa.setTemporary(true);
|
||||
//sa.setOriginalHost(hostCard);
|
||||
kws.addSpellAbility(sa);
|
||||
}
|
||||
card.addSpellAbility(sa);
|
||||
} else if (keyword.startsWith("Reinforce")) {
|
||||
final String[] k = keyword.split(":");
|
||||
final String n = k[1];
|
||||
final String manacost = k[2];
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("AB$ PutCounter | CounterType$ P1P1 | ActivationZone$ Hand");
|
||||
sb.append("| ValidTgts$ Creature | TgtPrompt$ Select target creature");
|
||||
sb.append("| Cost$ " + manacost + " Discard<1/CARDNAME>");
|
||||
sb.append("| CounterNum$ ").append(n);
|
||||
sb.append("| CostDesc$ " + ManaCostParser.parse(manacost)); // to hide the Discard from the cost
|
||||
sb.append("| PrecostDesc$ Reinforce ").append(n).append("—");
|
||||
sb.append("| SpellDescription$ (").append(Keyword.getInstance(keyword).getReminderText()).append(")");
|
||||
|
||||
final SpellAbility sa = AbilityFactory.getAbility(sb.toString(), card);
|
||||
sa.setIntrinsic(intrinsic);
|
||||
|
||||
if (n.equals("X")) {
|
||||
sa.setSVar("X", "Count$xPaid");
|
||||
}
|
||||
|
||||
if (!intrinsic) {
|
||||
sa.setTemporary(true);
|
||||
//sa.setOriginalHost(hostCard);
|
||||
|
||||
Reference in New Issue
Block a user