Commit Graph

1024 Commits

Author SHA1 Message Date
Hanmac
78eb7ee367 GameSimulatorTest: add more test cases for damage spliting 2017-01-07 17:31:38 +00:00
Agetian
9a75816ef2 - Adding a preference to control whether the Escape key can be used in desktop Forge as an alternative "end turn" shortcut (for players who prefer the old behavior). It is disabled by default. 2017-01-06 19:52:42 +00:00
Agetian
b5ad2e27e9 - Do not use Escape as a key for passing priority until end of turn. 2017-01-06 06:46:48 +00:00
Agetian
b2709acc36 - Committed "exile from hand/battlefield" dev menu options by Zuchinni. 2017-01-04 20:14:35 +00:00
Agetian
ee8b1dd237 - Show the source of the triggered ability on the battlefield if it's a WrappedAbility when ordering simultaneous SAs (e.g. Evolve) [affects desktop Forge, already taken care of in mobile Forge].
- Treat triggers with the same description coming from different sources as different for the purpose of auto-ordering them (do not auto order by default).
2017-01-03 06:06:31 +00:00
Agetian
cc3a587e42 - Implemented biasing random (simulated) AI vs AI matches towards decks with higher draft rank value.
- Better name for the random decision simulation option.
2017-01-01 20:14:13 +00:00
Agetian
ac2881cc6c - Added a new quest preference "Do Not Play AI Matches" which allows the player to decide the outcome of AI vs. AI matches randomly instead of playing them out and thus simulating them. This is disabled by default, set to "1" to enable.
- Currently determines the outcome of all AI vs. AI matches in a 50-50 fashion. Might be upgraded later to bias the outcome towards a stronger deck judging by the total card draft rating value.
2017-01-01 16:06:28 +00:00
Myrd
52711b7b33 [Simulated AI] Make game copier copy player mana pools along with a test. 2016-12-31 18:07:36 +00:00
Agetian
95ec8b63fa - Do not clear out deck Vanguard avatar on subsequent calls to selectVanguardAvatar (fixes Default Avatar not working).
- Note that Vanguard selection is still partly broken (for desktop Forge), it's impossible to select a particular avatar for each player (the avatar always ends up being the same), fix is welcome.
2016-12-31 10:41:23 +00:00
Myrd
a2e2753429 [Simulated AI] Fix energy counters propagation with a test. 2016-12-30 18:03:58 +00:00
Hanmac
e5dc653b4c GameSimulatorTest: add Testcases for Damage with Lifelink 2016-12-30 15:02:04 +00:00
Myrd
1c1de9a195 [Simulated AI] Fix transformed state with a test and commit part of my fix from my previous change.
I forgot to actually commit the validation and activatedPlayer setting part of my last change, so this change contains that too.
2016-12-29 22:42:37 +00:00
Myrd
6b968eeb08 Fix activating playing call in unit test. 2016-12-29 22:12:59 +00:00
Myrd
c3f30c6871 [Simulated AI] Make printing of the decision tree a bit better.
Also removes a print line from a test.
2016-12-29 18:22:31 +00:00
Hanmac
068b9b4cc0 GameSimulatorTest: fixed warning for "Ajani, Mentor of Heroes" 2016-12-29 09:18:41 +00:00
Myrd
1d1b94e757 [Simulated AI] Teach simulated AI how to choose card modes (e.g. on Charms and Commands).
Note: There's still a limitation in the simulated AI where it doesn't know what to do when multiple effects from an ability require targets. This can be addressed in the future to support things like Cryptic Command to both counter a spell and bounce a permanent.
2016-12-29 06:36:08 +00:00
Myrd
010d958e33 [Simulated AI] I forgot to commit the marked damage test. 2016-12-28 21:31:44 +00:00
Myrd
1e95e14d6a Lazy-load cards in GameSimulatorTest to make it exec faster. 2016-12-27 17:56:11 +00:00
Myrd
c34db9cf2d Remove failing assert from GameSimulatorTest. 2016-12-27 06:47:08 +00:00
Myrd
77a526b6d9 [Simulated AI] Fix copying tokens with abilities, like Eldrazi Scions.
Also fixes a bug in the main game code where if you have Clone try to copy a token with abilities, like an Eldrazi Scion, it would previously not get those abilities.

