Commit graph

300 commits

Author SHA1 Message Date
Oleg Agafonov
5474787641 Refactor: added miss Ability source in some choose methods 2023-04-21 10:08:33 +04:00
Oleg Agafonov
a15a0daa04 Fixed potential NPE errors in getPhase usage (fixed Berserker's Frenzy, etc) 2023-03-25 16:01:27 +04:00
Oleg Agafonov
cfd7464b49 Refactor: added edit protection for some unmodifiable lists 2023-03-25 15:22:13 +04:00
Alex W. Jackson
a6c5209a2a Combat.getAttackers and Combat.getBlockers now return a Set instead of a List, so that two-headed blockers aren't included twice 2022-09-07 22:36:05 -04:00
Alex Vasile
8b71e0a444 [DEV] JDK 11+ support. All builds still target Java 1.8. 2022-08-05 00:17:00 -04:00
DeepCrimson
882afbf8b5
Fix remaining raw unparameterized usages of ManaCostImpl 2022-06-16 14:53:44 -07:00
DeepCrimson
3ae5f4979d
Refactor: Remove redundant boxing/unboxing to parse int primitives (#9065) 2022-06-12 12:46:59 -04:00
DeepCrimson
0c8ef41012
Fix spelling of doneChoosing() (#9002) 2022-05-25 22:25:15 -06:00
Alex Vasile
015cdf3136
Revert "Added missing fields to many copy constructors. (#8957)" (#8999)
This reverts commit 82708e4273.

Some of these (AI related result in bloated memory usage, needs more investigation).
2022-05-25 12:57:24 -06:00
Alex Vasile
82708e4273
Added missing fields to many copy constructors. (#8957) 2022-05-25 09:51:18 -06:00
Evan Kranzler
80e11b2052
(WIP) Replacing blocking/blocked by predicates (#8729)
* replaced blocking/blocked by predicates

* added test for knight of dusk (currently fails)

* added source parameter to filters and everything else that needs it

* some changes to various predicates

* test fix

* small changes to filter code

* merge fix

* fixed a test failure

* small change to Karn, Scion of Urza

* removed sourceId from filter methods and other similar places

* added new getobject method to fix some test failures

* a few more fixes

* fixed merge conflicts

* merge fix
2022-03-23 18:45:02 -04:00
Alex W. Jackson
79b7a0a627 Remove obsolete adjustCosts and adjustTargets methods from MageObject interface 2022-03-12 19:01:59 -05:00
Oleg Agafonov
8418c6a09a AI: game logs improved (docs/wiki, added diff score per command and commands chain) 2021-09-26 18:43:57 +04:00
Oleg Agafonov
42325c7c2e AI improves:
* AI: fixed that AI was able to targeting an invalid player targets in some use cases (#5630);
* AI: fixed that AI was able to ignore targeted triggers in some use cases;
* AI: improved player targeting for not own chooses (if it's make a choice for another player);
2021-09-26 18:40:26 +04:00
Oleg Agafonov
2158d682cc Prepare new release 2021-08-30 14:44:03 +04:00
Evan Kranzler
f8d030bef4
Adding dice rolling trigger/replacement (ready for review) (#7989)
* [AFR] Implemented DiceRolledTriggeredAbility
* [AFR] Implemented Brazen Dwarf
* [AFR] Implemented Feywild Trickster
* [AFC] Implemented Reckless Endeavor
* [AFR] Implemented Pixie Guide
* [AFR] Implemented Critical Hit
* [AFR] Implemented Netherese Puzzle Ward
* [AFC] Implemented Neverwinter Hydra
* [AFR] Implemented Farideh, Devil's Chosen
* [AFR] Implemented Barbarian Class
* [AFC] Implemented Vrondiss, Rage of Ancients
* [AFC] Implemented Arcane Endeavor
* Test framework: added planar die rolls support
* Test framework: added random results set up support in AI simulated games;
* AI: improved roll die results chooses in computer games;
* Roll die: improved combo support for planar die and roll die effects;

Co-authored-by: Daniel Bomar <dbdaniel42@gmail.com>
Co-authored-by: Oleg Agafonov <jaydi85@gmail.com>
2021-08-26 14:06:10 +04:00
Oleg Agafonov
e25d287864 Test framework: added test fails on errors in AI's simulated games; 2021-08-21 17:22:06 +04:00
Oleg Agafonov
c6a3d5e588 Prepare new release 2021-07-25 01:15:33 +04:00
Oleg Agafonov
ac8d3de474 * Game: tiny leaders game mode improves (fixed AI games errors, fixed commander dupes on game restart with Karn Liberated, #6113); 2021-07-24 14:32:00 +04:00
Oleg Agafonov
c1db466d05 AI: fixed computer's errors if all players quit the game; 2021-07-24 05:52:02 +04:00
Evan Kranzler
572104b8fc
Reworking card types in preparation for implementing Grist, the Hunger Tide (#7899)
Co-authored-by: Oleg Agafonov <jaydi85@gmail.com>
2021-07-09 07:28:43 +04:00
Oleg Agafonov
b929b28e43 * AI: fixed game freezes with Karn Liberated in the game (#7922); 2021-07-02 15:03:06 +04:00
Oleg Agafonov
62d6675be6 AI: fixed that computer can't play commanders (#7955); 2021-07-01 18:21:15 +04:00
Evan Kranzler
a61d5543fa replaced all instances of converted mana cost with mana value 2021-04-17 17:02:27 -04:00
Oleg Agafonov
b6cb5cef9c Refactor: removed default comment headers 2021-02-21 08:15:16 +04:00
Oleg Agafonov
cf216c6802 Prepare new release 2021-02-07 22:24:40 +04:00
Evan Kranzler
dacf30f4b9
Refactoring subtypes to make Maskwood Nexus work (ready for review) (#7432)
* removed and renamed SubTypeList

* updated subtype test

* refactored Changeling to be an ability that actually does something

* moved isAllCreatureTypes into SubTypes class

* renamed copyTo method to copyFrom

* added removeAllCreatureTypes where usable

* replaced some subtype methods

* replaced some more subtype methods

* replaced subtype mass add/remove methods

* updated more subtype methods

* fixed some errors

* made common shared creature type predicate

* refactored another card involving subtypes

* Added usage of object attribute in subTypes's write operations;

* Refactor: use same param styles in subtype methods

* Refactor: simplified usage of copy appliers;

* Refactor: fixed code usage in CopyApplier

Co-authored-by: Oleg Agafonov <jaydi85@gmail.com>
2021-01-26 08:52:35 -05:00
Jeff
9742a673f6 - clear the two attackers lists in AI attack code 2021-01-10 11:43:00 -06:00
jeffwadsworth
4aa1e726c9 - Refactor AI attacking code to include Planeswalkers. 2021-01-08 14:41:00 -06:00
jeffwadsworth
aa6abe3045 - Revert AI planeswalker attack commit. 2021-01-06 17:04:43 -06:00
Jeff
a7e1c50122 - AI will now attack a Planeswalker first 2021-01-05 21:43:46 -06:00
Oleg Agafonov
64e948e4b3 * AI: improved game performance by x10 for cards with target amount;
AI: added targeting name and amount info to simulation logs;
AI: removed duplicated target variations from target amount simulations;
2020-12-24 15:02:28 +04:00
Oleg Agafonov
cc5fce4256 Prepare new release 2020-12-19 23:59:44 +04:00
Oleg Agafonov
db239a1055 Refactor: replaced sourceId by source and introduced source param in some methods; 2020-12-12 20:23:19 +04:00
Oleg Agafonov
ea46afbe62 Prepare new release 2020-11-10 13:11:45 +04:00
Oleg Agafonov
920697d2e5 Prepare new release 2020-08-23 01:52:55 +04:00
Oleg Agafonov
c4f028ffa0 Prepare new release 2020-07-10 16:50:38 +04:00
Oleg Agafonov
3f2a5fc362 Prepare new release 2020-06-20 11:36:13 +04:00
Oleg Agafonov
cce467a5ec Additional fix and simplified for playable abilities (see comments b94344341b) 2020-06-04 03:21:18 +04:00
Oleg Agafonov
009e55c4f0 * AI: fixed that computer can't use spells and abilities on opponent's pre-combat main step; 2020-03-09 12:49:21 +04:00
Oleg Agafonov
cb8d4dc340 * Non creature tokens - fixed rollback errors in AI games (example: Food token, see #6331);
Fixed other potentially NPE errors with rarity;
2020-03-06 03:27:46 +04:00
Ingmar Goudt
ae7919cd07 program towards Interface rather than implementations 2020-02-10 10:40:06 +01:00
Oleg Agafonov
6cbf94bad6 AI: improved usage of attachments:
* AI can play equipment/aura cards more frequent (computer can see and analyse all attached effects now);
* AI can attach permanents with bad effects correctly (bad for opponents, good for itself);
2020-01-29 07:38:08 +04:00
Oleg Agafonov
89394ffe0a Improved ability outcome processing; 2020-01-29 07:33:33 +04:00
Oleg Agafonov
6cbc970414 AI: disable outdated suggested file usage and disk access; 2020-01-23 01:44:35 +04:00
Oleg Agafonov
b366a83a45 Prepare new release 2020-01-09 08:55:26 +04:00
Oleg Agafonov
61a58d36c2 Refactor: added missing getPlayersInRange in cards code (to ignore leaved/lost players); 2019-12-26 05:24:44 +04:00
Oleg Agafonov
d26fde8dbc Prepare new release 2019-12-21 18:23:15 +04:00
Oleg Agafonov
bd71c98e3e Fixed AI freeze with non available targets 2019-12-21 18:10:29 +04:00
Oleg Agafonov
7469d59eee Prepare new release 2019-11-30 01:32:54 +04:00