Commit Graph

2301 Commits

Author SHA1 Message Date
Michael Kamensky
985599a3b2 Various AI improvements. 2018-11-06 11:59:49 +00:00
Hans Mackowiak
3dc438c332 Update ControlExchangeAi.java
Closes #764
2018-11-05 10:28:38 +00:00
Michael Kamensky
be86f5be9b Added several M19-GRN quest opponent decks, fixed the AI for several cards in Standard. 2018-11-04 18:34:15 +00:00
Michael Kamensky
d870a1b0f1 Make the AI account for static abilities granted from the evaluated card in ApplyStaticContPT 2018-11-04 09:12:59 +00:00
Hanmac
877b0abd66 add Sentry Breadcrumb 2018-11-03 18:02:18 +01:00
Agetian
0f72f0db8a - Attempt to fix the AI never playing Fight with Fire, kicked or unkicked. 2018-11-03 11:01:15 +03:00
Agetian
976418b89c - Improve Vivien of the Arkbow +2 AI in absence of creatures. 2018-11-03 08:24:03 +03:00
Agetian
0ab87d46b4 - Improved the implementation: clear the memory set for reentry-susceptible cards when starting to consider a new SA.
- Some more improvements in AiCardMemory.
2018-10-30 15:04:58 +03:00
Agetian
1ab9f2cae5 - Fixed a stack overflow when the AI is considering Pause for Reflection.
- Improved the implementation of AiCardMemory a little, making it a little safer to use as well in routines which may also be used to simulate human behavior.
2018-10-30 13:06:33 +03:00
Michael Kamensky
cfd4aafc35 Improve Omnispell Adept AI 2018-10-26 20:00:00 +00:00
Agetian
f4db360265 - Prevent NPEs caused by the AI when testing for the new style AI hints from within AI methods on Card objects, which is dangerous because Card.getRules() is not guaranteed to be non-null, and may indeed be null for objects such as tokens (especially noticeable in Momir Basic and MoJhoSto).
- Currently relegated 99% of AI calls to those getAIHints tests to a wrapper method which checks for a non-null getRules.
- The card predicate has to test for non-null directly to avoid adding an unnecessary dependency on the AI module (the alternative would be to add the wrapper methods to the Card object, but that'll clutter it even more and the AI hints belong to the AI side of things, not the card itself).
2018-10-26 17:16:12 +03:00
Chris H
ff4622954f Fix NPEs reported by Sentry 2018-10-20 22:07:57 -04:00
Sol
79f580d55a Update PowerExchangeAi.java 2018-10-19 13:37:29 +00:00
Michael Kamensky
4b52ff05d5 Update direct references to RemAIDeck/RemRandomDeck to use the new format 2018-10-19 12:13:31 +00:00
Jamin Collins
51bc066238 Merge branch 'fix+gonti' into 'master'
Fixing Mana types being inappropriately referenced in relation to Matrices

See merge request core-developers/forge!883
2018-10-12 23:13:33 +00:00
Chris H
8ac960168d Cross my fingers 2018-10-09 21:43:48 -04:00
swordshine
375c1e0da7 - Added Aminatou, the Fateshifter 2018-10-09 12:03:29 +08:00
swordshine
09b62681c1 - Fixed Whispering Snitch 2018-10-02 22:21:13 +08:00
Michael Kamensky
2ab59849a8 Merge branch 'guilds_fxes' into 'master'
Experimental Frenzy

See merge request core-developers/forge!954
2018-09-28 09:27:23 +00:00
tehdiplomat
2f30b14c53 Fix AI passing in null to canPlayLand 2018-09-27 10:57:04 -04:00
Jamin W. Collins
593218343c avoid CME in chooseSaToActivateFromOpeningHand()
Signed-off-by: Jamin W. Collins <jamin.collins@gmail.com>
2018-09-25 21:42:22 -06:00
Agetian
d87e63c9a7 - Fixed the AI not putting the Najeela trigger on stack if it doesn't want to use it. 2018-09-16 19:03:24 +03:00
Agetian
5503897911 - Added a basic AI logic for Najeela, the Blade Blossom. 2018-09-14 12:51:29 +03:00
Michael Kamensky
5a500b857b Merge branch 'checkstyle' into 'master'
implement basic checkstyle configuration

See merge request core-developers/forge!911
2018-09-13 12:45:22 +00:00
Agetian
a9e100cac5 - Fix a NPE in TokenAi when processing non-creature old style tokens. 2018-09-13 14:06:02 +03:00
Agetian
6d599d2b8c - Basic SurveilAi logic, largely inspired with the ScryAi logic. 2018-09-13 11:27:56 +03:00
Jamin W. Collins
fc62a41e46 implement basic checkstyle configuration
Remove all unused or redundant imports

Signed-off-by: Jamin W. Collins <jamin.collins@gmail.com>
2018-09-11 18:16:43 -06:00
Agetian
bd8fea4616 - Added a scry logic hook for willPutCardOnTop. 2018-09-10 17:56:29 +03:00
Agetian
5c8acadb5d - Minor correction to match the expected result per description. 2018-09-09 18:58:04 +03:00
Agetian
0c38c6306f - A simple hook that calls Scry logic for Surveil (but on top of that, checks whether there are enough cards in the library not to deck yourself).
- Can be improved further by completely differentiating the logic between the two.
2018-09-09 18:55:58 +03:00
Hanmac
61a627a36a Surveil Effect 2018-09-08 15:50:32 +02:00
Jamin Collins
925ae63071 Merge branch 'token_phase_two' into 'master'
Add more support for migrating Editions to TokenScripts

See merge request core-developers/forge!885
2018-09-06 01:16:27 +00:00
tehdiplomat
780902ac31 Allow TokenAI to handle TokenScripts 2018-09-03 11:36:41 -04:00
Hanmac
6ec0dd49d7 Prowl is a Keyword now 2018-09-02 14:45:56 +02:00
tehdiplomat
341a241a82 Fixing Mana types being inappropriately referenced in relation to Matrices 2018-08-28 12:24:04 -04:00
austinio7116
8331660825 Arixmethes, plus slumber counters 2018-07-29 19:30:48 +01:00
Michael Kamensky
a670245b3d Merge branch 'bushidoFix' into 'master'
Bushido fix

See merge request core-developers/forge!794
2018-07-26 06:24:03 +00:00
Hanmac
421da7285c ComputerUtilCombat: hotfix for predictPowerBonusOfBlocker and predictToughnessBonusOfBlocker 2018-07-26 06:54:57 +02:00
Hanmac
6d829db99e ComputerUtilCombat: hotfix for predictPowerBonusOfAttacker and predictToughnessBonusOfAttacker 2018-07-26 06:48:33 +02:00
kms70847
05c3402817 Swap order of operands so .equals can't get called on a null value.
Resolves https://git.cardforge.org/core-developers/forge/issues/632
2018-07-26 00:07:27 -04:00
Agetian
3c2f5b2ecf - Also reset the lands played last turn. 2018-07-17 16:13:35 +03:00
Agetian
442263710b - GameState: preserve the number of lands played so that land drops from the previous game state do not affect the new game state. 2018-07-17 08:50:56 +03:00
Hanmac
dfdee167a4 CounterPut: fix with CounterNum 2018-07-13 19:37:00 +02:00
Michael Kamensky
059644a27d Merge branch 'charm-ai' into 'master'
Fixed AI not making choices for AF Charm when playing spells without paying mana cost

See merge request core-developers/forge!742
2018-07-07 13:32:00 +00:00
Michael Kamensky
e89a742b24 - Added a simple CheckDFC logic for putting counters on cards that can transform later as a result (Ludevic's Test Subject). 2018-07-07 14:43:17 +03:00
Michael Kamensky
020e02fb50 - AI should make choices for AF Charm when playing a SA with this API without paying its mana cost. 2018-07-07 14:21:05 +03:00
Hanmac
3d90acdfa4 SetStateAi: cleanup 2018-07-06 07:11:50 +02:00
Hanmac
d2e02453d8 SetState: nonPerm can't turn faceup, also canTransform check 2018-07-05 22:50:37 +02:00
Michael Kamensky
1e0676562d Merge branch 'dom-puzzles' into 'master'
Added puzzle PS_DOM9 and improved PS_DOM4.

See merge request core-developers/forge!678
2018-06-26 05:38:29 +00:00
Agetian
66c4769d78 - Added a way to add persistent mana in game states (for puzzles).
- Added basic logic for Evra, Halcyon Witness.
- Added puzzle PS_DOM9.
- Improved implementation for puzzle PS_DOM4.
2018-06-26 08:36:06 +03:00