mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
Keyword: Impending (#5544)
* Keyword: Impending * Update overlord_of_the_hauntwoods.txt --------- Co-authored-by: tool4ever <therealtoolkit@hotmail.com>
This commit is contained in:
@@ -2494,7 +2494,7 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
|
||||
|| keyword.startsWith("Bestow") || keyword.startsWith("Surge")
|
||||
|| keyword.startsWith("Transmute") || keyword.startsWith("Suspend")
|
||||
|| keyword.startsWith("Dash") || keyword.startsWith("Disturb")
|
||||
|| keyword.equals("Undaunted") || keyword.startsWith("Monstrosity")
|
||||
|| keyword.equals("Undaunted") || keyword.startsWith("Monstrosity") || keyword.startsWith("Impending")
|
||||
|| keyword.startsWith("Embalm") || keyword.equals("Prowess")
|
||||
|| keyword.startsWith("Eternalize") || keyword.startsWith("Reinforce")
|
||||
|| keyword.startsWith("Champion") || keyword.startsWith("Freerunning") || keyword.startsWith("Prowl") || keyword.startsWith("Adapt")
|
||||
|
||||
@@ -1427,6 +1427,16 @@ public class CardFactoryUtil {
|
||||
trigger.setOverridingAbility(AbilityFactory.getAbility(abStr, card));
|
||||
|
||||
inst.addTrigger(trigger);
|
||||
} else if (keyword.startsWith("Impending")) {
|
||||
// Remove Time counter trigger
|
||||
final String endTrig = "Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | IsPresent$ Card.Self+counters_GE1_TIME" +
|
||||
" | Secondary$ True | TriggerDescription$ At the beginning of your end step, remove a time counter from it.";
|
||||
|
||||
final String remove = "DB$ RemoveCounter | Defined$ Self | CounterType$ TIME | CounterNum$ 1";
|
||||
final Trigger parsedEndTrig = TriggerHandler.parseTrigger(endTrig, card, intrinsic);
|
||||
parsedEndTrig.setOverridingAbility(AbilityFactory.getAbility(remove, card));
|
||||
|
||||
inst.addTrigger(parsedEndTrig);
|
||||
} else if (keyword.equals("Living Weapon")) {
|
||||
final StringBuilder sbTrig = new StringBuilder();
|
||||
sbTrig.append("Mode$ ChangesZone | Destination$ Battlefield | ");
|
||||
@@ -2329,6 +2339,21 @@ public class CardFactoryUtil {
|
||||
|
||||
final ReplacementEffect re = makeEtbCounter(sb.toString(), card, intrinsic);
|
||||
|
||||
inst.addReplacement(re);
|
||||
} else if (keyword.startsWith("Impending")) {
|
||||
final String[] k = keyword.split(":");
|
||||
final String m = k[1];
|
||||
final Cost cost = new Cost(k[2], false);
|
||||
|
||||
StringBuilder desc = new StringBuilder();
|
||||
desc.append("Impending ");
|
||||
desc.append(m).append("—").append(cost.toSimpleString());
|
||||
|
||||
final String effect = "DB$ PutCounter | Defined$ ReplacedCard | CounterType$ TIME | CounterNum$ " + m
|
||||
+ " | ETB$ True | SpellDescription$ " + desc;
|
||||
|
||||
final ReplacementEffect re = createETBReplacement(card, ReplacementLayer.Other, effect, false, true, intrinsic, "Card.Self+impended", "");
|
||||
|
||||
inst.addReplacement(re);
|
||||
} else if (keyword.equals("Jump-start")) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
@@ -3165,6 +3190,26 @@ public class CardFactoryUtil {
|
||||
sa.setIntrinsic(intrinsic);
|
||||
inst.addSpellAbility(sa);
|
||||
}
|
||||
} else if (keyword.startsWith("Impending")) {
|
||||
final String[] k = keyword.split(":");
|
||||
final Cost cost = new Cost(k[2], false);
|
||||
final SpellAbility newSA = card.getFirstSpellAbility().copyWithDefinedCost(cost);
|
||||
|
||||
newSA.putParam("PrecostDesc", "Impending");
|
||||
StringBuilder costDesc = new StringBuilder();
|
||||
costDesc.append(k[1]).append("—").append(cost.toSimpleString());
|
||||
newSA.putParam("CostDesc", costDesc.toString());
|
||||
|
||||
// makes new SpellDescription
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
sb.append(newSA.getCostDescription());
|
||||
sb.append("(").append(inst.getReminderText()).append(")");
|
||||
newSA.setDescription(sb.toString());
|
||||
|
||||
newSA.setAlternativeCost(AlternativeCost.Impending);
|
||||
|
||||
newSA.setIntrinsic(intrinsic);
|
||||
inst.addSpellAbility(newSA);
|
||||
} else if (keyword.startsWith("Level up")) {
|
||||
final String[] k = keyword.split(":");
|
||||
final String manacost = k[1];
|
||||
@@ -3953,6 +3998,9 @@ public class CardFactoryUtil {
|
||||
String effect = "Mode$ CantBlockBy | ValidAttacker$ Creature.Self | ValidBlocker$ Creature.withoutHorsemanship | Secondary$ True " +
|
||||
" | Description$ Horsemanship (" + inst.getReminderText() + ")";
|
||||
inst.addStaticAbility(StaticAbility.create(effect, state.getCard(), state, intrinsic));
|
||||
} else if (keyword.startsWith("Impending")) {
|
||||
String effect = "Mode$ Continuous | Affected$ Card.Self+counters_GE1_TIME | RemoveType$ Creature | Secondary$ True";
|
||||
inst.addStaticAbility(StaticAbility.create(effect, state.getCard(), state, intrinsic));
|
||||
} else if (keyword.equals("Intimidate")) {
|
||||
String effect = "Mode$ CantBlockBy | ValidAttacker$ Creature.Self | ValidBlocker$ Creature.nonArtifact+notSharesColorWith | Secondary$ True " +
|
||||
" | Description$ Intimidate (" + inst.getReminderText() + ")";
|
||||
|
||||
@@ -1882,6 +1882,14 @@ public class CardProperty {
|
||||
return false;
|
||||
}
|
||||
return card.getCastSA().isEvoke();
|
||||
} else if (property.equals("impended")) {
|
||||
if (card.getCastSA() == null) {
|
||||
return false;
|
||||
}
|
||||
if (AbilityUtils.isUnlinkedFromCastSA(spellAbility, card)) {
|
||||
return false;
|
||||
}
|
||||
return card.getCastSA().isImpending();
|
||||
} else if (property.equals("prowled")) {
|
||||
if (card.getCastSA() == null) {
|
||||
return false;
|
||||
|
||||
@@ -106,6 +106,7 @@ public enum Keyword {
|
||||
HEXPROOF("Hexproof", Hexproof.class, true, "This can't be the target of %s spells or abilities your opponents control."),
|
||||
HIDEAWAY("Hideaway", KeywordWithAmount.class, false, "When this permanent enters the battlefield, look at the top {%d:card} of your library, exile one face down, then put the rest on the bottom of your library."),
|
||||
HORSEMANSHIP("Horsemanship", SimpleKeyword.class, true, "This creature can't be blocked except by creatures with horsemanship."),
|
||||
IMPENDING("Impending", KeywordWithCostAndAmount.class, false, "If you cast this spell for its impending cost, it enters with {%2$d:time counter} and isn’t a creature until the last is removed. At the beginning of your end step, remove a time counter from it."),
|
||||
IMPROVISE("Improvise", SimpleKeyword.class, true, "Your artifacts can help cast this spell. Each artifact you tap after you're done activating mana abilities pays for {1}."),
|
||||
INDESTRUCTIBLE("Indestructible", SimpleKeyword.class, true, "Effects that say \"destroy\" don't destroy this."),
|
||||
INFECT("Infect", SimpleKeyword.class, true, "This creature deals damage to creatures in the form of -1/-1 counters and to players in the form of poison counters."),
|
||||
|
||||
@@ -12,6 +12,7 @@ public enum AlternativeCost {
|
||||
Flashback,
|
||||
Foretold,
|
||||
Freerunning,
|
||||
Impending,
|
||||
Madness,
|
||||
MTMtE, // More Than Meets the Eye (Transformers Universes Beyond)
|
||||
Mutate,
|
||||
|
||||
@@ -1553,6 +1553,10 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
|
||||
return isAlternativeCost(AlternativeCost.Freerunning);
|
||||
}
|
||||
|
||||
public final boolean isImpending() {
|
||||
return isAlternativeCost(AlternativeCost.Impending);
|
||||
}
|
||||
|
||||
public final boolean isMadness() {
|
||||
return isAlternativeCost(AlternativeCost.Madness);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
Name:Overlord of the Hauntwoods
|
||||
ManaCost:3 G G
|
||||
Types:Enchantment Creature Avatar Horror
|
||||
PT:6/5
|
||||
K:Impending:4:1 G G
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigToken | TriggerDescription$ Whenever CARDNAME enters or attacks, create a tapped colorless land token named Everywhere that is every basic land type.
|
||||
T:Mode$ Attacks | ValidCard$ Card.Self | TriggerZones$ Battlefield | Secondary$ True | Execute$ TrigToken | TriggerDescription$ Whenever CARDNAME enters or attacks, create a tapped colorless land token named Everywhere that is every basic land type.
|
||||
SVar:TrigToken:DB$ Token | TokenAmount$ 1 | TokenScript$ everywhere | LockTokenScript$ True | TokenTapped$ True
|
||||
Oracle:Impending 4—{1}{G}{G} (If you cast this spell for its impending cost, it enters with four time counters and isn’t a creature until the last is removed. At the beginning of your end step, remove a time counter from it.)\nWhenever Overlord of the Hauntwoods enters or attacks, create a tapped colorless land token named Everywhere that is every basic land type.
|
||||
4
forge-gui/res/tokenscripts/everywhere.txt
Normal file
4
forge-gui/res/tokenscripts/everywhere.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
Name:Everywhere
|
||||
ManaCost:no cost
|
||||
Types:Land Plains Island Swamp Mountain Forest
|
||||
Oracle:
|
||||
Reference in New Issue
Block a user