Commit Graph

31636 Commits

Author SHA1 Message Date
Myrd
a78455051d [Simulated AI] Now that we're pruning the search tree a bit, enable land-play simulation and increase search depth. 2016-12-26 05:34:21 +00:00
Agetian
27a0a20968 - Show a quest draft tournament event entry fee and ask the player to confirm creating a tournament when spending a draft token. 2016-12-26 05:21:50 +00:00
Myrd
496f63c814 [Simulated AI] Add logic to prune some targeting decisions that have been evaluated previously in the decision tree and found lacking. 2016-12-26 05:11:36 +00:00
Myrd
f97ccdef5d Create the FaceDown card state lazily.
Profiling showed this was responsible for 3% of execution time when using Simulated AI and is also wasting memory.
2016-12-25 21:13:03 +00:00
Myrd
6831c990a6 [Simulated AI] Add capability to simulate land plays, allowing the AI to prioritize which lands to play.
Currently, this is disabled because enabling this requires increasing the search depth and that slows things down too much currently.
2016-12-25 19:42:15 +00:00
Myrd
c3b9332e59 A few more cleanups to AIController. 2016-12-25 17:10:02 +00:00
Myrd
da9694c515 Some cleanups to AIController.
Marks some functions as private.
Renames a function to avoid confusion because of a different function with same name. Some other whitespace changes and moves attack/blocker decisions away from all the functions dealing with choosing SAs.
2016-12-25 17:04:00 +00:00
Myrd
5def006bcd Remove some extra printing. 2016-12-25 15:53:56 +00:00
Agetian
1a9af45756 - Imports fix. 2016-12-25 10:10:24 +00:00
Agetian
d49b884299 - Implemented optional texture filtering for card pictures on the battlefield in mobile Forge (helpful on larger tablets and when running mobile Forge on PC), disabled by default. 2016-12-25 10:09:22 +00:00
Agetian
09fb66033c - Made Mind's Dilation show the exiled card to the player prior to asking if he wants to play it. 2016-12-25 09:27:21 +00:00
Myrd
b74b952584 [Simulated AI] Remove a wasteful GameSimulator instantiation. 2016-12-25 06:39:10 +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
5ed07ed4a0 - Updated Planar Conquest sprites to make the conquered plane icon more visible on dark backgrounds. 2016-12-24 15:58:23 +00:00
Agetian
0904309290 - Preparing Mobile Forge release 1.5.58.008 (landscape mode rendering fixes). 2016-12-24 15:29:05 +00:00
Agetian
db8b72539e - Fixed the layout of quest spell shop and planar conquest collection screen in mobile Forge in landscape mode. 2016-12-24 14:20:39 +00:00
Agetian
16f87f56a7 - Fixed Crossroads Consecrator (if set to Card.Human instead of Creature.Human, the AI starts to target opponent's Human creatures with it). 2016-12-24 13:24:22 +00:00
Agetian
5d70839210 - Make the Chaos Wheel display correctly in landscape orientation. 2016-12-24 12:02:04 +00:00
Hanmac
e2cbbd7575 ComputerUtil & HumanPlay: fixed Splice onto Arcane only for Spells 2016-12-24 11:01:48 +00:00
Hanmac
0c2b9e7445 AiController: add orderPlaySa and add it to PlayerControllerAi 2016-12-24 10:56:12 +00:00
Hanmac
1d7f3e7dd5 CardPredicates: add hasSVar to check for some values like DiscardMe 2016-12-24 10:53:35 +00:00
Hanmac
20ca270e03 add SpellAbilityPredicates similar to CardPredicates and others 2016-12-24 10:52:33 +00:00
Agetian
b671ea87ac - Implement a method to reset WrappedAbility SA targets (fixes e.g. Chandra, Torch of Defiance emblem persistently targeting the same target). 2016-12-24 09:31:49 +00:00
Agetian
d2172519b4 - Clear the temporary EndOfTurnLeavePlay SVar from a Dashed creature to avoid making it linger permanently on the card for the rest of the duel. 2016-12-24 07:05:30 +00:00
Agetian
0334dbb87c - Do not set an EndOfTurnLeavePlay SVar on Dash cards (seems to have no functional effect while preventing the AI from ever casting the card for its full mana cost after it was dashed once). 2016-12-24 05:13:51 +00:00
Agetian
3f95f34acc - Use LKI copy for Dash AI simulation. 2016-12-23 20:42:34 +00:00
Agetian
cabd71c4f6 - Removed a test code I forgot to take out last time. 2016-12-23 20:12:30 +00:00
Agetian
4f00ae9424 - Create a new object when considering Dash and simulating it by the AI (if it has the same ID as the original card copied by the simulation, that can mess up with time stamp checks later and the card can become untargetable by spells, e.g. Kolaghan, the Storm of Fury + Force Away in Commander mode). 2016-12-23 20:08:48 +00:00
Myrd
c272cde429 Simulated AI: Evaluate different fetch targets.
This lets the AI figure out such sequences as:

Game state:

In play: Urborg, Thespian's stage & fetch land
In hand: Crop rotation

Sequence:
  1. Fetch for a forest.
  2. Crop rotate forest into Dark Depths.
  3. Activate Thespian's stage targeting Dark Depths.
  4. Profit!
2016-12-23 17:50:26 +00:00
Agetian
bd1e99bc2e - Removed unused imports. 2016-12-23 12:32:57 +00:00
Agetian
7ab904eb07 - Implemented a way to override fullscreen resolution for forge-gui-mobile-dev. 2016-12-23 12:32:25 +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
Agetian
8049783598 - Fixed Aetherworks Marvel. 2016-12-23 06:34:24 +00:00
Myrd
ca0e940069 Don't ignore counterspells in simulated AI. 2016-12-23 06:26:25 +00:00
Myrd
fce93840c0 Don't warn about cards AI can't play when using simulation AI. 2016-12-23 06:16:53 +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
4efc738813 Fix dev mode save/restore of legendary tokens. 2016-12-22 21:59:35 +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
Agetian
85ad047e4b - Preparing Mobile Forge v1.5.58.007 (fixes a lock-up/crash issue). 2016-12-22 19:42:50 +00:00
Agetian
fc9d924208 - Reverted r32715, breaks mobile Forge (better solution may be needed in order to prevent this from locking up Forge on desktop when processing achievements). 2016-12-22 19:35:56 +00:00
Myrd
2b0c76ad66 Fix cost reduction for Not of This World when targeting an Abzan Charm that's exiling a creature. 2016-12-22 18:58:02 +00:00
Agetian
e9385941cc - Improved the Forge Mobile Dev project: it can now function as a fullscreen back-port of the mobile Forge app running on Linux, Mac and Windows PCs.
- Added desktopMode parameter to forge-gui-mobile-dev Main: set it to "true" to make the game run in full-screen mode.
- Added desktopModeAssetsDir parameter to forge-gui-mobile-dev Main: it can be set to make the game use the standard desktop Forge assets folder structure.
- Disabled resizing for the forge-gui-mobile-dev screen when running in standard cellphone/tablet "emulation" mode since it causes visual graphics corruption.
- Added a Maven plugin to forge-gui-mobile-dev to build a .jar with dependencies (like for desktop Forge) that can function as a standalone executable running on Linux, Mac and Windows systems.
2016-12-22 18:06:34 +00:00
Myrd
d1bd0f0293 Fix loading a gauntlet. 2016-12-22 17:17:08 +00:00
Agetian
ff46840dca - Fixed a couple crashes when processing card scripts. 2016-12-22 05:47:39 +00:00
Myrd
73ab19cfb3 Fix gauntlet contests. 2016-12-21 21:07:49 +00:00
Hanmac
50b45901c1 cards: update splice cards 2016-12-21 18:33:31 +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
Hanmac
77437bdb50 Card: hide staticAbilities which are Secondary (probably made by Keyword) 2016-12-21 18:00:12 +00:00