Commit Graph

2301 Commits

Author SHA1 Message Date
Agetian
27ec723c06 - AI should generally exert creatures with Vigilance. 2017-05-28 15:28:24 +00:00
Hanmac
bbaf9078bd ReplaceDamage: fixed "Prevent$ True" count for Prevention$ Effects too.
make AI use it in damageIfUnblocked
2017-05-27 13:52:23 +00:00
Hanmac
4ef6d1c5c0 PlayerControllerHuman: sortCreatureTypes refactor code for Changeling, Clone and other stuff 2017-05-27 11:08:32 +00:00
austinio7116
f30a1d5950 Refactoring of CreatureType select sorting 2017-05-27 06:41:54 +00:00
austinio7116
55a5963ec8 Change to sorting of creature types to include tokens generated from abilities so that for example Metallic Mimic select boxes will show Servo's near the top of the list in token decks. The change also means the AI will select better creature types in such decks. 2017-05-26 19:22:19 +00:00
Agetian
5025e090a5 - Fixed the AI never playing */* cards that ETB with X +1/+1 counters on them due to a PayX miscalculation in CountersPutAi (e.g. Primordial Hydra, Altered Ego, Mikaeus, the Lunarch). 2017-05-24 06:40:19 +00:00
Agetian
376d127d8b - Adding a way to suppress testing canRegenerate from combat code temporarily to avoid re-entry from ComputerUtil#canRegenerate when testing cards such as Varolz, the Scar-Striped. 2017-05-21 06:35:17 +00:00
Agetian
c5b493d45e - Added AI logic AlwaysConfirm to AF Dig for some unusual complex cards (e.g. Quest for Ula's Temple) 2017-05-19 15:15:43 +00:00
Agetian
9e3c51fb0d - FIXME: Temporarily reverting the way damageIfUnblocked queries damage prevention effects (since isCombatDamagePrevented doesn't work as desired and I can't figure out why). Feel free to revert this to continue working on isCombatDamagePrevented. 2017-05-18 05:36:22 +00:00
Agetian
31fdcba181 - Added support for PayXButSaveMana AI logic for non-trigger AF Dig as well (for potential use cases). 2017-05-16 17:17:49 +00:00
Agetian
861728f7a6 - Simple AI support for AF Dig triggers that ask to pay {X} (e.g. Depala, Pilot Exemplar). 2017-05-16 15:34:17 +00:00
Agetian
f8d84f0d60 - Attempting to fix a potential ConcurrentModificationException in ChangeZone AI. 2017-05-16 04:39:38 +00:00
Hanmac
e277be4191 ComputerUtilCombat: add better look for ReplacementDamage 2017-05-15 05:10:48 +00:00
Agetian
7219c766e5 - Added some more keywords to damageIfUnblocked in ComputerUtilCombat (AI). 2017-05-15 05:03:28 +00:00
Agetian
0957ce6563 - AI should not attack with creatures the damage from which is prevented (temporarily or permanently). Not sure if this is the right fix, please take a look. 2017-05-15 04:33:22 +00:00
Hanmac
d9c0ed2960 CopyPermanentAi: cat combo got doubled 2017-05-14 05:30:04 +00:00
Hanmac
26d14e7f3d CopyPermanentAi: updated code a bit an make Cat Combo a bit better 2017-05-14 05:12:31 +00:00
Agetian
8a4d8a0c9c - A better way of handling the copycat combo in CopyPermanentAi. 2017-05-14 05:05:15 +00:00
Agetian
6aeffa69d0 - Saheeli Rai + Felidar Guardian combo support in CopyPermanent AI. 2017-05-13 17:44:19 +00:00
Agetian
f0802aa431 - Added a special AI Logic "BounceOnce" to ChangeZone AI to be able to mark permanents that exile another target permanent and then return it under its owner's control so that they are not bounced infinitely by the AI back and forth, creating an endless loop (e.g. Felidar Guardian bouncing another Felidar Guardian).
- Added AILogic$ BounceOnce to Felidar Guardian (some other cards may need to be marked with this logic).
- Added simple support for Saheeli Rai + Felidar Guardian "copycat" combo AI.
2017-05-13 17:07:10 +00:00
Agetian
5f4f2cee5e - Somewhat better AILogic for Chandra, Torch of Defiance. 2017-05-13 11:18:32 +00:00
Agetian
f589dc5ad6 - AI should not sac a card when paying a cost for a SpellAbility that is targeting that card (e.g. sacrificing an Eldrazi Scion when trying to attach an equipment to it). 2017-05-13 06:02:24 +00:00
Agetian
71ab7ef4ff - RepeatEach AI should obey AILogic$ Never (e.g. Watchers of the Dead) 2017-05-09 08:46:49 +00:00
Sol
546b9ac214 Some more fixes for Puzzle mode 2017-05-09 02:04:08 +00:00
Hanmac
0c327f2f39 CardFactoryUtil: "Prevent all (combat) Damage" + Cardname is now done as Replacement Effect 2017-05-07 10:23:57 +00:00
Agetian
3967267e9d - isAnyMana is better for determining the nature of the ability for Cavern of Souls. 2017-05-03 04:24:57 +00:00
Agetian
992540a17b - Added an exception for Cavern of Souls to chooseManaAbility to make the AI use it in a smarter way when paying generic mana shards (e.g. Blight Herder). Also helps with the smarter use of this card when using Auto mana payment. 2017-05-03 04:23:06 +00:00
Sol
8ccee98f5e Add Approach of the Second Sun
Add BranchEffect
2017-04-30 20:27:15 +00:00
Agetian
182b2db80b - A little clarification. 2017-04-30 13:51:28 +00:00
Agetian
64eaf3de80 - Adding AI Logic ExileAndPlayUntilEOT to Oracle's Vault and a couple other similar cards. 2017-04-30 13:47:14 +00:00
Agetian
c5d36b3086 - Oracle Update: place -> put (part 2 + code support) 2017-04-30 05:29:57 +00:00
Agetian
e6420cee68 - Ensure that AI resets targets prior to starting targeting with AF Untap, otherwise the AI gets confused about what to untap (e.g. with Filigree Sages). 2017-04-28 14:37:01 +00:00
Hanmac
9827d090d6 RepeatEachAi: add Logic AllPlayerLoseLife for Different LoseLife abilities like Stern Judge 2017-04-23 19:24:42 +00:00
Hanmac
b8fc526a88 CloneEffect now has own Choices Params and doesn't need ChooseCard anymore 2017-04-22 15:42:05 +00:00
Agetian
d235a8d136 - Removed a debug line. 2017-04-21 05:56:57 +00:00
Agetian
6a0e16e4cb - Fixed the AI failing to target with Chandra's Ignition (needs generalization for other similar SAs that do not target directly, but it's a bit tricky) 2017-04-21 05:56:31 +00:00
Hanmac
58d013e5be GameEntity#AddCounter now has a Source parameter
update all Effects using them
2017-04-20 12:34:31 +00:00
Sol
2f9319c420 Initial pass of Exert (lots of things to be improved, but should be good enough to start scripting) 2017-04-16 20:00:42 +00:00
Hanmac
8606459cef fixed GameState for dumping and reloading 2017-04-16 13:28:06 +00:00
Sol
d1b3cc6311 GameState shouldn't crash for nontokens without paper cards 2017-04-09 03:14:00 +00:00
Sol
54de9f1009 Fix GameState counters for Permanents 2017-04-09 02:36:22 +00:00
Sol
836ebdc5e6 Initial checkin for Puzzle Mode 2017-04-08 15:17:07 +00:00
Hanmac
e91ad84761 UntapAi: fixed chooseSingleCard, getAllies does not return player itself 2017-04-01 16:56:11 +00:00
Hanmac
fb482d4b61 ComputerUtil: add logic for Council's dilemma votings
add helper lifegainPositive & lifegainNegative for looking at lifegain replacement effects
2017-04-01 15:01:40 +00:00
Hanmac
a2579834cd FlipACoinAi: format and remove getOpponent 2017-04-01 14:57:50 +00:00
Hanmac
f132885b70 PlayerControllerAi & AiController: move chooseSingleReplacementEffect into the brain part
also add logic for Lifegain replacement effects
2017-03-19 20:25:56 +00:00
Hanmac
044f60b4d1 SpellAbility & CardTraitBase: move hasParam and getParam into CardTraitBase
add CardTraitPredicates as base for SpellAbilityPredicates
2017-03-19 13:05:06 +00:00
Agetian
711f741f6a - Fixed a logic in DrawAi making the AI incorrectly target itself when it can't (e.g. Thought-Knot Seer "target opponent" ability). 2017-03-07 06:41:57 +00:00
Sol
144156c497 Add Ballot Broker, Borderland Explorer, Custodi Soulcaller, Illusion of Choice (CN2) 2017-03-05 02:53:42 +00:00
Myrd
8311daada4 [Simulated AI] Don't de-dupe creatures involved in combat when evaluating potential targets.
Makes an exception if two identical creatures are attacking the same entity and haven't been blocked yet.
2017-02-27 00:05:31 +00:00