Commit graph

3998 commits

Author SHA1 Message Date
Oleg Agafonov
fc159728c7 version bump 2025-02-01 20:16:27 +04:00
Oleg Agafonov
a0a19a6a20 tests: added test for #13002 2025-01-29 01:05:00 +04:00
Oleg Agafonov
36309206a2 Create copy effects - fixed that it can't copy second side of the modal double-faced card (close #11307, close #13269); 2025-01-29 00:51:34 +04:00
Marco Romano
0bcf5f9e03
[DSK] Implement Unable to Scream (#13234)
* Introduced LoseAllAbilitiesAttachedEffect

* Added unit tests for Unable to Scream
2025-01-19 16:09:57 -05:00
Oleg Agafonov
1f7af53dbb tests: added more strictly checks for choice commands order (related to #12044); 2025-01-16 17:26:44 +04:00
Oleg Agafonov
34af53879a Do if cost pay improved:
* added additional hint to the optional pay dialog, so user can split it and remember for auto-answer (see withChooseHint);
* Mana Vault - improved UX, now user can hide an untap cost dialog for already untapped permanent (use right click on buttons, #2656);
2025-01-16 14:14:16 +04:00
Oleg Agafonov
c82511f96f tests: added more strictly checks for choice commands order, fixed wrong commands in old tests (related to #12044); 2025-01-16 08:14:28 +04:00
Marco Romano
b58fbbdd84
[DSK] Implement Acrobatic Cheerleader and per-game trigger limits (#13232) 2025-01-15 18:28:30 +04:00
Oleg Agafonov
39872e2625 AI: fixed that computer can cheat with target selection and choose 1 creature instead multiple required (example: sacrifice, close #13219) 2025-01-12 14:46:16 +04: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
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
Marco Romano
30dac5cc9f
[DSK] Implement Nowhere to Run (#13208)
* [DSK] implemented Nowhere to Run

* [DSK] implemented Nowhere to Run

* NowhereToRun - fixed typo in static test

* NowhereToRun - fixed hexproof effect
2025-01-09 15:07:13 -05:00
xenohedron
9c5c394c75
refactor: TargetCreatureOrPlayer inheritance (#13199)
* update TargetCreatureOrPlayer to be a subclass of TargetPermanentOrPlayer

closes #11161

* fix usages
2025-01-08 22:47:36 -05:00
Oleg Agafonov
0c8d49ce56 merge fix 2025-01-07 20:05:27 +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
Shashakar
7f7a6d6b83
Fixed interaction between Bello and Ashaya (#13196)
Co-authored-by: Dexton Armstrong <djarmstrong@verisk.com>
2025-01-02 20:03:19 -05:00
Oleg Agafonov
bd1f6a4ca7 tests: enabled test after #13182 2024-12-31 22:17:56 +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
aef220a19b tests: added progress bar with all running games in load tests, added error on non-started local server 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
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
138788659a AI, combat: fixed that computer safely blocks the weakest creature instead most powerfull 2024-12-23 01:54:04 +04:00
AlexKidd29
5928c84026
refactor: fixed wrong packge for RadCounterTriggerTest (#13162) 2024-12-19 01:55:21 +04:00
Cameron Merkel
73b63d14ad
TargetAmount refactors (#13128)
* Add minimum and maximum target counts as parameters for TargetAmount and its subclasses; update/add several rules comments (and one actual text) for clarity; remove unused imports

* Get amount+description from target instead of parameters for DistributeCountersEffect and DamageMultiEffect; additions to TargetImpl.getDescription to accommodate

* Create separate method to check if "any number" phrasing should be used, override it in TargetAmount

* Check instanceof TargetAmount before casting

* Add new constructors to chain off of for TargetCreaturePermanentAmount & TargetCreatureOrPlaneswalkerAmount

* Fix text for Storm the Seedcore

* Use Integer.MAX_VALUE instead of 0 to represent no maximum targets

* Add comment about getUseAnyNumber()

* Use amount-only constructors in some TargetAmount subclasses, add clarifying documentation

* Fix a few calls

* Require more specific filters
2024-12-17 19:23:18 -05:00
Grath
bd1f802f46 Fix DeckValidatorTest. 2024-12-16 13:48:37 -05:00
Oleg Agafonov
2955535927 tests: added tests for auto-lands suggestion in deck editor and tourney (related to #13127) 2024-12-16 21:50:27 +04:00
Oleg Agafonov
4bce1e0a9a When you cast this spell - fixed that it required double cost for cards with alternative costs like Evoke (example: Nulldrifter, #12843) 2024-12-14 21:47:55 +04:00
Oleg Agafonov
38b54beb54 tests: added Grand Abolisher tests for #13099 2024-12-14 18:49:34 +04:00
Oleg Agafonov
12220a7ada tests: added batch event tests for #13089 2024-12-14 18:25:54 +04:00
Oleg Agafonov
ea0b0915a5 Triggered abilities - fixed that sacrice trigger doesn't work on itself (related to #13089, regression from #13088) 2024-12-14 16:59:20 +04:00
Oleg Agafonov
b855434a24 refactor: fixed dies events support in single cards (part 8, related to #13089, continue from #13088); 2024-12-14 15:48:32 +04:00
Oleg Agafonov
a970dc46c7 Havengul Laboratory // Havengul Mystery - fixed that it doesn't transform back on creature leaves 2024-12-14 09:12:25 +04:00
PurpleCrowbar
b559ed6a63 [FDN] Implement Quilled Greatwurm 2024-12-13 19:03:45 +00:00
xenohedron
24687eb4af implement [CLB] Hezrou 2024-12-08 20:27:17 -05:00
Oleg Agafonov
9816ec7c26 tests: added wrong commands order check 2024-12-07 22:40:33 +04:00
Oleg Agafonov
8af7a492c8 refactor: fixed dies events support in single cards (part 7, related to #13089, continue from #13088); 2024-12-07 14:39:52 +04:00
Oleg Agafonov
c6bec887b9 Triggered abilities - fixed that it can trigger from hand or library (related to #13089, regression from #13088) 2024-12-01 15:28:30 +04:00
Oleg Agafonov
b1f914bbf4 version bump 2024-11-30 22:42:47 +04:00
Oleg Agafonov
57ef74da90 Recover abilities - fixed that it doesn't ask to pay a cost on multiple triggers; 2024-11-30 04:23:36 +04:00
Oleg Agafonov
6d55e4b9e6 refactor: fixed dies events support in single cards (part 5); 2024-11-30 04:23:35 +04:00
Oleg Agafonov
740a9347ae refactor: removed some usages of short LKI, moved static ability's useable zone logic to basic ability implementation; 2024-11-30 04:23:23 +04:00
Oleg Agafonov
0689c56597 refactor: fixed dies events support in single cards (part 4); 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 11ed19295f.

* Revert "add a verify check"

This reverts commit e7de47a656.

* 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
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
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
Oleg Agafonov
c0e027f4f4 Verrak, Warped Sengir - improved combo support with phyrexian style effects like K'rrik, Son of Yawgmoth (closes #10119) 2024-10-27 14:57:53 +04:00
xenohedron
8a8773971d
refactor: add new simpler technique for intervening if conditions on triggered abilities (#13037)
too many usages to fix all at once, plus condition text needs updating, but this will give a cleaner option for new implementations
2024-10-27 00:19:57 -04:00