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
65561ce4
Commit
65561ce4
authored
10 years ago
by
DarkGod
Browse files
Options
Downloads
Patches
Plain Diff
Jumpgate sustain shows the current distance to the gate
parent
82432599
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
game/modules/tome/data/talents/celestial/twilight.lua
+28
-2
28 additions, 2 deletions
game/modules/tome/data/talents/celestial/twilight.lua
with
28 additions
and
2 deletions
game/modules/tome/data/talents/celestial/twilight.lua
+
28
−
2
View file @
65561ce4
...
...
@@ -65,7 +65,7 @@ newTalent{
-- Check distance in preUseTalent to grey out the talent
on_pre_use
=
function
(
self
,
t
)
local
eff
=
self
.
sustain_talents
[
self
.
T_JUMPGATE
]
return
eff
and
core
.
fov
.
distance
(
self
.
x
,
self
.
y
,
eff
.
jumpgate_x
,
eff
.
jumpgate_y
)
<
t
.
getRange
(
self
,
t
)
return
eff
and
core
.
fov
.
distance
(
self
.
x
,
self
.
y
,
eff
.
jumpgate_x
,
eff
.
jumpgate_y
)
<
=
t
.
getRange
(
self
,
t
)
end
,
is_teleport
=
true
,
action
=
function
(
self
,
t
)
...
...
@@ -102,6 +102,19 @@ newTalent{
sustain_negative
=
20
,
no_npc_use
=
true
,
tactical
=
{
ESCAPE
=
2
},
iconOverlay
=
function
(
self
,
t
,
p
)
if
not
self
.
x
or
not
self
.
y
or
not
p
.
jumpgate_x
or
not
p
.
jumpgate_y
then
return
""
end
local
val
=
math.floor
(
core
.
fov
.
distance
(
self
.
x
,
self
.
y
,
p
.
jumpgate_x
,
p
.
jumpgate_y
))
local
jt
=
self
:
getTalentFromId
(
self
.
T_JUMPGATE_TELEPORT
)
local
max
=
jt
.
getRange
(
self
,
jt
)
local
fnt
=
"buff_font_small"
if
val
>=
1000
then
fnt
=
"buff_font_smaller"
end
if
val
<=
max
then
return
"#LIGHT_GREEN#"
..
tostring
(
math.ceil
(
val
)),
fnt
else
return
"#LIGHT_RED#"
..
tostring
(
math.ceil
(
val
)),
fnt
end
end
,
on_learn
=
function
(
self
,
t
)
if
self
:
getTalentLevel
(
t
)
>=
4
and
not
self
:
knowTalent
(
self
.
T_JUMPGATE_TWO
)
then
self
:
learnTalent
(
self
.
T_JUMPGATE_TWO
,
nil
,
nil
,
{
no_unlearn
=
true
})
...
...
@@ -304,6 +317,19 @@ newTalent{
self
:
unlearnTalent
(
self
.
T_JUMPGATE_TELEPORT_TWO
)
end
end
,
iconOverlay
=
function
(
self
,
t
,
p
)
if
not
self
.
x
or
not
self
.
y
or
not
p
.
jumpgate2_x
or
not
p
.
jumpgate2_y
then
return
""
end
local
val
=
math.floor
(
core
.
fov
.
distance
(
self
.
x
,
self
.
y
,
p
.
jumpgate2_x
,
p
.
jumpgate2_y
))
local
jt
=
self
:
getTalentFromId
(
self
.
T_JUMPGATE_TELEPORT_TWO
)
local
max
=
jt
.
getRange
(
self
,
jt
)
local
fnt
=
"buff_font_small"
if
val
>=
1000
then
fnt
=
"buff_font_smaller"
end
if
val
<=
max
then
return
"#LIGHT_GREEN#"
..
tostring
(
math.ceil
(
val
)),
fnt
else
return
"#LIGHT_RED#"
..
tostring
(
math.ceil
(
val
)),
fnt
end
end
,
activate
=
function
(
self
,
t
)
local
oe
=
game
.
level
.
map
(
self
.
x
,
self
.
y
,
engine
.
Map
.
TERRAIN
)
if
not
oe
or
oe
:
attr
(
"temporary"
)
then
return
false
end
...
...
@@ -350,7 +376,7 @@ newTalent{
no_unlearn_last
=
true
,
on_pre_use
=
function
(
self
,
t
)
local
eff
=
self
.
sustain_talents
[
self
.
T_JUMPGATE_TWO
]
return
eff
and
core
.
fov
.
distance
(
self
.
x
,
self
.
y
,
eff
.
jumpgate2_x
,
eff
.
jumpgate2_y
)
<
t
.
getRange
(
self
,
t
)
return
eff
and
core
.
fov
.
distance
(
self
.
x
,
self
.
y
,
eff
.
jumpgate2_x
,
eff
.
jumpgate2_y
)
<
=
t
.
getRange
(
self
,
t
)
end
,
action
=
function
(
self
,
t
)
local
eff
=
self
.
sustain_talents
[
self
.
T_JUMPGATE_TWO
]
...
...
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