Commit graph

1548 commits

Author SHA1 Message Date
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
36ccfb0a2a Performance: fixed memory leaks on each card viewer or draft open (10 Mb per call, related to #11285, fixes #9548) 2023-10-14 12:39:49 +04:00
Jipsu
ce311fd691
added MTGO Vintage Cube October 2023 (#11305) 2023-10-13 23:29:03 -04:00
Oleg Agafonov
10ccab3caa AI: fixed memory leaks on game's end without humans (4 Mb per game, related to #11285, #5023) 2023-10-12 06:28:01 +04:00
Artemis Kearney
41874b0b4b
new feature: Emblem Cards (#10498)
* new feature: Emblem Cards

Allows match/tournament creator to specify cards to give each player
emblem versions of (or just the starting player for symmetric effects).

Technical details:
- new UI for specifying emblem cards (.dck files)
  - available for all match/tournament types
- new class `EmblemOfCard`
- new method `copyWithZone` on `AbilityImpl` (used to make abilities
  work from command zone)
- new fields on `GameOptions` and `MatchOptions` for emblem cards
- emblems are granted after mulligans, before first turn (technically
  after Planechase starting plane creation)

* fixes

* defaults for emblem cards in match options (fixes quick game buttons)

* minor fixes

* use DeckCardInfo instead of Card for emblem cards options

* restore accessible parent properties

* fix images for card emblems

* look up cards in a way that preserves which art

* fix typos; make Emblem.sourceObject protected

* add descriptions to planechase and emblem cards

* fixes

* add some unit tests for known working cards

* fix author name

* add explanation comment

* fix up tests

* copyWithZone: no longer modifies zone for singleton abilities

* directly check for MageSingleton
2023-09-26 22:47:13 -04:00
Oleg Agafonov
abda1fb53b GUI: fixed wrong feedback panel status in computer games (related to #11189) 2023-09-22 11:00:47 +04:00
Oleg Agafonov
342979a55a
network: reworked client-server events (related to triggers dialog problem from #11173) (#11189)
* added bad connection mode to test client works on slow network, use -Dxmage.badconnection;
* added bad connection protection in events processing due event type;
* split events to different types (can be ignored, must be synced, etc);
* removed some unused server events.
2023-09-21 18:40:52 +04:00
Oleg Agafonov
11528e7d35 server: removed useless fastDbMode, improved db stats logs on updating 2023-09-17 22:16:12 +04:00
Oleg Agafonov
c515ff383c server: added support of property settings (can use launcher to setup params like -Dxmage.testMode=true) 2023-09-17 21:46:17 +04:00
arcox
2f0c1d84c5
Lint: fix 'declarations should use interfaces instead of classes' bugs (#11082) 2023-08-31 21:42:45 +04:00
Ethan Ward
c0bde27d69 Removes unused Gmail dependencies 2023-08-26 19:35:05 -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
sprangg
287df7af21
Wait 2 seconds before making the draft pick for a timed out player (#10733)
* The draft session waits for 5 seconds before making the pick for the timed out player

* Formatting

* Renamed constant

* Tweak

* If the draft pick's timeout value would increase the client's pick's timer, don't set it (might happen if the client or server is lagging)

* Lowered BOOSTER_LOADING_INTERVAL and AUTOPICK_BUFFER

---------

Co-authored-by: sprangg <a@b.c>
2023-08-06 20:00:42 -04:00
Alexander Novotny
519b3988be
game timer: Add chess-style buffer time option (#10598)
* UI Changes

* Add new buffer time options

* Main functionality

* Final implementation

Also added player UI for when they are using their buffer time (timer turns green)
2023-07-28 22:05:21 -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
Oleg Agafonov
6529ead72f refactor: simplified extra turn code, fixed NPE error on usage (Alchemist's Gambit) 2023-06-30 06:39:01 +04:00
xenohedron
b55f8f6c46 Merge fix 2023-06-07 19:36:55 -04:00
Artemis Kearney
d199640fb5
respect testMode=false in development builds (#10376) 2023-05-16 22:53:12 +04:00
xenohedron
4cc9329b15
New feature: "Chaos Remixed" booster draft (#10328)
* Fix error in draft pick logger that was failing on chaos drafts with fewer than 3 sets

* Implement Remixed Booster Draft

* Add debug test

* minor cleanup

* Cleanup unnecessary checks

* Fix elimination tournament type

* Add note for future improvement
2023-05-12 18:12:23 +04:00
Oleg Agafonov
550d719498 Fixed NPE error in drafting and timeout 2023-05-09 16:54:22 +04:00
Oleg Agafonov
1f4dfd08ce docs: added some comments about tokens, verify, test mode, etc 2023-05-09 12:27:18 +04:00
Oleg Agafonov
013f14c699 dev: enabled server's test mode by default in developer builds (example: fast games, deck valid skip, cheats, etc) 2023-05-09 00:53:53 +04:00
Oleg Agafonov
bc79b5f5d1 dev: enabled debug main menu by default in developer builds (example: test render dialog) 2023-05-09 00:49:46 +04:00
Oleg Agafonov
5c705a92a3 Cheats: added error dialog on wrong cheat command, added chat message about cheat try; 2023-05-09 00:22:00 +04:00
Oleg Agafonov
1dea98cf1f Game: fixed that search by card name was able to return a wrong card (example: cheat command) 2023-05-08 22:58:30 +04:00
Oleg Agafonov
5f55c7c667 Tokens and command objects reworked (part 1 of 2):
- fixed that copy effect doesn't restore original image after effect's end;
 - removed outdated availableImageSetCodes (all images auto-selected from tokens database now, related to #10139);
 - refactor command objects to use CommandObjectImpl;
 - refactor planes/emblems/etc objects to use MageObjectImpl, added copyable support;
 - refactor another game objects to remove some duplicated fields;
2023-05-08 02:15:07 +04:00
xenohedron
761663c63c
Feature improvement: automatic deck submissions now add lands sensibly (#10159)
* Make automatic deck submissions use sensible land suggestions

* Cover edge case of no colored mana symbols among cards in deck

* Add comments

* Get minimum deck size from deck validator
2023-04-28 18:59:24 +04:00
Oleg Agafonov
517ee16a60 Fixed possible NPE, improved server timeout 2023-04-14 19:07:08 +04:00
Oleg Agafonov
a6337fd28a Cheats: improved cheat and test commands to use same set_code-card_name notation, added additional tests (related to #10139, cheat command example: battlefield:Human:XLN-Island:1) 2023-04-04 22:05:22 +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
0bcf0320d0 Server: fixed warn message about miss messages file in dev environment 2023-03-17 23:02:01 +04:00
Oleg Agafonov
e2271d79fb Refactor: added auto-generated readable readme file to releases 2023-03-12 13:56:29 +04:00
Oleg Agafonov
7880d6cc43 Refactor: removed outdated files, added actual license and readme to releases 2023-03-11 21:20:16 +04:00
spjspj
0f5d58724b
Prevent very long and very short usernames (#9815)
* Prevent very long usernames

Currently a troll is killing the server with very long usernames.  This should validate each person's username up to being a maximum of 500 characters long (similar to the truncated message length).
2022-12-19 00:03:33 +04:00
sprangg
0627dc4640
More draft stability (#9718) 2022-11-25 11:44:14 -05:00
sprangg
b9530e307d
Draft stability improvements (#9435) 2022-09-25 17:33:16 -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
de9fcfc7ee
Refactor: Fix Spelling of userRequestingRollback (#9307) 2022-07-22 23:06:22 -04:00
Alex Vasile
b473300680
More robust searching and importing of MDFCs, Split, Adventure cards, etc. (#8948) 2022-07-08 22:19:54 -04:00
DeepCrimson
f99da274cd
Refactor: Remove Unused ComputerPlayer3 (#9220) 2022-07-04 23:13:23 -04:00
DeepCrimson
4546623fb6
Refactor: Fix spelling of DENY_PERMISSION_TO_ROLLBACK_TURN (#9114) 2022-06-16 22:16:03 -04:00
TheBear
1021ff5ab0
Added Khans Expanded Cube to draft cube list (#8961) 2022-05-15 09:00:45 -06:00
Oleg Agafonov
47726ebbea Fixed miss config for MTGO Khans Expanded Cube 2022-04-09 20:36:27 +04:00
The Bear
9e60e98fb5
Added the Khans Expanded Cube for booster draft (#8780)
* Added the MTGO Khans Expanded Cube for boosterdraft.

* Fixed Obscuring Aether character
2022-03-19 10:33:38 -04:00
Oleg Agafonov
7aceffcc6c Fixed miss config settings from #8731 2022-03-12 09:21:47 +04:00
Jackie Ng
2e44b3246c
Add Feb 2022 vintage cube (#8731)
* Add Feb 2022 vintage cube (source: https://magic.wizards.com/en/articles/archive/magic-online/vintage-cube-february-update-2022-02-15)

* Fix 3 card typos
2022-03-02 20:18:15 -05:00
Oleg Agafonov
6177896a07
Merge pull request #8577 from magefree/dependabot/maven/com.google.oauth-client-google-oauth-client-jetty-1.33.0
Bump google-oauth-client-jetty from 1.31.2 to 1.33.0
2022-01-21 23:45:55 +04:00
dependabot[bot]
c4e09f33a9
Bump google-oauth-client-jetty from 1.31.2 to 1.33.0
Bumps [google-oauth-client-jetty](https://github.com/googleapis/google-oauth-java-client) from 1.31.2 to 1.33.0.
- [Release notes](https://github.com/googleapis/google-oauth-java-client/releases)
- [Changelog](https://github.com/googleapis/google-oauth-java-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-oauth-java-client/compare/v1.31.2...v1.33.0)

---
updated-dependencies:
- dependency-name: com.google.oauth-client:google-oauth-client-jetty
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-21 19:44:09 +00:00
dependabot[bot]
4aa2a8d310
Bump google-oauth-client-java6 from 1.31.0 to 1.33.0
Bumps [google-oauth-client-java6](https://github.com/googleapis/google-oauth-java-client) from 1.31.0 to 1.33.0.
- [Release notes](https://github.com/googleapis/google-oauth-java-client/releases)
- [Changelog](https://github.com/googleapis/google-oauth-java-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-oauth-java-client/compare/v1.31.0...v1.33.0)

---
updated-dependencies:
- dependency-name: com.google.oauth-client:google-oauth-client-java6
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-21 19:43:16 +00:00