Commit graph

2092 commits

Author SHA1 Message Date
LevelX2
5e7a4d265e Merge pull request #2254 from royk/add-deck-support
Add support for .dek files
2016-09-13 11:56:46 +02:00
Mark Langen
610c4789e5 Fixed card rendering breaking when view is missing set code. Real issue is #2260, but that will take more work to fix. 2016-09-12 23:25:48 -06:00
fireshoes
6ea98ba19b [KLD] Updated mtg-cards-data.txt with spoilers through 9/12. Add Masterpiece Series set and 4 known reprints so far. 2016-09-12 14:02:48 -05:00
Roy Klein
1e39c99914 Add support for .dek files 2016-09-11 23:34:17 +02:00
spjspj
c5577dc09e d'oh 2016-09-12 01:13:16 +10:00
spjspj
3bbf5d1d56 spjspj - Add in last ditch token attempt (for momir vig mainly) 2016-09-12 01:00:43 +10:00
LevelX2
bb8326d46b XMage 1.4.15v0 2016-09-10 12:31:18 +02:00
Mark Langen
8d90f4558d Merge pull request #2234 from stravant/master
Characteristic-Based rendering initial release completed unless further bugs come up before then.
2016-09-07 23:16:10 -06:00
Mark Langen
26b98d1afb Added more card text sizes. And other small fixes.
* Changed card rules text rendering to use 5 total possible text sizes to better support HD+ display resolutions.

* Made a P/T box be shown on vehicles.

* Small bugfixes, fixing crashes when characteristics like type line or name are missing for whatever reason.
2016-09-07 22:35:14 -06:00
Mark Langen
a638625c77 Fixed full-arts seemingly not replicating properly
* The problem was that they key for caching rendered cards did not take into account the full art / not full artness of the cards, so when someone has both full art and non-full art variants of a land from the same set it one would override the other.
2016-09-07 17:35:05 -06:00
Mark Langen
f0a1938b3e Full art Land rendering
* Added "frameStyle" tagging to relevant full art lands (ZEN, BFZ, UNG, UHG)

* Added support for rendering based off of frameStyle

* Outstanding bug that frameStyle doesn't seem to be replicated exactly properly
2016-09-07 02:20:51 -06:00
emerald000
df2782fdb6 [KLD] Basic implementation of energy counters. Added Woodweaver's Puzzleknot.
Better display of energy counters would be preferred.
2016-09-07 01:07:21 -04:00
Mark Langen
0ea9d33211 Fixed card highlighting
* Changed CardPanelRenderImpl to correctly invalidate its render when its panel has its isChoosable / isSelected override set. Before things like selecting cards in a draft view would not visibly have an effect as the render wasn't invalidated.
2016-09-06 18:15:37 -06:00
Mark Langen
f9e088b51d Card Rendering name & type line fixes
* Changed Name and Type line rendering to use Arial / Arial Narrow instead of Beleren. At small font sizes, those fonts are much more readable.

* The P/T box still uses the Beleren font, as the numbers in that font are quite readable even at small sizes.

