Alex Vasile
e679574a15
Fixes for Mana.enough and Mana.needed. For #8153 ( #8663 )
...
Fixes to Mana.enough:
mana of any color (ManaType.Any) was being used to pay for colourless mana.
Fixes for Mana.needed:
mana of any color (ManaType.Any) was being used to pay for colourless mana.
calculation for generic mana remaining was using min(0, available) instead of max(0, available) meaning that leftover mana of other types was never used to pay for any leftover generic costs.
Other:
Added tests for both .needed and .enough.
Moved tests some tests from ManaUtilTest to ManaTest
Simplified Mana.subtractCosts by calling Mana.substract first to make use of common functionality.
Added more documentation
Added tests for both .needed
Added more tests for .enough to cover the changes with colourless mana.
2022-06-01 08:13:37 -06:00
Evan Kranzler
c93af17190
updated static filter test to detect multiple errors at once
2021-12-02 09:11:08 -05:00
Evan Kranzler
dcb08be4c3
added static filter test, a few other small changes
2021-11-17 08:31:50 -05:00
Oleg Agafonov
fa70af6131
Dev: removed test data from resources to data folder;
2021-10-01 14:10:39 +04:00
Evan Kranzler
f57693392c
various ability word text fixes
2021-07-17 11:17:49 -04:00
Evan Kranzler
a61d5543fa
replaced all instances of converted mana cost with mana value
2021-04-17 17:02:27 -04:00
Oleg Agafonov
2393485320
* Mana increase effects - fixed that some infinite mana combos gives 0 mana on too much permanents/effects (example: Nyxbloom Ancient);
2021-02-02 19:26:49 +04:00
Evan Kranzler
e5344b7a96
Refactoring snow mana to allow tracking how much is spent (Ready for Review) ( #7406 )
...
* refactored mana methods to WUBRG order
* more WUBRG refactoring
* added new mana tracking object
* fixed code error
* fixed missing mana count
* fixed null pointer exception in tests
* fixed issue with equality
* more equality fixes
* some cosmetic changes to ManaTest
* added copy method to setToMana
* fixed some initialization issues
* fixed serialization issue
* [KHM] Implemented Search for Glory
* updated mana handling to track snow
* added tests for snow mana tracking
* updated implementation of setter methods
* updated paramater to use copy methods
* fixed snow mana test to ensure proper mana tapping
* replaced instances of getPayment with getUsedManaToPay
* updated tracking of snow mana
* reverted snow mana tracking removal
* finished reverting change
2021-01-21 18:13:51 -05:00
Oleg Agafonov
1db8d07cbd
* GUI: fixed broken mtgjson decks import ( #7065 );
...
Fixed typos in comments;
2020-09-16 02:15:40 +04:00
Oleg Agafonov
c5d7a3e9f9
* GUI: added auto-fix for deck files on usage (if deck contains wrong card numbers then it will be fixed and saved automaticity);
2020-08-08 21:27:20 +04:00
jasc7636
cdcef4649d
Make watcher copy method deepcopy collections
2020-06-15 10:08:56 +02:00
Tim Haering
17c40ead3c
add import support for mtgjson deck files
2020-04-29 20:29:15 +02:00
Antonio Alonzi
f86529bbb9
#6256 : Do not create new Set/Map
2020-03-30 09:22:02 +01:00
Antonio Alonzi
76c9d38f57
#6256 : Fixed Watcher copy method for JDK11
2020-03-28 19:56:25 +00:00
Oleg Agafonov
bd0974eecd
* Cost increasing - fixed rollback error ( #6284 );
2020-02-17 20:43:51 +04:00
Oleg Agafonov
5adab75324
Revert "format: organize imports"
2020-02-05 02:17:00 +04:00
Leandro Doctors
8a0a9acff7
format: organize imports
2020-02-04 16:21:48 -03:00
Ingmar Goudt
ce23f6900d
fix conflicts
2019-12-29 19:28:20 +01:00
John Hitchings
b62d4fd20d
Support for importing mtga decks.
2019-05-19 11:18:09 -07:00
Ingmar Goudt
6703ba693d
refactor the copy functionality for no-args watchers
2019-04-30 20:28:57 +02:00
John Hitchings
61d40902ab
Ability to import draft logs as decks.
2019-04-11 22:27:21 -07:00
Oleg Agafonov
caf1a98759
* UI: added deck export to MTG Arena format ( #4243 );
2019-03-22 20:33:36 +04:00
Oleg Agafonov
a2feda38ce
Fixed mtgo deck export (sorting, empty lines);
2019-03-22 20:12:06 +04:00
Oleg Agafonov
04cb20f46a
UI: improved deck editor exports:
...
* added deck export to files (#4243 );
* fixed wrong card sorting in deck files after save (#3719 );
2019-03-21 19:17:41 +04:00
Oleg Agafonov
a260030069
Fix tests
2019-03-19 21:44:06 +04:00
John Hitchings
0ea73b19df
Refactor Sets.saveDeck into a deck exporter series of classes.
2019-03-17 14:58:05 -07:00
John Hitchings
1e6e279bc8
Merge branch 'add-cockatrice-deck-format-5493' of github.com:hitch17/mage into add-cockatrice-deck-format-5493
2019-01-10 19:40:54 -08:00
John Hitchings
aac3e3fdc1
add importer for o8d and some more decks to test.
2019-01-10 19:33:42 -08:00
John Hitchings
5bf748e2b5
Move tests to the Mage directory and stub out looking up cards by names for tests.
2019-01-10 11:04:00 -08:00
John Hitchings
9372ba63e2
Move tests to the Mage directory and stub out looking up cards by names for tests.
2019-01-10 09:52:38 -08:00
LevelX2
b073ce1c42
* Added to all toUpperCase/toLowerCase calls the Locale.ENGLISH to prevent problems with some languages (e.g. Turkish). Removed some unused import statements. ( #4634 ).
2018-03-18 18:18:54 +01:00
Evan Kranzler
54b8f10c3c
text fixes and test fixes to fix how tests test text, then more text next
2017-10-07 16:08:06 -04:00
ingmargoudt
372584f7ad
changed cardtype from list to enumset
2017-03-03 17:04:32 +01:00
JOAC69
845e406d63
Fix failing tests that were doing Object.Equels where == was needed
2017-02-19 02:31:04 -06:00
vraskulin
a15220d51e
Bugfixes with != instead of equals and default toString calls
2017-02-15 19:52:20 +03:00
LevelX2
17fbee2400
* Fixed a bug that adding counters with Skyship Plunder or Maulfist Revolution did not trigger counter added events.
2017-01-13 22:40:37 +01:00
LevelX2
782190bac3
Some changes to mana handling to handle {C} mana.
2016-01-08 23:25:42 +01:00
LevelX2
87fc4d53dc
Fixed Framework pom - removed fixed src folder. Minor fixes to ManaTest.
2015-12-01 22:43:56 +01:00
LevelX2
595a55b7c5
Revert "Fixed package declarations for moved Mage package."
...
This reverts commit 06199eeca3
.
2015-12-01 22:33:59 +01:00
poixen
db2af7000e
Merge pull request #1399 from poixen/counters
...
Added unit tests and javadoc for Counter class.
2015-12-01 20:04:15 +01:00
emerald000
7abfc7d025
File that wanted to feel special and not be part of last commit.
2015-12-01 06:16:00 -05:00
emerald000
06199eeca3
Fixed package declarations for moved Mage package.
2015-12-01 06:07:01 -05:00
poixen
ad0fb6b7eb
Added unit tests and javadoc for Counter class.
2015-11-30 21:44:57 +01:00
poixen
46eb6c0525
Restructured Mage module
2015-11-29 21:56:49 +01:00