Adds a test for the game simulation/copy case.
2016-12-27 04:09:18 +00:00
Myrd
d3723daa6d [Simulated AI] Fix game copy error with dashed creatures and add a test. 2016-12-26 16:29:21 +00:00
Myrd
3faf1946fa Get rid of an unnecessary CardDb of allCards which was taking 256kb of memory. 2016-12-25 06:22:26 +00:00
Myrd
328922029a [Simulated AI] Refactor code to create a Plan object.
This allows coming up with a multi-step planning and caching it, so it doesn't need to be re-computed at subsequent steps if nothing meaningful changed.
2016-12-25 05:05:18 +00:00
Agetian
9d0e8b8096 - Made the desktop port and the mobile port of the game use different threads when processing multiple achievements (otherwise the game tends to freeze). 2016-12-23 07:13:07 +00:00
Myrd
a2aa3ccc06 Fix another problem with Thespian's Stage copying itself and add a test. 2016-12-22 22:30:34 +00:00
Myrd
3e91a56ced Fix NPE in CardUtil.getLKICopy() that would happen when Thespian's Stage would copy itself.
The problem would happen when executing:
        newCopy.getCurrentState().copyFrom(in, in.getState(in.getCurrentStateName()));
        
Because the clone code was clearing the cloned state without updating currentStateName.

Also added a test for this in the context of simulated AI, although the actual bug was not in simulation code - it's just simulation code would run into it since it tries all possible targets to copy (while humans would likely not try it).
2016-12-22 20:31:41 +00:00
Myrd
4b14c9d943 Fix copying of emblems for simulated AI along with a test. 2016-12-22 19:45:16 +00:00
Myrd
d1bd0f0293 Fix loading a gauntlet. 2016-12-22 17:17:08 +00:00
Myrd
73ab19cfb3 Fix gauntlet contests. 2016-12-21 21:07:49 +00:00
Hanmac
94681b6675 Splice: do a total rewrite to make it better for the player and more rules conform 2016-12-21 18:32:50 +00:00
Agetian
7cf2c7e383 - Enforce deck construction limits in the deck editor by unique card name instead of by unique PaperCard. 2016-12-20 17:04:22 +00:00
Hanmac
3c5eb2248b CardFactoryUtil: Miracle is a Trigger now, and make PlayAi a bit better to check if it can play it 2016-11-18 19:55:05 +00:00
drdev
0f1fbc46d1 Fix warnings 2016-11-13 00:08:32 +00:00
Myrd
acddffa267 Experimental feature (behind a pref) to not load all card rules at start up. In my testing, this improves startup speed significantly.
This is still experimental & behind a flag because there's some more work that needs to be done to fully support this - such as loading all cards when the deck builder UI is shown.
2016-11-04 04:19:51 +00:00
Sol
0a78b139e8 - Added a Preference for Card Sale Percentage Base and Max 2016-11-04 02:09:25 +00:00
Krazy
ebbe189f4a [maven-release-plugin] prepare for next development iteration 2016-10-31 04:07:37 +00:00
Krazy
c6f6344d4f [maven-release-plugin] prepare release forge-1.5.57 2016-10-31 04:07:26 +00:00
Myrd
9e84290281 Fix some warnings. 2016-10-09 22:17:24 +00:00
Agetian
b3a49e005f - For now, disregard both -1 and Integer.MAX_VALUE when rendering integer components in a table.
- Unfortunately, this means that Spinal Parasite does not have its P/T visualized in the deck editor table; but at least there won't be a lot of -1's elsewhere in the editor. Couldn't find a way to fix both of these at the same time for now.
- Revert processing default CMC as Integer.MAX_VALUE for the UI purposes.
2016-10-09 15:17:58 +00:00
Agetian
2cd7016703 - More changes related to supporting negative power and toughness, please test to see this doesn't break anything.
- Fixed some visualization issues in the deck editor related to supporting negative P/T (e.g. non-creatures showing up as P/T 2 billion+ / 2 billion+).
2016-10-09 12:05:55 +00:00
excessum
27a3640c17 - Removed unwanted file from r32259 2016-10-03 12:33:12 +00:00
excessum
2ecfa4259d - Re-factored Vehicle animation logic into ComputerUtilCost.canPayCost() 2016-10-03 12:30:46 +00:00
Agetian
f932ba172b - Support showing Energy counters in the desktop version of Forge (poison counters take priority over energy counters). 2016-09-27 06:24:11 +00:00
drdev
32a7d0c138 Show Energy symbols in Android app 2016-09-27 02:10:23 +00:00
Krazy
ad1696fde2 [maven-release-plugin] prepare for next development iteration 2016-09-26 21:28:01 +00:00
Krazy
66615a683f [maven-release-plugin] prepare release forge-1.5.56 2016-09-26 21:27:49 +00:00
Sol
00092a17da - Adding Energy icon to sprite sheet 2016-09-21 14:36:14 +00:00
Sol
b529cfa5a2 - Allow Draft Editor to have a change section button to add Conspiracies to the deck (Sideboard filtering on section change not enabled yet) 2016-09-02 20:44:07 +00:00
Sol
9da706cbad - Rewriting Booster Draft to be a bit more capable of handling Draft Matters cards 2016-08-18 20:22:10 +00:00
Hanmac
b65a16acf2 ChooseName now uses ICardFaces for selecting a CardName.
that now makes it working for naming an alternate state of a card.
2016-08-18 08:29:11 +00:00