* Preliminary implementation of Share the Spoils. * Added tracking of cards in exile to MageTestPlayerBase in order to help with testing of cards such as Share the Spoils which put and take cards out of exile a lot. * Moved Share the Spoils to the correct set list. * Fixed bug with using ’ instead of ' for card text. * Add method to assert number of cards exiled into a specific exile zone. * Further implementation of ShareTheSpoils and it's tests. * Fixed a bug in the calcualtiong of exileNUmber. (I misunderstood what the copy() method was for) * - Added a watcher which should limit player to only cast the spell once per turn. - Fixed the tests to run properly (using .LOST instead of .LOSES for the GameEvent). - A bit of cleaning up of the class * Updated tests and card to capture both conceding and losing the game through other means. * Further implementation. All parts are working (though not correctly). * All pieces are now working. But, both the spend any mana and exile a card off the top of library activate when ANY card is played from exile, not just one exiled with Share the Spoils. * Replaced changed how I move card from top of library to correct exile zone. Instead of using moveCards() and moveToAnotherZone(), I am not using moveCardsToExile(). * A new card is now properly exiled whenever one is played with Share the Spoils * Moved inner class out and passing exileId as parameter instead * Updated text based on comments * Added several more tests * Made changes to how exileId is handled based on comments * Made changes based on comments * Further changes based on comments * Add a few more tests (will have to fix them once the exile zone issue is fixed) * Added workaround for #8706 * Get most of the tests working * Simplified cardId handling * Reformat file based on comment * - Added setStrictChooseMode to all tests - Properly using checkPlayableAbility for all checks where things can't be played/cast. * Fixed a missing getMainCardId call that made difficult cards unplayable * - Simplified handling of casting only once per turn. I don't see the point to keeping the MageReference object. using a simple boolean instead - This also fixes a bug where multiple cards could be played in the same turn. * Fixed test for difficult cards. * Reworked spend mana effect based on Dead Man's chest * Added a check again a null watcher * Fixed typo in checkManaSpendingForOtherExileSource * Fixed tests to use proper checkPlayableAbility syntax. Co-authored-by: Evan Kranzler <theelk801@gmail.com> |
||
|---|---|---|
| .github | ||
| Mage | ||
| Mage.Client | ||
| Mage.Common | ||
| Mage.Plugins | ||
| Mage.Server | ||
| Mage.Server.Console | ||
| Mage.Server.Plugins | ||
| Mage.Sets | ||
| Mage.Tests | ||
| Mage.Verify | ||
| repository/com/googlecode/jspf/jspf-core | ||
| Utils | ||
| .gitignore | ||
| .travis.yml | ||
| clean_dbs.sh | ||
| LICENSE.txt | ||
| pom.xml | ||
| readme.md | ||
| RemoveHeaders.java | ||
| sonar-project.properties | ||
XMage — Magic, Another Game Engine
XMage allows you to play Magic against one or more online players or computer opponents. It includes full rules enforcement for over 20 000 unique cards and more than 50.000 reprints from different editions. You can also find custom sets like Star Wars. All regular sets have nearly all implemented cards.
It's support single matches and tournaments with dozens game modes like duel, multiplayer, standard, modern, commander, pauper, oathbreaker, historic, freeform and much more.
Local server supports a special test mode for testing combos and other game situations with pre-defined conditions.
There are public servers where you can play XMage against other players. You can also host your own server to play against the AI and/or your friends.
XMage community and resources:
- Official XMage forum;
- Official XMage support and feature request on github;
- Reddit XMage group;
- Reddit XMage discord channel;
- Latest releases;
- Latest news;
- Project documentation.
Servers status:
Beta server with un-released or under development features:
Features
- Multiplatform app: Windows, Linux, MacOS;
- Deck editor (support multiple deck formats and deck sources);
- Two player duel or a multiplayer free-for-all game with up to 10 players;
- Computer AI opponents;
- Players rating system (Glicko);
- Supports special formats like Commander (up to 10 players), Oathbreaker, Cube, Tiny Leaders, Super Standard, Historic Standard and more;
- Single matches or tournaments supported (elimination or swiss type handling), which can be played with up to 16 players:
- Booster (also Cube) draft tournaments (4-16)
- Sealed (also from Cube) tournaments (2-16)
Bug report / feature request
The best way to report bug or feature request is github's issues page. There are another way to report bugs too:
- Feedback from xmage app's main menu;
- Bug thread in the Official XMage forum.
Installation / running
- Download latest XMage launcher file and put it to any folder like
D:\games\xmage; - You need to have Java version 8 or later to run launcher;
- If you can't run it then create
run-LAUNCHER.cmdtext file in launcher folder and put that line to it and save as ANSI format:java -Djava.net.preferIPv4Stack=true -jar XMageLauncher-0.3.8.jar- or just downlod and unpack that archive to launcher folder.
Look here for more detailed instructions.
Wiki page contains detail information about private or public server setup.
Server options
The XMage server locates by default the configuration file from the current working directory to the relative path config/config.xml
(config\config.xml in Windows). To change this location, start the server with the property xmage.config.path set
to the desired location, for example -Dxmage.config.path=config/otherconfig.xml. The option can be set from the
XMageLauncher in Settings > Java > Server java options.
Troubleshooting / FAQ
Github issues page contain popular problems and fixes:
- Program freezes on startup (white/blue/black screen);
- Can't download images or it stops after some time;
- MacOS can't open launcher
- MacOS client freezes in GUI (on connect dialog, on new match);
- Ugly cards and GUI drawing in games;
- No texts or small buttons in launcher;
- Can't run client, could not open ...jvm.cfg.
Performance tweaks
If you have a good GPU, it's very likely you'll be able increase performance by a lot through extra Java flags.
XMage runs on JRE 8, so this link should give you the available flags.
How to enable the extra flags
- Launch XMage
- In the menu bar from the launcher, click on "Settings", which will open up the Settings Window
- Go to the "Java" tab
- You can pass extra flags by editing the "Client java options" text field
Linux tweaks
Enable OpenGL
More info about OpenGL:
-Dsun.java2d.opengl=true
Possible problems:
- Caveat: There's a bug with the file chooser when OpenGL is enabled (you use the file chooser when you, for instance, try to load a deck from disk). The suggested workaround will make the game crash, so it's not an option.
- Workaround: When using i3, you're able to work around the bug by toggling the "floating" capabilities of the window and forcing it to re-render.
Enable XRender
More info about XRender:
-Dsun.java2d.xrender=true
Increase memory usage
This is not guaranteed to yield improvements, but it depends on your use-case. If you have a lot of RAM to spare, you might as well increase the initial heap size for good measure. More details about memory settings:
-Xms1G -Xmx2G
Developer
Full project documentation and instructions for developers can be found in wiki pages.
First steps for Xmage's developers: