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
f7eb3477
Commit
f7eb3477
authored
8 years ago
by
Hachem_Muche
Browse files
Options
Downloads
Patches
Plain Diff
Fix Throwing Knives talent abuse.
parent
b73def21
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/modules/tome/data/talents/techniques/throwing-knives.lua
+11
-11
11 additions, 11 deletions
.../modules/tome/data/talents/techniques/throwing-knives.lua
game/modules/tome/data/timed_effects/other.lua
+3
-2
3 additions, 2 deletions
game/modules/tome/data/timed_effects/other.lua
with
14 additions
and
13 deletions
game/modules/tome/data/talents/techniques/throwing-knives.lua
+
11
−
11
View file @
f7eb3477
...
...
@@ -106,15 +106,19 @@ newTalent{
stat
=
{
dex
=
function
(
level
)
return
12
+
(
level
-
1
)
*
2
end
},
level
=
function
(
level
)
return
0
+
(
level
-
1
)
*
8
end
,
},
-- need to fix talent toggling abuse
on_learn
=
function
(
self
,
t
)
venomous_throw_check
(
self
)
local
max
=
self
:
callTalent
(
self
.
T_THROWING_KNIVES
,
"getNb"
)
self
:
setEffect
(
self
.
EFF_THROWING_KNIVES
,
1
,
{
stacks
=
max
,
max_stacks
=
max
})
self
:
setEffect
(
self
.
EFF_THROWING_KNIVES
,
1
,
{
stacks
=
0
,
max_stacks
=
t
.
getNb
(
self
,
t
)})
end
,
on_unlearn
=
function
(
self
,
t
)
venomous_throw_check
(
self
)
self
:
removeEffect
(
self
.
EFF_THROWING_KNIVES
)
if
self
:
knowTalent
(
t
.
id
)
then
if
self
:
hasEffect
(
self
.
EFF_THROWING_KNIVES
)
then
self
:
setEffect
(
self
.
EFF_THROWING_KNIVES
,
1
,
{
stacks
=
0
,
max_stacks
=
t
.
getNb
(
self
,
t
)})
end
else
self
:
removeEffect
(
self
.
EFF_THROWING_KNIVES
)
end
end
,
speed
=
"throwing"
,
proj_speed
=
10
,
...
...
@@ -126,9 +130,7 @@ newTalent{
end
,
on_pre_use
=
function
(
self
,
t
)
local
eff
=
self
:
hasEffect
(
self
.
EFF_THROWING_KNIVES
)
if
eff
then
return
true
end
if
eff
and
eff
.
stacks
>
0
then
return
true
end
end
,
callbackOnActBase
=
function
(
self
,
t
)
if
self
.
resting
then
...
...
@@ -307,7 +309,7 @@ newTalent{
if
not
hitted
or
self
.
turn_procs
.
quickdraw
or
core
.
fov
.
distance
(
self
.
x
,
self
.
y
,
target
.
x
,
target
.
y
)
>
1
or
not
rng
.
percent
(
t
.
getChance
(
self
,
t
))
then
return
nil
end
local
eff
=
self
:
hasEffect
(
self
.
EFF_THROWING_KNIVES
)
if
not
eff
then
return
end
if
not
eff
or
eff
.
stacks
<=
0
then
return
end
local
tg
=
{
type
=
"ball"
,
range
=
0
,
radius
=
7
,
friendlyfire
=
false
,
selffire
=
false
}
local
tgts
=
{}
...
...
@@ -354,9 +356,7 @@ newTalent{
end
,
on_pre_use
=
function
(
self
,
t
)
local
eff
=
self
:
hasEffect
(
self
.
EFF_THROWING_KNIVES
)
if
eff
then
return
true
end
if
eff
and
eff
.
stacks
>
0
then
return
true
end
end
,
action
=
function
(
self
,
t
)
local
tg
=
self
:
getTalentTarget
(
t
)
...
...
This diff is collapsed.
Click to expand it.
game/modules/tome/data/timed_effects/other.lua
+
3
−
2
View file @
f7eb3477
...
...
@@ -3078,12 +3078,13 @@ newEffect{
display_desc
=
function
(
self
,
eff
)
return
eff
.
stacks
..
" Knives"
end
,
long_desc
=
function
(
self
,
eff
)
return
(
"Has %d throwing knives prepared:\n\n%s"
):
format
(
eff
.
stacks
,
self
:
callTalent
(
self
.
T_THROWING_KNIVES
,
"knivesInfo"
))
end
,
type
=
"other"
,
subtype
=
{
},
subtype
=
{
tactic
=
true
},
status
=
"beneficial"
,
parameters
=
{
stacks
=
1
,
max_stacks
=
10
},
parameters
=
{
stacks
=
1
,
max_stacks
=
6
},
charges
=
function
(
self
,
eff
)
return
eff
.
stacks
end
,
on_merge
=
function
(
self
,
old_eff
,
new_eff
)
old_eff
.
dur
=
new_eff
.
dur
old_eff
.
max_stacks
=
new_eff
.
max_stacks
old_eff
.
stacks
=
util
.
bound
(
old_eff
.
stacks
+
new_eff
.
stacks
,
1
,
new_eff
.
max_stacks
)
return
old_eff
end
,
...
...
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