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
ac5f07e4
Commit
ac5f07e4
authored
10 years ago
by
Hachem_Muche
Browse files
Options
Downloads
Patches
Plain Diff
fixes a problem with the resolver table being lost when reloading a game with glowing chests.
parent
5603cb21
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!28
Bugfix talented ai tactic
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
game/modules/tome/resolvers.lua
+6
-4
6 additions, 4 deletions
game/modules/tome/resolvers.lua
with
6 additions
and
4 deletions
game/modules/tome/resolvers.lua
+
6
−
4
View file @
ac5f07e4
...
...
@@ -695,8 +695,10 @@ end
-- Extra recursive methods not handled yet
function
resolvers
.
calc
.
talented_ai_tactic
(
t
,
e
)
local
old_on_added_to_level
=
e
.
on_added_to_level
e
.
on_added_to_level
=
function
(
self
,
level
,
x
,
y
)
if
old_on_added_to_level
then
old_on_added_to_level
(
self
,
level
,
x
,
y
)
end
e
.
__ai_compute
=
t
e
.
on_added_to_level
=
function
(
e
,
level
,
x
,
y
)
local
t
=
e
.
__ai_compute
if
old_on_added_to_level
then
old_on_added_to_level
(
e
,
level
,
x
,
y
)
end
print
(
" # talented_ai_tactic resolver function for"
,
e
.
name
,
"level="
,
e
.
level
,
e
.
uid
)
local
tactic_total
=
t
[
2
]
or
t
.
tactic_total
or
10
--want tactic weights to total 10
local
weight_power
=
t
[
3
]
or
t
.
weight_power
or
0
.
5
--smooth out tactical weights
...
...
@@ -811,8 +813,8 @@ function resolvers.calc.talented_ai_tactic(t, e)
tactic
.
type
=
"computed"
print
(
" ### ai_tactic table:"
)
for
tac
,
wt
in
pairs
(
tactic
)
do
print
(
" ##"
,
tac
,
wt
)
end
self
.
ai_tactic
=
tactic
-- self.on_added_to_level
= nil
e
.
ai_tactic
=
tactic
e
.
__ai_compute
=
nil
return
tactic
end
end
...
...
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