Commit graph

29 commits

Author SHA1 Message Date
poixen
3ffb11d2e9 Updated mana class to pass failing tests 2015-11-25 19:57:11 +01:00
poixen
a5242ff087 resolved conflicts 2015-11-21 12:02:55 +01:00
poixen
56be135532 Removed minus subtraction limits
+ Removed minus subtraction limits to allow other areas of code to work
2015-11-20 17:22:48 +01:00
LevelX2
c4ab5806e0 Revert "Mana Class Overhaul" 2015-11-19 22:59:57 +01:00
LevelX2
68ff09c219 Revert "Mana updates" 2015-11-19 22:59:15 +01:00
poixen
05b841577a added subtraction logic to enough()
+ added subornation logic to enough(). We do not want to mix the public
subtract() call with this method. As doing so would mean that either a)
subtraction can go below 0 (this should not happen) or b) we break this
function with exceptions. This is a work around for these scenarios.
2015-11-19 17:42:59 +01:00
poixen
2c617a6aaf Mana updates
+ calling subtraction will now throw an exception if you try and use
more mana than is available. This is better than setting it to 0.
Setting to 0 impose that you should still be allowed to perform the
action.
+ updated subtraction test to check for exception
+ subtractionCost() will not allow using mana that is not available,
same as subtract()
2015-11-19 17:09:40 +01:00
poixen
1f5638539f Class Overhaul
+ added javadoc
+ added final to method variables that should not be mutated
+ Mana can no longer be initialised with minus values
+ added null assertions
+ renamed ‘addXXX’ to ‘increaseXXX’. Add implies that you are able to
add variable amounts.
+ subtraction can no longer allow minus values.
+ removed unused state
+ refactored classes use renamed/removed mana calls
+ added comment to contains(), needs to be looked into?
+ Added validation to setting of mana. Can no longer be set to minus
values. Will log if an attempt is made
+Added comment to static mana, this is unsafe.
2015-11-19 09:53:52 +01:00
LevelX2
a5d7ca83d7 Checked objects possible to cause null pointer exceptions. Added some logging. 2015-10-31 11:55:20 +01:00
LevelX2
b169e7e6c7 * Mage-Ring Network - Fixed calculation of available mana. 2015-07-23 12:42:02 +02:00
LevelX2
eca37467a3 * Added a auto select color for color choices of mana abilities that ask the human player to select a colo (implements #690). 2015-07-21 17:23:10 +02:00
LevelX2
0e3d4b335a Some fixes/improvements to generation of available mana. 2015-07-12 09:11:13 +02:00
betasteward
282f600749 additions and improvements to ThreadLocalStringBuilder 2015-05-03 13:09:22 -04:00
LevelX2
ad012ebd02 Fixed more CPU load caused by calculation of available mana. 2015-02-14 00:22:17 +01:00
LevelX2
874b170a74 Added ManaOptions test and some changes in handling. 2015-02-11 01:10:34 +01:00
LevelX2
e0b17eacc7 * Reworked calculation of available mana that can be a source of heavy server load. 2015-02-07 18:16:35 +01:00
LevelX2
5b78dbe5c2 Added F10 to skip priority while the stack resolves. 2014-11-16 09:00:28 +01:00
LevelX2
acc3ac7b60 * Opal Palcar - Fixed a bug that the first mana ability also wrongly gave the commander boost. 2013-12-27 19:14:17 +01:00
North
0bb110be45 [refactor] moved enums from Constants class 2013-06-16 12:28:10 +03:00
North
239a4fb100 [refactoring][minor] Replaced all tabs with four spaces. 2012-06-19 23:50:20 +03:00
magenoxx
037310c279 Mana and getPlayable fix. +1 test passed. 2012-06-03 17:50:13 +04:00
BetaSteward
ee870a8970 changes to support tracking mana sources + some refactoring 2011-09-21 14:01:00 -04:00
magenoxx
0df1e17820 [M12] Consume Spirit 2011-08-20 17:31:14 +04:00
magenoxx
8be91072de Displaying not implemented cards for M12. 2011-07-31 09:51:42 +04:00
BetaSteward
659f790325 AI fixes and deck construction 2011-02-18 23:22:31 -05:00
magenoxx
770e5673f5 Now random decks contain non basic lands. 2010-12-01 21:55:37 +00:00
BetaSteward
e0b4388361 ... 2010-09-25 20:35:23 +00:00
BetaSteward
a3e2a8dae0 ... 2010-03-27 01:35:32 +00:00
BetaSteward
a4ecfa58fa Initial 2010-03-20 02:47:42 +00:00