Commit Graph

1413 Commits

Author SHA1 Message Date
Hanmac
4fe6569dc5 TokenAi: add chooseSinglePlayer for it, its used for TokenAttacking and should be used to get the player it should attack. 2016-07-14 19:33:59 +00:00
Agetian
02d06e7a1c - Removed a useless line I forgot to take out. 2016-07-14 09:07:54 +00:00
Agetian
6bf4c4ad66 - Attempted to fix the "single zone" targeting restriction for cards that require choosing multiple cards via a list input.
- For the human player, once the first target is chosen, the other targets are only listed from the same zone (e.g. from the same graveyard), other targets are not listed.
- For the AI player, the illegally chosen targets are removed post-selection from the targeting list. This is suboptimal and is only done this way so the AI at least does not cheat. We need an AI expert to expand on this to make the AI choose targets sanely in the first place.
2016-07-14 06:09:33 +00:00
Agetian
7510baf5e2 - Avoid division by zero when evaluating the opening hand if there are deck contains no lands. 2016-07-12 05:28:09 +00:00
Hanmac
38cf94774b StoreSVarAi: Tree of Redemption & Tree of Perdition add more logic if the AI or target opponent can't gain life/lose life. Also Check if something would turn the lifegain into a Lose. add Tainted Remedy into the check to enable Combo with Tree of Perdition. 2016-07-08 11:12:57 +00:00
Sol
abf66a5555 - Improving how the AI handles certain counterspells especially Hive Mind + Pact of Negation. 2016-07-07 17:54:43 +00:00
Sol
5524c00367 Meld 2016-07-03 16:37:05 +00:00
swordshine
c6106d7f58 - EMN: Added Lupine Prototype by Marek 14
- EMN: Added Decimator of the Provinces (Emerge)
2016-07-03 08:09:31 +00:00
Krazy
8d73ffb52b [maven-release-plugin] prepare for next development iteration 2016-06-29 04:09:17 +00:00
Krazy
4e6dd62a54 [maven-release-plugin] prepare release forge-1.5.53 2016-06-29 04:09:06 +00:00
Sol
259c6750fb - Mulligan sign got inverted somewhere during testing. 2016-06-23 20:57:36 +00:00
Sol
ea5d6d4fa5 - Split AI mulliganing to scoring hands/comparing to a base value to later be used with Backup Plan 2016-06-23 14:03:39 +00:00
Sol
ff0c33d613 - AI will have better respect for LEDs activation restriction during auto payment
- (Hopefully) Fixed auto-payment not clearing out it's express choice which forces Black Lotus, etc, to not prompt user for mana choice
2016-06-21 16:56:10 +00:00
Hanmac
9b6ce1a062 add Dawnbreak Reclaimer, with extra logic in ChangeZoneAllAi 2016-06-20 07:09:20 +00:00
Hanmac
9e93551fb4 SetStateAi: rearrange the code to have the TargetRestriction check also for Flip cards 2016-06-20 07:05:56 +00:00
Hanmac
7978674351 EffectAi: do not use Prevent effect on something which has already Prevent Effect 2016-06-16 16:42:58 +00:00
Hanmac
5f634369bf CardFactory: for DoubleFacedPlaneswalker, add the SVars to the State instead of the Card
ReplacementHandler: for Cards with AlternateState, ask the game for the current CardState
AIController: use game.getCardState
2016-06-14 15:33:15 +00:00
Hanmac
e9f32d344e ChooseGenericEffectAi: add Logic for SelfOthers cards, only use self, if it doesn't has consequences 2016-06-14 07:52:25 +00:00
Hanmac
fda1cbb88b AbilityUtils: make "OppNon" more generic to allow "OppNonParentTarget"
add "The Fate of the Flammable", "May Civilization Collapse", "Feed the Machine" and "Surrender Your Thoughts"
update ChooseGenericEffectAI, currently it does prefer others over self, even if targeted wouldn't hurt target player.
2016-06-11 18:39:32 +00:00
Hanmac
3c2a6fbaa3 ComputerUtil; add more checks for hasACardGivingHaste:
add Check for StaticAbilities for non-Equipment
add Check for Trigger which does trigger on EnterTheBattlefield
and ad Check for Special Cases like Anger and Odric
2016-06-04 10:44:57 +00:00
Hanmac
6684a597de AttachAi: fixed from variable name 2016-05-26 11:11:54 +00:00
Hanmac
d14e94b609 Card: add IsEquippedBy like isEnchantedBy from GameEntity
CardPredicates: use isEquippedBy and isEnchantedBy for Predicate<Card>
2016-05-25 07:18:16 +00:00
Hanmac
395cc70b3e Sasaya, Orochi Ascendant: fixed the SetState, SpellAbilityAi now does check for Restrictions and Conditions 2016-05-24 17:30:01 +00:00
Hanmac
75ec82d817 ComputerUtil: have better check for Undying and Persist for Sacrificing. Do Check the counter too. 2016-05-19 05:04:59 +00:00
Hanmac
59ce1abe00 AI: move check for isUseless from AttachAi to SpellAbilityAi
update SetStateAi to use new canPlay()
add check for useless Legendary in SetStateAi (try to replace Legendary if current one is useless)
add extra check for Legendary KI creatures, more counters are better.
2016-05-16 15:26:07 +00:00
Sol
692bfd7e81 - AI shouldn't try to transform creatures that can't transform 2016-05-15 23:53:00 +00:00
excessum
acf9bdd64e - Updated RegenerateAllAi to use new canPlay() and predictThreatenedObjects() 2016-05-15 07:15:39 +00:00
excessum
e224066cca - Updated RegenerateAi to use new canPlay() and predictThreatenedObjects() 2016-05-15 07:08:23 +00:00
excessum
73e3066e26 - Added overload to predictThreatenedObjects() to check for top-stack only to stop the AI from duplicating "rescue" efforts in complicated stacks 2016-05-15 03:52:21 +00:00
excessum
c16a1e508a - Updated ProtectAi to use new canPlay() 2016-05-15 03:31:37 +00:00
excessum
8d84cc3210 - TokenAi to use default checkAiLogic()
- Updated FightAi to use new canPlay()
2016-05-15 03:05:49 +00:00
excessum
774396ec72 - Removed checkSpecificCardLogic(), use checkAiLogic() instead
- Added some commonly used checks to checkApiLogic()
2016-05-15 02:56:05 +00:00
Sol
06ff1215b9 - Fix potential NPE in SetStateAI
- Unroll UntapAI into new style
2016-05-14 19:49:57 +00:00
Hanmac
96276cb896 EffectAI: add SpellCopy AILogic for Chandra, the Firebrand and Howl of the Horde 2016-05-14 19:31:13 +00:00
excessum
e29bd3442d - Updated TokenAi to use new canPlay() 2016-05-14 03:42:18 +00:00
excessum
992a3ea5b4 - Updated MillAi to use new canPlay() (fixes AI spamming Autumnal Gloom in its own turn) 2016-05-14 01:34:56 +00:00
excessum
f69d077e11 - Re-factored SpellAbilityAi.canPlay() into a template pattern 2016-05-12 12:54:38 +00:00
Hanmac
0d797f2365 Narset Tramscendent: add Logic for the Rebound Ability, only aktivate it if it can play a spell without rebound this turn 2016-05-10 15:02:27 +00:00
excessum
f31af9c1f8 - Added check for discard cost for TapAi (eg. Stern Constable)
- Added SacMe and DiscardMe flags for Drownyard Temple
2016-05-08 12:32:48 +00:00
Hanmac
37f0b07a28 SetStateAi: use more generic way to check if a Card should be transformed or not. Also does check if Legendary Rule does still apply for that. 2016-05-08 09:43:20 +00:00
excessum
2eb68946dd - Stopped AI from transforming Westvale Abbey if it controls Ormendahl 2016-05-08 08:50:50 +00:00
excessum
f645150aa0 - Fixed duplicated static effects caused by r31197 2016-05-08 04:08:42 +00:00
excessum
0bce2874b6 - Updated AiController to check for static effects like Elesh Norn, Grand Cenobite 2016-05-08 02:55:24 +00:00
excessum
17d75edc35 - Updated tokens AI to check for static effects like Virulent Plague 2016-05-07 04:41:34 +00:00
Sol
30c6a30bd4 - The AI shouldnt put AddTurn effects on the stack without a legal target 2016-05-05 21:20:33 +00:00
Sol
d66402dfca - Fix Vesuva recursing on itself if its the "best" choice for the AI 2016-05-03 21:27:41 +00:00
Krazy
a34996ee3b [maven-release-plugin] prepare for next development iteration 2016-05-03 03:12:25 +00:00
Krazy
9b8e57aee3 [maven-release-plugin] prepare release forge-1.5.52 2016-05-03 03:12:15 +00:00
Hanmac
5cceb922ae add more EndOfTurnLeavePlay to some creatures
also should not attach Aura to creature that does leave play (using the SVar)
EnchantMe creatures should not be attached when they are useless
2016-04-30 13:59:39 +00:00
Hanmac
0040b1eab5 ChooseGenericEffectAI: add missing imports 2016-04-29 17:52:03 +00:00