Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tales of MajEyal
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
tome
Tales of MajEyal
Commits
dabf7032
Commit
dabf7032
authored
4 years ago
by
Ryan Yappert
Browse files
Options
Downloads
Patches
Plain Diff
polop (res_def.ai.no_want)
parent
5a6fced2
No related branches found
Branches containing commit
No related tags found
1 merge request
!692
Resource-ification project for Life, Feedback, etc.
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
game/modules/tome/ai/improved_tactical.lua
+1
-1
1 addition, 1 deletion
game/modules/tome/ai/improved_tactical.lua
game/modules/tome/data/resources.lua
+1
-0
1 addition, 0 deletions
game/modules/tome/data/resources.lua
with
2 additions
and
1 deletion
game/modules/tome/ai/improved_tactical.lua
+
1
−
1
View file @
dabf7032
...
...
@@ -415,7 +415,7 @@ newAI("use_improved_tactical", function(self, t_filter, t_list)
local
dep_low
=
1
-
self
.
AI_RESOURCE_LEVEL_TRIGGER
;
dep_low
=
dep_low
/
(
math.max
(
0
.
001
,
1
-
dep_low
))
local
dep_high
=
1
-
0
.
35
*
self
.
AI_RESOURCE_LEVEL_TRIGGER
;
dep_high
=
dep_high
/
(
math.max
(
0
.
001
,
1
-
dep_high
))
for
res
,
res_def
in
ipairs
(
self
.
resources_def
)
do
if
not
res_def
.
talent
or
self
:
knowTalent
(
res_def
.
talent
)
then
-- determine want for this resource
if
not
(
res_def
.
ai
and
res_def
.
ai
.
no_want
)
and
(
not
res_def
.
talent
or
self
:
knowTalent
(
res_def
.
talent
)
)
then
-- determine want for this resource
-- resource-defined want calculation
if
res_def
.
ai
and
res_def
.
ai
.
tactical
and
res_def
.
ai
.
tactical
.
want_level
then
want
[
res_def
.
short_name
]
=
util
.
getval
(
res_def
.
ai
.
tactical
.
want_level
,
self
,
aitarget
)
...
...
This diff is collapsed.
Click to expand it.
game/modules/tome/data/resources.lua
+
1
−
0
View file @
dabf7032
...
...
@@ -48,6 +48,7 @@ ActorResource:defineResource(_t"Life", "life", nil, "life_regen", _t"This is you
{
color
=
'#c00000#'
,
wait_on_rest
=
true
,
ai
=
{
no_want
=
true
},
}
)
...
...
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