Commit graph

4057 commits

Author SHA1 Message Date
Oleg Agafonov
d0fd0c4023 tests: added test and todo for Devoted Druid bug (related to #13583) 2025-04-30 07:45:18 +04:00
Oleg Agafonov
4941a0dd8f Tombstone Stairwell - fixed that it doesn't destroy tokens on leaves the battlefield 2025-04-30 06:48:12 +04:00
theelk801
3281f214ab fix test failure 2025-04-28 11:28:17 -04:00
Oleg Agafonov
49c28458ec Can block any number of creatures - fixed that it can be broken with some of "can block an additional creature" effects 2025-04-27 23:34:58 +04:00
Oleg Agafonov
db9bdc05c2 GUI, game: fixed that attacking creature draws a wrong colored arrow after blocked creature removed (must be gray, close #11894) 2025-04-26 00:07:41 +04:00
jmlundeen
b2d8c12ca3 Fix Sigurd, Jarl of Ravensthorpe last ability trigger
* Didn't trigger on entering sagas
* Was checking for P1P1 counters
2025-04-24 10:58:10 -05:00
Oleg Agafonov
0b4dbaabba Ketramose, the New Dawn - fixed that it doesn't trigger on itself (miss setLeavesTheBattlefieldTrigger, related to eafbd5a95c) 2025-04-23 05:38:14 +04:00
jmlundeen
eafbd5a95c Fix Ketramose not seeing itself get exiled 2025-04-22 18:41:18 -05:00
xenohedron
0e63c0a75a refactor: fix name of test class 2025-04-16 20:58:38 -04:00
xenohedron
9e55771b1f add test for "becomes blocked" ability 2025-04-16 20:30:25 -04:00
jmlundeen
b32fd1b9d7 Rename Universes Within cards
Update test referencing Forge, Neverwinter Charlatan

[STX] Implement Bohn, Beguiling Balladeer

[STX] Implement Casal, Lurkwood Pathfinder

[STX] Implement Themberchaud

[STX] Implement Jurin, Leading the Charge

[STX] Implement Evin, Waterdeep Opportunist

[STX] Implement Mathise, Surge Channeler

[STX] Implement Rashel, Fist of Torm
2025-04-15 06:56:26 -05:00
earchip94
9261c1362e
implement [DSK] Osseous Sticktwister (#13421)
---------

Co-authored-by: xenohedron <12538125+xenohedron@users.noreply.github.com>
2025-04-14 01:36:42 -04:00
earchip94
187703a1fc
implement [BLB] Clement, the Worrywort (#13444)
---------

Co-authored-by: xenohedron <12538125+xenohedron@users.noreply.github.com>
2025-04-13 20:56:54 -04:00
jmlundeen
5cf0d8ad10 [TDM] Implement Hundred-Battle Veteran 2025-04-11 09:23:31 -05:00
jmlundeen
089d8c1be0 [TDM] Implement Mistrise Village 2025-04-11 09:23:26 -05:00
Oleg Agafonov
b819545744 bump version 2025-04-11 17:50:12 +04:00
Jmlundeen
1b06813997
Reworked Suspend ability: (#13527)
* Updated Delay and Gandalf Of The Secret Fire to get the main card since they target spells

* Suspend now properly lets you play either side of mdfc and spell parts from adventure/omen cards utilizing CardUtil.castSpellWithAttributesForFree method

* Removed extra code in SuspendPlayCardEffect since the referenced bug for Epochrasite does not seem to appear. Removed related gainedTemporary variable also.

* Added tests for Omen and Suspend With Taigam, Master Opportunists as well as an Epochrasite test for recasting after suspend.
2025-04-11 15:22:13 +04:00
Evan Kranzler
4d8028adb9
[TDM] Implement harmonize mechanic (#13475)
* add initial ability

* remove skip list

* update harmonize ability

* add reminder text

* remove skip list

* add harmonize test

* update tests

* create base class for flashback-like abilities
2025-04-10 13:39:21 -04:00
Oleg Agafonov
0b4c9d90b7 merge fix 2025-04-10 12:57:49 +04:00
Oleg Agafonov
dcdf0ca4a5 Choose a player at random - fixed that it wrongly choose same player (example: Scrambleverse, close #12679, close #13526);
Inniaz, the Gale Force - fixed that it wrongly choose left/right player (close #13526);
2025-04-10 12:42:42 +04:00
Jmlundeen
0848382dcd
[TDM] Implement Dragonfire Blade (#13522)
* [TDM] Implement Dragonfire Blade
2025-04-09 13:15:59 -05:00
jmlundeen
178bd22025 [TDM] Implement Host of the Hereafter 2025-04-09 13:12:29 -05:00
Evan Kranzler
56a05a7843
Rework implementation of anchor words (#13518)
* refactor anchor word implementation

* fix error

* [TDM] Implement Windcrag Siege
2025-04-09 13:24:57 -04:00
Oleg Agafonov
0a1bf47434 AI: fixed game freeze on cards with combat triggers (close #13342) 2025-04-09 02:21:29 +04:00
Oleg Agafonov
6cf1f4af3d refactor: improved Aladdin's Lamp 2025-04-08 23:02:49 +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
Jmlundeen
0df5f17603
[TDM] Implement omen mechanic (#13501)
* Abstract AdventureCard to SingleFaceSplitCard

* Fix AdventureCardSpellImpl

* Finish converting adventure card and adventure spell

* Update Brightcap Badger

change finalize call to adventure card

* Update Darksteel Monolith

being cast from hand condition referencing AdventureCardSpell

* Update Tlincalli Hunter

exiled creature condition referencing AdventureCardSpell

* Update Twice Upon a Time

finalizeAdventure called from Adventure card

* Finish abstracting Adventure

missed some more references to adventure cards

* Implement Omen cards

* Implement Dirgur Island Dragon

* Missed some adventureSpellName references

* OmenCardSpell had wrong comma symbol

* Add tests for Omen Cards

* Rename two part card components

change from SingleFaceSplitCard to CardWithSpellOption

* Update comments and variable name
2025-04-08 08:54:18 -04:00
jmlundeen
8e1805c874 Fix Ward batch event bug
Fixes #13498

getTargetingStackObject wasn't processing all stackObjects in a batch event

added tests for some related cards that also use the method
- Agrus Kos, Eternal Soldier
- Pawpatch Recruit
- Ward Ability
2025-04-05 07:47:24 -05:00
ssk97
969ffa1c98
FDN New Combat Rules (#13279)
* Remove all combat ordering code

* Use MultiAmount division for damage

* Remove damage selection division skipping in tests

* Fix Banding, Multi-block, add tests

* Fix test

* Fix random iteration order, fix new tests

* Add more info to choose dialog, make MultiAmountType class instead of enum

* Don't prompt for trample damage assignment if none possible

* Mark "Assign default damage" on tests, minor other test improvements
2025-03-30 14:42:05 -07:00
xenohedron
c64a56acf7 add test for #13419 2025-03-16 01:09:31 -04:00
xenohedron
fa88a3217d fix #13451 (Nether Traitor), add test 2025-03-16 00:46:11 -04:00
xenohedron
a6b3a20aeb fix Minion of the Wastes multiple replacement (related to f252525c) 2025-03-16 00:17:02 -04:00
xenohedron
8b1b04cd7c add assertion to ninjutsu test 2025-03-16 00:17:02 -04:00
xenohedron
4d1c6def23 fix Mongrel Pack, add test 2025-03-15 18:02:03 -04:00
xenohedron
7b03af3de3 fix #13433 (DoIfCostPaid regression), add test 2025-03-15 17:45:28 -04:00
xenohedron
bf8c8c4e99 fix #13425 (ninjutsu ability), add test 2025-03-15 17:36:46 -04:00
xenohedron
f252525cb8 fix Minion of the Wastes, add test 2025-03-15 16:33:37 -04:00
Grath
a9bffe4d25
Fix missing ProcessAction between the last mana being paid and the spell being cast. (#13396)
This is necessary so that, among other things, the Rain of Riches watcher can see that the last mana of a spell was a Treasure before the spell is cast - at which point it needs to already have Cascade.
2025-03-14 20:45:15 -04:00
Jmlundeen
9aaad5193f
[DFT] Implement Elvish Refueler (#13392) 2025-03-14 07:24:26 +04:00
Grath
419030b681 [NCC] Partially fix Rain of Riches and add tests.
Two tests are failing and ignored because this is only a partial fix, as we will still need to process actions between the last mana being paid and the spell being cast.
2025-02-26 23:12:07 -05:00
Steven Knipe
17e0c82a07 Remove BroodofCockroaches text test (in Verify), uncapitalize CreateDelayedTriggeredAbilityEffect ability rule text 2025-02-20 18:27:17 -08:00
jimga150
2174797c4b
Mu Yanling, Wind Rider - fixed not working second ability (#13361) 2025-02-18 19:57:13 +04:00
Oleg Agafonov
0612431ab2 [PIP] Implement Struggle for Project Purity (part of #11324) 2025-02-08 02:00:43 +04:00
Oleg Agafonov
89be55c816 tests: fixed randomly fail test 2025-02-07 15:13:58 +04:00
Wesley Mauk
b31a6c834a
Shifting Woodland - fixed game error on usage with MDF cards (#13308) 2025-02-07 08:12:30 +04:00
Oleg Agafonov
703d275356 merge fix 2025-02-06 18:01:52 +04:00
Oleg Agafonov
f17cbbe72b AI: improved performance and fixed crashes on use cases with too much target options like "deals 5 damage divided as you choose" (related to #11285):
* added DebugUtil.AI_ENABLE_DEBUG_MODE for better IDE's debugging AI code;
 * it's a target amount optimizations;
 * it's use a grouping of possible targets due same static and dynamic stats (name, abilities, rules, damage, etc);
 * instead of going through all possible combinations, AI uses only meaningful targets from particular groups;
2025-02-06 17:40:22 +04:00
Oleg Agafonov
b4fa6ace66 AI: reworked blockers selections:
* now computer will use simplified 1 vs 1 combat damage simulations to choose better blockers (due better game score after combat);
* it's not a full combat simulation, but support many things like non-stack abilities, damage replacement effects and SBA -- much better than older PT compare (related to #13290);
* now AI correctly use a blockers with deathtouth, indestructible, first/double strike and other abilities;
* chump blocks also supported (chump logic implemented before in 92b7ed8efc, related to #4485);
2025-02-06 07:03:16 +04:00
Oleg Agafonov
7d229e511c tests: added AI performance tests to reproduce bad use cases with too much possible targets 2025-02-05 13:12:22 +04:00
Oleg Agafonov
416beb741c tests: improved load tests (added deck gen from all sets support, added network errors support, e.g. on server crash) 2025-02-05 13:05:37 +04:00