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
yutio888
Tales of MajEyal
Commits
b8987542
Commit
b8987542
authored
9 years ago
by
DarkGod
Browse files
Options
Downloads
Patches
Plain Diff
fix adv shadow targetting
New ActorProject:getTargetLimited method
parent
3b2e8aea
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/ActorProject.lua
+9
-0
9 additions, 0 deletions
game/engines/default/engine/interface/ActorProject.lua
game/modules/tome/data/talents/cursed/advanced-shadowmancy.lua
+6
-15
6 additions, 15 deletions
...modules/tome/data/talents/cursed/advanced-shadowmancy.lua
with
15 additions
and
15 deletions
game/engines/default/engine/interface/ActorProject.lua
+
9
−
0
View file @
b8987542
...
...
@@ -253,6 +253,7 @@ function _M:canProject(t, x, y)
-- Stop at range or on block
local
stop_x
,
stop_y
=
typ
.
start_x
,
typ
.
start_y
local
stop_radius_x
,
stop_radius_y
=
typ
.
start_x
,
typ
.
start_y
local
l
,
is_corner_blocked
if
typ
.
source_actor
.
lineFOV
then
l
=
typ
.
source_actor
:
lineFOV
(
x
,
y
,
nil
,
nil
,
typ
.
start_x
,
typ
.
start_y
)
...
...
@@ -300,6 +301,14 @@ function _M:canProject(t, x, y)
return
is_hit
,
stop_x
,
stop_y
,
stop_radius_x
,
stop_radius_y
end
--- Calls :getTarget and :canProject to limit the results and returns the same as getTarget
function
_M
:
getTargetLimited
(
t
)
local
x
,
y
=
self
:
getTarget
(
t
)
local
_
_
,
x
,
y
=
self
:
canProject
(
t
,
x
,
y
)
local
target
=
game
.
level
.
map
(
x
,
y
,
Map
.
ACTOR
)
return
x
,
y
,
target
end
--- Project damage to a distance using a moving projectile
-- @param t a type table describing the attack, passed to engine.Target:getType() for interpretation
-- @param x target coords
...
...
This diff is collapsed.
Click to expand it.
game/modules/tome/data/talents/cursed/advanced-shadowmancy.lua
+
6
−
15
View file @
b8987542
...
...
@@ -30,25 +30,18 @@ newTalent{
getReduction
=
function
(
self
,
t
)
return
self
:
combatTalentScale
(
t
,
10
,
40
)
end
,
action
=
function
(
self
,
t
)
local
tg
=
{
type
=
"hit"
,
range
=
self
:
getTalentRange
(
t
),
talent
=
t
,
first_target
=
"friend"
}
local
x
,
y
,
target
=
self
:
getTarget
(
tg
)
local
x
,
y
,
target
=
self
:
getTarget
Limited
(
tg
)
if
x
and
y
and
target
and
target
.
summoner
and
target
.
summoner
==
self
and
target
.
is_doomed_shadow
then
local
tg2
=
{
type
=
"hit"
,
range
=
self
:
getTalentRange
(
t
),
source_actor
=
target
,
pass_terrain
=
true
}
local
x
,
y
,
target2
=
self
:
getTarget
(
tg2
)
local
_
_
,
x
,
y
=
self
:
canProject
(
tg2
,
x
,
y
)
local
tg2
=
{
type
=
"hit"
,
range
=
self
:
getTalentRange
(
t
),
start_x
=
x
,
start_y
=
y
,
source_actor
=
target
,
pass_terrain
=
true
}
local
x
,
y
,
target2
=
self
:
getTargetLimited
(
tg2
)
if
x
and
y
and
target2
and
target2
.
x
==
x
and
target2
.
y
==
y
then
game
.
level
.
map
:
particleEmitter
(
target
.
x
,
target
.
y
,
1
,
"teleport"
)
game
.
level
.
map
:
particleEmitter
(
target2
.
x
,
target2
.
y
,
1
,
"teleport"
)
target
.
die
(
target
)
target2
:
setEffect
(
target2
.
EFF_CURSE_IMPOTENCE
,
5
,
{
power
=
t
.
getReduction
(
self
,
t
)})
game
:
playSoundNear
(
target
,
"talents/earth"
)
else
return
nil
end
else
return
nil
end
return
true
...
...
@@ -73,12 +66,10 @@ newTalent{
getDamage
=
function
(
self
,
t
)
return
self
:
combatTalentMindDamage
(
t
,
0
,
280
)
end
,
action
=
function
(
self
,
t
)
local
tg
=
{
type
=
"hit"
,
range
=
self
:
getTalentRange
(
t
),
talent
=
t
,
first_target
=
"friend"
}
local
x
,
y
,
target
=
self
:
getTarget
(
tg
)
local
_
_
,
x
,
y
=
self
:
canProject
(
tg
,
x
,
y
)
local
x
,
y
,
target
=
self
:
getTargetLimited
(
tg
)
if
x
and
y
and
target
and
target
.
x
==
x
and
target
.
y
==
y
and
target
.
is_doomed_shadow
and
target
.
summoner
and
target
.
summoner
==
self
then
local
tg2
=
{
type
=
"hit"
,
range
=
self
:
getTalentRange
(
t
),
source_actor
=
target
,
friendlyblock
=
false
,
pass_terrain
=
true
,}
local
x
,
y
,
target2
=
self
:
getTarget
(
tg2
)
local
_
_
,
x
,
y
=
self
:
canProject
(
tg2
,
x
,
y
)
local
tg2
=
{
type
=
"hit"
,
range
=
self
:
getTalentRange
(
t
),
start_x
=
x
,
start_y
=
y
,
source_actor
=
target
,
friendlyblock
=
false
,
pass_terrain
=
true
,}
local
x
,
y
,
target2
=
self
:
getTargetLimited
(
tg2
)
if
x
and
y
and
target2
and
target2
.
x
==
x
and
target2
.
y
==
y
then
local
ox
,
oy
=
target
.
x
,
target
.
y
local
sx
,
sy
=
util
.
findFreeGrid
(
x
,
y
,
3
,
true
,
{[
engine
.
Map
.
ACTOR
]
=
true
})
...
...
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