Commit Graph

12 Commits (2733516cb9cdad7ac4cef98b819d4d01846e5c66)

Author SHA1 Message Date
Leandro Doctors 2733516cb9 Organize imports 2020-01-16 08:21:24 +08:00
Martin Petricek bd5ae5fd7a Refactoring (#1543)
* Fix typos.

* Remove unnecessary boxing/unboxing.

* Replace traditional 'for' loops with 'foreach' loops.

* Replace explicit types with <> (diamonds) where they can be inferred.

* Collapse identical catch branches.

* Replace statement lambda with expression lambda for short statements.

* Remove unnecessary imports.

* Replace some lambdas with Comparator.comparing

* Replace Runnables with lambdas.

* Use addAll instead of adding whole collection manually.

* Simplify boolean expressions.

* Remove redundant 'else'.

* Simplify some boolean conditions that are always true or false.

* Inline redundant local variables.

* Remove extraneous semicolons.

* Fix Javadoc errors.

* Replace anonymous classes with lambdas.

* Replace chain of 'if's with switch.

* Remove delaration of exception that is never thrown.

* Use String/StringBuilder properly.
2018-04-08 08:59:14 +08:00
melvinzhang 86210e9c66 grant haste to permanent cast with suspend as long as they are under control player who cast it, for #351 2017-08-07 12:09:49 +08:00
melvinzhang 2932f6ee70 pass MagicPermanentAction in MagicEvent 2017-07-29 09:33:31 +08:00
melvinzhang 0cfbac301b fix compiler error by casting long to int 2017-07-29 08:46:48 +08:00
melvinzhang f3e695eb38 move getStateId from MagicCopyable back to MagicObject 2017-07-29 08:32:47 +08:00
melvinzhang eafc98097a simplify groovy with MagicTuple 2017-07-28 16:05:39 +08:00
melvinzhang 3e092912ef replace dynamic action with static action 2017-07-28 15:26:11 +08:00
melvinzhang 3f750aef0c pass MagicChainEventFactory and MagicSourceEvent in MagicEvent 2017-07-28 14:31:14 +08:00
melvinzhang 68d838410b pass damage.getAmount() and damage.isCombat in MagicEvent 2017-07-28 14:07:25 +08:00
melvinzhang 032d51b4a9 use MagicObjectImpl.getStateId for MagicCopyable as it uses getId() for MagicPlayer 2017-07-28 13:52:11 +08:00
melvinzhang ca1c47e758 store int, MagicCounterType in MagicTuple 2017-07-28 12:32:16 +08:00