Commit graph

3905 commits

Author SHA1 Message Date
xenohedron
4c069754a6 fix #12657 with common class, add test 2024-08-16 23:12:15 -04:00
xenohedron
fea0c586a9 fix Dracoplasm, add test 2024-08-16 20:12:11 -04:00
Oleg Agafonov
de5de0e103 version bump 2024-08-16 19:35:42 +04:00
xenohedron
f1bf8a7ebd fix intermittent test failure 2024-08-14 22:21:58 -04:00
jimga150
e976920e2d
[BLB] Implement Season of Gathering and Pawprints mechanic (#12617)
* Add skeleton

* Implement Pawprints modal functionality

* Implement Seasons of Gathering

* remove unused imports

* Add Pawprints test

* use withPawPRintValue() instead of setter

* use 0 for non-pawprint mode and modes classes and move mode validation to addMode

* Use GreatestPowerAmongControlledCreaturesValue

* Fix pawprints check

* calcualte sleected pawprint count based on selected modes

* move max pawprints check to getAvailableModes

* fix max pawprints checks
2024-08-14 21:13:09 -04:00
jimga150
d5c76489ac
Implement Splash Portal (#12605)
* Implement Splash Portal

* Add test

* Add an afterEffect to ExileThenReturnTargetEffect for use in Splash Portal

* Modify Essence Flux to use new ExileThenReturnTargetEffect and write test

* use withAfterEffect for ExileThenReturnTargetEffect

* use ConditionalOneShotEffect

* Restrict effects to one shot
2024-08-14 21:12:55 -04:00
jimga150
9a872b4446
Implement [BLB] Alania, Divergent Storm (#12601) 2024-08-14 21:12:28 -04:00
jimga150
5d9efd8bac
[BLC] Implement Rapid Augmenter (#12654) 2024-08-14 21:09:24 -04:00
Oleg Agafonov
7916af0e52 server, refactor: added client side info about current table and parent table (tourney's sub-tables with matches); 2024-08-11 19:29:42 +04:00
xenohedron
b78956d286
text errata updates: various "enters the battlefield" -> "enters" (#12626)
* enters the battlefield, -> enters,

* {this} enters the battlefield -> {this} enters

* EntersBattlefieldAbility

* , it enters

* enters the battlefield under your control -> you control enters

* rework some trigger phrase logic

* fix tests
2024-08-02 18:43:59 -04:00
jimga150
ee3cab84ef
[BLC] Implement Fortune Teller's Talent (#12608)
* Implement Fortune Teller's Talent

* Remove outdated assert from PlayFromTopOfLibraryEffect and update comment
2024-07-31 22:45:59 -04:00
Oleg Agafonov
e1cffbde40 download: reworked connection:
- added shareable code with default proxy, headers and other settings for download tasks like images, symbols, mtgjson, etc;
- use XmageURLConnection.downloadText for text resources
- use XmageURLConnection.downloadBinary for any file resources
- added user agent with app version for all requests;
- added http logs and improved error messages;
2024-07-31 21:25:56 +04:00
Susucre
fa24f8f53b fix tests after 'enters the battlefield' -> 'enters' change 2024-07-30 16:21:23 +02:00
Susucre
c0eab28626
implement [MH3] Primal Prayers ; use choice panel for cast mode choice ; allow some restricted "as thought as it had flash" to work only on matching alternative cast. (#12420) 2024-07-30 15:47:39 +02:00
jimga150
c73cfebcd9
Fix EntersBattlefieldOneOrMoreTriggeredAbility (#12592)
* Apply fix for ZONE_CHANGE_GROUP events making tokens controlled by different players

* Add test

* Remove unused import

* Fix implementation

* Rewrite to use ZONE_CHANGE_BATCH

* Fix OPPONENT case

* Add default case

* refactor to avoid using stream as local variable and use ZoneChangeEvents in filters

* Fix typo
2024-07-30 00:39:01 -04:00
Oleg Agafonov
393dbc4047 Can't be activated effects - fixed that some restricted effects show abilities as playable (example: Sharkey, Tyrant of the Shire and Karakas, fixed #10642) 2024-07-27 15:38:13 +04:00
Oleg Agafonov
521a0f6e32 GUI: introduced default card hints:
* refactor: added helper emblems instead rad counter's inherent emblems (use initGameDefaultHelperEmblems to define new card hints or other fake objects);
* refactor: added card hints support for emblems, planes and other command objects;
* GUI: added storm counter as default card hint (use hints tool to see it, closes #12360);
2024-07-27 09:40:41 +04:00
xenohedron
5cc4901580 fix #12575
add test for AddManaInAnyCombinationEffect

cleanup Grand Warlord Radha, add test

simplify some abilities to common class

remove unused constructors
2024-07-25 01:35:51 -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
78649c1a62
Remove KickerAbility.getSpellKickedCount (#12553)
* Remove KickerAbility.getSpellKickedCount

* Check spell LKI instead of only current spell object

* Remove bad LKI storage under wrong ID
2024-07-22 23:13:48 -04:00
theelk801
05170d0227 [BLB] add test for Jolly Gerbils 2024-07-20 09:44:16 -04:00
Oleg Agafonov
7b2e9b390c GUI: added card hints in choose replacement effect dialog 2024-07-19 00:06:18 +04:00
Oleg Agafonov
bf3f26ccc1 server: database improves:
- fixed broken database in some use cases (example: AI and choose name dialog, related to #11285);
- added docs and debug tools for sql queries, caches and memory analyse (see DebugUtil);
- refactor code to use shared settings;
- deleted outdated and un-used code (db logs, stats, etc);
2024-07-18 21:22:10 +04:00
Evan Kranzler
7fe6ba9c57
Implement "Promise a gift" mechanic (#12578)
* [BLB] Implement Wear Down

* [BLB] Implement Valley Rally

* [BLB] Implement Dawn's Truce

* add initial test

* [BLB] Implement Kitnap

* [BLB] Implement Long River's Pull

* [BLB] Implement Peerless Recycling

* [BLB] Implement Into the Flood Maw

* add more tests

* add verify skip

* remove skip

* a few requested changes

* [BLB] Implement Nocturnal Hunger

* add test for gifting a food token

* [BLB] Implement Starforged Sword

* add comment to activation ket

* add test for adding extra cards
2024-07-18 09:15:45 -04:00
ssk97
96b08ee6bf
Fix effects where the source's controller sacrifices it (#12583)
* Fix effects where the source's controller sacrifices it. Added test. Fixes #12582

* Update Evoke rules text
2024-07-18 00:28:50 -04:00
Evan Kranzler
204f67c5f0
Implement offspring mechanic (#12572)
* implement offspring mechanic

* create offspring test
2024-07-12 23:38:29 -04:00
Susucre
3fdeb8c2fc implement [BLB] Starseer Mentor 2024-07-12 18:18:02 +02:00
Susucre
71fd73cf5d implement [BLB] Muerra, Trash Tactician 2024-07-11 18:22:38 +02:00
Susucre
c36b3959a8 implement and test ExpendTriggeredAbility 2024-07-11 17:57:16 +02:00
Susucre
e8d1befc19 add basic test for Threshold 2024-07-11 16:33:52 +02:00
Susucre
3acab4a76d implement [DSK] Screaming Nemesis 2024-07-06 18:55:53 +02:00
Susucre
9bc1289341 implement [ACR] Senu, Keen-Eyed Protector ; small refactor on AttacksAndIsNotBlockedTriggeredAbility's setTargetPointer 2024-07-06 18:29:53 +02:00
ssk97
7cb669603f
[WHO] Time Reaper, Add target adjuster for "that player controls/owns" damage trigger targets (#12528)
* Implement Time Reaper, start rework

* Create DamagedPlayerControlsTargetAdjuster, convert Aberrant to use it

* Always add targets for EachOpponentPermanentTargetsAdjuster

* Improve target name, finish Time Reaper

* Convert some cards

* Improve documentation, more cards

* More cards, fix cards that needed to use owner instead of controller

* Fix unfinished AlelaCunningConqueror changes

* more cards

* All remaining cards

* Fix target type

* Remove outdated attempt at TargetController.SOURCE_EFFECT_TARGET_POINTER

* Finish removal of SOURCE_EFFECT_TARGET_POINTER

* Change targetAdjuster blueprint target to be set inside setTargetAdjuster, add error checking

* Always add Target Adjuster after Target

* Add comment

* Fix TolarianContemptTest to skip opponent with no valid targets

* Forgot to git add the new abstract GenericTargetAdjuster

* Test now possible after merge, fix missed ChangeOfPlans adjuster order

* Text and optional-ness fixes

* Always set target pointer
2024-07-02 08:46:14 +04:00
Oleg Agafonov
858b0aadde tests: fixed random test fails for Salvation Swan 2024-07-01 16:35:53 +04:00
Oleg Agafonov
1e2d179410 multiple player/opponent choose - fixed that game ask players in random order instead APNAP (closes #12532);
game: fixed wrong player restore for TestPlayer and SimulatedPlayer2;
2024-07-01 13:22:58 +04:00
Susucre
5016a57397 fix and test [CMM] Narci, Fable Singer 2024-06-30 14:50:35 +02:00
Susucre
2709614508 tweak [BLB] Salvation Swan's effect, and add test with Meld. 2024-06-30 13:57:31 +02:00
Susucre
62a99a0497 implement [BLB] Salvation Swan 2024-06-29 18:38:00 +02:00
Susucre
65828866ec implement [BLB] Early Winter 2024-06-29 16:49:13 +02:00
Oleg Agafonov
d7ac82efb3 tests: fixed test with TxtDeckImporterTest 2024-06-28 18:49:07 +04:00
xenohedron
70c11361f0 fix #12530 (Indomitable Might) 2024-06-26 20:54:13 -04:00
Oleg Agafonov
3f5d2bb9b5 Implement [M3C] Gluttonous Hellkite (part of #12206, related to #12393) 2024-06-26 10:18:55 +04:00
Oleg Agafonov
c3903dc550 tests: added support of TargetStackObject (example: counter activated or triggered ability) 2024-06-26 10:18:55 +04:00
xenohedron
2d717f9f36 reduce frequency of random test failure 2024-06-26 00:37:40 -04:00
grimreap124
89738d8675
Implement [ACR] Desmond Miles (#12497) 2024-06-25 23:23:01 -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
ssk97
e367aeae25
fix Tolarian Contempt; add tests (#12523) 2024-06-25 23:22:29 -04:00
grimreap124
a99da54229
Implement [M3C] Aurora Shifter (#12336) 2024-06-25 22:56:15 -04:00
Oleg Agafonov
8a4a23bb8f game: improved cost tags to support card hints on stack (example: evidence, fixes #12522); 2024-06-25 18:25:08 +04:00
ssk97
f53954d56a
implement [MKM] Deadly Cover-Up; refactor to common class (#12500)
* Genericize most variants of SearchTargetGraveyardHandLibraryForCardNameAndExileEffect

* Implement Deadly Cover-Up

* int maxAmount instead of boolean maxFour, use player.chooseTarget

* Fix Surgical Extraction test, use withNotTarget for exile choices

* Add tests, fix MDFC's back sides' names from being matched against
2024-06-24 23:58:57 -04:00