mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
PIP: vats.txt and support (#4195)
* PIP: vats.txt and support * add SpellAbility.canTarget logic for targets with equal toughness
This commit is contained in:
@@ -2,7 +2,7 @@ Name:Atomwheel Acrobats
|
||||
ManaCost:3 G
|
||||
Types:Creature Elf Performer
|
||||
PT:3/2
|
||||
T:Mode$ RolledDie | TriggerZones$ Battlefield | Execute$ TrigPutCounter | ValidResult$ 1,2 | TriggerDescription$ Whenever you roll a 1 or 2, put that many +1/+1 counters on CARDNAME.
|
||||
T:Mode$ RolledDie | TriggerZones$ Battlefield | Execute$ TrigPutCounter | ValidResult$ 1,2 | ValidPlayer$ You | TriggerDescription$ Whenever you roll a 1 or 2, put that many +1/+1 counters on CARDNAME.
|
||||
SVar:TrigPutCounter:DB$ PutCounter | CounterType$ P1P1 | CounterNum$ X
|
||||
SVar:X:TriggerCount$Result
|
||||
A:AB$ RollDice | Cost$ 2 G | AILogic$ AtOppEOT | SpellDescription$ Roll a six-sided die.
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
Name:Mr. House, President and CEO
|
||||
ManaCost:R W B
|
||||
Types:Legendary Artifact Creature Human
|
||||
PT:0/4
|
||||
T:Mode$ RolledDie | TriggerZones$ Battlefield | Execute$ TrigBranch | ValidPlayer$ You | ValidResult$ GE4 | TriggerDescription$ Whenever you roll a 4 or higher, create a 3/3 colorless Robot artifact creature token. If you rolled 6 or higher, instead create that token and a Treasure token.
|
||||
SVar:TrigBranch:DB$ Branch | BranchConditionSVar$ TriggerCount$Result | BranchConditionSVarCompare$ GE6 | TrueSubAbility$ Tokens | FalseSubAbility$ Token
|
||||
SVar:Token:DB$ Token | TokenScript$ c_3_3_a_robot
|
||||
SVar:Tokens:DB$ Token | TokenScript$ c_3_3_a_robot,c_a_treasure_sac
|
||||
A:AB$ RollDice | Cost$ 4 T | Amount$ Count$TotalManaSpent Treasure/Plus.1 | StackDescription$ SpellDescription | SpellDescription$ Roll a six-sided die plus an additional six-sided die for each mana from Treasures spent to activate this ability.
|
||||
DeckHas:Ability$Token|Sacrifice & Type$Artifact|Robot|Treasure
|
||||
Oracle:Whenever you roll a 4 or higher, create a 3/3 colorless Robot artifact creature token. If you rolled 6 or higher, instead create that token and a Treasure token.\n{4}, {T}: Roll a six-sided die plus an additional six-sided die for each mana from Treasures spent to activate this ability.
|
||||
6
forge-gui/res/cardsfolder/upcoming/vats.txt
Normal file
6
forge-gui/res/cardsfolder/upcoming/vats.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
Name:V.A.T.S.
|
||||
ManaCost:2 B B
|
||||
Types:Instant
|
||||
K:Split second
|
||||
A:SP$ Destroy | TargetMin$ 0 | TargetMax$ Count$Valid Creature | ValidTgts$ Creature | TgtPrompt$ Choose any number of target creatures with equal toughness | TargetsWithEqualToughness$ True | SpellDescription$ Choose any number of target creatures with equal toughness. Destroy the chosen creatures.
|
||||
Oracle:Split second (As long as this spell is on the stack, players can't cast spells or activate abilities that aren't mana abilities.)\nChoose any number of target creatures with equal toughness. Destroy the chosen creatures.
|
||||
5
forge-gui/res/tokenscripts/c_3_3_a_robot.txt
Normal file
5
forge-gui/res/tokenscripts/c_3_3_a_robot.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
Name:Robot Token
|
||||
ManaCost:no cost
|
||||
PT:3/3
|
||||
Types:Artifact Creature Robot
|
||||
Oracle:
|
||||
@@ -256,6 +256,22 @@ public final class InputSelectTargets extends InputSyncronizedBase {
|
||||
}
|
||||
}
|
||||
|
||||
// If all cards must have equal toughness
|
||||
if (tgt.isEqualToughness()) {
|
||||
final List<Integer> tgtTs = new ArrayList<>();
|
||||
for (final GameObject o : targets) {
|
||||
if (o instanceof Card) {
|
||||
final Integer cmc = ((Card) o).getCurrentToughness();
|
||||
tgtTs.add(cmc);
|
||||
}
|
||||
}
|
||||
if (!tgtTs.isEmpty() && !tgtTs.contains(card.getCurrentToughness())) {
|
||||
showMessage(sa.getHostCard() + " - Cannot target this card (must have equal toughness)");
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// If all cards must have different mana values
|
||||
if (tgt.isDifferentCMC()) {
|
||||
final List<Integer> targetedCMCs = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user