Commit graph

1622 commits

Author SHA1 Message Date
Oleg Agafonov
81d44e615f gui: improved multi amount dialog (added cancel option, added mana symbols support in messages, improved form structure) 2023-11-02 12:30:40 +04:00
Jeff Wadsworth
0820761c3a Fixed #8771 2023-11-01 21:26:28 -05:00
Alexander Novotny
87921494b8
Improve trigger auto ordering and aura attachment (Lynde QOL fixes) (#10648)
* Lynde trigger references objects

* Changed triggered ability auto-order to care about targets

* Copy card test

* When a copy effect comes in as a copy of an aura,
it checks if it's already attached before asking player to attach

* add comments and null check per review

---------

Co-authored-by: xenohedron <xenohedron@users.noreply.github.com>
2023-11-01 21:40:04 -04:00
Oleg Agafonov
3abdb72910
dev: improved code coverage (jacoco) and static analyser (sonar) support (#11367):
* fixed code coverage data lost on failed tests;
* fixed code coverage report duplication and improved performance;
* fixed that sonar analyser can't see code coverage for some modules;
* added new aggregation module: Mage.Reports (used for code coverage report generation);
* reorganized pom and added additional instructions for jacoco and sonar usage;
2023-10-30 09:19:12 +04:00
Oleg Agafonov
b7ce9c80f0 refactor: improved ability's modes code (related to #11333) 2023-10-28 15:46:03 +04:00
Susucre
1cb484e03e unban Chaos Orb from OId School formats (#11344) 2023-10-26 18:29:59 +02:00
xenohedron
18c6596cc0
Improvements to player selection of TargetAmount (#11341) 2023-10-26 02:12:15 -04:00
Oleg Agafonov
f42f28344c Merge fix 2023-10-14 16:09:48 +04:00
Oleg Agafonov
06138ab3d3 AI: refactor PassAbility usage, added additional runtime checks 2023-10-14 15:57:19 +04:00
Jipsu
ce311fd691
added MTGO Vintage Cube October 2023 (#11305) 2023-10-13 23:29:03 -04:00
Oleg Agafonov
0d9121bf10 AI: fixed that computer can stop to use some equip and level up abilities, fixed small memory leaks (related to #11285, #4520) 2023-10-12 07:56:41 +04:00
Susucre
f14479c53c
Add custom options for starting life total and starting hand size (#11259)
* add startHandSize / startLife to the custom option panel

* use the custom startLife/startHandsize in all Game Modes
2023-10-06 23:22:48 -04:00
Susucre
7c454fb24c
Rework AsThough handling to allow choosing/affecting a specific alternate cast (#11114)
* Rework AsThoughEffect

* some cleanup of MageIdentifer

* refactor ActivationStatus

* fix bolas's citadel

* fix a couple of the Alternative Cost being applied too broadly.

* fix Risen Executioneer

* allow cancellation of AsThough choice.

* fix One with the Multiverse

* cleanup cards needing their own MageIdentifier

* last couple of fixes

* apply reviews for cleaner code.

* some more cleanup
2023-10-02 18:42:54 -04:00
Susucre
1acb1d6c9a
Tweak the Pillar of the Paruns format (#11197) 2023-09-24 22:09:38 -04:00
xenohedron
5d39d1bb38 fix Modern banned list (Yorion, Sky Nomad) 2023-09-23 20:21:23 -04:00
Oleg Agafonov
8ebbeef8f4 Choose triggers order dialog - fixed game error on remember of multiple instances of the trigger (fixes #11194) 2023-09-23 20:16:55 +04:00
Oleg Agafonov
103f75975c Choose triggers order dialog - fixed that it can't remember ability name with card name in it 2023-09-22 09:44:39 +04:00
Oleg Agafonov
921015e6f1 Choose triggers order dialog - fixed that it can't remember ability for last usage 2023-09-22 09:09:52 +04:00
Oleg Agafonov
4e77ccb381 refactor: removed unused data from special action, improved code (related to #11137) 2023-09-17 14:37:49 +04:00
xenohedron
9a0143be0e update Standard rotation; resolves #11150 2023-09-11 19:53:34 -04:00
Oleg Agafonov
4b3a19b4d5 refactor: improved target usage, replaced setNotTarget by withNotTarget 2023-09-07 05:35:54 +04:00
Susucre
9532310e06
game: fixed cube from deck game mode to use a card numbers (#11105) 2023-09-03 23:13:37 +04:00
Oleg Agafonov
8a65b0f149 refactor: removed netbeans's auto-generated comments 2023-09-02 16:05:29 +04:00
arcox
2f0c1d84c5
Lint: fix 'declarations should use interfaces instead of classes' bugs (#11082) 2023-08-31 21:42:45 +04:00
Alex Vasile
a2162ec3e7
Refactor: private fields and performance tweaks (#9625)
1a. Make `costs`, `manaCosts`, and `manaCostsToPay` private in `AbilityImpl` with access through getters/setters 
1b. fix cost adjuster for imprinted cards affected by the above

2a. Lazy instantiation for rarely used `data` field in `TargetPointerImpl`

3a. Pre-allocate certain array sizes in `Modes` and `CostsImpl`

4a. Make `manaTemplate` private in `BasicManaEffect`, copy when passing outside the class 
4b. Don't copy `manaTemplate` in copy constructor since it doesn't change 
4c. Add comments explaining copy usage for `manaTemplate` 
4d. Remove redundant variable assignment and make fields final 

---------

Co-authored-by: xenohedron <xenohedron@users.noreply.github.com>
2023-08-27 17:58:19 -04:00
Oleg Agafonov
da89ab6ad7 game: added runtime check for empty choice dialogs 2023-08-25 19:07:32 +04:00
Susucre
5062c84098
Refactor: removed server side objects from a client side game's data (#10788)
* Clean original values transmitted with CardView.originalObject
* Move RateCard to mage.Common, support cardView as argument.
* Clean PermanentView constructor for TestCardRenderDialog
2023-08-24 12:04:07 +04:00
names-are-hrad
5468e2f7e5
update modern/legacy banlists (#10779)
https://magic.wizards.com/en/news/announcements/august-7-2023-banned-and-restricted-announcement

Co-authored-by: MrMoo <>
2023-08-11 08:57:48 -04:00
Artemis Kearney
9ba0da00ff
Basic groundwork for extra decks (contraptions, attractions) (#10378)
* extra deck cards not counted in deck size

* extra deck handling in deckbuilder

* move responsibility for extraDeckCard boolean to CardImpl

* remove redundant field copy
2023-08-06 21:06:32 -04:00
theelk801
8830fd0cc8 [WHO] Implement The Thirteenth Doctor 2023-08-05 13:44:40 -04:00
mgrochowski
005f32cfff
update Premodern ban list (#10738)
* On July 15th Land Tax got banned, see more details:
https://premodernmagic.com/blog/ban-list-update-2023/

* Update Ban List (added "playing for ante" cards)
2023-08-03 01:02:10 -04:00
Oleg Agafonov
8d938926b6 refactor: improved usage of one time turn modifications (skip step, extra turn, etc) 2023-07-31 20:16:28 +04:00
xenohedron
b7543af939 Update Brawl ban list (closes #10686) 2023-07-28 21:33:22 -04:00
Alexander Novotny
a36a7d9b7f
[LTR] Add Goldberry, River-Daughter (#10524)
* Added Goldberry

* Slight optimizaztion

* Happy Path Test

* More unhappy tests

* Sanity check for Goldberry's counter choices

* Updated player.getMultiAmount to support individual constraints

* Some cleanup

Also modified ResourcefulDefense to use new multi amount api

* Updated logging

* Added hint for number of counters

* Fixed issue with Resourceful Defense

* Improvements to defaults

Default list will properly make sure to stay within individual maximums
If a player is asked for a choice that isn't actually a choice because each choice's min and max are equal, instead the default response is immediately returned. This helps with situations like moving a counter off of Goldberry when she only has one counter on her.

* -1/-1 Counter test

* Fixed issue with -1/-1 counters

* Adjusted dialog to properly enforce constraints
2023-07-28 21:29:40 -04:00
Susucre
574321f034
game: added Pillar of the Paruns custom mode (#10633)
* Introduce a new custom match mode: Each player with a Pillar of the Paruns in play.
2023-07-18 08:55:46 +04:00
Susucre
6b616dbf20
refactor: expose startingHandSize in GameImpl constructor. (#10629)
For now, it is 7 in every game mode.
2023-07-16 18:36:26 +04:00
Susucre
b960b77774
Refactor name of minimum deck size (was startingHandSize) (#10628)
* Refactor: rename starting hand size, it was actually minimum deck size (40, 60 or 100 most of the time)
2023-07-16 01:45:19 +04:00
xenohedron
0fa971514a
code style: eliminate unnecessary static imports (#10585)
* SacrificeTargetCost(StaticFilters)

* remove import static mage.constants.Outcome

* remove import static mage.constants.Duration

* remove other import static

* a few more sacrifice filters

* simpler constructors

* remove import static mage.filter

* remove a few more import static
2023-07-08 13:08:28 -04:00
Alexander Novotny
fb8424556e
Player auto-choose respects required targets (#10557)
* Player auto-choose respects required targets
2023-07-04 07:02:46 +04:00
Oleg Agafonov
6529ead72f refactor: simplified extra turn code, fixed NPE error on usage (Alchemist's Gambit) 2023-06-30 06:39:01 +04:00
Oleg Agafonov
afe89a1056 momir game: fixed game error on start, added momir emblem image 2023-06-17 09:29:47 +04:00
Juneau
eebb82c591
Update CanadianHighlander.java (#10459)
Update Canadian Highlander points list to match the most recent update as of 6/12/23
2023-06-12 12:37:53 -04:00
KungensBadkar
7daafe27f1
Update CanadianHighlander.java (#10448)
Updated points list.
2023-06-09 17:07:07 -04:00
xenohedron
44f3ef444e Merge branch 'glee--feature/addRichManSwiss' 2023-06-07 19:45:34 -04:00
xenohedron
b55f8f6c46 Merge fix 2023-06-07 19:36:55 -04:00
sprangg
99701e08e7
Improvements to limited with Freeform Unlimited Commander (#10114)
* Limited-style sideboarding with unlimited basics enabled for Freeform Unlimited Commander

* FreeformUnlimitedCommander does not depend on FreeformCommanderFreeForAll anymore.
FreeformUnlimitedCommander has sideboarding.
In two-player matches of FreeformUnlimitedCommander, the player who goes first doesn't draw a card on their first turn anymore.

* FreeformUnlimitedCommanderTypeTest takes into account that sideboarding is allowed

* Fix to startingPlayerSkipsDraw condition

---------

Co-authored-by: sprangg <a@b.c>
2023-06-07 19:05:37 -04:00
theelk801
82073bba73 [LTR] Implement Nazgul 2023-05-30 18:24:54 -04:00
theelk801
19f44e90ad update standard ban list 2023-05-29 11:02:57 -04:00
theelk801
fa03c6404f fix and rework commander validation (fixes #10345) 2023-05-23 19:25:00 -04:00
Evan Kranzler
60e488cf05
rename classes (#10383) 2023-05-17 18:49:30 -04:00