Commit Graph

2301 Commits

Author SHA1 Message Date
Agetian
13376d0ced - Improved handling of script execution in GameState to support subabilities and KW Awaken (other keywords with mana cost might need similar treatment later). 2017-08-21 04:50:49 +00:00
Agetian
094941ab8c - Added support for Imprinted cards to GameState. 2017-08-20 17:51:29 +00:00
swordshine
c063ccfa02 - C17: Added Portal Mage 2017-08-20 15:31:20 +00:00
Agetian
d28cbf3863 - Some Volrath's Shapeshifter fixes and QoL improvements. 2017-08-20 04:23:11 +00:00
Agetian
9c44662f2e - Fixed a NPE in the new AiController code. 2017-08-20 03:24:25 +00:00
Agetian
97428909a4 - Minor code style fix. 2017-08-19 19:38:10 +00:00
Agetian
a0bb52ff5f - Added Volrath's Shapeshifter with rudimentary, simple AI support.
- Was tested in most typical circumstances, including cloning it. However, may not yet be perfect in some corner cases. Improvements are welcome.
2017-08-19 18:05:44 +00:00
Agetian
7658481db2 - Slightly improved AI for Scavenger Grounds activated ability. 2017-08-19 06:02:34 +00:00
Agetian
2163eb5910 - Fixed the AI playability of Bargain. 2017-08-18 19:26:09 +00:00
Agetian
5970c575c8 - [C17] Added Mirri, Weatherlight Duelist.
- Not sure if oneBlockerPerOpponent is better off as a global rule or a keyword, feel free to change it to a keyworded implementation if appropriate.
2017-08-18 11:32:22 +00:00
Agetian
6ba659ff55 - Fixed the second, third, etc. AI never blocking anything in multiplayer when multiple players are attacked at the same time. 2017-08-18 06:22:55 +00:00
Agetian
2c9f0e3c7d - Fixed the AI incorrectly considering sorcery-speed tap abilities like Outlast, thus never using them. 2017-08-18 06:07:37 +00:00
Agetian
8632b0ffec - Conspiracy: a little restructuring of chooseCardName in PlayerControllerAi. 2017-08-17 15:34:23 +00:00
Agetian
bc0b69857a - Conspiracy: The AI should not spam all the conspiracies with the same card name, instead choosing a new name every time. 2017-08-17 15:31:32 +00:00
Agetian
0679d9a30f - Conspiracy: fixed the AI never putting any conspiracies into the command zone. Added some simple logic for the AI revealing conspiracies when a spell with the chosen name was cast during any given turn. 2017-08-17 12:31:27 +00:00
Agetian
f47a679dda - Allow precasting specific SAs from cards by their ordinal number (allows e.g. precasting planeswalker abilities).
- Added puzzle PS_AKH0 scripted by Rooger.
2017-08-17 06:34:55 +00:00
Agetian
e5e56b5260 - Allow precasting specific SAs from cards when setting up game state (needed by Puzzle Mode game states). 2017-08-17 06:06:44 +00:00
Agetian
fcdf9cf2ec - Do not run the replacement handler query if defender damage is determined to be 0. 2017-08-16 13:34:49 +00:00
Agetian
9831236d79 - Combat AI: Query the replacement handler for possible damage prevention when trying to determine if a blocker can destroy the attacker (fixes e.g. the AI chump blocking an exerted Oketra's Avenger even though all damage is to be prevented). 2017-08-16 13:32:30 +00:00
Agetian
c644d6bf2f - Removed a duplicated comment. 2017-08-16 12:26:41 +00:00
Agetian
d53f9e99af - Fixed a miscalculation and related NPE when trying to predict the bonus from Arahbo, Roar of the World.
- Some extra NPE prevention measures in related trigger processing code.
2017-08-16 12:25:23 +00:00
Agetian
6b799be7dd - Added support for PhasedOut to GameState. 2017-08-16 03:47:54 +00:00
Maxmtg
244d5bba47 Moved hasProperty code (it's forge script parsing in fact) out of CardState object to keep the class clean. 2017-08-15 21:40:03 +00:00
Agetian
f279792273 - AI should not overprioritize Gavony Township, otherwise it locks itself on mana too much. 2017-08-15 19:19:10 +00:00
Agetian
e087d04c17 - Basic AI logic for Shadow of the Grave. 2017-08-15 14:45:53 +00:00
Agetian
716ba3eea8 - Fixed a miscalculation in DamageAllAi. 2017-08-15 04:42:59 +00:00
Agetian
ba73f8a323 - ChangeZoneAi: do not activate the AF if it'll try to put a creature on the battlefield that will end up with toughness below zero after it enters the battlefield (Reassembling Skeleton + Elesh Norn, Grand Cenobite). 2017-08-14 14:13:14 +00:00
Agetian
9997b4a2de - A somewhat more comprehensive anti-cheating solution for Cavern of Souls AI. 2017-08-14 05:15:30 +00:00
Agetian
74b12606ef - Prevent the AI from cheating with Cavern of Souls, paying an arbitrary amount of mana with it. 2017-08-14 04:50:22 +00:00
Maxmtg
45945e839f fix more warnings 2017-08-13 02:25:48 +00:00
Maxmtg
d04e186dea more unused methods and imports removal 2017-08-13 01:44:36 +00:00
Maxmtg
4253365e03 Moved AIOption to ai package, where it belongs 2017-08-13 00:53:26 +00:00
Maxmtg
07437b7880 Clean up unused imports that popped up in eclipse warnings List 2017-08-13 00:40:48 +00:00
Maxmtg
5ddd007f67 Remove player.getOpponent method, route former calls from AI through ComputerUtil.getOpponentFor(player) 2017-08-13 00:27:26 +00:00
Agetian
2270b2a224 - Mairsil AI: do not cage the same card twice. 2017-08-12 05:42:07 +00:00
Agetian
be4943a9d6 - Added rudimentary AI logic for Mairsil, the Pretender. 2017-08-11 17:23:58 +00:00
Hanmac
c575c1bea3 game state: counters are enum map, using hash map might break something 2017-08-10 04:34:22 +00:00
Agetian
3ae9779eec - Removed a debug print line. 2017-08-08 04:45:12 +00:00
Agetian
ebbdc46305 - Fix imports. 2017-08-08 04:44:37 +00:00
Agetian
4fb1c866da - AI: Avoid infinitely activating AF Untap on another permanent that will then be used to untap the first one (e.g. 2x Kiora's Follower) 2017-08-08 04:44:05 +00:00
Agetian
431d5ef8a8 - Added support for Renowned and Monstrous X properties to GameState. 2017-08-08 04:12:49 +00:00
Agetian
174d1f7838 - Puzzle mode improvements: no triggers will now run when the game state is set up; triggers will run in combat if attackers are declared. 2017-08-08 04:07:18 +00:00
Agetian
86149145f6 - Extended support for single target precast spells in Puzzle Mode. 2017-08-07 07:42:33 +00:00
Agetian
f3c41e9a66 - Use the ";" delimiter for precast spell declarations. 2017-08-07 05:00:42 +00:00
Agetian
2a6723f8db - Fixed an occasional change. 2017-08-07 04:50:12 +00:00
Agetian
2bb8d8b52a - Some puzzle mode improvements. Added support for precasting simple (untargeted) spells at the beginning of the game via AIPrecast/HumanPrecast parameters. Added support for Flipped and Meld card states. 2017-08-07 04:49:24 +00:00
Agetian
54486cb5be - Reverting 34942 for now, causes weird, hard to track side effects. Better solution needed. 2017-08-06 18:17:56 +00:00
Agetian
d6dfc2ffb6 - Attempting to fix a long-standing bug with the delayed triggers getting the wrong activator set at their resolution time (the AI was aggressively overwriting the activator via its SpellAbility simulation routines).
- Ensured that all callers of getOriginalAndAltCostAbilities both call setActivatingPlayer and then reset it to its original value if there was one after the simulation completes. Thus, an aggressive setActivatingPlayer inside getOriginalAndAltCostAbilities should not be necessary.
2017-08-06 11:52:03 +00:00
Agetian
9b880eb669 - Fixed AI for Jace, Telepath Unbound -3 ability. 2017-08-05 03:53:16 +00:00
Agetian
57aa32f0c1 - Added Bow to My Command.
- Currently probably one of the most complicated scripts, utilizing a couple hacks to simulate the "tap creatures with power 8 or greater" triggered ability. Most likely needs, at least, an UnlessCost update to support the tapXType cost with total creature power, and also potentially another update when/if shared turns and shared decisions are implemented.
2017-08-04 16:15:28 +00:00