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
06633001
There was a problem fetching the pipeline summary.
Commit
06633001
authored
8 years ago
by
DarkGod
Browse files
Options
Downloads
Patches
Plain Diff
fixed grappling hook abuse
parent
7c71d265
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
game/modules/tome/data/talents/cunning/artifice.lua
+14
-11
14 additions, 11 deletions
game/modules/tome/data/talents/cunning/artifice.lua
with
14 additions
and
11 deletions
game/modules/tome/data/talents/cunning/artifice.lua
+
14
−
11
View file @
06633001
...
...
@@ -685,6 +685,20 @@ newTalent{
local
target
=
game
.
level
.
map
(
px
,
py
,
engine
.
Map
.
ACTOR
)
if
target
then
-- hook actor
local
tx
,
ty
local
size
=
target
.
size_category
-
self
.
size_category
if
size
>=
1
or
not
target
:
canBe
(
"knockback"
)
then
if
self
:
attr
(
"never_move"
)
then
game
.
logPlayer
(
self
,
"You cannot move!"
)
ok
=
false
return
end
local
block_actor
=
function
(
_
,
bx
,
by
)
return
game
.
level
.
map
:
checkEntity
(
bx
,
by
,
Map
.
TERRAIN
,
"block_move"
,
self
)
end
local
linestep
=
self
:
lineFOV
(
x
,
y
,
block_actor
)
local
lx
,
ly
,
is_corner_blocked
repeat
-- make sure each tile is passable
tx
,
ty
=
lx
,
ly
lx
,
ly
,
is_corner_blocked
=
linestep
:
step
()
until
is_corner_blocked
or
not
lx
or
not
ly
or
game
.
level
.
map
:
checkAllEntities
(
lx
,
ly
,
"block_move"
,
self
)
if
not
tx
or
not
ty
or
core
.
fov
.
distance
(
x
,
y
,
tx
,
ty
)
>
1
then
ok
=
false
return
end
end
local
dam
,
dam2
=
0
,
0
local
hit
=
false
self
:
logCombat
(
target
,
"#Source# throws a grappling hook at #target#!"
)
...
...
@@ -700,18 +714,7 @@ newTalent{
else
return
end
local
size
=
target
.
size_category
-
self
.
size_category
if
size
>=
1
or
not
target
:
canBe
(
"knockback"
)
then
if
self
:
attr
(
"never_move"
)
then
game
.
logPlayer
(
self
,
"You cannot move!"
)
ok
=
false
return
end
local
block_actor
=
function
(
_
,
bx
,
by
)
return
game
.
level
.
map
:
checkEntity
(
bx
,
by
,
Map
.
TERRAIN
,
"block_move"
,
self
)
end
local
linestep
=
self
:
lineFOV
(
x
,
y
,
block_actor
)
local
tx
,
ty
,
lx
,
ly
,
is_corner_blocked
repeat
-- make sure each tile is passable
tx
,
ty
=
lx
,
ly
lx
,
ly
,
is_corner_blocked
=
linestep
:
step
()
until
is_corner_blocked
or
not
lx
or
not
ly
or
game
.
level
.
map
:
checkAllEntities
(
lx
,
ly
,
"block_move"
,
self
)
if
not
tx
or
not
ty
or
core
.
fov
.
distance
(
x
,
y
,
tx
,
ty
)
>
1
then
ok
=
false
return
end
self
:
logCombat
(
target
,
"#Source# is dragged towards #target#!"
)
local
ox
,
oy
=
self
.
x
,
self
.
y
self
:
move
(
tx
,
ty
,
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