Commit Graph

2301 Commits

Author SHA1 Message Date
Seravy
3346cbf0c5 Update AiController.java 2018-02-19 17:05:56 +00:00
Michael Kamensky
74d9791f03 Merge branch 'ScorchedEarth' into 'master'
Scorched earth

See merge request core-developers/forge!234
2018-02-19 16:52:41 +00:00
Agetian
b05463ad6c - Code base cleanup. 2018-02-19 19:48:06 +03:00
Seravy
f229fbc4b1 Update DestroyAi.java 2018-02-19 12:54:16 +00:00
Seravy
e3b4c59b9f Update AiController.java 2018-02-19 12:50:15 +00:00
Seravy
8d4f72c691 Protect only if we are actually needing to protect the card the ability will work on. 2018-02-19 13:14:16 +01:00
Seravy
04260a7f45 Ai can now activate protection abilities that do not target but affect only a single card, such as Knights of Dawn 2018-02-19 11:42:02 +01:00
Seravy
3c03199ea3 Do not play protection if enchanted by aura of the color that would be chosen 2018-02-19 11:30:58 +01:00
Seravy
23e312f2ba Now it works 2018-02-19 11:18:20 +01:00
Seravy
3931903018 New SVar "ChosenProtection" Marks Auras that would grant protection from the chosen color, to prevent attaching to a creature that already would have protection from that color. While picking a different color would be another solution, there is a chance it's wasteful to protect from a secondary color, or the player plays only one color so it's better to not target that creature at all.
This attempt didn't work, next commit did.
2018-02-19 11:16:10 +01:00
Michael Kamensky
8c680da98c Merge branch 'PriceOfProgress' into 'master'
Price of progress

See merge request core-developers/forge!210
2018-02-19 04:37:54 +00:00
Seravy
6b64667767 Do not spend more on X than the number of lands we can discard! 2018-02-18 21:37:20 +01:00
Michael Kamensky
dd7e2d933f Merge branch 'DumpTurn' into 'master'
Dump/Setup game state will now save current game turn.

See merge request core-developers/forge!209
2018-02-18 19:39:22 +00:00
Seravy
97177e379e Default turn = 1 if none set 2018-02-18 20:22:17 +01:00
Seravy
c348ffa34e Now using SVar 2018-02-18 19:54:29 +01:00
Seravy
cbc0335d90 Trying to get effective cost instead of original cost but doesn't seem to recognize Memory Crystal anyway. I guess it's not that important. 2018-02-18 18:43:23 +01:00
Seravy
537259989f AI will avoid wasting a BUYBACK card without paying the buyback cost when able 2018-02-18 16:47:29 +01:00
Seravy
f16a7ff0b0 incomplete 2018-02-18 15:32:14 +01:00
Hanmac
3a071ea071 DestroyAi: extended havepact logic 2018-02-18 11:26:34 +01:00
Michael Kamensky
d544d69524 Merge branch 'AIInDangerRange' into 'master'
AI In danger threshold now configurable and can be random instead of being locked to always 4.

See merge request core-developers/forge!220
2018-02-18 09:15:34 +00:00
Michael Kamensky
bcc0fc9e00 Merge branch 'AINoncombatantCreatures' into 'master'
Ai noncombatant creatures

See merge request core-developers/forge!221
2018-02-18 09:10:39 +00:00
Seravy
7f2d2d6588 AI In danger threshold now configurable and can be random instead of being locked to always 4.
(As a player, I find the fact the AI always changes their behavior towards more defensive at exactly 5 life extremely abusable - I can always be 100% sure they won't block certain creatures or activate certain spells/abilties otherwise, and in many cases, if the AI already got down to 5 life, even if they do activate their big trump card, it's too late : the last 5 damage is way easy to deal.)

