Commit graph

8769 commits

Author SHA1 Message Date
Kyle Boutette
45b84f1e8d Fixes #7126 Introduce and use new lower_name column for card import
Profiling deck import revealed we spend most of the time running sql.
The specific query compared against `lower(name)` which is not under an index.
As a result, importing a deck could be quite slow since we were looking at
every single card in the game.

This change introduces a new indexed column, `lower_name`, and swaps
findCardsCaseInsensitive to run against it.

Optimally, we'd introduce an index here on `lower(name)` to avoid the
unnecessary column. ie,
`CREATE INDEX IF NOT EXISTS lower_name_index ON card (lower(name))`
However, H2 does not currently support indices on expressions.
2020-10-10 20:17:06 -05:00
Evan Kranzler
8c7d7f0b77 [M20] various text fixes 2020-10-08 09:15:38 -04:00
Evan Kranzler
50a0954606 [ELD] various text fixes 2020-10-07 20:57:43 -04:00
Evan Kranzler
6a3240fad3 [ZNR] various text fixes 2020-10-07 20:04:34 -04:00
Evan Kranzler
665528b251 [M21] some more text fixes 2020-10-07 09:28:12 -04:00
Evan Kranzler
524b9fcd44 [M21] various text fixes 2020-10-06 21:12:07 -04:00
Evan Kranzler
5187636672 [THB] various text fixes 2020-10-06 20:12:06 -04:00
Evan Kranzler
d3484ddc5d fixed life payment cost text 2020-10-06 19:53:21 -04:00
Evan Kranzler
57022068d3 fixed cost reduction text 2020-10-06 19:49:45 -04:00
Gösta
f750dc9c42 improved grammar of AddMana* Effects
Fixes #7051
2020-10-02 21:43:31 +02:00
Gösta
6c11d67980 Fixes ChooseCardTypeEffect always showing all card types 2020-10-02 15:45:43 +02:00
Evan Kranzler
042376d146 replaced hacky fix with a better one 2020-09-29 22:44:38 -04:00
Evan Kranzler
3f4698434b fixed random mystery booster test failures 2020-09-29 19:35:32 -04:00
Evan Kranzler
827ffb5fb2 changed how effects are applied for triggered abilities, added test (fixes #7083) 2020-09-29 18:55:51 -04:00
Evan Kranzler
bd5d3954b1 [SLD] Implemented Michonne, Ruthless Survivor 2020-09-28 20:01:10 -04:00
Evan Kranzler
4162c3e5cb [ZNC] fixed Whispersteel Dagger, added test (#7085) 2020-09-28 19:22:30 -04:00
Evan Kranzler
7647a3d8f0
Support for copying permanent spells (WIP, do not merge) (#7084)
* added initial support for permanent tokens

* [ZNR] Implemented Lithoform Engine

* [ZNR] Implemented Verazol, the Split Current

* permanent spell tokens no longer count as created

* small change to token generation

* added test, currently incomplete

* found a potential solution for kicker issue, possibly too much of a hack

* fixed a test failure

* reversed hack changes

* skipped failing tests

* added more tests
2020-09-27 10:54:44 -04:00
Evan Kranzler
0c4350afb1 [ZNR] fixed issue with Ashaya, Soul of the Wild and Kenrith's Transformation (#7046) 2020-09-24 20:39:03 -04:00
Evan Kranzler
40e663e2cf [ZNR] fixed Crawling Barrens giving multiple instances of added subtypes and card types (#7046) 2020-09-24 20:00:58 -04:00
Evan Kranzler
44a8954edf re-implemented O-Kagachi, Vengeful Kami (fixes #7082) 2020-09-23 21:57:44 -04:00
Evan Kranzler
be3834e762 updated implementation of abilities which trigger on gaining life for the first time in a turn 2020-09-23 19:53:09 -04:00
Evan Kranzler
b7e5d44b9d updated implementation of abilities which trigger on the second card in a turn being drawn 2020-09-23 19:52:30 -04:00
Evan Kranzler
f450de0d51 [ZNR] fixed Inscriptions kicker cost text (#7044) 2020-09-23 19:51:44 -04:00
Evan Kranzler
20e7c7cda3 [ZNR] fixed Moraug, Fury of Akoum bugs with combat (#7046) 2020-09-22 18:50:21 -04:00
Evan Kranzler
c7ebb4851f fixed null pointer exception with Pako, Arcane Retriever (fixes #7062) 2020-09-22 17:41:35 -04:00
Evan Kranzler
87b1efa546 [ZNR] fixed Malakir Blood-Priest text 2020-09-21 17:41:28 -04:00
Evan Kranzler
0ca95bb794 [ZNR] fixed Relic Robber text (#7044) 2020-09-21 17:37:18 -04:00
Evan Kranzler
0986a98022 [ZNR] fixed Ancient Greenwarden text (#7044) 2020-09-21 17:18:39 -04:00
Evan Kranzler
45a2532a89 [ZNR] fixed issues with Thieving Skydiver cost limitations and text (#7046) 2020-09-21 17:01:55 -04:00
Evan Kranzler
19344b00a4 [ZNR] fixed Moraug, Fury of Akoum creating extra turns incorrectly (#7046) 2020-09-20 21:31:21 -04:00
LevelX2
0f4cf84d93 * Some code cleanup. 2020-09-18 16:19:03 +02:00
LevelX2
2fec825523 * Some standardisation of dies trigger handling (fixes #7063 Midnight Reaper triggers when dies face down). 2020-09-18 16:15:21 +02:00
Evan Kranzler
42d6faf646 [ZNR] fixed Kargan Intimidator issues (#7046) 2020-09-17 17:10:25 -04:00
Evan Kranzler
9baaa8d214 [ZNR] added small additional fix for mdfc testing 2020-09-17 13:12:10 -04:00
LevelX2
75c4ff7d8e Using unique/special new event type for taking special actions and special mana payment(fixes #6753). 2020-09-17 17:01:59 +02:00
jeffwadsworth
08d9e8cfa0 - Fixed #7031. 2020-09-17 09:41:40 -05:00
LevelX2
1125d9cca1 Added a test. Some mionor changes. 2020-09-17 10:02:08 +02:00
LevelX2
4050631807 Fixed that some AlternativeCostSourceAbilities had no sourceId set. 2020-09-17 10:00:46 +02:00
LevelX2
0a66f1fca0 * Fixed some problems of player restore/rollback. 2020-09-17 08:05:56 +02:00
Evan Kranzler
c11ba5b82a fixed some card type hints (#7050) 2020-09-16 17:16:17 -04:00
Oleg Agafonov
1db8d07cbd * GUI: fixed broken mtgjson decks import (#7065);
Fixed typos in comments;
2020-09-16 02:15:40 +04:00
Evan Kranzler
5da085c975 fixed text formatting on some ability word cards 2020-09-15 15:56:32 -04:00
Evan Kranzler
29b5d15ca1 [ZNR] Implemented Moraug, Fury of Akoum 2020-09-13 09:45:49 -04:00
Oleg Agafonov
c325a6d2f0 Removed unused code (optionalCost); 2020-09-13 10:33:13 +04:00
Oleg Agafonov
6e0c7e868c Additional and alternative costs improved:
* Now player must choose additional costs before ability's modes;
* Fixed broken kicker ability from ZNR (see comments from d4ca287f0f);
* Improved compatibility of additional cost with cost modification effects (fixed that optional multi-costs doesn't affected by cost modification);
* Improved compatibility of additional cost with alternative cost (some cards ignores additional cost on alternative usage, e.g. on play free);
2020-09-13 09:57:17 +04:00
Evan Kranzler
5fa660a1d8 removed some redundant classes 2020-09-12 21:21:57 -04:00
Evan Kranzler
29efa7b067 fixed two small refactor errors 2020-09-12 20:56:46 -04:00
Evan Kranzler
8876d39491 move CounterPredicate to be within CounterType class 2020-09-12 20:48:13 -04:00
Evan Kranzler
3b52b4b833 [ZNR] Implemented Grakmaw, Skyclave Ravager 2020-09-12 18:20:49 -04:00
Evan Kranzler
0369a8dfb4 [ZNR] fixed Jace, Mirror Mage token dying on entry (#7046) 2020-09-12 09:26:44 -04:00
Evan Kranzler
c6e4a309fe updated discard effect to prevent unnecessary choosing from an empty hand (fixes #7064) 2020-09-11 22:34:16 -04:00
Evan Kranzler
5c0e7d6b2e fixed copy constructor for RemoveAllCountersSourceCost 2020-09-10 17:09:00 -04:00
Evan Kranzler
cc946a9148 [ZNR] Implemented Vine Gecko 2020-09-10 16:27:35 -04:00
Evan Kranzler
100c130cec [ZNR] fixed party count including opposing creatures, updated test (fixes #7061) 2020-09-10 12:40:01 -04:00
Evan Kranzler
8d9a62f259 [ZNR] Implemented Coveted Prize 2020-09-10 12:12:13 -04:00
Evan Kranzler
7008392a49 refactored mill effect names 2020-09-10 11:53:11 -04:00
Evan Kranzler
8d89c99f17 refactored cards which remove all counters to use a single class 2020-09-10 10:50:56 -04:00
Evan Kranzler
e6c1d502fc [ZNR] Implemented Myriad Construct 2020-09-09 09:54:46 -04:00
Evan Kranzler
0bf6949328 [ZNR] Implemented Thundering Sparkmage 2020-09-09 09:45:45 -04:00
Evan Kranzler
73f9a82938 [ZNR] small change to modes 2020-09-08 21:29:57 -04:00
Evan Kranzler
661119e462 [ZNR] Implemented Emeria's Call / Emeria, Shattered Skyclave 2020-09-08 17:28:17 -04:00
Oleg Agafonov
615fba5a72 * Explore abilities - fixed wrong ability hint text in some cards like Jadelight Ranger (#6958, #6986); 2020-09-09 01:17:43 +04:00
Evan Kranzler
21454f9b58 [ZNR] Implemented Nahiri's Binding 2020-09-08 11:27:40 -04:00
Evan Kranzler
f1cd9ca881 [ZNR] Implemented Kargan Intimidator 2020-09-08 11:10:48 -04:00
Evan Kranzler
ed65b8dea8 [ZNR] Implemented Inscription of Insight 2020-09-08 10:52:53 -04:00
Evan Kranzler
895453169b [ZNR] Implemented Felidar Retreat 2020-09-08 10:32:42 -04:00
LevelX2
8e465acb11 Primordial Mist - Fixed selection of face down targets (fixes #7045). 2020-09-08 13:14:15 +02:00
Evan Kranzler
ce4073d810 Implemented Skyclave Relic 2020-09-07 21:20:57 -04:00
Evan Kranzler
d4ca287f0f [ZNR] Implemented Inscription of Abundance 2020-09-07 16:29:18 -04:00
Evan Kranzler
9cf96bd391 [ZNR] Implemented Attended Healer 2020-09-07 16:08:19 -04:00
Evan Kranzler
5c78ed49a1 fix small error 2020-09-06 21:41:26 -04:00
Evan Kranzler
a15249f5d1 [ZNR] Implemented Phylath, World Sculptor 2020-09-06 21:11:00 -04:00
Evan Kranzler
5dffa447d1 updated delirium hint (#7050) 2020-09-06 20:20:25 -04:00
Oleg Agafonov
394e88f041 Fixed class names 2020-09-07 00:25:45 +04:00
Oleg Agafonov
01c7ed3e70 [ZNR] fixed text and hint colors (#7047); 2020-09-07 00:22:26 +04:00
Evan Kranzler
f977decf6e [ZNR] Implemented Relic Robber 2020-09-06 15:06:35 -04:00
Evan Kranzler
579e341944 [ZNR] Implemented Coralhelm Chronicler 2020-09-04 16:26:42 -04:00
Evan Kranzler
88f6ea6ee9 [ZNR] Implemented Umara Mystic 2020-09-04 10:36:11 -04:00
Evan Kranzler
d4ca4553d1 fixed a few recursion issues with party count computations 2020-09-03 20:44:24 -04:00
Evan Kranzler
cc0bb84dad
[ZNR] Implemented party mechanic (#7036)
* added incomplete party count implementation

* updated party count implementation

* added party count test

* fixed tests, updated test framework

* added an additional test

* fixed some errors in party count computation, should be good now

* fixed a small error with test generation

* fixed an NPE issue
2020-09-03 19:22:05 -04:00
Evan Kranzler
84609b74e0 fixed some errors in party count computation, should be good now 2020-09-03 18:25:59 -04:00
Oleg Agafonov
535e49b89f Test framework: added aliases support for activated abilities (related to #7036); 2020-09-04 02:18:40 +04:00
Oleg Agafonov
7a1795660a Fixed missing copy fields in CardImpl (morph, modaldfc, art; related to rollback); 2020-09-04 01:29:31 +04:00
Evan Kranzler
e254371f91 updated party count implementation 2020-09-03 16:34:15 -04:00
Evan Kranzler
42e38a4e8a some more changes to modal DFC implementation 2020-09-03 14:06:11 -04:00
Evan Kranzler
db11e2d92e Update CardsInOpponentGraveCondition.java 2020-09-03 13:02:19 -04:00
Evan Kranzler
b54c9449ef [ZNR] Implemented Mind Carver 2020-09-03 10:08:13 -04:00
Evan Kranzler
f9f845cb44 [ZNR] Implemented Prowling Felidar 2020-09-02 15:54:49 -04:00
Evan Kranzler
025a3edf9f [ZNR] Implemented Archpriest of Iona 2020-09-01 22:30:01 -04:00
Evan Kranzler
3a1239ba38 [ZNR] Implemented Spoils of Adventure 2020-09-01 19:49:43 -04:00
Evan Kranzler
73d37f0b70 added incomplete party count implementation 2020-09-01 17:36:40 -04:00
Evan Kranzler
b4c2898b39 [ZNR] Implemented Shepherd of Heroes 2020-09-01 17:30:48 -04:00
jeffwadsworth
34cece1107 - Fixed #7033 2020-08-31 15:38:46 -05:00
LevelX2
61315ec741 * Improved some FixedTarget initializations. 2020-08-31 10:54:59 +02:00
LevelX2
50668a548f * FixedTarget - Added check for missing init of zoneChangeCounter on use of getFirstTargetPermanentOrLKI (this fixes the problem with missing counter for Pelt Collector). 2020-08-31 10:54:08 +02:00
LevelX2
bbf30c6f74
Merge pull request #7026 from acabaca24/branch-for-issue6643
Duplicated code in "return to its owner's hand" effect
2020-08-31 09:18:10 +02:00
André Cabaça
7926c7c7d7
Missing 's' in effect
In the line 'sb.append(" to their owners' hand");' changed "hand" to "hands".
2020-08-31 00:56:30 +01:00
Andre Cabaca
36a3008f4c Optimized "Return to hand" effect text
Signed-off-by: Andre Cabaca <andre.cabaca24@gmail.com>
2020-08-30 12:49:24 +01:00
Andre Cabaca
0f6b8bbe9e Fixing an issue with the "return to its owner's hand" that was duplicating the target text.
Signed-off-by: Andre Cabaca <andre.cabaca24@gmail.com>
2020-08-30 11:54:13 +01:00
Oleg Agafonov
0cad4acf31
Merge pull request #7017 from acabaca24/branch-for-issue6643
Correcting some M21 text issues
2020-08-29 21:34:59 +02:00