mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Merge pull request #1531 from Northmoc/40k_squad
40K – Squad keyword and cards
This commit is contained in:
@@ -635,6 +635,27 @@ public final class GameActionUtil {
|
|||||||
tr.setSVar("ReplicateAmount", String.valueOf(v));
|
tr.setSVar("ReplicateAmount", String.valueOf(v));
|
||||||
tr.getOverridingAbility().setSVar("ReplicateAmount", String.valueOf(v));
|
tr.getOverridingAbility().setSVar("ReplicateAmount", String.valueOf(v));
|
||||||
|
|
||||||
|
for (int i = 0; i < v; i++) {
|
||||||
|
if (result == null) {
|
||||||
|
result = sa.copy();
|
||||||
|
}
|
||||||
|
result.getPayCosts().add(cost);
|
||||||
|
reset = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (o.startsWith("Squad")) {
|
||||||
|
Trigger tr = Iterables.getFirst(ki.getTriggers(), null);
|
||||||
|
if (tr != null) {
|
||||||
|
String costStr = o.split(":")[1];
|
||||||
|
final Cost cost = new Cost(costStr, false);
|
||||||
|
|
||||||
|
String str = "Choose amount for Squad: " + cost.toSimpleString();
|
||||||
|
|
||||||
|
int v = pc.chooseNumberForKeywordCost(sa, cost, ki, str, Integer.MAX_VALUE);
|
||||||
|
|
||||||
|
tr.setSVar("SquadAmount", String.valueOf(v));
|
||||||
|
tr.getOverridingAbility().setSVar("SquadAmount", String.valueOf(v));
|
||||||
|
|
||||||
for (int i = 0; i < v; i++) {
|
for (int i = 0; i < v; i++) {
|
||||||
if (result == null) {
|
if (result == null) {
|
||||||
result = sa.copy();
|
result = sa.copy();
|
||||||
|
|||||||
@@ -2036,7 +2036,8 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
|
|||||||
} else if (keyword.startsWith("Morph") || keyword.startsWith("Megamorph")
|
} else if (keyword.startsWith("Morph") || keyword.startsWith("Megamorph")
|
||||||
|| keyword.startsWith("Escape") || keyword.startsWith("Foretell:")
|
|| keyword.startsWith("Escape") || keyword.startsWith("Foretell:")
|
||||||
|| keyword.startsWith("Disturb") || keyword.startsWith("Madness:")
|
|| keyword.startsWith("Disturb") || keyword.startsWith("Madness:")
|
||||||
|| keyword.startsWith("Reconfigure")) {
|
|| keyword.startsWith("Reconfigure") || keyword.startsWith("Squad")
|
||||||
|
|| keyword.startsWith("Miracle")) {
|
||||||
String[] k = keyword.split(":");
|
String[] k = keyword.split(":");
|
||||||
sbLong.append(k[0]);
|
sbLong.append(k[0]);
|
||||||
if (k.length > 1) {
|
if (k.length > 1) {
|
||||||
|
|||||||
@@ -1791,6 +1791,19 @@ public class CardFactoryUtil {
|
|||||||
parsedTrigger.setOverridingAbility(sp);
|
parsedTrigger.setOverridingAbility(sp);
|
||||||
|
|
||||||
inst.addTrigger(parsedTrigger);
|
inst.addTrigger(parsedTrigger);
|
||||||
|
} else if (keyword.startsWith("Squad")) {
|
||||||
|
final String trigScript = "Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | " +
|
||||||
|
"ValidCard$ Card.Self+wasCast | CheckSVar$ SquadAmount | Secondary$ True | " +
|
||||||
|
"TriggerDescription$ When this creature enters the battlefield, create that many tokens that " +
|
||||||
|
"are copies of it.";
|
||||||
|
final String abString = "DB$ CopyPermanent | Defined$ TriggeredCard | NumCopies$ SquadAmount";
|
||||||
|
|
||||||
|
final Trigger squadTrigger = TriggerHandler.parseTrigger(trigScript, card, intrinsic);
|
||||||
|
final SpellAbility squadAbility = AbilityFactory.getAbility(abString, card);
|
||||||
|
squadAbility.setSVar("SquadAmount", "0");
|
||||||
|
squadTrigger.setOverridingAbility(squadAbility);
|
||||||
|
squadTrigger.setSVar("SquadAmount", "0");
|
||||||
|
inst.addTrigger(squadTrigger);
|
||||||
} else if (keyword.equals("Storm")) {
|
} else if (keyword.equals("Storm")) {
|
||||||
final String actualTrigger = "Mode$ SpellCast | ValidCard$ Card.Self | TriggerZones$ Stack | Secondary$ True"
|
final String actualTrigger = "Mode$ SpellCast | ValidCard$ Card.Self | TriggerZones$ Stack | Secondary$ True"
|
||||||
+ "| TriggerDescription$ Storm (" + inst.getReminderText() + ")";
|
+ "| TriggerDescription$ Storm (" + inst.getReminderText() + ")";
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public final class CardUtil {
|
|||||||
"Enchant", "Protection", "Cumulative upkeep", "Equip", "Buyback",
|
"Enchant", "Protection", "Cumulative upkeep", "Equip", "Buyback",
|
||||||
"Cycling", "Echo", "Kicker", "Flashback", "Madness", "Morph",
|
"Cycling", "Echo", "Kicker", "Flashback", "Madness", "Morph",
|
||||||
"Affinity", "Entwine", "Splice", "Ninjutsu", "Presence",
|
"Affinity", "Entwine", "Splice", "Ninjutsu", "Presence",
|
||||||
"Transmute", "Replicate", "Recover", "Suspend", "Aura swap",
|
"Transmute", "Replicate", "Recover", "Squad", "Suspend", "Aura swap",
|
||||||
"Fortify", "Transfigure", "Champion", "Evoke", "Prowl", "IfReach",
|
"Fortify", "Transfigure", "Champion", "Evoke", "Prowl", "IfReach",
|
||||||
"Reinforce", "Unearth", "Level up", "Miracle", "Overload", "Cleave",
|
"Reinforce", "Unearth", "Level up", "Miracle", "Overload", "Cleave",
|
||||||
"Scavenge", "Encore", "Bestow", "Outlast", "Dash", "Surge", "Emerge", "Hexproof:",
|
"Scavenge", "Encore", "Bestow", "Outlast", "Dash", "Surge", "Emerge", "Hexproof:",
|
||||||
|
|||||||
@@ -159,6 +159,7 @@ public enum Keyword {
|
|||||||
SPECTACLE("Spectacle", KeywordWithCost.class, false, "You may cast this spell for its spectacle cost rather than its mana cost if an opponent lost life this turn."),
|
SPECTACLE("Spectacle", KeywordWithCost.class, false, "You may cast this spell for its spectacle cost rather than its mana cost if an opponent lost life this turn."),
|
||||||
SPLICE("Splice", KeywordWithCostAndType.class, false, "As you cast an %2$s spell, you may reveal this card from your hand and pay its splice cost. If you do, add this card's effects to that spell."),
|
SPLICE("Splice", KeywordWithCostAndType.class, false, "As you cast an %2$s spell, you may reveal this card from your hand and pay its splice cost. If you do, add this card's effects to that spell."),
|
||||||
SPLIT_SECOND("Split second", SimpleKeyword.class, true, "As long as this spell is on the stack, players can't cast other spells or activate abilities that aren't mana abilities."),
|
SPLIT_SECOND("Split second", SimpleKeyword.class, true, "As long as this spell is on the stack, players can't cast other spells or activate abilities that aren't mana abilities."),
|
||||||
|
SQUAD("Squad", KeywordWithCost.class, false, "As an additional cost to cast this spell, you may pay %s any number of times. When this creature enters the battlefield, create that many tokens that are copies of it."),
|
||||||
STARTING_INTENSITY("Starting intensity", KeywordWithAmount.class, true, null),
|
STARTING_INTENSITY("Starting intensity", KeywordWithAmount.class, true, null),
|
||||||
STORM("Storm", SimpleKeyword.class, false, "When you cast this spell, copy it for each other spell that was cast before it this turn. You may choose new targets for the copies."),
|
STORM("Storm", SimpleKeyword.class, false, "When you cast this spell, copy it for each other spell that was cast before it this turn. You may choose new targets for the copies."),
|
||||||
STRIVE("Strive", KeywordWithCost.class, false, "CARDNAME costs %s more to cast for each target beyond the first."),
|
STRIVE("Strive", KeywordWithCost.class, false, "CARDNAME costs %s more to cast for each target beyond the first."),
|
||||||
|
|||||||
9
forge-gui/res/cardsfolder/upcoming/arco_flagellant.txt
Normal file
9
forge-gui/res/cardsfolder/upcoming/arco_flagellant.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Name:Arco-Flagellant
|
||||||
|
ManaCost:2 B
|
||||||
|
Types:Creature Human
|
||||||
|
PT:3/1
|
||||||
|
K:Squad:2
|
||||||
|
K:CARDNAME can't block.
|
||||||
|
A:AB$ Pump | PrecostDesc$ Endurant — | Cost$ PayLife<3> | KW$ Indestructible | SpellDescription$ CARDNAME gains indestructible until end of turn.
|
||||||
|
DeckHas:Ability$Token
|
||||||
|
Oracle:Squad {2} (As an additional cost to cast this spell, you may pay {2} any number of times. When this creature enters the battlefield, create that many tokens that are copies of it.)\nArco-Flagellant can't block.\nEndurant — Pay 3 life: Arco-Flagellant gains indestructible until end of turn.
|
||||||
10
forge-gui/res/cardsfolder/upcoming/sicarian_infiltrator.txt
Normal file
10
forge-gui/res/cardsfolder/upcoming/sicarian_infiltrator.txt
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
Name:Sicarian Infiltrator
|
||||||
|
ManaCost:2 U
|
||||||
|
Types:Artifact Creature Human Soldier
|
||||||
|
PT:1/2
|
||||||
|
K:Flash
|
||||||
|
K:Squad:2
|
||||||
|
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDraw | TriggerDescription$ Benediction of the Omnissiah — When CARDNAME enters the battlefield, draw a card.
|
||||||
|
SVar:TrigDraw:DB$ Draw | NumCards$ 1
|
||||||
|
DeckHas:Ability$Token
|
||||||
|
Oracle:Flash\nSquad {2} (As an additional cost to cast this spell, you may pay {2} any number of times. When this creature enters the battlefield, create that many tokens that are copies of it.)\nBenediction of the Omnissiah — When Sicarian Infiltrator enters the battlefield, draw a card.
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
Name:Space Marine Devastator
|
||||||
|
ManaCost:3 W
|
||||||
|
Types:Creature Astartes Warrior
|
||||||
|
PT:3/3
|
||||||
|
K:Squad:2
|
||||||
|
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDestroy | TriggerDescription$ Grav-cannon — When CARDNAME enters the battlefield, destroy up to one target artifact or enchantment.
|
||||||
|
SVar:TrigDestroy:DB$ Destroy | TargetMin$ 0 | TargetMax$ 1 | ValidTgts$ Artifact,Enchantment | TgtPrompt$ Select up to one target artifact or enchantment
|
||||||
|
DeckHas:Ability$Token
|
||||||
|
Oracle:Squad {2} (As an additional cost to cast this spell, you may pay {2} any number of times. When this creature enters the battlefield, create that many tokens that are copies of it.)\nGrav-cannon — When Space Marine Devastator enters the battlefield, destroy up to one target artifact or enchantment.
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
Name:Ultramarines Honour Guard
|
||||||
|
ManaCost:3 W
|
||||||
|
Types:Creature Astartes Warrior
|
||||||
|
PT:2/2
|
||||||
|
K:Squad:2
|
||||||
|
S:Mode$ Continuous | Affected$ Creature.Other+YouCtrl | AddPower$ 1 | AddToughness$ 1 | Description$ Other creatures you control get +1/+1.
|
||||||
|
DeckHas:Ability$Token
|
||||||
|
Oracle:Squad {2} (As an additional cost to cast this spell, you may pay {2} any number of times. When this creature enters the battlefield, create that many tokens that are copies of it.)\nOther creatures you control get +1/+1.
|
||||||
10
forge-gui/res/cardsfolder/upcoming/vanguard_suppressor.txt
Normal file
10
forge-gui/res/cardsfolder/upcoming/vanguard_suppressor.txt
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
Name:Vanguard Suppressor
|
||||||
|
ManaCost:3 U
|
||||||
|
Types:Creature Astartes Warrior
|
||||||
|
PT:3/2
|
||||||
|
K:Squad:2
|
||||||
|
K:Flying
|
||||||
|
T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigDraw | TriggerDescription$ Suppressing Fire — Whenever CARDNAME deals combat damage to a player, draw a card.
|
||||||
|
SVar:TrigDraw:DB$ Draw
|
||||||
|
DeckHas:Ability$Token
|
||||||
|
Oracle:Squad {2} (As an additional cost to cast this spell, you may pay {2} any number of times. When this creature enters the battlefield, create that many tokens that are copies of it.)\nFlying\nSuppressing Fire — Whenever Vanguard Suppressor deals combat damage to a player, draw a card.
|
||||||
10
forge-gui/res/cardsfolder/upcoming/zephyrim.txt
Normal file
10
forge-gui/res/cardsfolder/upcoming/zephyrim.txt
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
Name:Zephyrim
|
||||||
|
ManaCost:3 W
|
||||||
|
Types:Creature Human Warrior
|
||||||
|
PT:3/3
|
||||||
|
K:Squad:2
|
||||||
|
K:Flying
|
||||||
|
K:Vigilance
|
||||||
|
K:Miracle:1 W
|
||||||
|
DeckHas:Ability$Token
|
||||||
|
Oracle:Squad {2} (As an additional cost to cast this spell, you may pay {2} any number of times. When this creature enters the battlefield, create that many tokens that are copies of it.)\nFlying, vigilance\nMiracle {1}{W} (You may cast this card for its miracle cost when you draw it if it's the first card you drew this turn.)
|
||||||
Reference in New Issue
Block a user