Commit Graph

2469 Commits

Author SHA1 Message Date
Agetian
2a02fd124e - Some work on the AI for new keywords.
- NPE prevention in AI code.
2018-12-23 18:47:37 +01:00
Hanmac
b87f247c09 Keyword: add Riot 2018-12-23 18:47:37 +01:00
Hanmac
dd759352de Keyword: add Adapt 2018-12-23 18:47:37 +01:00
Hans Mackowiak
9b991635fb Sentry exception rework 2018-12-23 17:46:57 +00:00
Agetian
767e13c547 - NPE guard. 2018-12-16 09:50:18 +03:00
Agetian
81c76952ea - Code cleanup. 2018-12-16 09:43:52 +03:00
Agetian
14799ccd62 - Complete the basic implementation of AI optional cost choice, remove getOptionalCosts. 2018-12-16 09:11:54 +03:00
Agetian
7a53a0fb36 - Improve implementation for Entwine AI.
- Fixed an issue which made the SpellAbilityAi#isSorcerySpeed not to work correctly when checking from subabilities.
2018-12-15 22:08:16 +03:00
Agetian
0628ebcb54 - First steps in figuring out the infrastructure for AI chooseOptionalCosts and implementing Entwine. 2018-12-15 20:43:57 +03:00
Agetian
498f7325c9 - Fix the AI logic for Expansion // Explosion (casting for 0, underdrawing). 2018-12-15 11:58:43 +03:00
Agetian
f2e9d5913e - Default settings for holding back X damage spells. 2018-12-15 10:01:29 +03:00
Agetian
c6515bdf4a - Some tweaks to damage chaining.
- Improved Narset Transcendent AI logic for -2.
2018-12-15 09:58:02 +03:00
Agetian
f9cd173405 - Prevent the AI from relying on the ability to play a spell with an optional cost when deciding to do an assault attack with possible non-combat damage (prevents certain silly suicidal chump-attacks) 2018-12-15 09:10:55 +03:00
Agetian
5ff5ce0556 - PumpAI should account for spending a card cast from hand when counting P/T (fixes Inner Calm, Outer Strength AI assumptions). 2018-12-14 13:51:55 +03:00
Agetian
091fe36b2b - Basic logic to try not to be very wasteful with X-based direct damage spells (and the AI properties for it). Currently in Experimental profile. 2018-12-14 13:51:23 +03:00
Agetian
5b7f184053 - A sturdier logic for Doublecast-like card AI. 2018-12-14 08:55:50 +03:00
Agetian
ad5ece5242 - Code simplification/cleanup. 2018-12-13 22:09:46 +03:00
Agetian
7fd2a5fa04 - Code cleanup. 2018-12-13 22:02:17 +03:00
Agetian
36154db24d - A more reliable check for Valid Targeting in damage chaining. 2018-12-13 21:57:01 +03:00
Agetian
3896a79cfa - Improve damage chaining so that the AI doesn't try to chain a spell with restricted targeting to a general use spell (e.g. a spell that targets only attacking creatures to a Lightning Strike outside of combat). 2018-12-13 20:08:01 +03:00
Agetian
f09ec13428 - Restore the "move equipment" functionality for the AI 2018-12-12 21:54:14 +03:00
Agetian
f45bccf71d - chainDmg not null is already ensured on top 2018-12-12 20:40:26 +03:00
Agetian
adec6c720f - Removed a superfluous isAI check, handled inside getDamagingSAToChain (one more). 2018-12-12 20:39:49 +03:00
Agetian
9bcdfad726 - Removed a superfluous isAI check, handled inside getDamagingSAToChain. 2018-12-12 20:37:25 +03:00
Agetian
b718365a39 - getDamagingSAToChain should only work for actual AI players, not when simulating human decisions. 2018-12-12 19:42:28 +03:00
Agetian
7a7b461e0d - Set the damage chaining defaults for the AI profiles. 2018-12-12 14:41:39 +03:00
Agetian
7b6ad78ba2 - Don't use damage chaining for simulated AI. 2018-12-12 12:43:21 +03:00
Agetian
709e04d9ad - Don't try to chain a pump spell to a damage spell targeting a player. 2018-12-12 10:08:00 +03:00
Agetian
4cbb50483a - Renamed a method. 2018-12-12 09:04:46 +03:00
Agetian
1b6b7f8af4 - Move chainDmg closer to where it's used, avoid calling it when not planning to cast the spell for other reasons. 2018-12-12 09:03:41 +03:00
Agetian
3b5015e9b6 - Moved the chain SA prediction routine to DamageDealAi, where it belongs more. 2018-12-12 08:57:23 +03:00
Agetian
789f9eecb4 - Maximize the chance to chain spells to kill threats when in danger (unless the option is disabled). 2018-12-12 08:54:31 +03:00
Agetian
95db50f07b - Renamed a few things for clarity. 2018-12-12 08:47:36 +03:00
Agetian
602226f416 - Removed a commented out line (mana is reserved elsewhere). 2018-12-12 08:14:41 +03:00
Agetian
0c5e5288b8 - Tweaking a method name. 2018-12-12 08:14:41 +03:00
Agetian
96f941aeae - Added an experimental AI property controlling damage chaining. 2018-12-12 08:14:41 +03:00
Agetian
c79ed8b609 - Basic implementation for chaining two damage spells, supports damage+damage or damage+debuff. 2018-12-12 08:14:41 +03:00
Agetian
d362f275e5 - More logic for Vaevictis, moved the relevant logic to SacrificeAi for clarity, only called from Pump now. 2018-12-11 08:35:01 +03:00
Agetian
9fec411bd5 - More logic for Vaevictis. 2018-12-10 20:24:53 +03:00
Agetian
ec1566f169 - Somewhat more detailed logic for allied sac on Vaevictis. 2018-12-10 20:02:38 +03:00
Agetian
dcd2fade4a - Fixed Vaevictis Asmadi, the Dire AI targeting logic. 2018-12-10 19:24:53 +03:00
Agetian
0be13468bc - Determine X Cost only if canPlay returns true. 2018-12-10 18:31:56 +03:00
Agetian
381a94a5e4 - Fixed the AI trying to pay for abilities it doesn't control, causing weird side effects and slowdowns. 2018-12-10 18:27:37 +03:00
Agetian
38831e11bf - Don't evaluate non-combat Haste more than once. 2018-12-10 07:48:01 +03:00
Agetian
027b912199 - Refactored AI Haste chance calculation to make more sense. 2018-12-10 07:47:14 +03:00
Agetian
56cdf52f0b - AI Haste: grant to cards with affordable activated abilities with a tap cost. 2018-12-10 07:11:14 +03:00
Agetian
5f71ee4694 - Fixed UntapAllAi not checking for the tapped state. 2018-12-09 16:57:10 +03:00
Agetian
c0806714fc - Fixed a logic error in AnimateAi which made the AI animate things like Plains via Genju of the Fields when the Plains was tapped, part 3. 2018-12-09 14:51:38 +03:00
Agetian
156683cddb - Fixed a logic error in AnimateAi which made the AI animate things like Plains via Genju of the Fields when the Plains was tapped, part 2. 2018-12-09 14:49:53 +03:00
Agetian
031d0b4d3c - Fixed a logic error in AnimateAi which made the AI animate things like Plains via Genju of the Fields when the Plains was tapped. 2018-12-09 14:48:08 +03:00