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
Merge requests
!28
Bugfix talented ai tactic
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Bugfix talented ai tactic
Hachem_Muche/t-engine4:bugfix_talented_ai_tactic
into
master
Overview
0
Commits
1
Pipelines
0
Changes
Merged
Hachem_Muche
requested to merge
Hachem_Muche/t-engine4:bugfix_talented_ai_tactic
into
master
10 years ago
Overview
0
Commits
1
Pipelines
0
Changes
-
Expand
fixes a problem with the talented_ai_tactic resolver with glowing chests.
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
ac5f07e4
1 commit,
10 years ago
+
6
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
game/modules/tome/resolvers.lua
+
6
−
4
Options
@@ -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
Loading