Used this for playing the past few days and it seemed to work without problems.
2018-02-18 10:08:29 +01:00
Agetian
b7601fded3 - Minor cleanup. 2018-02-18 11:59:10 +03:00
Seravy
602f761552 This should work? 2018-02-18 09:39:17 +01:00
Seravy
f271c7a74e Now the AI properly realizes this can be played, but doesn't actually play it.
Is there something that prevents it from playing things that destroy own tokens?
2018-02-18 09:39:15 +01:00
Seravy
c47242e40e fixed card name 2018-02-18 09:39:14 +01:00
Seravy
887f2f9a52 Mark Spirit Mirror and Breeding Pit tokens as things to sacrifice.
If Grave Pact is in play, activate Spirit Mirror to destroy own token and force enemy to sac a creature if possible.
2018-02-18 09:39:13 +01:00
Agetian
4665503caa - Minor cleanup and updating CHANGES.txt. 2018-02-18 11:29:02 +03:00
Michael Kamensky
f5e095f345 Merge branch 'cantblock' into 'master'
CantBlockBy as Static Ability

See merge request core-developers/forge!218
2018-02-18 08:05:59 +00:00
Michael Kamensky
d444e8896c Merge branch 'Fireslinger' into 'master'
Fireslinger

See merge request core-developers/forge!211
2018-02-18 07:36:27 +00:00
Michael Kamensky
935d42af74 Merge branch 'SuddenImpact' into 'master'
Force use of Sudden Impact during enemy draw step after drawing if enemy holds…

See merge request core-developers/forge!212
2018-02-18 07:34:03 +00:00
Michael Kamensky
b5ae52a3b6 Merge branch 'AiNonstacking' into 'master'
AI Nonstacking Permanents

See merge request core-developers/forge!222
2018-02-18 05:54:50 +00:00
Michael Kamensky
3215eb9a8a Merge branch 'CounterFromAbilityAI' into 'master'
Counter from ability ai

See merge request core-developers/forge!224
2018-02-18 05:49:09 +00:00
Michael Kamensky
f2ddd697e9 Merge branch 'AICuriosity' into 'master'
Ai curiosity

See merge request core-developers/forge!225
2018-02-18 05:47:57 +00:00
Michael Kamensky
2dc0e10c34 Merge branch 'TreasureTroveFix' into 'master'
AI Logic name in code and actual card scripts did not match. Assuming the…

See merge request core-developers/forge!228
2018-02-18 05:45:14 +00:00
Seravy
cf9e3a5f1d "Tap to deal X damage to target player" should be a priority target even if it's a defender or 0 attack creature 2018-02-17 22:58:45 +01:00
Seravy
91616396b7 Also no need to block if Awakening is in play. Adding here to prevent future merge conflict with Fog having the same effect. 2018-02-17 21:21:06 +01:00
Seravy
300e3fd4d3 Fixed using the fog effect on "about to die" Spike Weaver 2018-02-17 21:14:59 +01:00
Hanmac
4528541b3f AiController: add orderSa for token and pump effects for Hero of Bladehold 2018-02-17 16:25:41 +01:00
Seravy
9e58ec0f80 React to removal of Spike Weaver by using the effect if it's already planning to do later
Don't leave blockers if planning to use fog effect, except the card that will do so. (might need to tap to use it, or might get killed if attacking)
2018-02-17 14:04:31 +01:00
Seravy
606f52e493 Improved feature 2018-02-17 13:18:24 +01:00
Seravy
769f6ea976 Reserve mana for fog effects if in danger 2018-02-17 12:38:52 +01:00
Seravy
89eed17839 Reserve mana for fog effects 2018-02-17 12:01:39 +01:00
Seravy
67f9be5d4d endswith->equals 2018-02-17 01:19:37 +01:00
Seravy
8650a147aa AI Logic name in code and actual card scripts did not match. Assuming the scripts (6 cards) are correct as no card uses the other name. 2018-02-17 00:46:32 +01:00
Seravy
99f64d7565 Add fear to evasion abilities 2018-02-16 12:34:35 +01:00
Seravy
32ef472b0c AI prefers evasion or "tap to deal damage to player" creatures to enchant with these. 2018-02-16 12:22:50 +01:00
Seravy
33554dd9cc changed order 2018-02-15 09:48:26 +01:00
Seravy
4dd73930e3 p->P 2018-02-15 09:40:28 +01:00
Seravy
af14c33e39 Fixed problems with previous commit 2018-02-14 22:26:54 +01:00