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
f2a797e4
Commit
f2a797e4
authored
6 years ago
by
Chris Davidson
Browse files
Options
Downloads
Patches
Plain Diff
Fix friendly fire disable for talent_on procs
parent
f84609ec
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/class/interface/Combat.lua
+4
-0
4 additions, 0 deletions
game/modules/tome/class/interface/Combat.lua
game/modules/tome/data/damage_types.lua
+3
-2
3 additions, 2 deletions
game/modules/tome/data/damage_types.lua
with
7 additions
and
2 deletions
game/modules/tome/class/interface/Combat.lua
+
4
−
0
View file @
f2a797e4
...
...
@@ -756,6 +756,9 @@ function _M:attackTargetHitProcs(target, weapon, dam, apr, armor, damtype, mult,
end
-- On hit talent
-- Disable friendly fire for procs since players can't control when they happen or where they hit
local
old_ff
=
self
.
nullify_all_friendlyfire
self
.
nullify_all_friendlyfire
=
true
if
hitted
and
not
target
.
dead
and
weapon
and
weapon
.
talent_on_hit
and
next
(
weapon
.
talent_on_hit
)
and
not
self
.
turn_procs
.
melee_talent
then
for
tid
,
data
in
pairs
(
weapon
.
talent_on_hit
)
do
if
rng
.
percent
(
data
.
chance
)
then
...
...
@@ -773,6 +776,7 @@ function _M:attackTargetHitProcs(target, weapon, dam, apr, armor, damtype, mult,
end
end
end
self
.
nullify_all_friendlyfire
=
old_ff
-- Shattering Impact
if
hitted
and
self
:
attr
(
"shattering_impact"
)
and
(
not
self
.
shattering_impact_last_turn
or
self
.
shattering_impact_last_turn
<
game
.
turn
)
then
...
...
This diff is collapsed.
Click to expand it.
game/modules/tome/data/damage_types.lua
+
3
−
2
View file @
f2a797e4
...
...
@@ -571,7 +571,8 @@ setDefaultProjector(function(src, x, y, type, dam, state)
if
src
.
__projecting_for
then
-- Disable friendly fire for procs since players can't control when they happen or where they hit
src
.
nullify_all_friendlyfire
=
1
local
old_ff
=
src
.
nullify_all_friendlyfire
src
.
nullify_all_friendlyfire
=
true
if
src
.
talent_on_spell
and
next
(
src
.
talent_on_spell
)
and
t
.
is_spell
and
not
src
.
turn_procs
.
spell_talent
then
for
id
,
d
in
pairs
(
src
.
talent_on_spell
)
do
if
rng
.
percent
(
d
.
chance
)
and
t
.
id
~=
d
.
talent
then
...
...
@@ -604,7 +605,7 @@ setDefaultProjector(function(src, x, y, type, dam, state)
end
end
end
src
.
nullify_all_friendlyfire
=
nil
src
.
nullify_all_friendlyfire
=
old_ff
if
not
target
.
dead
and
(
t
.
is_spell
or
t
.
is_mind
)
and
not
src
.
turn_procs
.
meteoric_crash
and
src
.
knowTalent
and
src
:
knowTalent
(
src
.
T_METEORIC_CRASH
)
then
src
.
turn_procs
.
meteoric_crash
=
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