Commit Graph

15016 Commits (master)

Author SHA1 Message Date
Leandro Doctors b976afb965 Organize imports 2020-02-05 17:58:37 +08:00
Leandro Doctors 2e6fcc2629 refactor: Apply "Protected Variations" for deck extension name 2020-02-05 17:58:37 +08:00
Mike 648806f1d8 add AiStrCal tool to compare AI implementations 2020-01-17 08:26:14 +08:00
Leandro Doctors 2733516cb9 Organize imports 2020-01-16 08:21:24 +08:00
melvinzhang 3fed8cbf3e bump version number to 1.96 2019-12-29 11:16:33 +08:00
Bilbo a6e97873fd Optimize mesage generation.
* Use faster stringbuilder for card token formatting instead of full-blown formatter.
* When SN/RN/PN and similar placeholders are expanded, calculate the replacement
  value only if the placeholder is present in the string.
   In a test with some random games:
    55.4M times replaceName was called
    39.2M times SN was present
     2.0M times PN was present
     0.2M times RN was present
     0.2M times X was present
* Generate event description on demand, instead on event construction.
   In a test with some random games:
   71.601M times description is generated
    0.258M time it is actually read or used
 By postponing generating the description to a point when it is actually needed,
 CPU time spent when going through possible actions is reduced to about 80%,
 so in given amount of time, MMAB AI and similar
 is able to examine larger part of the possible game states.
2019-12-13 05:25:23 +01:00
Bilbo d8fcafa0eb Print total time and time per card at end of the test. 2019-12-08 09:08:47 +01:00
Bilbo 10bfd0ddd9 Add ability to skip cards for the test. 2019-12-08 09:08:15 +01:00
Bilbo 120e019c95 Refactor Commandline parsing. 2019-12-08 09:08:15 +01:00
Bilbo 22a1471424 Add "card test" mode that tests all cards in a predefined scenario. 2019-12-06 23:04:39 +01:00
Bilbo 39f14b40c8 Fix exception when attempting to open file or directory
(mostly log directory, crash logs, etc ...) with default application on a system where this is not supported.
If opening fails, show a messagebox that also shows the file/directory name.
2019-12-03 07:02:09 +01:00
Bilbo f6ab949566 Fix exception when attempting to open URL on a system where this is not supported.
If opening URL fails, show a messagebox that also shows the URL.
2019-12-03 05:45:06 +01:00
Ada Joule 217bee1bc6 Make Riot grant Haste forever 2019-02-12 00:11:07 +07:00
melvinzhang 8b8d590cd6 replace clunky comparison using getId with isFriend 2019-01-16 19:58:02 +08:00
Ada Joule 460a51da88 Merge branch 'spectacle' 2019-01-16 17:44:54 +07:00
Ada Joule 0b35c1d557 Add EntersSpectacleEffect to MagicAbility 2019-01-16 17:43:57 +07:00
Ada Joule 542cbb9c89 Change Spectacle cost to mana cost instead of just cost 2019-01-16 17:40:44 +07:00
Ada Joule f6e4a18cde Fix error 2019-01-16 17:36:11 +07:00
Ada Joule fcb38517b3 Add Addendum condition 2019-01-16 17:27:05 +07:00
Ada Joule e42b42c829 Add Adapt to effect script 2019-01-16 17:09:54 +07:00
Ada Joule 357eeb284b Add Spectacle mechanic 2019-01-16 03:58:06 +07:00
Ada Joule 50b97bd746 Add Afterlife [number] to ability script 2019-01-16 03:31:46 +07:00
Ada Joule be00f393ea Add imports 2019-01-16 03:31:32 +07:00
Ada Joule 866d374441 Add Afterlife trigger 2019-01-16 03:28:08 +07:00
Ada Joule 4690cbe4b8 Add Riot ability to script 2019-01-16 03:14:25 +07:00
Ada Joule 0efcab7f0d Add Riot trigger 2019-01-16 03:13:56 +07:00
Ada Joule 1f84ef595b Use addFirstEvent instead of addEvent for explore
This fixes the Jadelight Ranger bug
2018-11-28 03:55:05 +07:00
Ada Joule 2ff0e11de6 Use getGameCost() instead of getCost() 2018-11-26 19:32:44 +08:00
Ada Joule 81d0562f0f Move mana cost to the Jump-start event 2018-11-26 19:32:44 +08:00
Ada Joule 13ae81e0e2 Add Jump-start to MagicAbility.java 2018-11-26 19:32:44 +08:00
Ada Joule 6e03b1ceb3 Add MagicJumpStartActivation.java 2018-11-26 19:32:44 +08:00
Ada Joule b4e2e742a1 Rename ReturnCardAction to PutOntoBattlefieldAction
fixes #1632
2018-11-26 05:19:37 +07:00
Ada Joule 8c1901072c Add Mentor mechanic 2018-11-15 18:48:09 +08:00
Ada Joule f3d488fa37 Add GRN to sets list and update standard.fmt 2018-11-14 13:35:40 +07:00
melvinzhang 8bd8eb53d8 bump version to 1.95 2018-11-12 21:40:52 +08:00
Ada Joule b90a1c5a17 Add permanent CMCEQ to target filter parser 2018-11-12 18:30:08 +08:00
Ada Joule 8ccca8aa3d Add corpse counter to MagicPlayMod 2018-11-12 18:30:08 +08:00
Ada Joule 1d7bdc0cbb Add "when you become targeted" ability 2018-11-12 18:30:08 +08:00
melvinzhang 3e02c92f3c reduce nesting using 'else if' and merging condition of nested if, for #1630 2018-11-04 10:08:08 +08:00
Bilbo b31f953e02 Refactor: Use StringBuilder instead of repeated string concatenation. 2018-11-04 10:05:25 +08:00
Bilbo ce02d4afbb Refactor: Use Collections.singletonList instead of Arrays.asList where appropriate. 2018-11-04 10:05:25 +08:00
Bilbo 28732e250a Implement cost reduction to apply for most cases of reducing hybrid/split/phyrexian cost.
Extend unit test with those cases.
2018-11-04 10:05:25 +08:00
Bilbo dd3f975c9d Cost increasing abilities were put into wrong layer.
Fix YourCostIncrease and CostIncrease ignoring reduction cost/amount.
Enhance cost reduction to support colored-mana-cost reduction.
2018-11-02 11:55:24 +08:00
melvinzhang 5640960c34 replace manual close with try-with-resources statement 2018-11-01 17:01:18 +08:00
melvinzhang cc622f594d use getResourceAsStream instead of getResource, for #1617 2018-11-01 16:09:21 +08:00
melvinzhang 5cb0594ee2 use getResourceAsStream instead of getResource, for #1617 2018-11-01 12:53:45 +08:00
melvinzhang 470c6fe675 use getResourceAsStream instead of getResource, for #1617 2018-11-01 12:44:25 +08:00
melvinzhang 0735be1f7b use getResourceAsStream instead of getResource, for #1617 2018-11-01 12:42:41 +08:00
Bilbo 91668c2964 Fix weird crash with bogus reason if deckfile does not exists (now it shows that deck is invalid). 2018-10-28 20:30:13 +08:00
Bilbo 5aaa5ddc02 Make surveil trigger unconditional, as unlike scry, there is no "pseudo-surveil" action. 2018-10-25 09:45:13 +08:00