Commit graph

4077 commits

Author SHA1 Message Date
jmlundeen
ca8b02d5ab increase test coverage 2025-08-19 11:26:52 -05:00
jmlundeen
8b636b9926 disable testNahiriSacrificePrevented test
* will enable with #13916
2025-08-17 14:49:39 -05:00
jmlundeen
0651825e6d add test coverage for Jaya, Fiery Negotiator emblem 2025-08-17 12:26:50 -05:00
jmlundeen
b0ee19d782 fix Stalwart Successor checking permanents entering 2025-08-17 12:26:23 -05:00
jmlundeen
c16b3d6056 add tests to increase coverage 2025-08-17 10:59:01 -05:00
jmlundeen
abe8a4356e increase test coverage for sacrifice effects 2025-08-17 09:46:17 -05:00
jmlundeen
985390b7c3 fix Dark Impostor and add test coverage 2025-08-17 09:45:47 -05:00
jmlundeen
b470f0b679 update Urianger Augurelt to support full cost reduction 2025-08-15 15:39:28 -05:00
Oleg Agafonov
bfe218dd05 tests: disabled randomly failed AI test 2025-08-15 08:41:15 +04:00
jmlundeen
ec2c7e6ad6 [TDM] change Mistrise Village effect duration to end of turn and add discard logic
* effect now has end of turn duration and is discarded after resolving the next spell
2025-08-14 13:16:28 -05:00
jmlundeen
05e304e621 [TDM] fix Mistrise Village effect
* Add additional tests and fix effect to only work on next spell cast
* closes #13891
2025-08-13 16:28:25 -05:00
Steven Knipe
84a7e9f5b8 Simplify Transform triggers, fix Wildsong Howler 2025-08-12 23:35:52 -07:00
Oleg Agafonov
8994c8e7aa merge fix 2025-08-10 03:07:30 +04:00
Jmlundeen
574d7f91a5
fix Yasharn, Implacable Earth and Angel of Jubilation (#13753)
* Fix Angel of Jubilation and Yasharn, Implacable Earth

* canPaySacrificeCost filter was not checking if the source ability was a spell or activated ability

* Create common CantPayLifeOrSacrificeEffect

* add some docs for CantPayLifeOrSacrificeEffect

* change player pay life restrictions and remove player sacrifice cost filter

* pay life cost restriction is now an enum set so multiple effects apply together

* sacrifice cost filter was removed and replaced with PAY_SACRIFICE_COST event

* convert CantPayLifeEffect to CantPayLifeOrSacrificeAbility

* Changed to combine life restriction and sacrifice cost restriction

* update bargain ability cost adjustors using canPay

* fix Thran Portal

* Effect was incorrectly adjusting the cost of mana abilities on itself.

* Fixed ability adding type to itself during ETB

* Add additional tests

* update PayLifeCostRestrictions to be mutually exclusive
2025-08-09 18:53:43 -04:00
Oleg Agafonov
2833460e59 AI: improved performance on too many possible targets (fix game freezes and server crashes - see #9539, #9438, #9518, related to #11285, #5023); 2025-08-10 02:16:18 +04:00
Oleg Agafonov
384ce67cc3 refactor: improved search in stack 2025-08-10 02:07:15 +04:00
Correl Roush
925a820f09
Fix Nahiri, Forged in Fury trigger (#13893)
Fixes the trigger firing for all attacking creatures, not just equipped
ones.

Restores the equipped predicate removed in commit db193bd4 (#13707) and
adds tests to prevent future regressions.
2025-08-07 00:38:32 -04:00
Oleg Agafonov
c7a485b728 reworked AI, targeting and targets logic:
- refactor: simplified target implementation from a dozen canTarget, canChoose and possibleTargets methods to canTarget/possibleTargets only (part of #13638, #13766);
- refactor: fixed wrong target implementations in many cards (example: TargetCardInHand for opponent's hand, close #6210);
- AI: now human, AI and test players -- all use possibleTargets logic in most use cases instead filters or custom validation;
- AI: improved AI sims support for multiple targets abilities;
- AI: improved AI stability, freezes and targets errors in some use cases;
2025-08-04 23:56:23 +04:00
Oleg Agafonov
e866707912 test framework improves:
- now game logs will show stack ability on push and on resolve (before any choices);
- now game logs will show used choices made by cast/activate, setChoice, setMode and addTarget commands (not work for AI tests, part of #13832);
- improved choice logic for modes and yes/not dialogs (now it's use a more strictly checks, use TestPlayer.MODE_SKIP to stop mode selection);
- improved error logs and testable dialogs menu in cheat mode;
2025-08-04 23:53:16 +04:00
theelk801
3d1400905b rework DrawNthCardTriggeredAbility, add test (closes #13885) 2025-07-30 10:52:43 -04:00
Evan Kranzler
1700180455
Implement Mayhem mechanic (#13877) 2025-07-27 07:12:11 -04:00
xenohedron
e8cd6dbdad
Fix bugs associated with Foretell ability (#13879)
* add foretell tests

* rework foretell events and watcher

* refactor: not static inner classes

* refactor: move becomes foretold code from Ethereal Valkyrie to ForetellAbility

* add watcher for edge cases

* fix Ethereal Valkyrie to not leak face down card name in log

* fix some access modifiers

* refactor: make copy-pasted code common
2025-07-27 00:26:30 -04:00
Susucre
35e0ca2561 refactor "counter [spell] unless its controller pays [...]. If they do, [effect]"
closes #13861
2025-07-19 17:42:04 +02:00
Steven Knipe
2c91ec65b0 Didn't fix enough, failure was still possible (though incredibly unlikely) 2025-07-19 00:40:50 -07:00
Steven Knipe
5486bb5e00 Fix rare AlaniaDivergentStormTest failure 2025-07-19 00:39:26 -07:00
Evan Kranzler
df70ab7c8a
[Ready for review] Implementing Warp mechanic (#13847)
* add initial warp mechanic implementation

* a few small changes

* add hand restriction

* add void support

* add test

* [EOE] Implement Timeline Culler

* add void test

* [EOE] Implement Close Encounter

* [EOE] Implement Tannuk, Steadfast Second

* a few requested changes

* add comment

* [EOE] Implement Full Bore

* small rewrite

* merge fix

* remove reminder text

* small code rewrite
2025-07-18 21:01:50 -04:00
Susucre
08c729178f add check to Lightstall Inquisitor tests that nonlands are not tapped 2025-07-19 02:20:26 +02:00
Susucre
5c08d310a7 implement [EOE] Lightstall Inquisitor 2025-07-19 02:15:03 +02:00
Susucre
bf7b232861 implement [EOE] Depressurize 2025-07-18 21:00:26 +02:00
Susucre
1a7d8ce397 implement [EOE] Cryoshatter 2025-07-18 18:43:21 +02:00
Susucre
432b5f5559 implement [EOE] Territorial Bruntar 2025-07-18 17:50:13 +02:00
theelk801
61fe216569 add tests for Doctor's companion 2025-07-16 10:20:09 -04:00
theelk801
284ae05e5d add tests for vehicles and spacecraft in commander 2025-07-15 20:53:47 -04:00
theelk801
a672172907 fix test failure 2025-07-14 18:37:13 -04:00
theelk801
ce35717f1f [EOE] Implement Tapestry Warden 2025-07-13 17:05:54 -04:00
theelk801
ff17fb1125 add test for station mechanic 2025-07-13 17:03:42 -04:00
Susucre
ae0e0c873b fix NPE for token copy of Mirror Golem
fixes #13850
2025-07-13 15:42:56 +02:00
Susucre
0dceeb78bd implement [EOE] Kav Landseeker; fix & test Meandering Towershell along the way 2025-07-11 20:40:59 +02:00
Susucre
a0b62d7b63 implement [EOC] Baloth Prime 2025-07-09 21:53:55 +02:00
Susucre
5b58f07196 implement [EOE] Seedship Impact 2025-07-09 21:25:15 +02:00
Susucre
a75a95a7f1 implement [EOE] Sami, Wildcat Captain 2025-07-09 21:13:11 +02:00
Steven Knipe
3bc22b9f9c Fix 'M' cards with card name instead of {this}, fix random test failure in TaigamMasterOpportunistTest 2025-07-07 00:46:33 -07:00
Steven Knipe
57df155a79 Fix cards 'H' to 'L' with card name instead of {this} (plus a couple more split cards), fix ImpelledGiantTest 2025-07-07 00:25:06 -07:00
Oleg Agafonov
e49063228d
Revert "Fix saga first chapter zcc (#13710)"
This reverts commit 19f980c2ce.
2025-07-07 09:51:14 +04:00
ssk97
19f980c2ce
Fix saga first chapter zcc (#13710)
* Enable disabled tests

* Enable zcc Saga fix

* Remove existing zcc hacks
2025-07-06 22:49:51 -07:00
Oleg Agafonov
52180d1393 Added data collectors, AI and testing tools improves:
- dev: added data collectors API to collect and process game data in real time;
- tests: added game logs output in all unit tests (enabled by default);
- tests: added games history storage (decks, game logs, chats - disabled by default);
2025-07-05 21:44:55 +04:00
ssk97
7d7e517084
More target adding, reattach improves (#13807)
* Add Target to Provoke, Soulshift, remove from AttachableToRestrictedAbility

* Add Target to CurseOfInertia, FarrelsMantle, Incendiary, JubilantMascot, MantleOfTheAncients, MuseVessel, SoulSeizer. Fix DreamEater text.

* Fix CardImpl.cantBeAttachedBy to not early return with Protection abilities

* Improve tests
2025-07-01 22:08:27 -07:00
Oleg Agafonov
450f7bd907 AI: fixed game freeze on free cast of multiple cards (part of #13638, #13766);
refactor: fixed that TargetCard doesn't work with Zone.ALL;
2025-06-29 15:24:27 +04:00
Oleg Agafonov
c3a0c731d6 AI, tests: added stability tests to make sure AI simulations can process errors and freezes (part of #13638, #13766); 2025-06-28 22:51:34 +04:00
Oleg Agafonov
f3e18e245f AI: improved target amount targeting (part of #13638, #13766):
- refactor: migrated AI's target amount code to shared selection logic;
- ai: fixed game freezes on some use cases;
- tests: added AI's testable dialogs for target amount;
- tests: improved load tests result table, added game cycles stats;
- Dwarven Catapult - fixed game error on usage;
2025-06-27 01:11:10 +04:00