Skip to content

Commit 107c31c

Browse files
authored
ECL cards, 6th January, batch 1 (Card-Forge#9422)
1 parent b7fcbf6 commit 107c31c

21 files changed

+164
-33
lines changed

forge-ai/src/main/java/forge/ai/ability/EffectAi.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -544,10 +544,8 @@ protected boolean cantRegenerateCheckStack(Card host) {
544544
if (subAbility.getTargets().contains(host)) {
545545
return true;
546546
}
547-
} else {
548-
if (AbilityUtils.getDefinedObjects(subAbility.getHostCard(), subAbility.getParam("Defined"), subAbility).contains(host)) {
549-
return true;
550-
}
547+
} else if (AbilityUtils.getDefinedObjects(subAbility.getHostCard(), subAbility.getParam("Defined"), subAbility).contains(host)) {
548+
return true;
551549
}
552550

553551
if (CardUtil.getRadiance(subAbility).contains(host)) {
@@ -603,10 +601,8 @@ protected boolean cantRegenerateCheckStack(Card host) {
603601
if (subAbility.getTargets().contains(host)) {
604602
targeting = true;
605603
}
606-
} else {
607-
if (AbilityUtils.getDefinedObjects(subAbility.getHostCard(), subAbility.getParam("Defined"), subAbility).contains(host)) {
608-
targeting = true;
609-
}
604+
} else if (AbilityUtils.getDefinedObjects(subAbility.getHostCard(), subAbility.getParam("Defined"), subAbility).contains(host)) {
605+
targeting = true;
610606
}
611607

612608
for (Card source : definedSources) {

forge-game/src/main/java/forge/game/ability/effects/CountersPutEffect.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,8 @@ protected void resolvePerType(SpellAbility sa, Player placer, CounterType counte
304304
options = options.replace(ct.getName(), "");
305305
}
306306
for (CounterType ct : typesToAdd) {
307-
if (obj instanceof Player) {
308-
((Player) obj).addCounter(ct, counterAmount, placer, table);
307+
if (obj instanceof Player p) {
308+
p.addCounter(ct, counterAmount, placer, table);
309309
}
310310
if (obj instanceof Card) {
311311
if (etbcounter) {
@@ -367,8 +367,8 @@ protected void resolvePerType(SpellAbility sa, Player placer, CounterType counte
367367
counterAmount = remaining;
368368
}
369369
}
370-
if (obj instanceof Player) {
371-
((Player) obj).addCounter(ct, counterAmount, placer, table);
370+
if (obj instanceof Player p) {
371+
p.addCounter(ct, counterAmount, placer, table);
372372
}
373373
if (obj instanceof Card) {
374374
if (etbcounter) {
@@ -393,8 +393,8 @@ protected void resolvePerType(SpellAbility sa, Player placer, CounterType counte
393393

394394
if (eachExistingCounter) {
395395
for (CounterType ct : choices) {
396-
if (obj instanceof Player) {
397-
((Player) obj).addCounter(ct, counterAmount, placer, table);
396+
if (obj instanceof Player p) {
397+
p.addCounter(ct, counterAmount, placer, table);
398398
}
399399
if (obj instanceof Card) {
400400
gameCard.addCounter(ct, counterAmount, placer, table);
@@ -600,8 +600,7 @@ public void resolve(SpellAbility sa) {
600600
counterMapValue = Integer.valueOf(sa.getParam("CounterMapValues"));
601601
}
602602
@SuppressWarnings("unchecked")
603-
Map<CounterType, Integer> counterMap = (Map<CounterType, Integer>) sa
604-
.getTriggeringObject(AbilityKey.CounterMap);
603+
Map<CounterType, Integer> counterMap = (Map<CounterType, Integer>) sa.getTriggeringObject(AbilityKey.CounterMap);
605604
for (Map.Entry<CounterType, Integer> e : counterMap.entrySet()) {
606605
resolvePerType(sa, placer, e.getKey(), counterMapValue == null ? e.getValue() : counterMapValue, table, false);
607606
}

forge-game/src/main/java/forge/game/ability/effects/ManaEffect.java

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,10 @@ public void resolve(SpellAbility sa) {
6868

6969
if (abMana.isComboMana()) {
7070
int amount = sa.hasParam("Amount") ? AbilityUtils.calculateAmount(host, sa.getParam("Amount"), sa) : 1;
71-
if (amount <= 0)
71+
int each = sa.hasParam("Each") ? AbilityUtils.calculateAmount(host, sa.getParam("Each"), sa) : 1;
72+
if (amount <= 0 || each <= 0) {
7273
continue;
74+
}
7375

7476
String combo = abMana.getComboColors(sa);
7577
if (combo.isBlank()) {
@@ -84,7 +86,7 @@ public void resolve(SpellAbility sa) {
8486
final StringBuilder choiceString = new StringBuilder();
8587
final StringBuilder choiceSymbols = new StringBuilder();
8688
// Use specifyManaCombo if possible
87-
if (colorsNeeded == null && amount > 1 && !sa.hasParam("TwoEach")) {
89+
if (colorsNeeded == null && amount > 1 && !sa.hasParam("Each")) {
8890
Map<Byte, Integer> choices = chooser.getController().specifyManaCombo(sa, colorOptions, amount, differentChoice);
8991
for (Map.Entry<Byte, Integer> e : choices.entrySet()) {
9092
Byte chosenColor = e.getKey();
@@ -123,14 +125,15 @@ public void resolve(SpellAbility sa) {
123125
choice = MagicColor.toShortString(chosenColor);
124126
}
125127

126-
if (nMana > 0) {
127-
choiceString.append(" ");
128-
}
129-
choiceString.append(choice);
130-
choiceSymbols.append(MagicColor.toSymbol(choice));
131-
if (sa.hasParam("TwoEach")) {
132-
choiceString.append(" ").append(choice);
133-
choiceSymbols.append(MagicColor.toSymbol(choice));
128+
String symbol = MagicColor.toSymbol(choice);
129+
int count = each;
130+
while (count > 0) {
131+
if (choiceString.length() > 0) {
132+
choiceString.append(" ");
133+
}
134+
choiceString.append(choice);
135+
choiceSymbols.append(symbol);
136+
--count;
134137
}
135138
}
136139
}
@@ -148,13 +151,12 @@ else if (abMana.isAnyMana()) {
148151

149152
String colorsNeeded = abMana.getExpressChoice();
150153

151-
ColorSet colorMenu = null;
152154
byte mask = 0;
153155
//loop through colors to make menu
154156
for (int nChar = 0; nChar < colorsNeeded.length(); nChar++) {
155157
mask |= MagicColor.fromName(colorsNeeded.charAt(nChar));
156158
}
157-
colorMenu = mask == 0 ? ColorSet.WUBRG : ColorSet.fromMask(mask);
159+
ColorSet colorMenu = mask == 0 ? ColorSet.WUBRG : ColorSet.fromMask(mask);
158160
byte val = chooser.getController().chooseColor(Localizer.getInstance().getMessage("lblSelectManaProduce"), sa, colorMenu);
159161
if (0 == val) {
160162
throw new RuntimeException("ManaEffect::resolve() /*any mana*/ - " + p + " color mana choice is empty for " + host.getName());

forge-gui/res/cardsfolder/n/nexos.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ ManaCost:1 G
33
Types:Creature Human Tyranid Advisor
44
PT:2/2
55
S:Mode$ Continuous | Affected$ Land.Basic+YouCtrl | AddAbility$ Mana | Description$ Strategic Coordinator — Basic lands you control have "{T}: Add {C}{C}. Spend this mana only on costs that contain {X}."
6-
SVar:Mana:AB$ Mana | Cost$ T | Produced$ Any | Produced$ C | Amount$ 2 | RestrictValid$ CostContainsX | SpellDescription$ Add {C}{C}. Spend this mana only on costs that contain {X}.
6+
SVar:Mana:AB$ Mana | Cost$ T | Produced$ C | Amount$ 2 | RestrictValid$ CostContainsX | SpellDescription$ Add {C}{C}. Spend this mana only on costs that contain {X}.
77
AI:RemoveDeck:Random
88
Oracle:Strategic Coordinator — Basic lands you control have "{T}: Add {C}{C}. Spend this mana only on costs that contain {X}."

forge-gui/res/cardsfolder/o/open_the_omenpaths.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Name:Open the Omenpaths
22
ManaCost:2 R
33
Types:Instant
44
A:SP$ Charm | Choices$ Mana,Pump
5-
SVar:Mana:DB$ Mana | Amount$ 2 | TwoEach$ True | Produced$ Combo AnyDifferent | RestrictValid$ Spell.Creature,Spell.Enchantment | SpellDescription$ Add two mana of any one color and two mana of any other color. Spend this mana only to cast creature or enchantment spells.
5+
SVar:Mana:DB$ Mana | Amount$ 2 | Each$ 2 | Produced$ Combo AnyDifferent | RestrictValid$ Spell.Creature,Spell.Enchantment | SpellDescription$ Add two mana of any one color and two mana of any other color. Spend this mana only to cast creature or enchantment spells.
66
SVar:Pump:DB$ PumpAll | NumAtt$ +1 | ValidCards$ Creature.YouCtrl | SpellDescription$ Creatures you control get +1/+0 until end of turn.
77
DeckHints:Type$Enchantment|Creature
88
Oracle:Choose one —\n• Add two mana of any one color and two mana of any other color. Spend this mana only to cast creature or enchantment spells.\n• Creatures you control get +1/+0 until end of turn.

forge-gui/res/cardsfolder/s/sygg_wanderwine_wisdom_sygg_wanderbrine_shield.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Name:Sygg, Wanderwine Wisdom
22
ManaCost:1 U
33
Types:Legendary Creature Merfolk Wizard
44
PT:2/2
5-
S:Mode$ CantBlockBy | ValidAttacker$ Creature.Self | Description$ CARDNAME can't be blocked.
5+
S:Mode$ CantBlockBy | ValidAttacker$ Creature.Self | Description$ NICKNAME can't be blocked.
66
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigAnimate | TriggerDescription$ Whenever this creature enters or transforms into CARDNAME, target creature gains "Whenever this creature deals combat damage to a player or planeswalker, draw a card" until end of turn.
77
T:Mode$ Transformed | ValidCard$ Card.Self | Execute$ TrigAnimate | Secondary$ True | TriggerDescription$ Whenever this creature enters or transforms into CARDNAME, target creature gains "Whenever this creature deals combat damage to a player or planeswalker, draw a card" until end of turn.
88
SVar:TrigAnimate:DB$ Animate | ValidTgts$ Creature | Triggers$ DamageTrig
@@ -20,7 +20,7 @@ ManaCost:no cost
2020
Colors:white
2121
Types:Legendary Creature Merfolk Rogue
2222
PT:2/2
23-
S:Mode$ CantBlockBy | ValidAttacker$ Creature.Self | Description$ CARDNAME can't be blocked.
23+
S:Mode$ CantBlockBy | ValidAttacker$ Creature.Self | Description$ NICKNAME can't be blocked.
2424
T:Mode$ Transformed | ValidCard$ Card.Self | Execute$ TrigProt | TriggerDescription$ Whenever this creature transforms into CARDNAME, target creature you control gains protection from each color until your next turn.
2525
SVar:TrigProt:DB$ Pump | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature you control | KW$ Protection from each color | Duration$ UntilYourNextTurn
2626
T:Mode$ Phase | Phase$ Main1 | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigTransform | TriggerDescription$ At the beginning of your first main phase, you may pay {U}. If you do, transform NICKNAME.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Name:Aurora Awakener
2+
ManaCost:6 G
3+
Types:Creature Giant Druid
4+
PT:7/7
5+
K:Trample
6+
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDigUntil | TriggerDescription$ Vivid — When this creature enters, reveal cards from the top of your library until you reveal X permanent cards, where X is the number of colors among permanents you control. Put any number of those permanents onto the battlefield, then put the rest of the revealed cards on the bottom of your libray in a random order.
7+
SVar:TrigDigUntil:DB$ DigUntil | Amount$ X | Valid$ Permanent | ValidDescription$ permanent | RevealedDestination$ Library | OptionalFoundMove$ True | RevealedLibraryPosition$ -1 | FoundDestination$ Battlefield | RevealRandomOrder$ True
8+
SVar:X:Count$Valid Permanent.YouCtrl$Colors
9+
Oracle:Trample\nVivid — When this creature enters, reveal cards from the top of your library until you reveal X permanent cards, where X is the number of colors among permanents you control. Put any number of those permanents onto the battlefield, then put the rest of the revealed cards on the bottom of your libray in a random order.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Name:Bloodline Bidding
2+
ManaCost:6 B B
3+
Types:Sorcery
4+
K:Convoke
5+
A:SP$ ChooseType | Defined$ You | Type$ Creature | SubAbility$ DBChangeZoneAll | AILogic$ MostProminentInComputerGraveyard | SpellDescription$ Choose a creature type. Return all creature cards of the chosen type from your graveyard to the battlefield.
6+
SVar:DBChangeZoneAll:DB$ ChangeZoneAll | ChangeType$ Creature.ChosenType+YouOwn | Origin$ Graveyard | Destination$ Battlefield
7+
Oracle:Convoke (Your creatures can help cast this spell. Each creature you tap while casting this spell pays for {1} or one mana of that creature's color.)\nChoose a creature type. Return all creature cards of the chosen type from your graveyard to the battlefield.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Name:Blossombind
2+
ManaCost:1 U
3+
Types:Enchantment Aura
4+
K:Enchant:Creature
5+
SVar:AttachAILogic:Curse
6+
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigTap | TriggerDescription$ When this Aura enters, tap enchanted creature.
7+
SVar:TrigTap:DB$ Tap | Defined$ Enchanted
8+
R:Event$ Untap | ActiveZones$ Battlefield | ValidCard$ Card.EnchantedBy | Layer$ CantHappen | Description$ Enchanted creature can't become untapped and can't have counters put on it.
9+
S:Mode$ CantPutCounter | ValidCard$ Card.EnchantedBy | Secondary$ True | Description$ Enchanted creature can't become untapped and can't have counters put on it.
10+
Oracle:Enchant creature\nWhen this Aura enters, tap enchanted creature.\nEnchanted creature can't become untapped and can't have counters put on it.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Name:Boggart Cursecrafter
2+
ManaCost:B R
3+
Types:Creature Goblin Warlock
4+
PT:2/3
5+
K:Deathtouch
6+
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Goblin.Other+YouCtrl | Execute$ TrigDamage | TriggerZones$ Battlefield | TriggerDescription$ Whenever another Goblin you control dies, this creature deals 1 damage to each opponent.
7+
SVar:TrigDamage:DB$ DealDamage | Defined$ Opponent | NumDmg$ 1
8+
DeckHints:Type$Goblin
9+
Oracle:Deathtouch\nWhenever another Goblin you control dies, this creature deals 1 damage to each opponent.

0 commit comments

Comments
 (0)