Commit Graph

31762 Commits

Author SHA1 Message Date
Agetian
2344d02085 - Logic fix related to previous commit. 2016-12-27 12:42:15 +00:00
Agetian
2f121ee34e - A somewhat more transparent implementation of DelayedTriggerRemembered fix. 2016-12-27 12:35:17 +00:00
Agetian
aaa9bf1a73 - Removed an unused import. 2016-12-27 12:24:52 +00:00
Agetian
1d55b0cf33 - Ported the "Duel a Specific Opponent / Start a Gauntlet" functionality in Booster Draft and Sealed Deck game modes to mobile Forge. 2016-12-27 12:24:07 +00:00
Agetian
16353246cd - Fixed a mistype in Arcane Denial. 2016-12-27 12:23:14 +00:00
Agetian
47709d4061 - Fixed Arcane Denial, Sapphire Charm and other similar delayed triggers not activating correctly (to make them work it's apparently necessary to check the SA itself first for DelayTriggerRemembered info before searching up the chain in getRootAbility). 2016-12-27 12:21:06 +00:00
Agetian
8024b4567a - Prevent a possible NPE in TextRenderer#updatePieces (mobile Forge) 2016-12-27 06:54:45 +00:00
Myrd
c34db9cf2d Remove failing assert from GameSimulatorTest. 2016-12-27 06:47:08 +00:00
Myrd
35014d76f8 Revert my previous change for cloning a SpellAbility.
Looks like setHostCard() is being called when the clone gets added to a card. However, previously the SpellAbility was being added to the Game in clone(), which doesn't work if the cloned ability should be part of a different Game - such as in simulation AI code. So, this change moves that to addSpellAbility().
2016-12-27 06:39:25 +00:00
Myrd
7521c33c30 [Simulated AI] Fix issue with empty card names when pretty-printing SpellAbilities. 2016-12-27 04:28:02 +00:00
Myrd
3729533ea9 I think I missed this in my previous commit. 2016-12-27 04:24:59 +00:00
Myrd
0fe2afb3c0 When copying spell-abilities to a new card, update the hostCard.
(Not sure what this affects, but noticed that it wasn't being done.)
2016-12-27 04:20:56 +00:00
Myrd
741d38f50b Make getTargetedString() not have a trailing space. 2016-12-27 04:09:59 +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
5f634730ff [Simulated AI] Some cards, like Wild Slash, have targeting as part of their sub-ability.
This fixes all the simulated AI logic to correctly look at all the sub-abilities for target choices. However, it still doesn't support multiple sub-abilities with targets.

Also fixes an issue - still with Wild Slash - where the AI would only look at top-level SA restrictions when determining whether a card is playable. For Wild slash, the top-level SA is the ferocious clause - while the 2 damage clause is a sub-ability and doesn't have the same restrictions.
2016-12-27 02:14:40 +00:00
Myrd
eafaaf5088 [Simulated AI] Copy combat when copying game state. This fixes an NPE in AI code that expects the Combat object to exist if we're in the corresponding phase. 2016-12-26 17:28:50 +00:00
Hanmac
3badd1bc15 cards: update TokenDoubler as Replacement Effect 2016-12-26 17:00:08 +00:00
Hanmac
e2eb916d72 make TokenDoubler use new Replacement Effect 2016-12-26 16:57:28 +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
0b7c70230a [Simulation AI] Fix broken tests. 2016-12-26 16:12:46 +00:00
Myrd
32cb5690d3 Reland r32802 (lazy FaceDown characteristic creation) which had an issue with hasAlternateState() which this revision hopefully fixes. 2016-12-26 16:06:12 +00:00
Hanmac
a67da177ff add new Replacement Effect its for manipulating the original request
Card#addCounter does show how it is done
2016-12-26 13:31:20 +00:00
Agetian
cae93fbc3c - Preparing mobile Forge publish v1.5.58.009. 2016-12-26 11:10:02 +00:00
Agetian
56b40c960c - Temporarily reverted r32802 (breaks visualization of transform, flip and meld cards in their alternate state, possibly more). Please feel free to revert this commit and update the solution when possible. 2016-12-26 07:04:20 +00:00
Agetian
1ba2197d2c - Fixed foil effect corruption on zoomed card images in mobile Forge. 2016-12-26 06:24:31 +00:00
Myrd
4f61ca9f3b [Simulated AI] Remove limitation of playing spells only in MAIN2 which I added a few commits ago. 2016-12-26 05:42:19 +00:00
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