Commit graph

1622 commits

Author SHA1 Message Date
Jmlundeen
69e20b1061
Merge pull request #14061
* move setPT to Card

* Create DoubleFacedCard and DoubleFacedCardHalf to share code between …

* Create Transforming Double Face Card class

* allow putting either permanent side of a double faced card to the bat…

* refactor exile and return transforming card

* update ModalDoubleFacedCard references to DoubleFacedCard where relev…

* update for GUI

* refactor a disturb card

* refactor more disturb cards for test coverage

* refactor a transform card

* refactor more transform cards for test coverage

* fix Archangel Avacyn

* fix cantPlayTDFCBackSide inconsistency

* fix Double Faced Cards having triggers and static abilities when tran…

* fix Double Faced Cards card view erroring when flipping in client

* fix test_Copy_AsSpell_Backside inconsistency

* enable Spider-Man MDFC

* convert TDFC with saga as the front and add card references to Transf…

* refactor More Than Meets the Eye Card

* refactor a battle

* refactor a craft card

* update comment on PeterParkerTest

* Merge branch 'master' into rework-dfc

* fix Saga TDFC Azusa's Many Journeys

* fix double faced cards adding permanent triggers / effects to game

* move permanents entering map into Battlefield

* convert Room cards for new Permanent structure

* fix disturb not exiling

* Merge branch 'master' into rework-dfc

* fix Eddie Brock Power/Toughness

* fix Miles Morales ability on main card

* fix verify conditions for siege and day/night cards

* change room characteristics to text effect to match game rules

* update verify test to skip DoubleFacedCard in missing card test

* accidentally removed transform condition

* Merge branch 'master' into rework-dfc

* fix verify