* Changed the name / type lines to switch between Arial and Arial Narrow depending on whether there is space available using Arial or not.
2016-09-06 17:03:28 -06:00
ingmargoudt
e2a479255a refactor : removed all instances of new Random() and replaced with RandomUtil for a ThreadLocal randomizer 2016-09-05 15:03:47 +02:00
fireshoes
f2cc8d4571 Removed Nissa vs Ob Nixilis from ignored images. 2016-09-04 23:06:13 -05:00
fireshoes
b9d29d3ebf Added upcoming sets. [KLD] Updated mtg-cards-data.txt. Added some simple cards. 2016-09-04 22:54:05 -05:00
fireshoes
16c40d0248 Merge origin/master 2016-09-04 09:13:47 -05:00
fireshoes
5e911ca63c Updated image sources for upcoming sets. 2016-09-04 09:08:46 -05:00
spjspj
fb5087683f spjspj - Implement new token source (mtg.onl) for downloading of tokens to tokenDescriptor format in TOK.zip 2016-09-04 22:34:43 +10:00
LevelX2
720a4457fd * Fixed hybrid mana symbol display for characteristic-based card rendering. Removed not used import statements. 2016-09-03 10:52:14 +02:00
Mark Langen
629da22dd9 Small fix to renderer. 2016-09-01 17:23:17 -06:00
Mark Langen
b2895ee9eb Tweaked layout for small card text. 2016-09-01 16:13:28 -06:00
Mark Langen
463576dbd0 Merged up to current 2016-09-01 15:44:14 -06:00
Mark Langen
818efb8535 * Textual set symbols no longer displayed if set symbol image doesn't exist.
* Fixed a small graphical mispositioning in rendering of keyword abilities.
* Added an option to hide set symbols entirely when rendering.
* Fixed flip walkers like Arlin Kord showing a "0" loyalty on their back face (when they should have no loyalty there).
* Removed some log files I accidentally committed.
* Fixed a bug in tokens, where they are missing their expansion symbol of they are created by another token
* Fixed the the new Rendering based CardPanel not returning the correct Image through getImage (resulting in a poor quality image in the card preview window)
2016-09-01 15:00:46 -06:00
spjspj
0f043d480d spjspj - Implement new method for image generation of tokens. 2016-09-01 17:11:12 +10:00
Mark Langen
d33f8a636e Most obvious bugs ironed out. Ready for PR. 2016-08-31 23:37:31 -06:00
Mark Langen
d5415d2d04 Working Card Rendering 2016-08-31 04:43:28 -06:00
spjspj
4bf78fd6d4 Update devs 2016-08-19 19:45:23 +10:00
LevelX2
873ecddb1d Fixed that token images were not loaded. 2016-08-15 11:13:06 +02:00
LevelX2
539b03bd1d Xmage 1.4.14v0 2016-08-13 10:14:38 +02:00
fwannmacher
9b5a02c09c - Fixed issue #2075 2016-08-04 09:52:56 -03:00
LevelX2
a0fbcddeb9 * Added preference option to set the size of the enlarged image popup window. 2016-08-02 12:00:36 +02:00
fireshoes
88e8894b29 Added Duel Decks: Nissa vs Ob Nixilis and From the Vault: Lore. 2016-08-01 15:05:25 -05:00
Quercitron
c04bd6d64a Replace Yes/No text with Mulligan/Keep text on mulligan answer buttons to make options more clear. 2016-07-31 15:57:45 +03:00
Derek M
86e7ace06e Merge pull request #2112 from fwannmacher/master
Converted cardNumber from int to String. Now card number with "a" or "b" can be used.
2016-07-25 16:24:01 -04:00
spjspj
883b63a01d spjspj - Update to push deck List across from Client to Server for Custom Cube 2016-07-25 22:44:21 +10:00
fwannmacher
10778cdd6b - Converted CardImpl.cardNumber from int to String
- Fixed Issue #1953
- Fixed Issue #1914
- Fixed Issue #739
2016-07-24 15:18:54 -03:00
fwannmacher
78f327e822 - Fixed more image url properties 2016-07-21 01:19:28 -03:00
fwannmacher
9861f762b7 - Added option to select number of threads for image download 2016-07-20 16:08:36 -03:00
fwannmacher
8c1e7ec42e - Fixed some image url properties 2016-07-20 14:23:22 -03:00
fireshoes
9630320ba9 Changed set codes in image sources and Mage Sets to match recent changes. Changed Portal Second Age set code back to PO2. Updated tokens with recent sets to product correct images. Fixed that there was no basic land slot in EMN packs. 2016-07-18 15:49:43 -05:00
Quercitron
91f74ced1f Add downloading of double-faced cards from the mythicspoiler.com 2016-07-12 03:31:08 +03:00
LevelX2
d0ecb473da Xmage 1.4.13v0 2016-07-11 22:54:43 +02:00
LevelX2
8e76430d07 Revert "Use a dedicated thread pool for audio" 2016-07-10 22:01:06 +02:00
fireshoes
4cf3f29c4c [EMN] Added complete spoiler to mtg-cards-data.txt. Added existing reprints. 2016-07-08 11:18:14 -05:00
spjspj
26d38f0773 spjspj - Add the option of having a .dck file as a cube 2016-07-04 00:20:31 +10:00
LevelX2
ce91f6aae7 Fixed a problem with transformed image cache. 2016-07-02 19:07:26 +02:00
LevelX2
1c2aa4c10a Fixed cleint exception problem with transformable cards. 2016-07-02 18:38:29 +02:00
LevelX2
7cfdd80c57 Chnaged permanent row handling so creatures are always shown towards the opponent side. 2016-07-02 13:45:34 +02:00
LevelX2
e9993f980a Added workaround to deck generator to handle missing basic lands. 2016-07-02 13:44:36 +02:00
LevelX2
2874996994 Merge pull request #2032 from draxdyn/hold_priority
Hold priority on Ctrl+click
2016-07-01 16:00:20 +02:00
LevelX2
3b0f7b074f * Some changes to distance calculation of enchantments on the battlefield. Added minimal permanet size preference setting (not working correctly yet). 2016-07-01 15:08:40 +02:00
fireshoes
33ac32f5c4 [EMN] Added additional 6/30 spoilers to mtg-cards-data.txt. Added some more cards. 2016-06-30 14:47:59 -05:00
draxdyn
a7409f3d08 Hold priority on Ctrl+click
In most cases, it is not useful to hold priority after doing something,
since the spell or ability added to the stack can just be performed
beforehand.

Hence, automatically passing priority is the only comfortable setting.

