Commit graph

283 commits

Author SHA1 Message Date
xenohedron
50acfad59c remove unnecessary method that missed source param 2025-06-08 00:57:07 -04:00
xenohedron
fdb8fe83af text fixes [MRD] [DST] [5DN] 2025-05-31 22:09:52 -04:00
Susucre
43c45238d0
refactor and test 'greatest [quality] among [permanent filter]' (#13666) 2025-05-25 18:58:53 +02:00
theelk801
029232d274 [FIN] Implement Deadly Embrace 2025-05-14 15:30:56 -04:00
theelk801
0fdd167ba2 [TDC] fix Arbor Adherent counting its own toughness 2025-05-01 18:16:50 -04:00
theelk801
3b959c25b9 fix verify failure 2025-04-10 08:23:18 -04:00
theelk801
2363fd6390 [TDC] Implement Arbor Adherent 2025-04-10 07:44:23 -04:00
theelk801
3c6e055f41 [TDC] Implement Become the Avalanche 2025-04-09 08:36:38 -04:00
Oleg Agafonov
36cec8961e refactor: better naming in CardsInControllerHandCount 2025-04-08 22:42:31 +04:00
Oleg Agafonov
bae3089abb Reworked cost adjuster logic for better support of X and cost modification effects:
Improves:
* refactor: split CostAdjuster logic in multiple parts - prepare X, prepare cost, increase cost, reduce cost;
* refactor: improved VariableManaCost to support min/max values, playable and AI calculations, test framework;
* refactor: improved EarlyTargetCost to support mana costs too (related to #13023);
* refactor: migrated some cards with CostAdjuster and X to EarlyTargetCost (Knollspine Invocation, etc - related to #13023);
* refactor: added shared code for "As an additional cost to cast this spell, discard X creature cards";
* refactor: added shared code for "X is the converted mana cost of the exiled card";
* tests: added dozens tests with cost adjusters;

Bug fixes:
* game: fixed that some cards with CostAdjuster ignore min/max limits for X (allow to choose any X, example: Scorched Earth, Open The Way);
* game: fixed that some cards ask to announce already defined X values (example: Bargaining Table);
* game: fixed that some cards with CostAdjuster do not support combo with other cost modification effects;
* game, gui: fixed missing game logs about predefined X values;
* game, gui: fixed wrong X icon for predefined X values;

Test framework:
* test framework: added X min/max check for wrong values;
* test framework: added X min/max info in miss X value announce;
* test framework: added check to find duplicated effect bugs (see assertNoDuplicatedEffects);

Cards:
* Open The Way - fixed that it allow to choose any X without limits (close #12810);
* Unbound Flourishing - improved combo support for activated abilities with predefined X mana costs like Bargaining Table;
2025-04-08 22:39:10 +04:00
4825764518
8267d7d770
[DRC] Implement Priest of the Crossing (#13394)
* Implement Priest of the Crossing

* Add common dynamic value for "creatures that died under your control this turn"
2025-03-12 22:01:25 -07:00
Oleg Agafonov
b55ad3cdc0
Merge pull request #13373 from Jmlundeen/implement-ketramose
[DFT] Implement Ketramose, the New Dawn
2025-03-11 14:02:43 +03:00
jmlundeen
121ab378e7 Change CardsInExileCondition constructor and toString
change CardsInExileCondition to accept generic DynamicValue
create a toString override to generate rule text
2025-03-08 12:52:39 -06:00
Jmlundeen
158212bbeb
refactor: create common DynamicValue for instant and sorcery spells cast in a turn (#13374) 2025-02-23 00:57:26 +04:00
jmlundeen
b9fa82f602 Replace unnecessary custom hint class with ValueHint 2025-02-22 14:13:08 -06:00
jmlundeen
cbb3012b05 [DFT] Implement Ketramose, the New Dawn and implement exile condition and dynamic value 2025-02-21 21:19:34 -06:00
Oleg Agafonov
25e4930bd5 Number of card types in graveyards - added card hint for cards like Tarmogoyf 2025-02-07 07:37:27 +04:00
theelk801
cf6ba1895a [DFT] Implement Cryptcaller Chariot 2025-02-03 11:35:07 -05:00
Evan Kranzler
ef213b1bef
Implementing "Start your engines!" mechanic (#13259)
* add initial speed handling

* finish speed implementation

* remove skip list

* add initial test

* add some more tests

* change speed initialization to state-based action

* add opponent speed check

* add control change test

* add check for speed 5
2025-02-01 13:49:47 -05:00
Oleg Agafonov
de19bd56cb refactor: fixed copy constructor in some dynamic values 2025-01-25 01:11:35 +04:00
Grath
7bfb0d2dec [DRC] Implement Prophet of the Scarab
Also adds a DynamicValue that finds the largest of multiple DynamicValues.
2025-01-24 15:47:17 -05:00
theelk801
59c1a32697 [DFT] Implement Streaking Oilgorger 2025-01-23 23:07:34 -05:00
xenohedron
d6cf207a8b
Introduce new batch event for life lost for a specific player (#13071)
* Introduce new batch event for life lost for a specific player

closes #12202, fix #10805

* implement [DSC] Valgavoth, Harrower of Souls

* text fixes
2024-11-19 23:41:34 -05:00
xenohedron
fb71ce8c85
refactor: SourcePermanentPowerValue to enum (#13040)
* refactor: standard enum style for SourcePermanentToughnessValue

* refactor SourcePermanentPowerCount to enum SourcePermanentPowerValue

add comments on usage of NOT_NEGATIVE vs ALLOW_NEGATIVE
2024-10-27 00:19:38 -04:00
grimreap124
f42fc0f388
[ACR] Implement The Capitoline Triad (#12510)
* Implement-ACR-The-Capitoline-Triad

---------

Co-authored-by: Grath <1895280+Grath@users.noreply.github.com>
2024-09-07 00:57:36 -04:00
xenohedron
23a8434552 fix Twitching Doll counter type
small refactor to CountersSourceCount for counters of any type
2024-09-06 22:14:41 -04:00
xenohedron
a9250ff28a followup text fixes 2024-09-02 20:17:36 -04:00
grimreap124
9f1031f286
Implement [M3C] Blaster Hulk/Create EnergySpentOrLostThisTurnCount and update Izzet Generatorium (#12426)
* Implement-M3C-Blaster-Hulk

* Update BlasterHulk.java

* Update BlasterHulk to fix number of targets

---------

Co-authored-by: Grath <1895280+Grath@users.noreply.github.com>
2024-09-01 13:40:54 -04:00
ssk97
e8808c3ae3
Remove duplicate code for X costs (#12551)
* Replace "([a-zA-Z]+).getManaCostsToPay().getX()" with CardUtil.getSourceCostsTag(game, $1, "X", 0)
Fix Disrupting Shoal

* Change final card .getX() calls

* Condense all ManacostVariableValue enum values into "instance"

* Further removal of getX, Display X symbol for non-mana X cards

* Fix test

* Fully remove ManaCosts.getX

* Replace all different X dynamic values with GetXValue

* Remove individual cards checking getAmount for X values (leaving cost reduction that does not use X)

* Add null check for game object inside getSourceCostsTagsMap

* fix build errors

* fix Vicious Betrayal

* text fix
2024-07-23 01:57:47 -04:00
ssk97
2daa2b8820
[PIP] and [WHO] card implementations (#12482)
* Last Night Together

* Nanogene Conversion

* Return the Past

* Rose, Cutthroat Raider

* Diamond City

* Fix Apostrophe

* Various fixes

* Replace Diamond City and Celebration Watchers

* LastNightTogether improvements, add hint to ReturnThePast

* Add AttackedThisTurnOpponentsCount hint, ignore new failing Celebration test

* Review fixes, also create ValueConditionHint for value hints with a conditional threshold

* Comments improvements

* Requested changes to make ValueConditionHint extend ConditionHint

* single super call in ValueConditionHint constructor
2024-06-25 23:22:45 -04:00
theelk801
bac4e7b507 (refactor) break out assignment into its own package 2024-06-18 13:44:11 -04:00
grimreap124
1d8be572b5
Implement [M3C] Razorfield Ripper (#12389) 2024-06-06 23:11:38 -04:00
Susucre
24b184c28f refactor SavedGainedLifeValue instead of getValue("gainedLife") 2024-06-04 11:19:14 +02:00
xenohedron
4025b312ad cleanup calls to respect range of influence 2024-06-02 21:28:14 -04:00
grimreap124
48579814f9
implement [MH3] Spymaster's Vault (#12325) 2024-05-31 12:13:20 +02:00
Susucre
20b7a115da
prevent direct access of Player->counters ; some cleanup on counter removal effects ; implement [MH3] Izzet Generatorium (#12314) 2024-05-29 22:34:54 +02:00
Susucre
bcff245a31
rework more Prevention Effects involving counters. Implement [PIP] Bloatfly Swarm (#12205) 2024-05-23 19:48:44 +02:00
Susucre
79165f269c implement [MH3] Sorin of House Markov // Sorin, Ravenous Neonate 2024-05-22 22:18:52 +02:00
Susucre
8002cdf88f implement [MH3] Tamiyo Inquisitive Student // Tamiyo, Seasoned Scholar 2024-05-22 21:43:07 +02:00
xenohedron
398744dfbe add comments to CountersSourceCount for null param usage 2024-05-21 00:57:32 -04:00
ssk97
32bf3eb9bf
Genericize Target Adjusters (#12107)
* Create generic X MV adjuster

* Update XTargetsAdjuster

* Create DynamicValueTargetsAdjuster to replace VerseCounterAdjuster

* Convert XTargetsAdjuster to use DynamicValueTargetsAdjuster

* Genericize MV target adjuster

* Converting custom classes for A and B cards, fix Back in Town to only target creature cards

* Add Power and Toughness target adjusters, C cards

* Set up and use Monstrosity X DynamicValue

* Move Scry amount dynamic value to common, add D and E cards

* Convert F to I cards

* Cards K-M

* N, O cards

* Cards O-R

* S cards (check Scrap Welder)

* Cards T - Z

* Rename target adjusters

* Add filter messages, don't add 0 count targets

* Clear blueprint targets (just in case), fix target names, Temporal Firestorm is not target

* Requested renames

* Aether Burst is "up to"

* Review fixes

* Add new cards, add source to dynamic value calculation
2024-05-03 01:12:52 -04:00
Susucre
6f5eb8788d implement [PIP] HELIOS One 2024-05-02 16:32:41 +02:00
xenohedron
f482eef06a text fixes 2024-05-02 01:24:22 -04:00
Susucre
74adbf222c refactor together experience counter DynamicValue 2024-05-01 21:54:19 +02:00
Susucre
7c3bbed8f3 make batchs for milling cards (per player, all)
Rework and test the couple of existing cards triggering on mill.
2024-05-01 20:55:50 +02:00
Susucre
e62d1c2124 [OTC] Implement Thunderclap Drake 2024-04-09 13:08:10 +02:00
Susucre
b5d0943b9d [OTC] Implement Cactus Preserve 2024-04-06 13:42:23 +02:00
Cameron Merkel
fc5ee90bf8
[MKC] Implement Experiment Twelve, changes to TargetPermanentPowerCount (#11901) 2024-03-04 14:42:04 +04:00
Matthew Wilson
08eb000453
[MKM] Implement Proft's Eidetic Memory (#11779) 2024-02-10 14:52:28 -05:00
xenohedron
264b73355a
refactor: improved targets that find a [type1] card and/or a [type2] card (#11497) 2023-12-01 19:26:30 +04:00