Commit Graph

2301 Commits

Author SHA1 Message Date
Hanmac
2be9f32678 CountersPutAi: use Iterables.size for better size 2016-08-15 04:44:23 +00:00
Hanmac
c8b46ec38b CountersPutAi: add chooseSingleCard for Bolster and maybe others 2016-08-15 04:42:50 +00:00
Hanmac
b25b3b0eda ComputerUtil: set CastSA for AI 2016-08-12 15:50:24 +00:00
Sloth
d966c4e08e - The AI will ignore the ability fo Nether Void for cards that can't be countered. 2016-08-11 13:34:10 +00:00
Hanmac
56d6435d81 ComputerUtilMana: fixed that AI can bypass the RollDiceCost 2016-08-11 09:28:16 +00:00
Hanmac
088879bdd0 ComputerUtil: scoreHand, prevent crash on zero lands deck 2016-08-08 12:21:22 +00:00
Hanmac
59232efe17 ComputerUtil: add logic into choosePermanentsToSacrifice for Pillar Tombs of Aku 2016-08-08 11:08:59 +00:00
Hanmac
a3c57c2f4b DamageDealAi: fixed for the AI is not the activator of the damage spell
might need some more AILogic.
2016-08-08 07:59:02 +00:00
Sloth
07677f98cc - Improved AI predicting the effect of Castle when attacking. 2016-08-04 14:28:28 +00:00
Hanmac
be9f6c8ef2 ComputerUtil: fixed chooseSomeType
PlayerControllerAi & MessageUtil: fixed output for chooseType
2016-08-04 13:49:12 +00:00
excessum
c802512ffd - Fixed bug with AI responding wrongly with pumps against exile effects 2016-08-04 12:43:07 +00:00
Hanmac
987af3d0fd ZoneExchangeAi: AI should also not activate it if it does not own the first card 2016-08-04 09:41:53 +00:00
Hanmac
2c097cd62c Big MayPlay rewrite, now use StaticAbility as Key in the mayPlay Map
SpellAbilityRestriction now does check if the spell is still valid when playing.
Add Special Logic for Bestow spells there. MayPlay that only allows creature spells, can't be used for Bestow.
2016-08-03 15:42:28 +00:00
Hanmac
2458a8f73c Cost: moved "You can't sacrifice creatures to cast spells or activate abilities." into Card.canBeSacrificedBy.
also add Property for that.
2016-08-03 10:50:34 +00:00
Hanmac
22c741c7d0 ClashAi: add logic to select player for Clash,
Split cards are not implemented yet.
2016-08-03 09:41:57 +00:00
Hanmac
a381163a12 fixed ComputerUtil & PlayerControllerAi: return false if spell cost could not be paid
that does fix Madness for AI
2016-08-02 18:12:10 +00:00
Hanmac
9708019f7e ComputerUtil: updated chooseSomeType to use better check with removing invalid types first. 2016-08-02 12:07:29 +00:00
Hanmac
a11906c21b ComputerUtilCard: add getMostProminentBasicLandType and a more generic getMostProminentType
change getMostProminentCreatureType to use the generic form too
2016-08-02 11:59:34 +00:00
Hanmac
afd50154d1 SetStateAi: add more logic for transforming, now use always evaluated value check
unblocked should only care about transformed power for now.
thats the next step in making the AI use Elusive Tormentor better.
2016-08-02 10:55:49 +00:00
Hanmac
16a2160598 AiAttackController: add check for GlobalAttackRestrictions used for getting MaxAttack,
when it can only attack with one creature, it should pick the strongest one. 
also moved MustAttack parts a bit.
that fixes AI using the Attack Rule of Silent Arbiter correctly
2016-08-02 08:24:10 +00:00
Agetian
a629afcc3b - Implemented a basic "good" triple gang block. Currently considers a 3-vs-1 block in which only one blocker dies *or* a 3-vs-1 block in which two blockers may die but one of which is a token "good". May not be optimal and may be a bit slow at the moment, please consider improving. 2016-08-02 05:24:14 +00:00
excessum
0669c4c0bd - Fixed cannot add to stack bug for AI with Tree of Perdition 2016-08-01 12:38:18 +00:00
Hanmac
88988cfe26 SetStateAI: add checkPhaseRestrictions to check which form would be better for transformation.
thats for Screeching Bat vs Stalking Vampire to check in which form it should attack.
2016-08-01 09:57:04 +00:00
excessum
b5d3b86693 - Made AI aware of activated transform abilities in combat 2016-07-31 04:22:39 +00:00
Hanmac
13b1f01e3b AiCostDescision: add collection for discarded and tapped, to prevent the ai from using the same card twice 2016-07-30 19:01:34 +00:00
Hanmac
325fd94907 AiController: getCardsToDiscard add exclude parameter (like using for already selected for discarding) 2016-07-30 18:59:43 +00:00
Hanmac
443ee670cd ComputerUtilCost: checkDiscardCost: remove from hand what is already selected for discard 2016-07-30 18:58:37 +00:00
Hanmac
29c0f4bfaa ComputerUtil: chooseTapType add exclude parameter (like using for already selected for tapping) 2016-07-30 18:56:50 +00:00
excessum
46b6131f69 - Updated ChangeZoneAi to use new canPlay() 2016-07-30 13:03:06 +00:00
Hanmac
9468e9e454 Big MayPlay Update, now MayPlayEffect does know about its host card, and the hostcard does count how often the effect is used.
also add MayPlayLimit and MayPlayCardOwner flags.
that makes Karador, Ghost Chieftain scriptable
2016-07-30 11:36:58 +00:00
excessum
7baa99dcbb - Fixed bug where AI suicides attackers into multi-blockers (eg. 2/3 lifelink into two 2/3s) 2016-07-30 08:18:25 +00:00
Hanmac
8bc1015496 SpellAbilityAi: add to the warnings of "default implementation" which card did cause that problem 2016-07-30 07:53:33 +00:00
Hanmac
bb114eba85 forge-ai: remove mention of "may be played" 2016-07-30 07:52:08 +00:00
excessum
2ac9949251 - Added AILogic for mill ability of Liliana, the Last Hope 2016-07-30 05:41:03 +00:00
excessum
ebce26e412 -Changed CharmAi to use canPlayAi() instead of doTrigger() when deciding if a choice is good 2016-07-29 13:52:08 +00:00
Hanmac
9ef0ccf663 ComputerUtilMana: AI did get away without raising the Cost of SpellAbilities 2016-07-29 11:16:13 +00:00
Sol
d41c0bc3e0 - Add changes to allow for a one of the two piles to be facedown
- Add Fortune's Favor
2016-07-26 14:32:42 +00:00
excessum
9496bf38fd - Removed PumpAllAi.doTriggerAINoCost() that was allowing AI to cast spells illegally, causing couldn't add to stack errors 2016-07-26 13:45:45 +00:00
excessum
9bbbe5bc46 - Removed EffectAi.doTriggerAINoCost() that was allowing AI to cast spells illegally, causing couldn't add to stack errors 2016-07-26 12:16:40 +00:00
Hanmac
1cf4bc02fd CostAdjustment does absorb ManaCostAdjustment 2016-07-26 10:19:17 +00:00
excessum
c58a1495ac - Re-factored CharmAi further 2016-07-25 14:00:46 +00:00
excessum
e43fe8abc6 - Fixed accidental revert of PlayerControllerAi by r31697 2016-07-25 12:49:35 +00:00
excessum
c7de464023 - Fixed NPE for triggers in r31688 and r31664 2016-07-25 12:43:47 +00:00
Agetian
31cee17693 - Temporarily reverted r31664 (causes repeatable fatal crashes e.g. on the AI casting a spell like Deceiver Exarch that do not allow the game to proceed). Feel free to recommit in a tweaked way. 2016-07-24 15:46:49 +00:00
excessum
1b5c2ad932 - Cleaned up CharmAi 2016-07-23 13:02:19 +00:00
excessum
b25ad27692 - Reverted most of r31652 as CharmsAi.chooseOptionsAi() can be called externally 2016-07-23 06:54:53 +00:00
excessum
956910fbe9 - Updated CharmAi to use new canPlay() 2016-07-23 04:24:47 +00:00
Sol
9c6d4e69a9 - Initial checkin for Meld (still some kinks to work out, but ya gotta start somewhere)
- Add Graf Rats/Chittering Host and Midnight Scavengers
2016-07-23 01:26:51 +00:00
Agetian
7d89f5ee70 - A somewhat cleaner fix for Token AI that fully separates the logic for detecting and processing mixed player/planeswalker target lists. 2016-07-20 04:18:12 +00:00
Agetian
1acd48be9e - Attempted fix for the Token AI crashing when the AI is trying to decide which player/planeswalker to attack with a spawned token. Consider improving. 2016-07-19 19:34:02 +00:00