Commit graph

414 commits

Author SHA1 Message Date
Evan Kranzler
60e488cf05
rename classes (#10383) 2023-05-17 18:49:30 -04:00
Daniel Bomar
92b6d7a531
[BRO] Implemented Gix, Yawgmoth Praetor (#9765)
* [BRO] Implemented Gix, Yawgmoth Praetor

* Add missing TestPlayer, PlayerStub implementations
2023-04-23 11:49:52 -04:00
Oleg Agafonov
5474787641 Refactor: added miss Ability source in some choose methods 2023-04-21 10:08:33 +04:00
Evan Kranzler
947351932b
Ready for Review: Implementing Battles (#10156)
* add types and subtypes

* add startingDefense attribute

* [MOM] Implement Invasion of Ravnica / Guildpact Paragon

* fix two small errors

* refactor various instances of "any target"

* fully implement defense counters

* battles can now be attacked

* [MOM] Implement Invasion of Dominaria / Serra Faithkeeper

* [MOM] Implement Invasion of Innistrad / Deluge of the Dead

* [MOM] Implement Invasion of Kaladesh / Aetherwing, Golden-Scale Flagship

* [MOM] Implement Invasion of Kamigawa / Rooftop Saboteurs

* [MOM] Implement Invasion of Karsus / Refraction Elemental

* [MOM] Implement Invasion of Tolvada / The Broken Sky

* simplify battle info ability

* fix verify failure

* some more fixes for attacking battles

* [MOM] Implement Invasion of Kaldheim / Pyre of the World Tree

* [MOM] Implement Invasion of Lorwyn / Winnowing Forces

* [MOM] Implement Invasion of Moag / Bloomwielder Dryads

* [MOM] Implement Invasion of Shandalar / Leyline Surge

* [MOM] Implement Invasion of Belenon / Belenon War Anthem

* [MOM] Implement Invasion of Pyrulea / Gargantuan Slabhorn

* [MOM] Implement Invasion of Vryn / Overloaded Mage-Ring

* [MOM] Implement Marshal of Zhalfir

* [MOM] Implement Sunfall

* implement protectors for sieges

* partially implement siege defeated trigger

* fix verify failure

* some updates to blocking

* [MOM] Implement Invasion of Mercadia / Kyren Flamewright

* [MOM] Implement Invasion of Theros / Ephara, Ever-Sheltering

* [MOM] Implement Invasion of Ulgrotha / Grandmother Ravi Sengir

* [MOM] Implement Invasion of Xerex / Vertex Paladin

* add initial battle test

* fix verify failure

* [MOM] Implement Invasion of Amonkhet / Lazotep Convert

* [MOM] update spoiler

* update how protectors are chosen

* update text

* battles can't block

* add control change test

* rename battle test for duel

* add multiplayer test

* [MOM] Implement Invasion of Alara / Awaken the Maelstrom

* [MOM] Implement Invasion of Eldraine

* [MOM] Implement Invasion of Ergamon / Truga Cliffhanger

* [MOM] Implement Invasion of Ixalan / Belligerent Regisaur

* battles now cast transformed (this is super hacky but we need to refactor TDFCs anyway)

* add TODO

* add ignore for randomly failing test

* a few small fixes

* add defense to MtgJsonCard (unused like loyalty)

* implement ProtectorIdPredicate

* small fixes
2023-04-13 20:03:16 -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
Alex Vasile
6035f04140
Disable auto-payment of mana for spells which care about mana color (#9173) 2022-10-03 19:16:45 -04:00
Alex Vasile
8b71e0a444 [DEV] JDK 11+ support. All builds still target Java 1.8. 2022-08-05 00:17:00 -04:00
Alex Vasile
b85353bf25 Fix double-click needed to auto-choose blockers. Closes #9255. 2022-07-14 11:25:31 -04:00
Alex Vasile
96f6fbefc8
GUI: Autochoose targets if choice can be made (#9206) 2022-07-08 21:58:42 -04:00
Alex Vasile
5e7f145e3d
Fix message for choose target dialog for distributing +1/+1 counters (#9202) 2022-07-08 21:42:42 -04:00
DeepCrimson
0c8ef41012
Fix spelling of doneChoosing() (#9002) 2022-05-25 22:25:15 -06:00
Evan Kranzler
26ae7b7281 replaced various instances of instanceof lambda functions with 2022-04-03 11:11:07 -04:00
Evan Kranzler
945b60c8d0 fixed some NPE issues with player target choosing 2022-03-25 21:16:38 -04: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
Evan Kranzler
bbb9382150
Reworking effects which allow casting spells from a selection of cards (ready for review) (#8136)
* added function for casting spells with specific attributes from a selection of cards

* updated cascade to use new method

* refactored various cards to use new methods

* added TestPlayer method

* fixed a small error

* text fix

* broke out some repeated code

* added missing notTarget setting

* add additional retain zone check

* some more cards refactored

* more refactoring

* added interface for split/modal cards

* reworked spell casting methods

* reworked multiple cast to prevent unnecessary dialogs

* fixed test failures due to change in functionality

* add AI code

* small nonfunctional change

* reworked Kaya, the Inexorable

* added currently failing test

* added more tests

* updated Geode Golem implementation

* fixed adventure/cascade interaction, added/updated tests

* some nonfunctional refactoring

* added interface for subcards

* [AFC] Implemented Fevered Suspicion

* [AFC] Implemented Extract Brain

* [AFC] updated Arcane Endeavor implementation

* [C17] reworked implementation of Izzet Chemister

* [ZEN] reworked implemented of Chandra Ablaze

* additional merge fix

* [SLD] updated Eleven, the Mage

* [NEO] Implemented Discover the Impossible

* [NEO] Implemented The Dragon-Kami Reborn / Dragon-Kami's Egg

* [NEO] Implemented Invoke Calamity

* [AFR] Implemented Rod of Absorption

* [VOC] Implemented Spectral Arcanist

* [VOC] added additional printings

* [NEO] added all variants

* [SLD] updated implementation of Ken, Burning Brawler
2022-03-09 08:03:54 -05:00
Evan Kranzler
4591ac07cc
Reworking goad effects (ready for review) (#8034)
* changing goad to designation, refactored goad effects to be continuous

* [AFC] Implemented Vengeful Ancestor

* reworked effects which goad an attached creature

* updated goading implementation

* updated combat with new goad logic

* some more changes, added a test

* another fix

* update to test, still fails

* added more failing tests

* more failing tests

* added additional goad check

* small fix to two tests (still failing

* added a regular combat test (passes and fails randomly)

* fixed bug in computer player random selection

* some changes to how TargetDefender is handled

* removed unnecessary class

* more combat fixes, tests pass now

* removed tests which no longer work due to combat changes

* small merge fix

* [NEC] Implemented Komainu Battle Armor

* [NEC] Implemented Kaima, the Fractured Calm

* [NEC] added all variants
2022-02-15 09:18:21 -05:00
Oleg Agafonov
1f381cffe5 GUI: improved cards with transform ability:
* added transform button to permanents on battlefield to view another card side;
* fixed wrong popup hints in some use cases (example: alternative side view by mouse wheel down, #8433);
2021-11-05 23:16:44 +04:00
Oleg Agafonov
58ab020065 Dev: pom clean up, improved parent/child structure; 2021-10-03 18:11:56 +04:00
Oleg Agafonov
6bc5a00e8a * Alternative costs - fixed that it can be activated on free cast (example: cascade with overload, #6925, #7410, #7741, #6342); 2021-09-21 14:22:46 +04:00
Oleg Agafonov
912e695f40 * GUI: fixed that some choose dialogs doesn't show possible targets (example: Haunting Voyage, #8223); 2021-09-05 13:07:13 +04:00
Oleg Agafonov
2158d682cc Prepare new release 2021-08-30 14:44:03 +04:00
Oleg Agafonov
2efdb464fc Little refactor, additional logs for CheckPlayableState error; 2021-08-28 12:09:22 +04:00
Oleg Agafonov
43bdab8636 * GUI: added yes/no auto-answers for state base actions dialogs (example: commander change zone); 2021-08-16 02:00:53 +04:00
Oleg Agafonov
c9ab896d24 * GUI: added auto-choose for replacement effects (remember answer in dialog + reset answer in popup menu + new option in preferences; #4360, #328, #4219, #6676, #7914); 2021-08-09 11:26:11 +04:00
Oleg Agafonov
c6a3d5e588 Prepare new release 2021-07-25 01:15:33 +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
Evan Kranzler
2ab78b9f03 [STX] fixed Shadrix Silverquill not allowing players to choose no modes (fixes #7874) 2021-06-27 11:46:36 -04:00
Evan Kranzler
a61d5543fa replaced all instances of converted mana cost with mana value 2021-04-17 17:02:27 -04:00
Daniel Bomar
600cac6fc7
[READY FOR REVIEW] Implement a "multi-amount" dialog (#7528)
* Implemented chooseTargetAmount and new GUI dialog (distribute damage, distribute mana)
* Added tests and AI support;
* Test framework: added aliases support in TargetAmount dialogs;

Co-authored-by: Oleg Agafonov <jaydi85@gmail.com>
2021-04-17 14:28:01 +04:00
Oleg Agafonov
650acf9e1e Test framework: fixed support of chooseAbilityForCast for commanders, added destroy target custom effect (#7593); 2021-02-22 16:05:48 +04:00
Oleg Agafonov
cf216c6802 Prepare new release 2021-02-07 22:24:40 +04:00
Oleg Agafonov
5077a82585 * GUI: improved ability picker dialog for double sides, split and adventure cards (if one side is playable then you can see ability name before play/cast it, see #7361); 2021-02-03 08:52:31 +04:00
Oleg Agafonov
767644f1c8 GUI: fixed that user can target/click on second side of mdf card instead the main side (related to #7297); 2020-12-27 01:39:18 +04:00
LevelX2
77a44733c2 * Eerie Ultimatum - Fixed target handling. Duplicate names could be selected. Deselection was not possible. 2020-12-21 16:47:03 +01: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
2b78388eab [CMR] fixed Akroma's Will - missing copy of new condition in modes (#7210);
Improved compatibility of new modes condition with choose dialogs and test framework;
2020-11-28 19:49:16 +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
LevelX2
c16fb75668 * replaces all [source} by {this}. ATTENTION !!!: Only supporting [this} from now on in rule text. 2020-08-22 12:52:49 +02:00
Oleg Agafonov
c4f028ffa0 Prepare new release 2020-07-10 16:50:38 +04:00
Aidan Coward
857c072ac1 grammar fix: freezed -> frozen 2020-07-05 18:23:16 -04:00
Oleg Agafonov
da4a44445b Additional fixes for #6771 (modal spells resolve order) 2020-07-03 01:46:05 +04:00
Oleg Agafonov
adbe84c540 Improved freeze checks and canRespond/isInGame usage 2020-07-01 13:48:22 +04:00
Oleg Agafonov
3f2a5fc362 Prepare new release 2020-06-20 11:36:13 +04:00
Oleg Agafonov
c2e7b02e13 Reworked and improved special mana payment abilities (convoke, delve, assist, improvise):
* now it can be used to calc and find available mana and playable abilities;
* now tests and AI can use that abilities;
* now it follows mtg's rules and restrictions for mana activation order (rule 601.2f, see #768);
2020-06-19 13:09:45 +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
b94344341b Improved playable abilities and split cards:
* Now human player uses same code for playable abilities search as test framework (old version used different code, so it could not work in one of the modes);
* Split cards - improves playable highlights;
* Split cards - fixed that it doesn't work with dynamic added abilities like flashback (#6327, #6470, #6549);
2020-06-03 12:44:58 +04:00
Oleg Agafonov
63dbf5f40b * Split cards improves:
* Fixed that fused spells can't be played from non hand zone;
 * Fixed double choose spell dialog (#5506, #6549);
2020-05-19 01:30:46 +04:00
Oleg Agafonov
6b5108770c * UI: fixed wrong ability text capitalization in mode choose dialog; 2020-05-19 00:27:42 +04:00