Commit graph

1270 commits

Author SHA1 Message Date
Oleg Agafonov
92e15283ea * Tapped for mana abilities - fixed that it cause rollback error if you cast second card with that effect (Nyxbloom Ancient, etc); 2020-01-12 09:11:38 +04:00
Oleg Agafonov
e1fea330dd Test framework - multiple improves:
* Added support of spell ability choice in free cast (chooseSpellAbilityForCast);
* Added support of "up to" targets setup in addTargetAmount (use TestPlayer.TARGET_SKIP to stop target choose);
* Restored multiple checks for addTargetAmount;
* Fixed many wrong tests (wrong order or missing commands);
2020-01-12 01:17:39 +04:00
Oleg Agafonov
b366a83a45 Prepare new release 2020-01-09 08:55:26 +04:00
Oleg Agafonov
584d6ca614 * Canadian Highlander - updated card points; 2020-01-09 00:58:01 +04:00
Oleg Agafonov
bb59cedbd9 AI fixes:
* Gain control abilities - fixed wrong target chooses by AI (selects weakest permanent instead most powerful);
* Target of an opponent’s choice abilities - fixed that AI was able to cancel card cast, fixed wrong target chooses (Evangelize, Echo Chamber, Arena, Preacher, etc);
2020-01-04 22:37:16 +04:00
Adonis Pujols
4432d03d89 Add AIMCTS Sources to Maven (missing srcDirectory) (#6140)
No Maven expert, but the sources of every other Server.Plugin is included in Maven project EXCEPT for Mage.Player.AIMCTS (which seems necessary to actually be used/ran, imported, indexed, etc). I doubt this is intentional and it's the only way to get those sources working for IntelliJ IDEA.
This should add some more development support for anyone else poking around the code base, like in #6114
2020-01-04 07:25:14 -06:00
Oleg Agafonov
f065c5ca9c
Merge pull request #6133 from adonispujols/patch-1
Fixed Computer Player treating unprevented moves as unplayable.
2020-01-03 03:51:39 +01:00
Oleg Agafonov
0930bdd016
Merge pull request #5690 from magefree/copy_constructor_watchers
refactor the copy functionality for no-args watchers
2020-01-02 18:51:37 +01:00
Adonis Pujols
56eef2b563
Fixed Computer Player treating unprevented moves as unplayable.
(First time contributing so please excuse my noobness) Card not prevented by an effect should be playable ("&& !prevented"), but currently AI says card not prevented is NOT playable ("&& prevented"). Also, not sure why AI doesn't add to unplayable even though its not contained by playableInstants or playableNonInstants. I'm not even sure if we're maintaining ComputerPlayer's decision logic (as opposed to Computer Player7).
2020-01-01 14:44:45 -05:00
Oleg Agafonov
fc8c7eb410 * Centurion Commander - fixed missing banned cards Gaea, Mishra, Sensei and Yawgmoth; 2020-01-01 14:23:15 +04:00
Oleg Agafonov
cbb0680cc8 * Duel Commander - fixed missing banned card Yuriko; 2020-01-01 14:22:08 +04:00
Oleg Agafonov
d960ed7c75 Server stability improves:
* No more game freezes on commanders from disconnected players;
* No more game freezes for disconnected players in started games (on mulligan, yes/no choices, etc);
* Fixed missing ability controller in some choose dialogs (wrong targets for gained controlled permanents);
* Added TODO for next fixes with take turn controllers;
2019-12-31 05:36:47 +04:00
Ingmar Goudt
ce23f6900d fix conflicts 2019-12-29 19:28:20 +01:00
Ingmar Goudt
702a1f2498 remove all copy constructors and copy methods for all watchers 2019-12-29 19:18:20 +01:00
LevelX2
cadae9ee92 * Added checks in all the methods that wait for human response to prevent endless loops if the method is called from a the get playable actions. 2019-12-27 23:28:53 +01:00
Oleg Agafonov
61a58d36c2 Refactor: added missing getPlayersInRange in cards code (to ignore leaved/lost players); 2019-12-26 05:24:44 +04:00
LevelX2
133cc7342d * Fixed a problem with check playable methods causing e.g. endless loop if Shared Fate was on the battlefield. 2019-12-25 16:01:02 +01:00
Oleg Agafonov
98cbf42a11 Added MCTS AI for #6114 2019-12-23 23:35:19 +04:00
Oleg Agafonov
b8754af355 Karn Liberated banned in Tiny Leaders format (xmage doesn't support game restart for Tiny Leaders); 2019-12-23 22:09:18 +04:00
Oleg Agafonov
fac7ea1388 * AI: fixed rollback errors with copy spell abilities;
Tests: added copy spell support for test player;
2019-12-23 21:47:01 +04:00
Oleg Agafonov
d26fde8dbc Prepare new release 2019-12-21 18:23:15 +04:00
Oleg Agafonov
bd71c98e3e Fixed AI freeze with non available targets 2019-12-21 18:10:29 +04:00
Oleg Agafonov
8cce5a3648 * AI: reworked computer choices for "target permanent" targets:
* Fixed that computer was able to target own permanents for bad effects and opponent permanents for good effect;
 * Improved target choices on card score (as example: boost most valuable, discard most weaker);
 * Tests: fixed false positive tests (AI depended);
 * Tests: fixed that test player can't find permanents for some filters/predicates;
2019-12-20 20:20:16 +04:00
Evan Kranzler
cdad32aed4 updated Pioneer banlist 2019-12-16 17:23:33 -05:00
Oleg Agafonov
419cbf3c28 * AI: fixed that computer was able to choose non valid targets/cards (from all graveyards, hands, etc); 2019-12-16 02:58:10 +04:00
LevelX2
af9f2c93dd
Merge pull request #5910 from magefree/set_lint
Fix various hints and warnings on many set & block classes (via Intel…
2019-12-15 13:21:08 +01:00
Patrick Hulin
b7d080f888 Add December 2019 Vintage Cube. 2019-12-14 23:07:07 -05:00
Oleg Agafonov
a05da68493 Improved alternative cost from dynamic effects (it's like #5913 PR):
* Game: added multiple cards/effects support (old version supported only 1 effect per game);
 * Game: added combo support with split and adventure cards;
 * AI: computer can see and play cards with dynamic added alternative cost (like Bolas's Citadel);
 * UI: users can see playable cards with alternative cost.
2019-12-14 19:09:25 +04:00
Oleg Agafonov
9748136723 Fixed dates 2019-12-07 21:55:45 +04:00
Oleg Agafonov
d35e96cc47
Merge pull request #6071 from Dh0mp5eur/master
updated DuelCommander ban list
2019-12-07 01:09:18 +01:00
Oleg Agafonov
899cde4d54
Merge pull request #6073 from ssouders412/pronoun-fixes
Updated pronouns to reflect current rules and oracle text
2019-12-07 01:07:11 +01:00
Oleg Agafonov
1d20069ddf * Fixed wrong selection count in choose ability mode dialog (cards like Planewide Celebration); 2019-12-07 01:48:39 +04:00
ssouders412
2d3247d732
Updated pronouns to reflect current rules and oracle text
Replaced all instances of "her or she", "him or her", and "his or her", with "they", "them", and "their", or sometimes "that player". Updated verbs where appropriate.
2019-12-06 14:29:36 -05:00
Sarah Souders
b208dc332f Fixed Rankle's triggered ability (#6064)
* Fixed Rankle's triggered ability

Any number of available modes can now be selected, including zero.

* Update AbilityImpl.java

* getTargets now returns empty Target for null Mode

Reverted null Target check changes in StackAbility.

* Update HumanPlayer.java
2019-12-04 20:59:03 -06:00
Dh0mp5eur
45e15f0813 updated DuelCommander ban list 2019-12-04 19:31:21 +01:00
Evan Kranzler
a033150de6 updated Pioneer ban list 2019-12-02 17:57:07 -05:00
jeffwadsworth
2de7c136ea - Fixed #6056. Please test when you can. Now you will see other abilities/spellAbilities from cards presented during the cast from exile. Overload, Emerge, Surge, etc. 2019-12-01 21:53:01 -06:00
Oleg Agafonov
b61e50ae61 * Gameplay: fixed missing RTR set in Pioneer format; 2019-11-30 02:56:04 +04:00
Oleg Agafonov
7469d59eee Prepare new release 2019-11-30 01:32:54 +04:00
Evan Kranzler
f93b8fc1cf Updated Vintage restricted list 2019-11-18 10:45:14 -05:00
Evan Kranzler
6f65875618 Updated Standard ban list 2019-11-18 10:45:01 -05:00
Evan Kranzler
bbcd0a51f4 Updated Legacy ban list 2019-11-18 10:44:36 -05:00
Evan Kranzler
805e5950a8 Updated Brawl ban list 2019-11-18 10:44:22 -05:00
Evan Kranzler
7bfc671940 updated Pioneer ban list 2019-11-11 18:27:51 -05:00
Evan Kranzler
b4325b1daa updated Pioneer ban list 2019-11-05 20:11:04 -05:00
Evan Kranzler
cf39bce677 updated Brawl banned list 2019-10-24 17:41:23 -04:00
Evan Kranzler
b49bf569ce added Pioneer format 2019-10-21 21:46:37 -04:00
Evan Kranzler
e0eb61053e updated Standard ban list 2019-10-21 15:36:04 -04:00
Evan Kranzler
dd85324bc9 updated Pauper ban list 2019-10-21 15:35:52 -04:00
Evan Kranzler
995c88157e
Merge pull request #6016 from andreacosta/master
Implemented Commander Centurion Banlist and Rules
2019-10-16 15:26:03 -04:00
acosta
bafac3ca7d Add banned partners 2019-10-16 20:57:40 +02:00
Evan Kranzler
4a7bf89d8f added support for banned partners in commander variants 2019-10-16 12:38:30 -04:00
acosta
c49e856e56 Remove banned partners 2019-10-16 11:33:22 +02:00
acosta
35a4f1a2fd Add Centurion banlist 2019-10-16 10:44:59 +02:00
Evan Kranzler
d23d78c7f4 updated Australian Highlander points list 2019-10-12 12:09:08 -04:00
Evan Kranzler
16199d12dd updated Canadian Highlander points list 2019-10-12 12:03:41 -04:00
Evan Kranzler
3f7fdb3074 updated Oathbreaker banlist 2019-10-12 12:01:46 -04:00
Evan Kranzler
6289e9a1f5 updated Freeform Commander Duel life total to 40 (fixes #6010) 2019-10-08 22:48:09 -04:00
Oleg Agafonov
d4baa4ebd2 * Game: premodern ban list updated (Frantic Search removed, Yawgmoth's Bargain added); 2019-09-28 00:30:28 +04:00
Oleg Agafonov
f719503a89 Prepare new release 2019-09-27 21:19:03 +04:00
Oleg Agafonov
6cc2472ed6 * UI: improved choose target amount dialog (selected targets can be removed/de-selected); 2019-09-24 08:40:58 +04:00
Oleg Agafonov
eafb4eb653 * UI: improved choose target amount dialog (added info about selected targets and amount); 2019-09-24 07:47:02 +04:00
Evan Kranzler
a03e5f11fb Implemented Seven Dwarves 2019-09-14 19:07:41 -04:00
Oleg Agafonov
8dc6e152af Prepare next release 2019-09-10 00:33:47 +04:00
Oleg Agafonov
5f04fe9b16
Merge pull request #5945 from phulin/master
Add July 2019 Legacy Cube.
2019-09-08 21:09:46 +02:00
Evan Kranzler
7eb5105052 updated Aus Highlander point list 2019-08-30 21:02:57 -04:00
Gunnar Már Óttarsson
0650cff105 updated DuelCommander ban list 2019-08-30 22:20:26 +00:00
Evan Kranzler
1f1eb08609 updated Vintage ban and restricted list 2019-08-26 12:29:19 -04:00
Evan Kranzler
14081a7ac5 updated Standard ban list 2019-08-26 12:26:03 -04:00
Evan Kranzler
c3b3553e29 updated Modern ban list 2019-08-26 12:25:28 -04:00
Patrick Hulin
5d944e4570 Add July 2019 Legacy Cube. 2019-08-17 14:59:36 -04:00
Patrick Hulin
18fdb352b8 Fix Expansion // Explosion in June 2019 vintage cube.
Card was misnamed as just "Expansion."
2019-08-16 10:27:24 -04:00
Jakob
cb988097d2
Fix pass with mana in pool message when activating macro
Suppress the pass with mana in pool question when activating a macro with mana in the pool.
For example now you are able to make a macro producing mana with Devoted Druid and Vizier of Remedies.
2019-08-13 20:51:02 +02:00
Evan Kranzler
090ea444d9 updated Oathbreaker banlist 2019-08-02 15:38:42 -04:00
Mike Simons
8d08f005af Fix various hints and warnings on many set & block classes (via IntelliJ IDEA linting):
- replacing hard coded strings of set codes with reference to 'mage.sets.<set>.getInstance().getCode()' allows for set class names to no longer show as unreferenced & adds for more consistence between other block units
- various protected variables were able to be changed to private to clean up additional warnings
- some JavaDoc comments were generating warnings due to missing documentation
- removed some unused imports and unused variables
- there were multiple conditional logic checks for 'rarity != Rarity.LAND' within an if block where the outer condition was 'if rarity == Rarity.COMMON' rendering the inner condition always true and thus redundant
- a few ExpansionSet.buildDate parameters wer using octal values (eg. '03' instead of '3') which triggered some warnings
- added a booster generation test for WarOfTheSparks to make sure every booster contains a planeswalker
- added a booster generation test for ModernHorizons to make sure every booster contains a snow land
- booster generation test for Battlbond set referenced the Coldsnap set class instead of Battlebond
2019-07-18 23:28:48 -04:00
Ingmar Goudt
eb0cfc94f8 change some size() comparisons, to isEmpty() 2019-07-14 20:53:23 +02:00
Oleg Agafonov
0f2eb4dd58 * Oathbreaker 1 vs 1 - fixed that starting player draws a card like multiplayer games; 2019-07-13 12:29:24 +04:00
Oleg Agafonov
8c40a1d1a7 * Commander abilities - fixed that it increases commander tax after cast/play from non-command zone (as example: after Remand effect); 2019-07-13 10:47:02 +04:00
Oleg Agafonov
02b1e86f20 Extra tests for AI; 2019-07-12 19:09:26 +04:00
Oleg Agafonov
e02d8a079b AI: added support to attack/kill any opponent in multiplayer, not only first one; 2019-07-12 18:51:42 +04:00
Oleg Agafonov
ae7623e118 AI: fixed that AI never use alpha strike to kill opponent (doesn't use "all in" attack, #4486); 2019-07-12 18:36:32 +04:00
Oleg Agafonov
7871b95d81 * UI: fixed not working skip stack button; 2019-07-11 21:48:12 +04:00
Ingmar Goudt
178da75e4d Sonar fixes 2019-07-09 21:57:55 +02:00
Evan Kranzler
b5e65ba34a updated Commander ban list 2019-07-08 16:35:07 -04:00
Evan Kranzler
50fe6db4f9 updated Modern ban list 2019-07-08 16:33:38 -04:00
Oleg Agafonov
bce01ce053 Sonar's fixes 2019-07-06 13:09:27 +04:00
Oleg Agafonov
716b929877 Prepare new release 2019-06-30 18:33:29 +04:00
Evan Kranzler
ca9ecc6035 updated Pauper banlist 2019-06-27 20:10:47 -04:00
Oleg Agafonov
34ff038053 AI: improved target amount abilities:
* added support to search targets from multiple opponents instead one;
 * added support of TargetCreaturePermanentAmount and all new target types;
 * added new priorities (kills most valuable first);
 * added bad and good conditions (choose most valuable in good case and most weakest in bad case, e.g. damage yourself);
 * fixed that AI targets opponent for good ability instead yourself;
2019-06-26 21:46:11 +04:00
Oleg Agafonov
073b003b37 * AI: planeswalkers gets more priority in targets selection; 2019-06-26 21:45:15 +04:00
Oleg Agafonov
1d7cac3059 * Oathbreaker: fixed that signature spell can moves to graveyard instead forced move to command zone (#5819); 2019-06-14 21:20:16 +04:00
Oleg Agafonov
09678f4267
Merge pull request #5841 from phulin/master
Add most recent Vintage Cube update.
2019-06-14 18:42:15 +02:00
Evan Kranzler
620be8fd33 updated Australian Highlander points list 2019-06-10 08:04:04 -04:00
Evan Kranzler
539e1061a7 updated Canadian Highlander point list (closes #5845) 2019-06-10 08:00:17 -04:00
Patrick Hulin
88fd684081 Add most recent Vintage Cube update. 2019-06-09 13:18:50 -04:00
Oleg Agafonov
24c6d7d4f4 * Fixed missing banned check in Oathreaker's decks; 2019-06-08 09:29:37 +04:00
Evan Kranzler
e741e93f8a updated Tiny Leaders ban list 2019-06-07 14:09:05 -04:00
Evan Kranzler
105a919425 updated Tiny Leaders to allow planeswalkers as commanders 2019-06-07 14:03:04 -04:00
Oleg Agafonov
55bc61000a Prepare new release 2019-06-06 23:03:38 +04:00
Oleg Agafonov
0e2cfb7def Fixed tests with multiple X values 2019-06-06 21:07:51 +04:00
Oleg Agafonov
b64a75aa4b Typo fix 2019-06-06 16:55:17 +04:00
Oleg Agafonov
12fc854777 [MH1] added Unbound Flourishing 2019-06-06 16:52:06 +04:00
Oleg Agafonov
a9329c130d Oathbreaker: added support of 2 partners with 2 spells, improved signature spell hint and checks; 2019-05-29 03:03:17 +04:00
Oleg Agafonov
1465e505c0 Added duel mode for oathbreaker 2019-05-27 18:02:28 +04:00
Oleg Agafonov
913ee65f36 Cards compatibility with oathbreaker format; 2019-05-27 17:21:17 +04:00
Oleg Agafonov
e1259d0dd6 Merge fix 2019-05-27 16:21:22 +04:00
Oleg Agafonov
2f04a0d979 Fixed bloated error messages on commander deck check; 2019-05-27 16:18:20 +04:00
Oleg Agafonov
07cf5201ba * Added new game mode: Oathbreaker (#5678); 2019-05-27 16:17:15 +04:00
Oleg Agafonov
060ebe655e * Added new game type: Freeform Commander Two Player Duel (#5771) 2019-04-30 16:35:24 +04:00
Oleg Agafonov
67f02ec5ab * AI: fixed error on cards with target player or planeswalker; 2019-04-30 12:53:41 +04:00
Oleg Agafonov
bbf1c1343a Prepare release 1.4.35 2019-04-23 23:32:54 +04:00
Oleg Agafonov
e49be97879 * Look at card abilities -- improved dialog (now it's shown that card have extra abilities to call on "no" button); 2019-04-23 17:09:26 +04:00
Oleg Agafonov
f273fdd071 * AI: fixed errors in cards with "copy the spell for each"; 2019-04-18 12:54:28 +04:00
Evan Kranzler
1518802a38 fixed Freeform Commander not allowing multiples of cards like Persistent Petitioners (fixes #5721) 2019-04-15 09:04:42 -04:00
Oleg Agafonov
fed433657c Fixed deck size check 2019-04-05 12:46:54 +04:00
Oleg Agafonov
238aa7abdc * AI: fixed game freezes for cards with different human/computer logic (#5023); 2019-04-04 09:00:30 +04:00
Oleg Agafonov
de4befb9c2 * Sideboarding: fixed that it possible to auto-submit 40 cards deck instead 60 in constructed formats (#5579);
Sideboarding: fixed that cheated deck with sideboard can be used instead lose the game;
2019-04-01 07:34:46 +04:00
Oleg Agafonov
c9f216889b * Fixed F10 that it stops on old stack object instead new only; 2019-03-30 01:03:59 +04:00
Oleg Agafonov
65bb9b2161 Prepare new release 1.4.34 2019-03-29 18:31:00 +04:00
Oleg Agafonov
ff640a942e UI: improved skips and stops for declare blocker step:
* added options to STOP skip on any or zero blockers available;
 * added auto-stop before declare blockers step (e.g. user can cast instants and crew abilities);
2019-03-29 18:10:00 +04:00
Oleg Agafonov
0e6dbb4eed * UI: improved and fixed possible targets highlighting:
* added blockers highlighting on declare blockers step;
   * fixed that blocker targets highlights all attackers instead real;
   * fixed wrong attackers draw in images render mode;
2019-03-28 09:29:15 +04:00
John Hitchings
4a232b148c Add mulligan options to NewTableDialog, passing mulligan information to games. 2019-03-19 06:08:12 -07:00
John Hitchings
7885a42168 Refactor mulligans out of GameImpl and add Paris, Vancouver, London, and Canadian Highlander. Refactor GameImpls to use their specific mulligan. 2019-03-17 23:23:52 -07:00
Oleg Agafonov
83d8f5a538 * UI: improved mulligan dialog with color, added free mulligan info in game log; 2019-03-17 06:11:20 +04:00
Oleg Agafonov
bf2861c309 * UI: improved skip buttons and preferences:
* added new setting for STACK skip button: stops on full empty stack (default) or on new objects added;
 * added new dynamic hints for skip buttons to see current settings and modes;
 * fixed that some skip buttons not de-activated after goal was achieved;
 * fixed wrong default render mode for cards, MTGO must be default (#4409);
2019-03-17 04:38:31 +04:00
Oleg Agafonov
d8bee36892 * Multiple choosing abilities - added de-selection (click on selected permanent to de-select it); 2019-03-10 15:36:53 +04:00
jsiegelman1
35371bb68a
Updated Points List
Mana Crypt 2 -> 3
Personal Tutor 1 -> 0
2019-03-04 20:24:49 -08:00
Ingmar Goudt
553d263526 add missing diamond operators 2019-03-04 11:57:53 +01:00
Oleg Agafonov
e30eecead3 Refactor set's legality, Modern Horizons now available for modern formats; 2019-03-04 04:49:49 +04:00
Oleg Agafonov
8df43cfbb6 Refactor set's legality 2019-03-04 02:31:51 +04:00
Oleg Agafonov
4504ad5e6f * Fixed infinite AI choose if there are not enough different targets, e.g. Biomantic Mastery (#5023); 2019-02-22 03:29:01 +04:00
Oleg Agafonov
b7a7a95180 Fixed infinite chooseTarget on invalid targets while AI plays (#5023); 2019-02-21 05:31:30 +04:00
Oleg Agafonov
7eb1ccfebd Fixed premodern format with missing Exodus set (#5301) 2019-02-06 18:03:10 +04:00
Ingmar Goudt
63718e7a6e Sonar fixes
remove the deprecated GameState.getWatchers()
2019-02-02 22:09:55 +01:00
Oleg Agafonov
004c2ba0c3 Upgraded all projects to same java 8 version 2019-02-01 17:54:59 +04:00
Oleg Agafonov
7eba755666 Refactor card ratings, fixed rare error exception "comparison method violates its general contract" (different ratings in same card); 2019-02-01 17:41:29 +04:00
Jeff
8d6c6cb765 - Fixed the morphAbility null exception for AI 2019-01-31 10:44:30 -06:00
spjspj
6a5c8e0be7 Australian 7 pt Highlander Points update 2019-02-01 01:39:35 +11:00
Oleg Agafonov
5c004687fc Typo 2019-01-30 20:32:03 +04:00
Oleg Agafonov
0fa4ee677e AI: fixed rare error exception "comparison method violates its general contract"; 2019-01-30 20:28:46 +04:00
Evan Kranzler
badfd1c59e updated Modern banned list 2019-01-21 10:42:36 -05:00
Oleg Agafonov
ff5839860e Improved target messages for users: added extra hints;
Applied Biomancy - added target's choose hints;
2019-01-21 12:53:02 +04:00
Ingmar Goudt
7c2f55eda0 couple of sonar fixes 2019-01-17 12:03:22 +01:00
brodee
ea9e2d55fc adding rna AI card ratings
adding rna AI card ratings
2019-01-16 22:47:51 -08:00
Oleg Agafonov
14f66029f8 Missing v33 commit 2019-01-16 20:59:45 +04:00
Oleg Agafonov
d06b79e9b4 Fixed infinite AI loop in TargetPermanent abilities (see #5023) 2019-01-14 15:38:27 +04:00
Oleg Agafonov
063be44523 Fixed NPE errors for some cards (#5471) 2019-01-08 07:15:39 +04:00
Oleg Agafonov
e9f9b05141 Fixed NPE errors for some cards (#5471) 2019-01-02 20:06:01 +04:00
brodee
5bd30c8c55 added the scg winter con cube
this is the cube they drafted for $10k
2019-01-01 14:07:16 -08:00
Oleg Agafonov
2ebad63595 Added seeds support to random util:
* all xmage code uses shared util to generate random values;
 * tests can uses seeds to repeat "random" results like deck builds or AI plays;
2018-12-30 03:52:30 +04:00