Commit graph

216 commits

Author SHA1 Message Date
theelk801
d3b0531777 [TLA] Implement Solstice Revelations 2025-10-29 15:59:43 -04:00
Steven Knipe
60be7070d6 Mass rename getSourceObjectZoneChangeCounter to getStackMomentSourceZCC, un-deprecate and change comment 2025-08-26 01:15:04 -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
xenohedron
24f030fa71
fix #13523 (trigger on becomes the target of recast spell) (#13740)
move findTargetingStackObject from CardUtil to Game, so saved data can be cleared with short living lki

add test cases
2025-06-14 00:09:40 -04:00
theelk801
58b5bb76f9 various text fixes 2025-06-13 13:44:33 -04:00
theelk801
fe4d6d3197 [BLB] various text fixes 2025-06-02 16:30:11 -04:00
Susucre
a445142d39 fix and test Font of Agonies
fixes #13717
2025-06-01 22:52:31 +02:00
theelk801
1ab9eeaad8 [J25] various text fixes 2025-06-01 10:29:05 -04:00
Oleg Agafonov
8d7bd60061 Player under control - fixed that it doesn't hide opponent's hand after control lost (part of #13353); 2025-06-01 10:21:47 +04:00
theelk801
a27302654c [FIC] more text fixes 2025-05-31 09:51:19 -04:00
Evan Kranzler
9e2a1a59e0
[FIC] Implement G'raha Tia, Scion Reborn, rework DoIfCostPaid and "do only once" effects (#13660)
* rework effects with DoIfCostPaid and "do this only once each turn"

* [FIC] Implement G'raha Tia, Scion Reborn

* [FIC] Implement Emet Selch of the Third Seat

* rework Emet-Selch

* add test

* add static methods to handle whether ability was used this turn
2025-05-30 21:28:11 -04:00
theelk801
f2b97b6102 [FIN] Implement Vaan, Street Thief 2025-05-29 09:46:18 -04:00
xenohedron
535543860f refactor: introduce new helper method
to find permanent from card after moved to battlefield
2025-05-26 17:20:02 -04:00
theelk801
563e7fb712 [DSC] Implement Demonic Covenant 2025-04-30 10:16:07 -04:00
theelk801
46aa2a043d [ACR] Implement Havi, the All-Father 2025-04-23 09:55:01 -04:00
xenohedron
74d2265c12
refactor: find targeting stack object (#13534)
* refactor: simplify finding targeting stack object
related to #11185, 8e1805c

* clarify docs

---------

Co-authored-by: xenohedron <12538125+xenohedron@users.noreply.github.com>
2025-04-14 10:19:57 -05:00
theelk801
1ace958057 [TDC] Implement Broodcaller Scourge 2025-04-11 12:19:45 -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
theelk801
bc120a34c7 [DFT] various text fixes 2025-02-08 16:42:10 -05:00
Grath
4dbce1132c Fix typo in method name. 2025-01-30 13:33:06 -05:00
Oleg Agafonov
1f1d1088a1 Turn under control reworked:
- game: fixed game freezes when computer try to take control over another computer or human (added game logs, related to #12878);
 - cheats: improved take and give control commands, now you can give control under yourself to another player;
 - cheats: improved take and give control commands, now you can return control to computer in the same priority;
 - cheats: deleted useless and unused command to activate opponent's ability;
2025-01-11 22:21:58 +04:00
Oleg Agafonov
5626c5f932 cheats: added default commands to take and remove control over another player (related to #12878) 2025-01-07 19:47:25 +04:00
Oleg Agafonov
c076f4925f Turn under control reworked:
- game: added support for human games (cards like Emrakul, the Promised End, #12878);
 - game: added support of 720.1. to reset control in the turn beginning instead cleanup step (related to #12115);
 - game: added game logs for priorities in cleanup step;
 - game: fixed game freezes and wrong skip settings usages (related to #12878);
 - gui: added playable and choose-able marks for controlling player's cards and permanents, including switched hands;
 - gui: added controlling player name in all choice dialogs;
 - info: control of computer players is it not yet supported;
2025-01-07 12:38:01 +04:00
Oleg Agafonov
c265e640bb Keen-Eyed Curator - fixed not working boost effect (#13022) 2024-10-24 22:18:29 +04:00
Grath
e5a351ff58
[DSC] Implement The Lord of Pain. (#12940)
Also adds "their" to the text that CardUtil.addArticle supports and fixes a range of influence bug in SpellCastAllTriggeredAbility.
2024-09-29 13:12:31 -04:00
xenohedron
2f9ba6dba9
fix "any number of targets with total value X or less" (#12808)
* improve UX for Call of the Death-Dweller

* add new utility methods for targets of total value limit

* fix affected cards to use new standard methods

* adjust message

* remove incorrect check

* requested adjustments
2024-09-09 00:18:29 -04:00
theelk801
64774b457f [DSK] Implement Zimone, All-Questioning 2024-08-31 21:48:40 -04:00
Oleg Agafonov
2bf6e3e3a2 GUI: added mana and other symbols support in choose spell dialog (closes #12155) 2024-07-27 10:17:22 +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
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
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
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
8a4a23bb8f game: improved cost tags to support card hints on stack (example: evidence, fixes #12522); 2024-06-25 18:25:08 +04:00
Oleg Agafonov
e7b8eecd64 Evidence abilities - added improved card hint with available evidence to collect 2024-06-25 10:30:50 +04:00
xenohedron
fc21365847
Fix "becomes the target of" logic to check all modes (#12452)
* check all targets from all modes for getTargetingStackObject

* update logic related to a97dec3
2024-06-11 00:58:12 -04:00
xenohedron
f2d6629313 text fixes 2024-06-06 23:05:44 -04:00
Oleg Agafonov
0e39d6a833 images: fixed miss token image in some use cases (if it was created from a card and a set contains multiple images); 2024-05-26 12:56:03 +04:00
Susucre
0e64a326c6 implement [MH3] Kami of Jealous Thirst 2024-05-25 15:40:35 +02:00
Oleg Agafonov
36d54bc7a9 cheats: improved card commands to support names like ED-E, Lonesome Eyebot (related to #12238) 2024-05-09 11:43:37 +04:00
Susucre
36d6547bf8
Modal double-faced cards - fixed game error on usage with some replacement effects (example: Diluvian Primordial, closes #12176) (#12184) 2024-04-25 23:40:57 +04:00
xenohedron
fc3551fc0a text improvements 2024-04-17 20:54:05 -04:00
Susucre
c77634c843
separate 'you may play'|'you may cast' AsThoughtEffect approuvers
Also, reworked Gonti, Lord of Luxury and checks it now works properly with Zoetic Cavern.
2024-04-13 12:10:53 +02:00
xenohedron
8bf75ed000 text fixes 2024-04-11 00:34:19 -04:00
Susucre
d1de8b8cd3
[OTJ] Implement Tinybones, the Pickpocket + refactor MayCastTargetThenExileEffect (#12040) 2024-04-05 00:16:53 +02:00
Susucre
97ab8074b3
[OTJ] Implement Plot mechanic (+8 cards) (#12017)
[OTJ] Implement Aloe Alchemist
[OTJ] Implement Aven Interrupter
[OTJ] Implement Longhorn Shapshooter
[OTJ] Implement Kellan Joins Up
[OTJ] Implement Make Your Own Luck
[OTJ] Implement Jace Reawakened
[OTJ] Implement Lilah, Undefeated Slickshot
[OTJ] Implement Doc Aurlock, Grizzled Genius
2024-03-31 17:06:55 +02:00
xenohedron
cb28fb5a56
Refactor batch events (#11995)
* create new abstract class for batch event framework

* adjust CardUtil.getEventTargets to support new framework

* update TappedBatchEvent to new framework

* update UntappedBatchEvent to new framework

* slight cleanup

* update LifeLostBatchEvent to new framework

* update ZoneChangeBatchEvent to new framework

* complete refactor by moving damage events to new framework

* remove old code no longer used

* clean up some nonsense code in star wars card

* fix watcher checking id before event type

* fix wrong id usage

* fix missed wrong id usage
2024-03-28 23:19:20 -04:00
Oleg Agafonov
55f1d36695 game: improved visible rules of face down cards, removed visible face up cost (part of #10653, #11884) 2024-03-01 16:47:59 +04:00