Commit Graph

1413 Commits

Author SHA1 Message Date
Hanmac
0c2b9e7445 AiController: add orderPlaySa and add it to PlayerControllerAi 2016-12-24 10:56:12 +00:00
Agetian
d2172519b4 - Clear the temporary EndOfTurnLeavePlay SVar from a Dashed creature to avoid making it linger permanently on the card for the rest of the duel. 2016-12-24 07:05:30 +00:00
Agetian
3f95f34acc - Use LKI copy for Dash AI simulation. 2016-12-23 20:42:34 +00:00
Agetian
cabd71c4f6 - Removed a test code I forgot to take out last time. 2016-12-23 20:12:30 +00:00
Agetian
4f00ae9424 - Create a new object when considering Dash and simulating it by the AI (if it has the same ID as the original card copied by the simulation, that can mess up with time stamp checks later and the card can become untargetable by spells, e.g. Kolaghan, the Storm of Fury + Force Away in Commander mode). 2016-12-23 20:08:48 +00:00
Myrd
c272cde429 Simulated AI: Evaluate different fetch targets.
This lets the AI figure out such sequences as:

Game state:

In play: Urborg, Thespian's stage & fetch land
In hand: Crop rotation

Sequence:
  1. Fetch for a forest.
  2. Crop rotate forest into Dark Depths.
  3. Activate Thespian's stage targeting Dark Depths.
  4. Profit!
