Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tales of MajEyal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Otowa Kotori
Tales of MajEyal
Commits
47b4eafd
Commit
47b4eafd
authored
7 years ago
by
Hachem_Muche
Browse files
Options
Downloads
Patches
Plain Diff
Fixed a bug in improved_tactical AI when activating draining sustains out of combat
parent
7d9287e2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
game/engines/default/engine/ai/talented.lua
+2
-1
2 additions, 1 deletion
game/engines/default/engine/ai/talented.lua
game/modules/tome/ai/improved_tactical.lua
+2
-1
2 additions, 1 deletion
game/modules/tome/ai/improved_tactical.lua
with
4 additions
and
2 deletions
game/engines/default/engine/ai/talented.lua
+
2
−
1
View file @
47b4eafd
...
...
@@ -78,7 +78,8 @@ end)
--- Randomly use a talent, trying alternate talents if one fails (up to 5 total)
-- @param t_filter <optional> = filter passed to self:aiGetAvailableTalents to restrict talent choices
-- @param t_list, <optional, default self.talents> list of talent id's to pick from, passed to self:aiGetAvailableTalents
-- @return talent id used or false, table of remaining available talents
-- @return talent id used or false
-- @return table of remaining available talents
newAI
(
"improved_talented"
,
function
(
self
,
t_filter
,
t_list
)
local
log_detail
=
config
.
settings
.
log_detail_ai
or
0
-- Find available talents
...
...
This diff is collapsed.
Click to expand it.
game/modules/tome/ai/improved_tactical.lua
+
2
−
1
View file @
47b4eafd
...
...
@@ -576,9 +576,10 @@ newAI("use_improved_tactical", function(self, t_filter, t_list)
end
-- These checks replace those performed in aiCheckSustainedTalent for simpler AIs
-- don't turn on sustains that cannot be sustained indefinitely
-- active draining sustains may eventually be deactivated (std tactical evaluation)
if
t
.
mode
==
"sustained"
and
t
.
_may_drain_resources
and
not
is_active
then
local
res_def
,
r_invert
for
i
,
res
in
i
pairs
(
t
.
_may_drain_resources
)
do
for
res
,
_
in
pairs
(
t
.
_may_drain_resources
)
do
res_def
=
self
.
resources_def
[
res
];
r_invert
=
res_def
.
invert_values
and
-
1
or
1
if
((
self
[
res_def
.
regen_prop
]
or
0
)
-
(
util
.
getval
(
t
[
res_def
.
drain_prop
],
self
,
t
)
or
0
)
*
r_invert
)
*
r_invert
<=
0
then
t_avail
=
false
break
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment