CardFactoryUtil: do Escalate as Keyword

This commit is contained in:
Hanmac
2016-07-26 08:42:59 +00:00
parent db7d07b170
commit c9b5bba65b
3 changed files with 21 additions and 4 deletions

View File

@@ -1400,7 +1400,7 @@ public class Card extends GameEntity implements Comparable<Card> {
sbLong.append(keyword).append("\r\n");
} else if (keyword.startsWith("Sunburst") && hasStartOfKeyword("Modular")) {
} 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")) {
} else if (keyword.startsWith("Provoke") || keyword.startsWith("Devour") || keyword.equals("Unleash")) {
sbLong.append(keyword + " (" + Keyword.getInstance(keyword).getReminderText() + ")");

View File

@@ -2529,11 +2529,14 @@ public class CardFactoryUtil {
addReplacementEffect(keyword, card, null);
addStaticAbility(keyword, card, null);
}
else if (keyword.startsWith("Escalate")) {
addStaticAbility(keyword, card, null);
}
else if (keyword.startsWith("Rampage")) {
addTriggerAbility(keyword, card, null);
}
else if (keyword.startsWith("Strive")) {
addStaticAbility(keyword, card, null);
addStaticAbility(keyword, card, null);
}
else if (keyword.startsWith("Bushido")) {
addTriggerAbility(keyword, card, null);
@@ -3277,7 +3280,20 @@ public class CardFactoryUtil {
public static void addStaticAbility(final String keyword, final Card card, final KeywordsChange kws) {
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 manacost = k[1];

View File

@@ -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."),
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."),
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."),
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."),