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
6091cfb2
Commit
6091cfb2
authored
8 years ago
by
DarkGod
Browse files
Options
Downloads
Patches
Plain Diff
Disengage autoselects the farther spot you can jump to in a straight line from the target
parent
afd6293d
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/interface/GameTargeting.lua
+22
-12
22 additions, 12 deletions
game/engines/default/engine/interface/GameTargeting.lua
game/modules/tome/data/talents/techniques/mobility.lua
+25
-1
25 additions, 1 deletion
game/modules/tome/data/talents/techniques/mobility.lua
with
47 additions
and
13 deletions
game/engines/default/engine/interface/GameTargeting.lua
+
22
−
12
View file @
6091cfb2
...
...
@@ -69,7 +69,9 @@ function _M:targetDisplayTooltip(dx, dy, force, nb_keyframes)
-- Move target around
if
self
.
old_tmx
~=
tmx
or
self
.
old_tmy
~=
tmy
then
self
.
target
.
target
.
x
,
self
.
target
.
target
.
y
=
tmx
,
tmy
if
not
(
self
.
target_mode
and
self
.
target_no_move_tooltip
)
then
self
.
target
.
target
.
x
,
self
.
target
.
target
.
y
=
tmx
,
tmy
end
end
self
.
old_tmx
,
self
.
old_tmy
=
tmx
,
tmy
end
...
...
@@ -132,6 +134,10 @@ function _M:targetMode(v, msg, co, typ)
self
.
target
:
setActive
(
true
,
typ
)
self
.
target_style
=
"lock"
self
.
target_warning
=
true
self
.
target_no_move_tooltip
=
true
if
type
(
typ
)
==
"table"
and
typ
.
no_move_tooltip
then
self
.
target_no_move_tooltip
=
true
end
if
type
(
typ
)
==
"table"
and
typ
.
talent
then
self
.
target_warning
=
typ
.
talent
.
name
elseif
type
(
typ
)
==
"table"
and
typ
.
__name
then
...
...
@@ -146,16 +152,20 @@ function _M:targetMode(v, msg, co, typ)
self
.
key
:
setCurrent
()
local
do_scan
=
true
if
self
.
target_no_star_scan
or
(
self
.
target
.
target
.
entity
and
self
.
level
.
map
.
seens
(
self
.
target
.
target
.
entity
.
x
,
self
.
target
.
target
.
entity
.
y
)
and
self
.
player
~=
self
.
target
.
target
.
entity
)
then
if
type
(
typ
)
==
"table"
and
typ
.
no_start_scan
then
do_scan
=
false
else
if
self
.
target_no_start_scan
or
(
self
.
target
.
target
.
entity
and
self
.
level
.
map
.
seens
(
self
.
target
.
target
.
entity
.
x
,
self
.
target
.
target
.
entity
.
y
)
and
self
.
player
~=
self
.
target
.
target
.
entity
)
then
if
type
(
typ
)
==
"table"
and
typ
.
first_target
~=
"friend"
and
self
.
player
:
reactionToward
(
self
.
target
.
target
.
entity
)
>=
0
then
else
do_scan
=
false
if
type
(
typ
)
==
"table"
and
typ
.
first_target
~=
"friend"
and
self
.
target
.
target
and
self
.
target
.
target
.
entity
and
self
.
player
:
reactionToward
(
self
.
target
.
target
.
entity
)
>=
0
then
else
do_scan
=
false
end
end
end
if
do_scan
then
...
...
@@ -272,12 +282,12 @@ function _M:targetGetForPlayer(typ)
if
self
.
target
.
forced
then
return
unpack
(
self
.
target
.
forced
)
end
if
coroutine.running
()
and
typ
then
local
msg
self
.
target_no_star_scan
=
nil
self
.
target_no_star
t
_scan
=
nil
if
type
(
typ
)
==
"string"
then
msg
,
typ
=
typ
,
nil
elseif
type
(
typ
)
==
"table"
then
if
typ
.
default_target
then
self
.
target
.
target
.
entity
=
typ
.
default_target
self
.
target_no_star_scan
=
true
self
.
target_no_star
t
_scan
=
true
end
msg
=
typ
.
msg
end
...
...
This diff is collapsed.
Click to expand it.
game/modules/tome/data/talents/techniques/mobility.lua
+
25
−
1
View file @
6091cfb2
...
...
@@ -86,7 +86,31 @@ newTalent{
local
dx
,
dy
if
self
.
player
then
-- player targeting
local
tg2
=
{
type
=
"beam"
,
source_actor
=
self
,
selffire
=
false
,
range
=
move_dist
,
talent
=
t
}
local
l
=
target
:
lineFOV
(
self
.
x
,
self
.
y
)
l
:
set_corner_block
()
local
lx
,
ly
,
is_corner_blocked
=
l
:
step
(
true
)
local
possible_x
,
possible_y
=
lx
,
ly
local
pass_self
=
false
-- Check for terrain and friendly actors
while
lx
and
ly
and
not
is_corner_blocked
and
core
.
fov
.
distance
(
self
.
x
,
self
.
y
,
lx
,
ly
)
<=
move_dist
do
local
actor
=
game
.
level
.
map
(
lx
,
ly
,
engine
.
Map
.
ACTOR
)
if
actor
==
self
then
pass_self
=
true
elseif
pass_self
and
game
.
level
.
map
:
checkEntity
(
lx
,
ly
,
engine
.
Map
.
TERRAIN
,
"block_move"
)
then
-- possible_x, possible_y = lx, ly
break
end
possible_x
,
possible_y
=
lx
,
ly
lx
,
ly
=
l
:
step
(
true
)
end
if
pass_self
then
game
.
target
.
target
.
entity
=
nil
game
.
target
.
target
.
x
=
possible_x
game
.
target
.
target
.
y
=
possible_y
end
local
tg2
=
{
type
=
"beam"
,
source_actor
=
self
,
selffire
=
false
,
range
=
move_dist
,
talent
=
t
,
no_start_scan
=
true
,
no_move_tooltip
=
true
}
tg2
.
display_line_step
=
function
(
self
,
d
)
-- highlight permissible grids for the player
local
t_range
=
core
.
fov
.
distance
(
self
.
target_type
.
start_x
,
self
.
target_type
.
start_y
,
d
.
lx
,
d
.
ly
)
if
t_range
>=
1
and
t_range
<=
tg2
.
range
and
not
d
.
block
and
check_dest
(
d
.
lx
,
d
.
ly
)
then
...
...
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