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
33a2d95c
Commit
33a2d95c
authored
10 years ago
by
Alex Ksandra
Browse files
Options
Downloads
Patches
Plain Diff
Moved psionic shields after percentage resists because they act like flat reduction plenty of time.
parent
76a8b6ff
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!57
Damage handlers reorder
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
game/modules/tome/data/damage_types.lua
+35
-35
35 additions, 35 deletions
game/modules/tome/data/damage_types.lua
with
35 additions
and
35 deletions
game/modules/tome/data/damage_types.lua
+
35
−
35
View file @
33a2d95c
...
...
@@ -228,41 +228,6 @@ setDefaultProjector(function(src, x, y, type, dam, tmp, no_martyr)
return
0
+
add_dam
end
lastdam
=
dam
-- Static reduce damage for psionic kinetic shield
if
target
.
isTalentActive
and
target
:
isTalentActive
(
target
.
T_KINETIC_SHIELD
)
then
local
t
=
target
:
getTalentFromId
(
target
.
T_KINETIC_SHIELD
)
dam
=
t
.
ks_on_damage
(
target
,
t
,
type
,
dam
)
end
-- Static reduce damage for psionic spiked kinetic shield
if
target
:
attr
(
"kinspike_shield"
)
then
local
t
=
target
:
getTalentFromId
(
target
.
T_KINETIC_SHIELD
)
dam
=
t
.
kss_on_damage
(
target
,
t
,
type
,
dam
)
end
-- Static reduce damage for psionic thermal shield
if
target
.
isTalentActive
and
target
:
isTalentActive
(
target
.
T_THERMAL_SHIELD
)
then
local
t
=
target
:
getTalentFromId
(
target
.
T_THERMAL_SHIELD
)
dam
=
t
.
ts_on_damage
(
target
,
t
,
type
,
dam
)
end
-- Static reduce damage for psionic spiked thermal shield
if
target
:
attr
(
"thermspike_shield"
)
then
local
t
=
target
:
getTalentFromId
(
target
.
T_THERMAL_SHIELD
)
dam
=
t
.
tss_on_damage
(
target
,
t
,
type
,
dam
)
end
-- Static reduce damage for psionic charged shield
if
target
.
isTalentActive
and
target
:
isTalentActive
(
target
.
T_CHARGED_SHIELD
)
then
local
t
=
target
:
getTalentFromId
(
target
.
T_CHARGED_SHIELD
)
dam
=
t
.
cs_on_damage
(
target
,
t
,
type
,
dam
)
end
-- Static reduce damage for psionic spiked charged shield
if
target
:
attr
(
"chargespike_shield"
)
then
local
t
=
target
:
getTalentFromId
(
target
.
T_CHARGED_SHIELD
)
dam
=
t
.
css_on_damage
(
target
,
t
,
type
,
dam
)
end
if
dam
~=
lastdam
then
game
:
delayedLogDamage
(
src
,
target
,
0
,
(
"%s(%d to psi shield)#LAST#"
):
format
(
DamageType
:
get
(
type
).
text_color
or
"#aaaaaa#"
,
lastdam
-
dam
),
false
)
end
--target.T_STONE_FORTRESS could be checked/applied here (ReduceDamage function in Dwarven Fortress talent)
-- affinity healing, we store it to apply it after damage is resolved
...
...
@@ -320,6 +285,41 @@ setDefaultProjector(function(src, x, y, type, dam, tmp, no_martyr)
end
print
(
"[PROJECTOR] after self-resists dam"
,
dam
)
end
lastdam
=
dam
-- Static reduce damage for psionic kinetic shield
if
target
.
isTalentActive
and
target
:
isTalentActive
(
target
.
T_KINETIC_SHIELD
)
then
local
t
=
target
:
getTalentFromId
(
target
.
T_KINETIC_SHIELD
)
dam
=
t
.
ks_on_damage
(
target
,
t
,
type
,
dam
)
end
-- Static reduce damage for psionic spiked kinetic shield
if
target
:
attr
(
"kinspike_shield"
)
then
local
t
=
target
:
getTalentFromId
(
target
.
T_KINETIC_SHIELD
)
dam
=
t
.
kss_on_damage
(
target
,
t
,
type
,
dam
)
end
-- Static reduce damage for psionic thermal shield
if
target
.
isTalentActive
and
target
:
isTalentActive
(
target
.
T_THERMAL_SHIELD
)
then
local
t
=
target
:
getTalentFromId
(
target
.
T_THERMAL_SHIELD
)
dam
=
t
.
ts_on_damage
(
target
,
t
,
type
,
dam
)
end
-- Static reduce damage for psionic spiked thermal shield
if
target
:
attr
(
"thermspike_shield"
)
then
local
t
=
target
:
getTalentFromId
(
target
.
T_THERMAL_SHIELD
)
dam
=
t
.
tss_on_damage
(
target
,
t
,
type
,
dam
)
end
-- Static reduce damage for psionic charged shield
if
target
.
isTalentActive
and
target
:
isTalentActive
(
target
.
T_CHARGED_SHIELD
)
then
local
t
=
target
:
getTalentFromId
(
target
.
T_CHARGED_SHIELD
)
dam
=
t
.
cs_on_damage
(
target
,
t
,
type
,
dam
)
end
-- Static reduce damage for psionic spiked charged shield
if
target
:
attr
(
"chargespike_shield"
)
then
local
t
=
target
:
getTalentFromId
(
target
.
T_CHARGED_SHIELD
)
dam
=
t
.
css_on_damage
(
target
,
t
,
type
,
dam
)
end
if
dam
~=
lastdam
then
game
:
delayedLogDamage
(
src
,
target
,
0
,
(
"%s(%d to psi shield)#LAST#"
):
format
(
DamageType
:
get
(
type
).
text_color
or
"#aaaaaa#"
,
lastdam
-
dam
),
false
)
end
--Vim based defence
if
target
:
attr
(
"demonblood_def"
)
and
target
.
getVim
then
...
...
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