Commit graph

2334 commits

Author SHA1 Message Date
theelk801
86c4b85973 [DFT] Implement Draconautics Engineer 2025-01-26 20:05:47 -05:00
Grath
9172a9eba8 [DRC] Implement On Wings of Gold. 2025-01-24 14:23:10 -05:00
theelk801
334655014d [DFT] Implement Country Roads 2025-01-24 12:38:08 -05:00
theelk801
4b5bf3e1de [DFT] Implement Cloudspire Captain 2025-01-24 12:25:50 -05:00
PurpleCrowbar
e399e233d7 [DSC] Implement Rendmaw, Creaking Nest 2025-01-18 01:30:37 +00:00
PurpleCrowbar
1e9c171441 [BLC] Implement Fisher's Talent 2025-01-17 18:58:00 +00:00
Oleg Agafonov
0505f5159e Turn under control reworked:
- game: added support when a human is take control over a computer player (related to #12878);
 - game: fixed game freezes while controlling player leaves/disconnect on active priority/choose of another player;
2025-01-10 20:20:11 +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
jackd149
fd4b82696b
[DSK] Implement Kaito, Bane of Nightmares (#13187) 2025-01-02 20:03:51 -05:00
Cameron Merkel
48117b9620
[DSC] Implement Phenomenon Investigators (#13184) 2025-01-02 20:03:35 -05:00
Oleg Agafonov
7a1d22d459 merge fix 2024-12-31 22:33:10 +04:00
Oleg Agafonov
b2279a8e9c tests: added many use cases for must be blocked, must blocking and menace effects (related to #13182) 2024-12-31 22:12:42 +04:00
Oleg Agafonov
23a414e074 refactor, combat: improved declare blockers code, added docs, added additional runtime checks for AI, added debug info 2024-12-31 22:08:13 +04:00
Oleg Agafonov
60112c6be5 test framework: added commands to check declared attackers and blockers creatures (useful for AI tests, see checkAttackers and checkBlockers) 2024-12-31 22:08:13 +04:00
Grath
6b9532febd
[refactor/bugfix] use rule 802.2a where appropriate. (#13179)
* [refactor/bugfix] use rule 802.2a where appropriate.

Many effects which relied on getDefendingPlayerId would fail if the attacking creature had been removed from combat before they resolved, in which case the defending player ID would be null. This fixes these issues.

* Add test for removing attacking creature with Defending Player triggered ability.

Change allowFormer to be true by default, reduce falses to only necessary cases.
2024-12-25 14:18:01 -05:00
Grath
8de9fb03a4
Break deadlock for one must/can't be blocked pair. (#13182)
Handle the case where a 'must be blocked if able' creature is attacking but there aren't enough available creatures to block it.
2024-12-25 14:17:40 -05:00
Oleg Agafonov
f4572faf8b AI, combat: fixed that computer blocking an attacker by biggest creature instead optimal;
refactor: fixed that Defiant Vanguard depends on debug data;
2024-12-25 18:43:26 +04:00
Oleg Agafonov
2949444089 refactor: removed useless code on ChoiceCreatureType usage, removed possibly infinite code (game freezes) (related to #13106); 2024-12-05 01:03:13 +04:00
xenohedron
d2e7d100ee adjust start of extra turn log message 2024-12-02 20:22:21 -05:00
Oleg Agafonov
d49ff89a81 refactor: shared logic for diff implementation of isInUseableZone, improved docs and readability; 2024-11-30 04:23:45 +04:00
Oleg Agafonov
52ebba4cd1 refactor: removed outdated code 2024-11-30 04:23:23 +04:00
Oleg Agafonov
fdbc5d6409 docs: added additional notes for 616, related to #13062 2024-11-30 04:23:21 +04:00
Oleg Agafonov
66b338c6fc dies triggers improves:
* tests: added additional tests and verify/runtime checks for wrong die trigger settings;
* refactor: removed some usage of short LKI ;
* fixed dies events support in "or trigger" and "conditional trigger" (use cases like sacrifice cost);
* fixed dies events support in shared triggered abilities (use cases like sacrifice cost);
2024-11-30 04:23:21 +04:00
xenohedron
d6cf207a8b
Introduce new batch event for life lost for a specific player (#13071)
* Introduce new batch event for life lost for a specific player

closes #12202, fix #10805

* implement [DSC] Valgavoth, Harrower of Souls

* text fixes
2024-11-19 23:41:34 -05:00
xenohedron
d06d594934
rework batch events (#13066)
* add new framework for batch triggers

apply for tapped, untapped, sacrificed, milled

simplify Ob Nixilis, Captive Kingpin

* add a verify check

* fix mistakes

* add simple tests

* another test

* zone change - enters battlefield

* zone change: not battlefield

* zone change - leaves battlefield

* fix Kaya Spirit's Justice

* rename OneOrMoreCombatDamagePlayerTriggeredAbility

* refactor OneOrMoreDamagePlayerTriggeredAbility

* new YoureDealtDamageTriggeredAbility

* new OpponentDealtNoncombatDamageTriggeredAbility

* rework Risona, Asari Commander

* simplify War Elemental

* Add damage batch by source

rework some delayed triggered abilities

* fix Mindblade Render

* rework Initiative and a few others

* [temp] initiative test

* refactor: common style for DealsDamageSourceTriggeredAbility

* refactor cards to use common DealsDamageSourceTriggeredAbility

* update damage players batch triggers

* fix mistake in initiative

* new DealtDamageAnyTriggeredAbility

* new DealtCombatDamageToSourceTriggeredAbility

* update dealt damage to permanent batch triggered abilities

* refactor Hot Soup and param in DealtDamageAttachedTriggeredAbility

* a few more permanent batch triggered abilities

* fix mistake

* update some more damage batch triggers

* add test for Phyrexian Negator

* update Felix Five-Boots and enable test

update Wayta, Trainer Prodigy to align

* update damage batch by source triggers

* undo mistaken change

* fix verify

* cleanup unused methods

* Revert "[temp] initiative test"

This reverts commit 11ed19295fb4f54f5e0870acd4d3d515b54761f1.

* Revert "add a verify check"

This reverts commit e7de47a6562f13c127fdc4c29a7735a08f8da9ea.

* fixes from checking text discrepancies

* fix Shriekwood Devourer

* merge fix

---------

Co-authored-by: Susucre <34709007+Susucre@users.noreply.github.com>
2024-11-19 21:23:08 -05:00
theelk801
10f03d0d12 [DSC] Implement Formless Genesis 2024-11-18 19:23:45 -05:00
xenohedron
0e1fa94a11 refactor: SimpleActivatedAbility default zone (cards X Y Z, emblems, tokens) 2024-11-16 23:04:53 -05:00
xenohedron
ca6d0302b7 refactor: SimpleStaticAbility default zone (separate line) 2024-11-16 23:04:53 -05:00
xenohedron
39512d75ac refactor: SimpleStaticAbility default zone (before newline) 2024-11-16 23:04:53 -05:00
xenohedron
994c97e86a refactor: SimpleStaticAbility default zone (tokens, emblems, etc.) 2024-11-16 23:04:53 -05:00
theelk801
659fadba96 [J25] Implement Ozox, the Clattering King 2024-11-12 12:15:25 -05:00
ciaccona007
a387c5ed67 [FDN] Implement Kiora, the Rising Tide 2024-11-04 09:01:24 -05:00
xenohedron
a98ff3867c various text fixes 2024-11-03 21:49:03 -05:00
ciaccona007
a5d2338c5a [FDN] Implement Kaito, Cunning Infiltrator 2024-11-03 18:48:48 -05:00
theelk801
ca91c976c4 [FDN] Implement Guarded Heir 2024-10-31 12:26:02 -04:00
theelk801
0e4730ca20 [J25] Implement Cynette, Jelly Drover 2024-10-30 16:05:03 -04:00
theelk801
482fbf0d0c [FDN] Implement Herald of Eternal Dawn 2024-10-28 15:30:52 -04:00
xenohedron
5b0eba7068
refactor: end step triggered abilities (#13047)
* simplify BeginningOfEndStepTriggeredAbility

* more simplifications

* move to common class

* find and replace to common class

* simplify again

* align parameter order

* package reorg

* simplify BeginningOfCombatTriggeredAbility constructors

* simplify BeginningOfFirstMainTriggeredAbility constructors

* text fixes

* update docs
2024-10-28 01:49:11 -04:00
xenohedron
587a68a837
refactor: simplify BeginningOfUpkeepTriggeredAbility (#13046)
* remove superfluous zone.battlefield

* remove redundant TargetController.YOU

* remove unneeded param

* simpler constructor with default optional false

* move to inheritance structure

remove setTargetPointer

* adjust

* align trigger phrase text

* add comments, fix param

* fix params and text

* fix params to fix text

* simplify

* package reorg
2024-10-28 00:15:59 -04:00
xenohedron
eee0fee79e
refactor: common logic for "at..." triggered abilities (#13045)
* add new common framework for at step triggered abilities

* move postcombat main and second main triggers to it

* update draw step triggers

* refactor BeginningOfCombatTriggeredAbility

* refactor BeginningOfFirstMainTriggeredAbility

* move Pronoun to constants package

* cleanup some cards to use simpler constructors

* package reorganization
2024-10-27 21:03:40 -04:00
xenohedron
fb71ce8c85
refactor: SourcePermanentPowerValue to enum (#13040)
* refactor: standard enum style for SourcePermanentToughnessValue

* refactor SourcePermanentPowerCount to enum SourcePermanentPowerValue

add comments on usage of NOT_NEGATIVE vs ALLOW_NEGATIVE
2024-10-27 00:19:38 -04:00
xenohedron
001f9e866f
refactor: PlayFromGraveyardControllerEffect (#13032)
* refactor PlayFromGraveyardControllerEffect for broader usage

* AbandonedSarcophagus to common class

* refactor Player::canPlayCardsFromGraveyard to AsThough common class

* a few more refactors
2024-10-26 16:20:16 -04:00
Oleg Agafonov
a9bdf2eb18 test framework: improved aiXXX commands support:
- added more options for priority control (play single priority, play multiple priorities until stack resolved);
- added more options for step control (play single step, play multiple steps);
- improved compatibility with AI and real time commands (now check commands can be called inside AI controlled steps);
- added tests for assign non-blocked damage;
2024-10-26 11:55:19 +04:00
Oleg Agafonov
1ec277631f GUI, game: added card popup support in choose target amount dialogs (example: damage distribution, related to #9827) 2024-10-24 16:30:17 +04:00
Evan Kranzler
1484e3b575
Rework "second main phase" abilities (#12970)
* replace all instances of "postcombat main phase" with "second main phase" minus exceptions

* second main trigger now works correctly

* add survival test

* additional text fixes
2024-10-18 23:03:43 -04:00
Oleg Agafonov
a16215caed tests: removed and restricted empty commands for choices and targets, improved empty name usages in tests (use EmptyNames.xxx.getTestCommand and EmptyNames.xxx.getObjectName for face down objects) 2024-10-16 15:19:46 +04:00
Oleg Agafonov
2fa07c8ecc GUI, game: added default card hint to see day/night and next turn transform conditions (use player panel to see that hints, related to #8414) 2024-10-06 13:23:55 +04:00
Grath
49bce836f9 Change Duration.UntilTheNextEndStep to statically end during the beginning of EndStep. 2024-09-30 22:08:58 -04:00
Oleg Agafonov
701bd68d97 tests: added test for LKI from copied spell (related to Swan Song fix from #12883) 2024-09-25 09:55:19 +04:00