mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
CardFactoryUtil: do Escalate as Keyword
This commit is contained in:
@@ -1400,7 +1400,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
sbLong.append(keyword).append("\r\n");
|
sbLong.append(keyword).append("\r\n");
|
||||||
} else if (keyword.startsWith("Sunburst") && hasStartOfKeyword("Modular")) {
|
} else if (keyword.startsWith("Sunburst") && hasStartOfKeyword("Modular")) {
|
||||||
} else if (keyword.startsWith("Modular") || keyword.startsWith("Soulshift") || keyword.startsWith("Bloodthirst")
|
} else if (keyword.startsWith("Modular") || keyword.startsWith("Soulshift") || keyword.startsWith("Bloodthirst")
|
||||||
|| keyword.startsWith("Strive")
|
|| keyword.startsWith("Strive") || keyword.startsWith("Escalate")
|
||||||
|| keyword.startsWith("ETBReplacement") || keyword.startsWith("MayEffectFromOpeningHand")) {
|
|| keyword.startsWith("ETBReplacement") || keyword.startsWith("MayEffectFromOpeningHand")) {
|
||||||
} else if (keyword.startsWith("Provoke") || keyword.startsWith("Devour") || keyword.equals("Unleash")) {
|
} else if (keyword.startsWith("Provoke") || keyword.startsWith("Devour") || keyword.equals("Unleash")) {
|
||||||
sbLong.append(keyword + " (" + Keyword.getInstance(keyword).getReminderText() + ")");
|
sbLong.append(keyword + " (" + Keyword.getInstance(keyword).getReminderText() + ")");
|
||||||
|
|||||||
@@ -2529,6 +2529,9 @@ public class CardFactoryUtil {
|
|||||||
addReplacementEffect(keyword, card, null);
|
addReplacementEffect(keyword, card, null);
|
||||||
addStaticAbility(keyword, card, null);
|
addStaticAbility(keyword, card, null);
|
||||||
}
|
}
|
||||||
|
else if (keyword.startsWith("Escalate")) {
|
||||||
|
addStaticAbility(keyword, card, null);
|
||||||
|
}
|
||||||
else if (keyword.startsWith("Rampage")) {
|
else if (keyword.startsWith("Rampage")) {
|
||||||
addTriggerAbility(keyword, card, null);
|
addTriggerAbility(keyword, card, null);
|
||||||
}
|
}
|
||||||
@@ -3277,7 +3280,20 @@ public class CardFactoryUtil {
|
|||||||
|
|
||||||
public static void addStaticAbility(final String keyword, final Card card, final KeywordsChange kws) {
|
public static void addStaticAbility(final String keyword, final Card card, final KeywordsChange kws) {
|
||||||
final boolean intrinsic = kws == null;
|
final boolean intrinsic = kws == null;
|
||||||
if (keyword.startsWith("Strive")) {
|
|
||||||
|
if (keyword.startsWith("Escalate")) {
|
||||||
|
final String[] k = keyword.split(":");
|
||||||
|
final String manacost = k[1];
|
||||||
|
final Cost cost = new Cost(manacost, false);
|
||||||
|
|
||||||
|
final String effect = "Mode$ RaiseCost | ValidCard$ Card.Self | Type$ Spell | Amount$ Escalate | Cost$ "+ manacost +" | EffectZone$ All" +
|
||||||
|
" | Description$ Escalate " + cost.toSimpleString() + " (" + Keyword.getInstance(keyword).getReminderText() + ")";
|
||||||
|
StaticAbility st = card.addStaticAbility(effect);
|
||||||
|
st.setIntrinsic(intrinsic);
|
||||||
|
if (!intrinsic) {
|
||||||
|
kws.addStaticAbility(st);
|
||||||
|
}
|
||||||
|
} else if (keyword.startsWith("Strive")) {
|
||||||
final String[] k = keyword.split(":");
|
final String[] k = keyword.split(":");
|
||||||
final String manacost = k[1];
|
final String manacost = k[1];
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ public enum Keyword {
|
|||||||
ENTWINE(KeywordWithCost.class, true, "You may choose all modes of this spell instead of just one. If you do, you pay an additional %s."),
|
ENTWINE(KeywordWithCost.class, true, "You may choose all modes of this spell instead of just one. If you do, you pay an additional %s."),
|
||||||
EPIC(SimpleKeyword.class, true, "For the rest of the game, you can't cast spells. At the beginning of each of your upkeeps for the rest of the game, copy this spell except for its epic ability. If the spell has any targets, you may choose new targets for the copy."),
|
EPIC(SimpleKeyword.class, true, "For the rest of the game, you can't cast spells. At the beginning of each of your upkeeps for the rest of the game, copy this spell except for its epic ability. If the spell has any targets, you may choose new targets for the copy."),
|
||||||
EQUIP(KeywordWithCost.class, false, "%s: Attach this permanent to target creature you control. Activate this ability only any time you could cast a sorcery."),
|
EQUIP(KeywordWithCost.class, false, "%s: Attach this permanent to target creature you control. Activate this ability only any time you could cast a sorcery."),
|
||||||
|
ESCALATE(KeywordWithCost.class, true, "Pay this cost for each mode chosen beyond the first."),
|
||||||
EVOKE(KeywordWithCost.class, false, "You may cast this card by paying %s rather than paying its mana cost. If you do, it's sacrificed when it enters the battlefield."),
|
EVOKE(KeywordWithCost.class, false, "You may cast this card by paying %s rather than paying its mana cost. If you do, it's sacrificed when it enters the battlefield."),
|
||||||
EVOLVE(SimpleKeyword.class, false, "Whenever a creature enters the battlefield under your control, if that creature has greater power or toughness than this creature, put a +1/+1 counter on this creature."),
|
EVOLVE(SimpleKeyword.class, false, "Whenever a creature enters the battlefield under your control, if that creature has greater power or toughness than this creature, put a +1/+1 counter on this creature."),
|
||||||
EXALTED(SimpleKeyword.class, false, "Whenever a creature you control attacks alone, that creature gets +1/+1 until end of turn."),
|
EXALTED(SimpleKeyword.class, false, "Whenever a creature you control attacks alone, that creature gets +1/+1 until end of turn."),
|
||||||
|
|||||||
Reference in New Issue
Block a user