Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
t-engine4
Manage
Activity
Members
Labels
Code
Merge requests
0
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
Erik Welch
t-engine4
Commits
fb1222be
Commit
fb1222be
authored
10 years ago
by
DarkGod
Browse files
Options
Downloads
Patches
Plain Diff
fix to AI for less borking
parent
1c6f64d5
No related branches found
Branches containing commit
Tags
tome-1.2.1
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
+1
-1
1 addition, 1 deletion
game/engines/default/engine/ai/talented.lua
game/modules/tome/ai/tactical.lua
+1
-1
1 addition, 1 deletion
game/modules/tome/ai/tactical.lua
with
2 additions
and
2 deletions
game/engines/default/engine/ai/talented.lua
+
1
−
1
View file @
fb1222be
...
...
@@ -30,7 +30,7 @@ newAI("dumb_talented", function(self)
-- print(self.name, self.uid, "dumb ai talents can try use", t.name, tid, "::", t.mode, not self:isTalentCoolingDown(t), target_dist <= self:getTalentRange(t), self:preUseTalent(t, true), self:canProject({type="bolt"}, self.ai_target.actor.x, self.ai_target.actor.y))
-- For dumb AI assume we need range and LOS
-- No special check for bolts, etc.
local
total_range
=
self
:
getTalentRange
(
t
)
+
self
:
getTalentRadius
(
t
)
local
total_range
=
(
self
:
getTalentRange
(
t
)
or
0
)
+
(
self
:
getTalentRadius
(
t
)
or
0
)
local
tg
=
{
type
=
util
.
getval
(
t
.
direct_hit
,
self
,
t
)
and
"hit"
or
"bolt"
,
range
=
total_range
}
if
t
.
mode
==
"activated"
and
not
t
.
no_npc_use
and
not
self
:
isTalentCoolingDown
(
t
)
and
self
:
preUseTalent
(
t
,
true
,
true
)
and
...
...
This diff is collapsed.
Click to expand it.
game/modules/tome/ai/tactical.lua
+
1
−
1
View file @
fb1222be
...
...
@@ -83,7 +83,7 @@ newAI("use_tactical", function(self)
local
tg
=
self
:
getTalentTarget
(
t
)
local
default_tg
=
{
type
=
util
.
getval
(
t
.
direct_hit
,
self
,
t
)
and
"hit"
or
"bolt"
}
-- Only assume range... some talents may no require LOS, etc
local
within_range
=
target_dist
and
target_dist
<=
(
self
:
getTalentRange
(
t
)
+
self
:
getTalentRadius
(
t
))
local
within_range
=
target_dist
and
target_dist
<=
(
(
self
:
getTalentRange
(
t
)
or
0
)
+
(
self
:
getTalentRadius
(
t
)
or
0
)
)
if
t
.
mode
==
"activated"
and
not
t
.
no_npc_use
and
not
self
:
isTalentCoolingDown
(
t
)
and
self
:
preUseTalent
(
t
,
true
,
true
)
and
(
not
self
:
getTalentRequiresTarget
(
t
)
or
within_range
)
...
...
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