* CardUtil - remove unnecessary line from castSingle method
2025-11-27 09:24:03 -06:00
theelk801
2799c3f1c0 update ban lists 2025-11-10 11:17:55 -05:00
Grath
3c0593a7fa Update Duel Commander ban list. 2025-10-30 09:37:17 -04:00
theelk801
8375d6b606 rework partner variants, add tests 2025-10-10 13:56:39 -04:00
Oleg Agafonov
4e29f4f241 version bump 2025-10-06 23:53:07 +04:00
Oleg Agafonov
2884c898b3 deck: updated mtgo and paper cubes to the latest version; 2025-10-06 06:29:04 +04:00
theelk801
7c114272d7 [SLD] Implement Ellie, Vengeful Hunter 2025-09-28 19:43:28 -04:00
theelk801
7b131673be [SLD] Implement Atreus, Impulsive Son 2025-09-28 19:39:48 -04:00
Oleg Agafonov
bfe218dd05 tests: disabled randomly failed AI test 2025-08-15 08:41:15 +04:00
Oleg Agafonov
2833460e59 AI: improved performance on too many possible targets (fix game freezes and server crashes - see #9539, #9438, #9518, related to #11285, #5023); 2025-08-10 02:16:18 +04:00
Oleg Agafonov
384ce67cc3 refactor: improved search in stack 2025-08-10 02:07:15 +04:00
Oleg Agafonov
c7a485b728 reworked AI, targeting and targets logic:
- refactor: simplified target implementation from a dozen canTarget, canChoose and possibleTargets methods to canTarget/possibleTargets only (part of #13638, #13766);
- refactor: fixed wrong target implementations in many cards (example: TargetCardInHand for opponent's hand, close #6210);
- AI: now human, AI and test players -- all use possibleTargets logic in most use cases instead filters or custom validation;
- AI: improved AI sims support for multiple targets abilities;
- AI: improved AI stability, freezes and targets errors in some use cases;
2025-08-04 23:56:23 +04:00
Oleg Agafonov
e866707912 test framework improves:
- now game logs will show stack ability on push and on resolve (before any choices);
- now game logs will show used choices made by cast/activate, setChoice, setMode and addTarget commands (not work for AI tests, part of #13832);
- improved choice logic for modes and yes/not dialogs (now it's use a more strictly checks, use TestPlayer.MODE_SKIP to stop mode selection);
- improved error logs and testable dialogs menu in cheat mode;
2025-08-04 23:53:16 +04:00
theelk801
94b71e4c67 update duel commander ban list 2025-07-28 14:35:11 -04:00
theelk801
3a92da6f67 update duel commander ban list 2025-07-23 14:42:06 -04:00
theelk801
8bb1f40bf7 update canadian highlander point list 2025-07-19 08:41:49 -04:00
theelk801
ccaeabaeba update commander rules to allow vehicles and spacecraft with P/T 2025-07-08 17:27:05 -04:00
Oleg Agafonov
6384816489 AI: added detail logs on too long thinks (show battlefield/stack stats, abilities activation chain on AI freezes, part of #10154, #13766) 2025-07-05 20:33:25 +04:00
ReSech
0cee5127dc
deck: added Freeform Unlimited deck type to play games with any cards amount (#13815) 2025-07-02 07:21:25 +04:00
theelk801
08c2fcf82a update historic ban list 2025-06-30 11:09:03 -04:00
theelk801
043be12aff update standard ban list 2025-06-30 11:08:48 -04: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
Oleg Agafonov
dfb84b09f3 server: improved performance and stability with broken AI and human games, e.g. less memory leaks and out of memory errors with AI (related to #11285, #5023); 2025-06-29 01:01:34 +04:00
Oleg Agafonov
c3a0c731d6 AI, tests: added stability tests to make sure AI simulations can process errors and freezes (part of #13638, #13766); 2025-06-28 22:51:34 +04:00
Oleg Agafonov
135c594de1 AI, refactor: removed outdated and unused code like simple priority and combat implementation, simple combat damage calculator, etc (part of #13638, #13766) 2025-06-27 16:37:07 +04:00
Oleg Agafonov
f3e18e245f AI: improved target amount targeting (part of #13638, #13766):
- refactor: migrated AI's target amount code to shared selection logic;
- ai: fixed game freezes on some use cases;
- tests: added AI's testable dialogs for target amount;
- tests: improved load tests result table, added game cycles stats;
- Dwarven Catapult - fixed game error on usage;
2025-06-27 01:11:10 +04:00
theelk801
3b0a7f5d6f remove outdated standard bans 2025-06-20 09:55:10 -04:00
Oleg Agafonov
ffe902d25e
AI: purged whole targeting code and replaced with simple and shared logic (part of #13638) (#13766)
- refactor: removed outdated/unused code from AI, battlefield score, targeting, etc;
- ai: removed all targeting and filters related logic from ComputerPlayer;
- ai: improved targeting with shared and simple logic due effect's outcome and possible targets priority;
- ai: improved get amount selection (now AI will not choose big and useless values);
- ai: improved spell selection on free cast (now AI will try to cast spells with valid targets only);
- tests: improved result table with first bad dialog info for fast access (part of #13638);
2025-06-18 21:03:58 +04:00
Oleg Agafonov
d893d52190 tests: improved testable dialogs (added source code ref in result table for better IDE navigation, part of #13643, #13638); 2025-06-15 14:08:43 +04:00
Oleg Agafonov
6ad2cdaa78 AI: improved stability:
- fixed game errors with source related filters (related to #13713);
- fixed game freeze in hand's cards selection (related to #13290);
- fixed game freeze in target amount selection with X=0 (related to #13290);
2025-06-14 16:03:44 +04:00
Oleg Agafonov
b8a8d92b14 deck: updated The Paper Cube, fixed legacy/vintage (part of #13705) 2025-06-01 00:06:18 +04:00
Oleg Agafonov
eba4d0276d deck: updated Legacy Cube to latest version, removed outdated cubes, improved last update info (part of #13705) 2025-05-31 23:11:44 +04:00
Oleg Agafonov
3d45a24959
Draft Cubes rework (better cube from deck, dynamic data, better errors processing, actual MTGO Vintage Cube) (#13705)
- GUI, table: added dynamic data support for Cube Types (no more depends on server's config names, part of #12050);
- server: replace multiple MTGO Vintage Cubes by single cube, updated to April 2025 (part of #12050);
- server: fixed table freeze on starting error (related to #11285);
- GUI, table: added better support of Cube From Deck (client/server side errors, additional info about loaded cards, etc);
2025-05-31 20:15:31 +04:00
Oleg Agafonov
ef4431e7f2 merge fix 2025-05-24 20:12:53 +04:00
Oleg Agafonov
f3ba897536 gui, deck: reworked edh power level (close #5361, close #11732, related to #13341):
* added power level info in deck validation panel;
* added detail calculation info (hint with cards and their power levels);
* fixed that deck's edh power level ignore individual card's levels and used only commanders;
* removed outdated deck restrictions by commander colors;
* now players can really limit allowed decks by edh power level;
2025-05-24 19:53:37 +04:00
Oleg Agafonov
3f1a02aa03 GUI, deck: improved invalid deck information (added more details in wrong commander color); 2025-05-24 00:21:23 +04:00
Oleg Agafonov
e320bf241c GUI, game: added source info in "choose number/amount" dialogs, added auto-choose for single possible value (part of #13638); 2025-05-17 21:18:45 +04:00
Oleg Agafonov
66db821437 refactor: combined announceX methods in one, improved X message and selection for AI (part of #10330) 2025-05-16 19:34:57 +04:00
Oleg Agafonov
133e4fe425
other: reworked target selection: (#13638)
- WIP: AI and multi targets, human and X=0 use cases, human and impossible targets use cases;
- improved stability and shared logic (related to #13606, #11134, #11666, continue from a53eb66b58, close #13617, close #13613);
- improved test logs and debug info to show more target info on errors;
- improved test framework to support multiple addTarget calls;
- improved test framework to find bad commands order for targets (related to #11666);
- fixed game freezes on auto-choice usages with disconnected or under control players (related to #11285);
- gui, game: fixed that player doesn't mark avatar as selected/green in "up to" targeting;
- gui, game: fixed small font in some popup messages on big screens (related to #969);
- gui, game: added min targets info for target selection dialog;
- for devs: added new cheat option to call and test any game dialog (define own dialogs, targets, etc in HumanDialogsTester);
- for devs: now tests require complete an any or up to target selection by addTarget + TestPlayer.TARGET_SKIP or setChoice + TestPlayer.CHOICE_SKIP (if not all max/possible targets used);
- for devs: added detail targets info for activate/trigger/cast, can be useful to debug unit tests, auto-choose or AI (see DebugUtil.GAME_SHOW_CHOOSE_TARGET_LOGS)
2025-05-16 13:55:54 +04:00
Oleg Agafonov
a53eb66b58 other: reworked target selection (now it use same logic and methods in all places), fixed AI and selection freezes in some use cases (related to #13606, #11285) 2025-05-07 17:34:36 +04:00
Oleg Agafonov
00dc6f4742 refactor: removed useless getNumberOfTargets from Target (replaced with getMinNumberOfTargets) 2025-05-07 02:55:02 +04:00
PurpleCrowbar
36196742ad Update EDH bans 2025-04-22 19:47:11 +01:00
Oleg Agafonov
f83c2bea4b merge fix 2025-04-19 17:48:27 +04:00
Oleg Agafonov
3dc606501d AI: improved stability and bug fixes (related to #13290):
- bug's reason: wrong usage of canTarget, add/addTarget, getOpponents, etc;
- fixed that it can target dead players in some use cases (close #13507);
- fixed that it wrongly choose targets in bad/good effects in some use cases;
- fixed that it can't find valid targets in some use cases;
- fixed game freezes and errors with some cards;
2025-04-19 07:04:55 +04:00
Oleg Agafonov
b915c6590b AI: fixed game freeze with yes/no combat triggers (related to #13290); 2025-04-19 04:10:55 +04:00
Oleg Agafonov
b819545744 bump version 2025-04-11 17:50:12 +04:00
Oleg Agafonov
0a1bf47434 AI: fixed game freeze on cards with combat triggers (close #13342) 2025-04-09 02:21:29 +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
63781e9ca1 Missed some references to instanceof AdventureCard
replaced with CardWithSpellOption
2025-04-08 09:49:08 -05:00
PurpleCrowbar
dfb6896453
Skip prompting player with no blockers to select blockers (#13496)
* Don't prompt creatureless player to select blockers

* Move getting possible blockers back to while loop

* Several preferences text improvements, always skip select blockers prompt if no blockers
2025-04-03 18:34:04 +01:00