Commit graph

3549 commits

Author SHA1 Message Date
xenohedron
4977fea307
Merge pull request #11417 from ssk97/TagTracking3_KeywordAbilities
Costs Tag Tracking part 3: Most keyword abilities
2023-11-20 21:28:40 -05:00
xenohedron
d328a30d9d add another saga test 2023-11-20 21:26:20 -05:00
xenohedron
8ad53750ee fix ability text in test 2023-11-19 21:48:45 -05:00
Oleg Agafonov
571711e67d tests: added multiple tests for ring emblem and ring-bearer effects (related to #11425) 2023-11-19 19:12:07 +04:00
ssk97
38adbb4ae5
[UNF] "Name Sticker" Goblin, [WHO] Coward // Killer, [WHO] Thijarian Witness (#11392)
* Add [WHO] Coward // Killer

* Add MTGO version of [UNF] "Name Sticker" Goblin

* Implement [WHO] Thijarian Witness

* Add NameStickerGoblinTest

* Fix Thijarian Witness, add tests (may need additional tests). Also adds a simple toString for MageObjectReference

* Don't spam the java garbage collector, add another test

* Replace non-ASCII characters in card text

* improve MOR toString

* Thijarian Witness fixed better, add AttackingBlockingWatcher in common

* cleanup from xenohedron's review

* Fix test, add warning not to use AttackingBlockingWatcher for static effects

* rename AttackingBlockingWatcher to AttackingBlockingDelayedWatcher to make it more obvious how it should be used, minor documentation changes
Simplify and rename Thijarian Witness Predicate

* add null checks
2023-11-19 00:38:21 -05:00
xenohedron
2457255130 add test for Tiller Engine 2023-11-19 00:03:09 -05:00
xenohedron
67d9127027 add test for Banewasp Affliction 2023-11-19 00:03:09 -05:00
Oleg Agafonov
4f081c0918 Merge fix 2023-11-18 15:36:55 +04:00
Oleg Agafonov
2bbe2b3c43 GUI - new card hints window features:
* new help window can be opened from a player panel;
* it collect and show all visible game hints from all players and all zones;
* it updates in real time on game update;
* allows to customize visible data;
* allows to open multiple windows (current limit is 5 windows, can be slow to render);
* allows to minimize opened windows;
* workable card popup on mouse move over card name or card id;
* filter modes:
  * all - show hints from all players;
  * player - show hints from single player;
* group mode:
  * by hints - show same hints as one with all used cards;
  * by cards - show full cards list with own hints;
* search mode:
  * allows to filter card hints by player name, card name, card id or card hint;
  * allows to search multiple words (equals to "or")
* current limitation:
  * card popup shows a card instead a real object, e.g. miss card hints in it (relelated to game logs problem);
  * unsupport of emblems, dungeons and other non card objects from a command zone;
  * unsupport of revealed and library's top cards;

GUI - player's panel improves:
* added hints helper button;
* added player hithlight as possible target in choose dialogs;
* improved player name button in small mode;
* fixed wrong height in small mode;

Other fixes:
* game logs: added card popup support for logs with custom object name;
2023-11-18 14:48:25 +04:00
Steven Knipe
79f8601e26 Minor test improvements 2023-11-17 23:20:35 -08:00
ssk97
ca80849249
game: fixed "if mana was spent to cast" abilities after leaves (#11419)
* ManaWasSpentCondition should use MageObjectReferences
2023-11-17 12:02:47 +04:00
Steven Knipe
193a19104c Improved Altered Ego rules documentation 2023-11-16 23:35:09 -08:00
Tirth Bharatiya
44b8a0faf4
refactor: improved code to increase readability. (#11418)
Moved the cardViewEquals method from CardPanelRenderModeMTGO to CardView
Decomposed conditional to increase readability.
Changed the variable/constant names to increase the readability.
2023-11-17 10:47:53 +04:00
Steven Knipe
177f72c8d8 Altered ego X value should be separate 2023-11-16 18:21:02 -08:00
Steven Knipe
18600a53a9 Add new/Enable existing tests 2023-11-16 18:09:02 -08:00
ssk97
bea33c7493
Costs Tag Tracking part 2: Tag system and X values, reworked deep copy code (#11406)
* Implement Costs Tag Map system

* Use Costs Tag Map system to store X value for spells, abilities, and resolving permanents

* Store Bestow without target's tags
Change functions for getting tags and storing the tags of a new permanent

* Create and use deep copy function in CardUtil, add Copyable<T> to many classes

* Fix Hall Of the Bandit Lord infinite loop

* Add additional comments

* Don't store null/empty costs tags maps (saves memory)

* Fix two more Watchers with Ability variable

* Add check for exact collection types during deep copy

* Use generics instead of pure type erasure during deep copy

* convert more code to using deep copy helper, everything use Object copier, add EnumMap

* fix documentation

* Don't need the separate null checks anymore (handled in deepCopyObject)

* Minor cleanup
2023-11-16 23:12:32 +04:00
ssk97
ec4c79e0e0
Fix copying subabilities to no longer duplicate them (#11399)
* Fix Subability copy bug (fix #10526 )

* Cards which copy abilities of other cards should not copy subabilities.

* Enable previously-failing tests

* Find more addAbility that should be done without subabilities

* Add documentation to addAbility function

* Add warning about not using basic addAbility when copying from a source

* Invert withSubabilities to fromExistingObject
2023-11-12 19:57:39 -05:00
xenohedron
933d694b08 implement [LCI] Market Gnome 2023-11-09 21:42:57 -05:00
xenohedron
af05e6f940 add test coverage 2023-11-09 19:53:30 -05:00
Oleg Agafonov
d6c858ecaf performance: added day/night performance test for transform ability (disabled by default, see DayNightTest, related to #11285), added day/night rules ref 2023-11-07 01:25:15 +04:00
Oleg Agafonov
089ff267a7 tests: added additional check for Karn Liberated (related to #11081) 2023-11-06 12:11:59 +04:00
Oleg Agafonov
dfbd6627e5 game: fixed miss watchers from second side of transformable cards (closes #11329); 2023-11-06 10:40:05 +04:00
Jeff Wadsworth
af8e790522 Adjusted a test to cast detrimental "forked" spells onto an opponents creatures instead of it own. 2023-11-05 20:45:04 -06:00
xenohedron
e8b94d566a add test for #11385 2023-11-03 20:52:36 -04:00
Susucre
bab07a421d
[LCI] Implement Starving Revenant (#11378) 2023-11-02 15:17:30 +01:00
Susucre
3d8e6b34af fix Temple of Power NPE on emblem dealing damage 2023-11-02 15:17:09 +01:00
Oleg Agafonov
5b49fa4cc2 choose mode improves:
- fixed broken cards with once per turn choose (example: Galadriel, Light of Valinor, closes #11362);
- fixed cheat to skip required mode by cancel button (example: Black Market Connections, closes #11149, closes #10611);
- fixed empty modes list if nothing available to choose;
- improved compatibility with max modes and other modification effects;
- fixed that non-valid modes can be selected in some use cases;
2023-11-02 17:57:55 +04:00
Oleg Agafonov
a5e74fd79d Merge fix 2023-11-02 13:15:35 +04:00
xenohedron
5275c87a41 implement [LCI] Twists and Turns
expand explore tests
2023-11-01 23:28:07 -04:00
Evan Kranzler
595955a3cc
Add finality counters (#11379)
* [LCI] Implement Soulcoil Viper

* add finality counter test

* fix bug, add extra test

* [LCI] Implement Uchbenbak, the Great Mistake
2023-11-01 22:08:57 -04:00
Susucre
dded050668
add tests for Scry & Surveil (#11380)
tests using StrictChooseMode are now more strict, with 3 more overriden methods.
2023-11-02 02:55:48 +01:00
Alexander Novotny
87921494b8
Improve trigger auto ordering and aura attachment (Lynde QOL fixes) (#10648)
* Lynde trigger references objects

* Changed triggered ability auto-order to care about targets

* Copy card test

* When a copy effect comes in as a copy of an aura,
it checks if it's already attached before asking player to attach

* add comments and null check per review

---------

Co-authored-by: xenohedron <xenohedron@users.noreply.github.com>
2023-11-01 21:40:04 -04:00
Susucre
bc335b949b [LCI] Implement Curator of Sun's Creation 2023-11-01 20:12:49 +01:00
Oleg Agafonov
3abdb72910
dev: improved code coverage (jacoco) and static analyser (sonar) support (#11367):
* fixed code coverage data lost on failed tests;
* fixed code coverage report duplication and improved performance;
* fixed that sonar analyser can't see code coverage for some modules;
* added new aggregation module: Mage.Reports (used for code coverage report generation);
* reorganized pom and added additional instructions for jacoco and sonar usage;
2023-10-30 09:19:12 +04:00
Susucre
0c485ec593
[LCI] Implement The Millennium Calendar (#11359)
new UNTAPPED_BATCH event.
2023-10-29 12:43:24 +01:00
xenohedron
f820aec0ac add tests for moving counters 2023-10-28 19:07:02 -04:00
xenohedron
e335023cd6 fix #11349 (You Cannot Pass!) 2023-10-28 17:16:37 -04:00
xenohedron
ad66b91642 fix #11353 (InvestigateTargetEffect)
add some test cases
2023-10-28 16:54:27 -04:00
xenohedron
9733786e5d add GameEvent.EventType.EXPLORE
add tests for explore multiple times
2023-10-28 14:43:25 -04:00
Oleg Agafonov
b7ce9c80f0 refactor: improved ability's modes code (related to #11333) 2023-10-28 15:46:03 +04:00
Evan Kranzler
bc4aa6931f
Ready for review: Implement Craft mechanic (#11352)
* [LCI] Implement Spring-Loaded Sawblades / Bladewheel Chariot

* [LCI] Implement Sunbird Standard / Sunbird Effigy

* card filter needs to have an owner predicate

* [LCI] Implement Throne of the Grim Captain / The Grim Captain

* make default constructor for craft with artifact

* dedupe some code

* refactor constructors for simplicity

* add currently failing test
2023-10-27 22:32:11 -04:00
Susucre
27b8d3e198
[LCI] Implement Deeproot Pilgrimage (#11350) 2023-10-26 18:06:10 +02:00
xenohedron
c8b3754c6f add test for Storage Matrix 2023-10-26 01:31:17 -04:00
xenohedron
0d4f004049 add tests for Explore ability 2023-10-26 01:31:17 -04:00
Aquid
5b845ef7e4
[40K] Implement Anrakyr the Traveller (#11160)
---------

Co-authored-by: gravitybone <7361357+gravitybone@users.noreply.github.com>
Co-authored-by: Aquid <Aquid117@users.noreply.github.com>
2023-10-24 19:03:44 -04:00
ssk97
5e3c0764a5
Adds two tests on Transform+card changing effects (#11334)
* Adds two tests on interactions between card-changing effects and Transform. One works, the other currently fails.

* add check that moonmist flip worked
2023-10-24 19:03:05 -04:00
Susucre
5c4261b865 [MIR] Implement Spatial Binding 2023-10-22 16:19:10 +02:00
Susucre
f0a398f4e8 [WTH] Implement Ertai's Familiar 2023-10-22 16:07:29 +02:00
Susucre
5996cfbce2
[MIR] Implement Teferi's Imp (#11326) 2023-10-22 14:34:45 +02:00
Susucre
284ef8a01a
undo changes to great henge. fix cost reduction for nexus. (#11330) 2023-10-21 16:02:13 +02:00