However, in some cases it is useful (chiefly for Infernal Tutor +
Lion's Eye Diamond and similar interaction), and currently players
have to open Preferences, change the option and then change it back
whenever they need to hold priority, which is very annoying.

This change allows to temporarily hold priority by simply holding
Control while performing an action, which solves the issue in a
manner similar to other clients.

A "Hold" indicator next to the spells cast indicator is displayed so
that the user knows his Control key holding was registered.

The code works by adding a new HOLD_PRIORITY player action that causes
the automatic priority pass options to be ignored until the player is
given priority again.

The client sends the message whenever it's not already holding priority
and Ctrl+click/space/enter happens anywhere.

This is somewhat "loose" as it means that Ctrl+click on the background
also holds priority, but this might actually be desirable and it greatly
simplifies the code, since only a global AWT event listener is required,
and there is no need to change every place in the code that could add
something to the stack.

It is also possible to hold priority and stop holding priority using
the context menu.
2016-06-29 19:57:45 +02:00
drmDev
9deb1bd0da Ignition Team implementation (requested card) 2016-06-29 03:21:40 -04:00
LevelX2
facd5ffa2c Merge pull request #2028 from draxdyn/cardpanel_threading
Fix broken threading in CardPanel
2016-06-28 13:28:37 +02:00
LevelX2
0733729382 Merge pull request #2029 from draxdyn/audio_threadpool
Use a dedicated thread pool for audio
2016-06-28 13:27:18 +02:00
LevelX2
d220c739a8 Merge pull request #2030 from draxdyn/performance
Improve GUI performance
2016-06-28 13:26:44 +02:00
LevelX2
f7cecdf050 Merge pull request #2033 from draxdyn/f6
Add support for F6
2016-06-28 09:16:09 +02:00
LevelX2
c505c2f44f Merge pull request #2027 from draxdyn/resize_editor
Update image when cards in editor are resized
2016-06-28 09:08:37 +02:00
draxdyn
62d5d45a45 Add support for F6
Skips everything until next turn, except for declare attackers and blockers.

F11 and F9 are a better design, but F6 is provided for compatibility with
established conventions.

There is currently no GUI button for it.
2016-06-24 21:34:30 +02:00
spjspj
157d94360c spjspj - Modifications to shrink size of players who have left. 2016-06-24 19:20:46 +10:00
draxdyn
053580c412 Add support for disabling animations 2016-06-23 16:21:34 +02:00
draxdyn
b8e5f5f942 Draw CardPanel to a buffered image and cache it across instances
Speeds up GUI performance.
2016-06-23 16:21:34 +02:00
draxdyn
892cfdce45 Draw MageRoundPane and its shadow to a buffered image and cache it across instances
Speeds up GUI performance.
2016-06-23 16:21:34 +02:00
draxdyn
ffb65d48fe Draw GlowText to a buffered image and cache it across instances
Speeds up GUI performance.
2016-06-23 16:21:34 +02:00
draxdyn
4b190eeaf4 Drastically simplify ScaledImagePanel by having it just use the resized image cache
All the current behavior of ScaledImagePanel seems to be useless, since the source
images are static, so we can just use the highest quality scaling possible and
cache the result using TransformedImageCache.
2016-06-23 16:21:34 +02:00
draxdyn
e3d84ca212 Cache resized and rotated images
RotatedResizedImageCache and MultiRotatedResizedImageCache contain the caching
machinery.

A cache of rotated and resized images is added to ImageCache, and is used by
the resizing functions there.

All the resizing and rotation functions in ImageHelper are redirected to the
ones in ImageCache.

This is slightly inefficient because it will cache some calls that are never
repeated, but it prevents developers from mistakenly using uncached functions
when calls are repeated, seriously impacting performance.

Also resizing functions that only take a width or an height have been removed,
and their calls fixed to provide the other dimension. It's still possible to
specify -1 as width or height to ignore constraints in that dimension, though.

Greatly speeds up UI performance.
2016-06-23 16:21:34 +02:00
draxdyn
1999dfe5c0 Add mechanism to register image caches and flush them all on GUI size change
This should avoid the issue of having lots of unused entries in caches if the
GUI size is changed multiple times.
2016-06-23 16:21:34 +02:00
draxdyn
415c8cce7e Don't call setText() on the popup text component until it is shown
Performance improvement, impacts profiles.
2016-06-23 16:21:34 +02:00
draxdyn
9513b5bf74 Don't call setText in MageTextArea if the text hasn't changed
Minor UI speedup, shows up in profiles for simple games.
2016-06-23 16:21:34 +02:00
draxdyn
8c2c1f4887 Don't call setEditable in ColorPane
Shows up in profiles, and should be unnecessary.
2016-06-23 16:21:34 +02:00
draxdyn
0b13660348 Use mouse point in event instead of calling getMousePosition()
Improves performance and is also the correct way to do this.
2016-06-23 16:21:34 +02:00
draxdyn
d8b791a506 Use a dedicated thread pool for audio
Audio threads are busy while the sound plays, which could be several seconds,
potentially stalling other tasks competing for the thread pool.

So use a dedicated thread pool, which also allows to have it sized based
on the number of the audio lines.
2016-06-23 16:16:48 +02:00
draxdyn
1dddda6599 Fix broken threading in CardPanel
The current code is broken, can't touch the UI in a thread pool thread,
UI.invokeLater must be used to get back on the UI thread.

Also, it must check whether the card has been changed again before setting
the image and do nothing in that case.
2016-06-23 16:12:15 +02:00
draxdyn
5c177dcdc8 Update image when cards in editor are resized
Currently images are blurred when changing GUI size in the editor,
and this fixes the issue.
2016-06-23 16:01:47 +02:00
Quercitron
207961ee5f Fix that isType2 flag was not set for second sides of transform cards and flipped cards in the pictures download. 2016-06-22 13:10:42 +03:00
LevelX2
f691017cda * Gryff's Boon - Fixed that the target was wrongly selected during resolution. 2016-06-19 16:13:50 +02:00
LevelX2
84989973ed Merge pull request #2001 from draxdyn/fix_oobe
Fix ArrayIndexOutOfBoundsException in ButtonColumn.actionPerformed
2016-06-17 13:45:03 +02:00
LevelX2
469febfafd Merge pull request #2000 from aastrand/aastrand/password
Add TablesPanel filter for passworded games
2016-06-17 13:44:23 +02:00
LevelX2
5d1b96e4c9 Merge pull request #1986 from draxdyn/clicks
Recognize double clicks made in rapid succession
2016-06-17 13:42:38 +02:00
spjspj
8c017fe3d2 Merge pull request #2002 from draxdyn/getwizardsimage_npe
Fix NPE in getWizardsCard
2016-06-16 12:16:02 +10:00
draxdyn
54a7be59d0 fix NPE in getWizardsCard 2016-06-15 13:11:40 +02:00
Kranken
c445270783 Make password filter behave nice with settings 2016-06-15 00:03:22 +02:00
Kranken
9fee893ed1 Add TablesPanel filter for passworded games
This commit makes passworded a first class property of
TableView as well as adds filtering capabilities
of open and passworded games. Useful for hiding
passworded games when looking for open play and
useful for hiding open games when playing vs
a friend on a busy server.
2016-06-14 23:19:17 +02:00
draxdyn
d671a22398 Fix ArrayIndexOutOfBoundsException in ButtonColumn.actionPerformed
Don't call convertRowIndexToModel with a -1 row.
2016-06-14 18:31:33 +02:00
draxdyn
0b8404f0a4 Recognize double clicks made in rapid succession
Currently they are not recognized, because getClickCount() will be
higher than 2 since Java interprets them as quadruple, sextuple, etc. clicks.

So, instead of checking for getClickCount() == 2, check for getClickCount()
being an even number.

This allows to quickly remove or add many cards to a deck.
2016-06-14 13:02:51 +02:00
Alex Marcotte
a7e29b3fd0 Adding way to import deck from clipboard 2016-06-05 15:06:02 -04:00
LevelX2
266a0870ca Xmage 1.4.12v0 2016-05-29 10:59:39 +02:00
LevelX2
98fadbd8ba Merge pull request #1946 from Simown/master
Reverted changes to deck generation sliders
2016-05-29 10:19:11 +02:00
LevelX2
9fa0bf7bd2 Swapped main menu position of Feedback and Preferences (so Preferences is always available if you switch to a too big font size). 2016-05-29 09:53:56 +02:00
fireshoes
20ec737a58 [EMA] Added 5/23 spoilers. 2016-05-23 18:38:04 -05:00
Simown
dc10a52caf Reverted changes to deck generation sliders 2016-05-23 12:31:56 +01:00
LevelX2
f44987aa37 * Fixed that Suspend was handled as activated ability for increase/decrease of mana activation costs. 2016-05-22 16:02:10 +02:00
Quercitron
c781728b97 Add rating to the client (#1498) 2016-05-17 17:27:43 +03:00
fireshoes
a2c56d821c Added a bunch of promo cards and the new sets that were announced today. 2016-05-16 23:05:31 -05:00
LevelX2
308c485a67 Merge pull request #1913 from Bitmaximus/master
Add tracking for quantity of artifacts in card lists. Add tracking for quantity of card types in graveyard.
2016-05-15 18:15:28 +02:00
spjspj
f9e363fb30 spjspj - Update Rich Man draft to allow Random packs 2016-05-15 23:52:13 +10:00
LevelX2
d9066db141 * Fixed that freeform tables were not shown in thelist of open games. 2016-04-30 12:01:42 +02:00