Commit Graph

2301 Commits

Author SHA1 Message Date
Agetian
299358264d - Since Mirror Entity Avatar is used offensively by the AI, make the conditions somewhat more restricted and dependent on the opposition to try to ensure that it doesn't fail as an attrition attack (otherwise the AI wastes all mana). 2017-06-17 17:31:14 +00:00
Agetian
75951f5a76 - Improved Mirror Entity Avatar AI logic for all-changeling decks (like the one in PConq) so that the AI can still identify the cases to play the avatar's ability. 2017-06-17 16:40:15 +00:00
Agetian
662be6b56e - Generalized the logic that is currently used for Goblin Dark-Dwellers to determine WithoutManaCost from the SA itself. 2017-06-17 10:15:57 +00:00
Agetian
0cb9dab01d - Avoid code duplication in PlayAi. 2017-06-17 09:56:49 +00:00
Agetian
5b78887668 - Comments cleanup. 2017-06-17 09:31:12 +00:00
Agetian
25aa7aa429 - Imports cleanup. 2017-06-17 09:30:49 +00:00
Agetian
2ca7597624 - Refactored AI logic for cards like Goblin Dark-Dwellers and Snapcaster Mage.
- Rewired AI logic for Goblin Dark-Dwellers to work with the new card implementation.
2017-06-17 09:29:29 +00:00
swordshine
4881224b06 - HOU: Added Oasis Ritualist 2017-06-17 08:19:41 +00:00
Agetian
759f62418f - Basic AI support for Maralen of the Moonsong Avatar to make the relevant PConq event work (still not sure if the AI should pay 1 or 2 here, it's not very good at choosing the right thing when it comes to choosing between a land and a non-land). 2017-06-16 19:38:17 +00:00
Agetian
43ec4e545f - Some refactoring and imports cleanup in ChooseTypeAi. 2017-06-16 15:05:07 +00:00
Agetian
130f384853 - Added basic AI logic for Mirror Entity Avatar in Vanguard (for Planar Conquest). Removed RemAIDeck from the relevant avatar. 2017-06-16 15:02:48 +00:00
Agetian
13d29814c4 - Reorganized PayEnergyConservatively as an if-else chain. 2017-06-16 12:40:59 +00:00
Agetian
b8fcd43918 - Aggro AI profiles should play AI Logic PayEnergyConservatively the same as PayEnergy. 2017-06-16 12:33:10 +00:00
Agetian
c2eb2812f7 - Limit PayEnergyConservatively only to offensive combat, otherwise there's too much risk of using it when chump blocking and still losing the creature. 2017-06-16 10:52:00 +00:00
Agetian
abfbd3fa2b - Clean up imports. 2017-06-16 10:31:37 +00:00
Agetian
9427f29c5b - Reverted an accidental commit of a test change in CountersPutAi. 2017-06-16 10:31:02 +00:00
Agetian
d4c4afcf0b - Added a more conservative version of AILogic PayEnergy for PutCounter AI that only pays energy if the creature is in combat (attacking/blocking) or if there's more energy available than the most expensive energy cost of a permanent SA on the battlefield requires plus whatever the PutCounter SA requires.
- Set this logic for Longtusk Cub and Bristling Hydra.
- TODO: maybe somehow teach the AI to pay energy if it can save the creature from lethal damage from a spell?
2017-06-16 10:30:13 +00:00
Agetian
8c3159166c - Fixed a NPE in doTargetSpellToPlayLogic. 2017-06-15 15:01:04 +00:00
Agetian
a69b345c00 - Improved and patched up the Snapcaster AI logic, enabled it for Snapcaster Mage (was previously disabled, most likely due to a crash).
- Added a variant of the Snapcaster logic called PlaySpellForFree used for cards that allow to play spells without paying their mana cost. Set this for Goblin Dark-Dwellers.
2017-06-14 14:14:58 +00:00
Agetian
4925fb90b4 - Refactored Lightmine Field AI logic into its own method. 2017-06-13 17:59:24 +00:00
Agetian
99cd34fecb - Removed an unnecessary empty line. 2017-06-13 16:39:17 +00:00
Agetian
dcce72d770 - Reverted one accidental change in the previous commit. 2017-06-13 16:37:46 +00:00
Agetian
e03f39c0ac - A little bit better prediction in Lightmine Logic AI for creatures that are forced to attack. 2017-06-13 16:37:01 +00:00
Agetian
5f9efe9192 - Improved the AI for attacking in presence of Lightmine Field (logic developed by nefigah). 2017-06-13 16:03:42 +00:00
Agetian
3be7d4764c - Better names for split NeedsToPlay vars (SplitNeedsToPlay/SplitNeedsToPlayVar). 2017-06-12 06:40:36 +00:00
Agetian
abfb2d432f - A minor code improvement related to the previous commit. 2017-06-12 06:23:45 +00:00
Agetian
65850b63b1 - Added a way for split cards to have separate NeedsToPlay/NeedsToPlayVar sets for the right split (named NeedsToPlaySplit/NeedsToPlayVarSplit, respectively).
- Added NeedsToPlayVarSplit to the right split of Dusk // Dawn.
2017-06-12 06:21:52 +00:00
Agetian
30d95794df - Added the ability to make the AI play CopySpellAbilityAi on triggers if AILogic$ Always is set. Added this logic to Pyromancer Ascension. 2017-06-12 04:47:15 +00:00
Agetian
c096079b61 - Experimental: determineLeftoverMana should use the root ability (with the actual mana cost), otherwise it's not always possible to determine the correct mana cost (e.g. for Banefire) and PayX gets set to the wrong (usually too high) value, making the AI unable to play the card. 2017-06-10 19:30:53 +00:00
Agetian
a4fdd54424 - Experimental: adjust the mana cost after determining extra mana cost increase in ComputerUtilMana#calculateManaCost in order to allow the AI to e.g. properly determine the cost reduction for {X} (Endless One) in presence of Eye of Ugin and other similar scenarios. Needs additional testing. 2017-06-10 19:25:11 +00:00
Agetian
ab8038c3bb - A more reliable check in the Cavern of Souls AI that works with ability-changing effects like Blood Moon. 2017-06-10 16:39:09 +00:00
Agetian
b88aa51507 - Improved Auto mana payment for Cavern of Souls.
- Fixed the AI trying to play Endless One for 0 when in presence of Cavern of Souls.
2017-06-10 14:48:20 +00:00
Agetian
0bce0ee2e1 - AI should only sac Ghost Quarter if it either has more lands in play than the opponent, or equal amount of lands but at least one replacement land in hand, otherwise the AI tends to play too suboptimally. 2017-06-10 07:02:53 +00:00
Hanmac
aba349c3ef EncodeAi: should only use it when it has a target for that 2017-06-07 21:35:15 +00:00
Agetian
0045be2e84 - Some more updates to the LandForLand DestroyAi logic, added some configurable options for it to the AI profiles.
- Marked Ghost Quarter with AILogic$ LandForLand.
- Added some comments to AI profile definition files.
2017-06-06 04:58:16 +00:00
Agetian
7abc9c20d2 - More reliable way of detecting whether the opponent has skipped a land drop in DestroyAi (AILogic LandForLand). 2017-06-05 17:38:05 +00:00
Agetian
989ce5fb4b - Somewhat more advanced land-for-land removal logic in DestroyAi. 2017-06-05 16:56:09 +00:00
Hanmac
60cb791596 PoisonAI: updated code to newer format, add targeting logic 2017-06-05 05:37:27 +00:00
Agetian
d0f7df48ac - Slightly improved DestroyAi for Strip Mine and Wasteland (AI should not sac-destroy a land unless it has a mana-producing land to replace it with, as well as at least a couple lands in the hand and on the battlefield combined, or enough mana-producing lands on the battlefield in general, otherwise it's too risky to mana-lock yourself early in the game). Further improvements are welcome. 2017-06-05 04:53:58 +00:00
Hanmac
543c5f5f20 EffectAi: some cleanup and added NeedCreatures logic 2017-06-04 07:34:06 +00:00
Agetian
5d887c2025 - Improved Commander replacement ability AI to properly account for the delayed trigger implementation of blink (e.g. Flickerwisp). 2017-06-03 19:51:43 +00:00
Agetian
e9b9e39a79 - Moved the comment. 2017-06-03 15:55:35 +00:00
Agetian
8d93ca9fbc - Improved ChangeTargetsAi for cases when two or more of the same cards with retarget ability are present on the battlefield (e.g. 2x Spellskite), the AI will no longer retarget the spell infinitely to different copies. 2017-06-03 15:55:10 +00:00
Agetian
91f980c6ab - Removed a debug print line. 2017-06-03 15:28:49 +00:00
Agetian
8b6074358b - Improved the AI logic for Commander's return to command zone replacement ability (should no longer return commanders like Nissa, Vastwood Seer or Obzedat, Ghost Council each time they temporarily leave the battlefield to return later).
- Needs testing, might be too permissive, in which case the AI may fail to return the commander back to Command zone in certain cases when it should.
2017-06-03 15:28:26 +00:00
Hanmac
556dacd3fa GameAction: move Zone actions now has Cause Parameter, add it to all other places where it is used 2017-06-03 06:21:31 +00:00
Agetian
4c1dc0182b - Prevent a crash when testing Exert triggers (SA activator was not set). 2017-05-31 06:31:37 +00:00
Agetian
d48a1620e6 - Fixed a crash in RevealAiBase. 2017-05-30 03:43:26 +00:00
Hanmac
0940ec14e5 AIAttackController: more helper logic for Exert.
Looking for if Extert Trigger would target, if it can target anything
2017-05-28 17:38:04 +00:00
Agetian
94332978fc - Minor refactoring in exertAttackers, could be useful in the future. 2017-05-28 16:23:52 +00:00