2016-12-23 17:50:26 +00:00
Myrd
ca0e940069 Don't ignore counterspells in simulated AI. 2016-12-23 06:26:25 +00:00
Myrd
fce93840c0 Don't warn about cards AI can't play when using simulation AI. 2016-12-23 06:16:53 +00:00
Myrd
4b14c9d943 Fix copying of emblems for simulated AI along with a test. 2016-12-22 19:45:16 +00:00
Hanmac
94681b6675 Splice: do a total rewrite to make it better for the player and more rules conform 2016-12-21 18:32:50 +00:00
Agetian
4b46daf963 - AI should not confirm the AF Tap action if nothing at all was targeted by it (prevents e.g. the AI pouring all available mana into Waxmane Baku). 2016-12-20 13:59:53 +00:00
Hanmac
0000700320 CountersMoveAi: total refacor of AI class, now it has better logic for Tgt -> Defined and Source -> Tgt and for without Tgt 2016-12-18 06:33:40 +00:00
Hanmac
90ffab69de ClashAi & ManifestAi: use shorter form now for looking at TopCard of Library 2016-12-18 06:28:59 +00:00
Hanmac
d8c97d9c4e CardFactoryUtil: moved "At the beginning of your upkeep, sacrifice" as "UpkeepCost" in CardFactoryUtil
delete Upkeep class because its not needed anymore
2016-12-17 18:03:43 +00:00
Agetian
141f66d54d - Reset targets for ChangeZoneAi SameName logic (hopefully fixes Declaration in Stone AI targeting errors). 2016-12-17 15:05:57 +00:00
Agetian
1da0063310 - Somewhat better structuring of ChangeZoneAll AI targeting check. 2016-12-17 14:41:19 +00:00
Agetian
e09d57562f - A better idea: for non-targeted AF ChangeZoneAll, just return "true" for now without trying to target it. This allows to keep Paradigm Shift as non-RemAIDeck. 2016-12-17 14:35:45 +00:00
Agetian
8977d1ad8f - AI should not attempt targeting AF ChangeZoneAll which does not need any targets (e.g. Timetwister, Memory Jar, etc., which the current AI can't use). 2016-12-17 14:16:02 +00:00
Agetian
c789fc32f7 - List most likely can't be null at this point since it's instantiated, so just check for empty. 2016-12-16 19:02:30 +00:00
Agetian
4aec9031d3 - NPE prevention measure in ControlGainAi (potentially trying to sort an empty list when the AI has nothing to target). 2016-12-16 19:01:52 +00:00
Agetian
d3951c0061 - Added an extra check for Genju of the <X> AI. 2016-12-16 12:02:19 +00:00
Agetian
f076b765de - Removed an extra blank line. 2016-12-16 10:53:58 +00:00
Agetian
b46aabf6c6 - Prevent the AI from animating a land enchanted with an animating aura (i.e. Genju of the Cedars) by tapping the land that is to be animated. 2016-12-16 10:53:20 +00:00
Agetian
fbf3845ca6 - Fixed CountersPutAi NPEing on divided counter allocation (e.g. Ajani, Mentor of Heroes +1) 2016-12-15 06:16:55 +00:00
Sol
79813ceed7 Fix Cumulative Upkeep not hitting the stack for AI 2016-12-10 20:54:55 +00:00
Hanmac
d800e06fa5 CardFactory: remove everything about unparsedAbilities its not needed anymore 2016-12-09 22:11:21 +00:00
Hanmac
cd55be1c6d RevealAi: need to check Cost for Miracle 2016-12-09 19:02:28 +00:00
Hanmac
234178dfd5 SpellAbilityAi: fixed general Logic, Restriction should be ignored for Trigger
AiController: for ETB Effects, ignore IsPresent Conditions (used in Fabricate)
2016-12-07 21:14:34 +00:00
Hanmac
ce64f9b541 RevealAi: fixed for Miracle 2016-12-07 06:14:48 +00:00
Hanmac
7ca9786501 RevealAi: updated to new SpellAbilityAi format,
add Code Part for Miracle Reveal Effect (only reveal if ai wants to cast it)
2016-12-06 06:34:11 +00:00
Hanmac
828c9d70b2 RepeatAi: use new getAdditonalAbility 2016-12-03 17:08:07 +00:00
Hanmac
b12c8166b2 ChooseGenericEffectAi: fixed it to prevent the AI from using it then it doens't have the AI for
Also add some Logic for Pump Abilities like Choose Keyword
2016-12-03 17:07:22 +00:00
Hanmac
f544605e5b CharmAi: updated for new SpellAbility Format, and does check Entwine 2016-12-03 17:04:15 +00:00
Hanmac
72ee5baf7c AnimateAi: non-Curse Animate not for opponent stuff 2016-12-02 06:38:44 +00:00
Agetian
84cb569c92 - Fixed Tezzeret, Agent of Bolas AI logic for the -1 ability (currently by adding AITgts and an extra parameter, AITgtsStrict, which makes the AI targets a necessary requirement instead of a merely favorable one). 2016-12-02 06:30:13 +00:00
Hanmac
ba3412abc8 SpellAbilityAi: moved part of canPlayAI into extra function without Restriction
also add extra checkPhaseRestrictions variant with AiLogic
2016-11-29 06:34:02 +00:00
Hanmac
abb4d6f31f PlayAi & PermanentAi: add more functions to make Suspend cards working again 2016-11-28 19:07:02 +00:00
Hanmac
f9f13275b1 GoadAi: do it without TargetRestrictions 2016-11-28 19:05:35 +00:00
Hanmac
f0cef50d73 ChooseGenericEffectAi: used new SpellAbilityAi format, and make Fabricate possible 2016-11-28 17:57:29 +00:00
Hanmac
5b763c63b7 AiCostDecision: fixed CounterType for Quest logic 2016-11-27 09:02:21 +00:00
Hanmac
f14c4ab564 AiCostDecision: CostRemoveAnyCounter add logic how to remove counters from cards. 2016-11-26 11:57:25 +00:00
Hanmac
fdcf7be18a ComputerUtil: extend isNegativeCounter with more counters and Special cases
add isUselessCounter for Counters with no effect
2016-11-26 11:23:47 +00:00
Hanmac
c9d6f72d77 CountersMultiply: add new API type for double counters on cards
remove it from RepeatEachAi
add more AI logic into it. it does support Strive Spell
2016-11-20 15:03:27 +00:00
Hanmac
7a36b36835 CountersProliferateAi: use better AI logic 2016-11-20 09:23:57 +00:00
Hanmac
3c5eb2248b CardFactoryUtil: Miracle is a Trigger now, and make PlayAi a bit better to check if it can play it 2016-11-18 19:55:05 +00:00
excessum
4178d0f7e3 - Fixed timing for AI self-mill
- Fixed chkAIDrawBack() for ChooseCardAi
2016-11-17 06:57:09 +00:00
Hanmac
e9ddecbc8c AiController: checkETBEffects: make it better working with OverridingAbility (and use better getAbility function) 2016-11-16 06:23:15 +00:00
Hanmac
5729ec0779 ComputerUtil: getDamageFromETB fixed Trigger with OverwridingAbility 2016-11-14 21:00:33 +00:00
Hanmac
b7beb6612e ChangeZoneAllAi: add more check for mandatory 2016-11-10 18:19:39 +00:00
Hanmac
ceb3fae152 CardFactoryUtil: make Haunt a better Effect, rework the Haunt Triggers in new format
Trigger now does has a helper to replace ABILITY in TriggerDescription with its ability
2016-11-09 15:26:26 +00:00