mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Put ForColor for Call of the Spirit Dragons (#7348)
* Support for Call the Spirit Dragons * ~ better ChoiceTitle * ~ add AI flags
This commit is contained in:
@@ -7,6 +7,7 @@ import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
import forge.card.MagicColor;
|
||||
import forge.game.Game;
|
||||
import forge.game.GameEntity;
|
||||
import forge.game.GameEntityCounterTable;
|
||||
@@ -618,6 +619,23 @@ public class CountersPutEffect extends SpellAbilityEffect {
|
||||
for (String k : keywords) {
|
||||
resolvePerType(sa, placer, CounterType.getType(k), counterAmount, table, false);
|
||||
}
|
||||
} else if (sa.hasParam("ForColor")) {
|
||||
Iterable<String> oldColors = card.getChosenColors();
|
||||
CounterType counterType = null;
|
||||
try {
|
||||
counterType = chooseTypeFromList(sa, sa.getParam("CounterType"), null, placer.getController());
|
||||
} catch (Exception e) {
|
||||
System.out.println("Counter type doesn't match, nor does an SVar exist with the type name.");
|
||||
return;
|
||||
}
|
||||
for (String color : MagicColor.Constant.ONLY_COLORS) {
|
||||
card.setChosenColors(Lists.newArrayList(color));
|
||||
if (sa.getOriginalParam("ChoiceTitle") != null) {
|
||||
sa.getMapParams().put("ChoiceTitle", sa.getOriginalParam("ChoiceTitle").replace("chosenColor", color));
|
||||
}
|
||||
resolvePerType(sa, placer, counterType, counterAmount, table, true);
|
||||
}
|
||||
card.setChosenColors(Lists.newArrayList(oldColors));
|
||||
} else {
|
||||
CounterType counterType = null;
|
||||
if (!sa.hasParam("EachExistingCounter") && !sa.hasParam("EachFromSource")
|
||||
|
||||
15
forge-gui/res/cardsfolder/c/call_the_spirit_dragons.txt
Normal file
15
forge-gui/res/cardsfolder/c/call_the_spirit_dragons.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
Name:Call the Spirit Dragons
|
||||
ManaCost:W U B R G
|
||||
Types:Enchantment
|
||||
S:Mode$ Continuous | Affected$ Dragon.YouCtrl | AddKeyword$ Indestructible | Description$ Dragons you control have indestructible.
|
||||
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ PutCounter | TriggerDescription$ At the beginning of your upkeep, for each color, put a +1/+1 counter on a Dragon you control of that color. If you put +1/+1 counters on five Dragons this way, you win the game.
|
||||
SVar:PutCounter:DB$ PutCounter | Choices$ Dragon.ChosenColor+YouCtrl | ChoiceTitle$ Choose a Dragon for chosenColor | CounterType$ P1P1 | CounterNum$ 1 | RememberPut$ True | ForColor$ True | SubAbility$ WinGame
|
||||
SVar:WinGame:DB$ WinsGame | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ5 | SubAbility$ DBCleanup | SpellDescription$ If you put +1/+1 counters on five Dragons this way, you win the game.
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||
SVar:X:Count$RememberedSize
|
||||
DeckNeeds:Type$Dragon
|
||||
DeckHas:Ability$Counters
|
||||
AI:RemoveDeck:Random
|
||||
SVar:NeedsToPlay:Creature.Dragon+YouCtrl
|
||||
Oracle:Dragons you control have indestructible.\nAt the beginning of your upkeep, for each color, put a +1/+1 counter on a Dragon you control of that color. If you put +1/+1 counters on five Dragons this way, you win the game.
|
||||
|
||||
Reference in New Issue
Block a user