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
69c429e7
Commit
69c429e7
authored
5 years ago
by
DarkGod
Browse files
Options
Downloads
Patches
Plain Diff
Combat:attackTarget() returns total damage done
als, nothing to see
parent
2cb94104
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
+9
-4
9 additions, 4 deletions
game/modules/tome/class/interface/Combat.lua
game/modules/tome/data/gfx/shockbolt/stars/eyal.png
+0
-0
0 additions, 0 deletions
game/modules/tome/data/gfx/shockbolt/stars/eyal.png
with
9 additions
and
4 deletions
game/modules/tome/class/interface/Combat.lua
+
9
−
4
View file @
69c429e7
...
...
@@ -170,6 +170,8 @@ function _M:attackTarget(target, damtype, mult, noenergy, force_unarmed)
break_stealth
=
true
end
local
totaldam
=
0
if
not
speed
and
not
self
:
attr
(
"disarmed"
)
and
not
self
:
isUnarmed
()
and
not
force_unarmed
then
local
double_weapon
-- All weapons in main hands
...
...
@@ -179,7 +181,8 @@ function _M:attackTarget(target, damtype, mult, noenergy, force_unarmed)
if
combat
and
not
o
.
archery
then
if
o
.
double_weapon
and
not
double_weapon
then
double_weapon
=
o
end
print
(
"[ATTACK] attacking with (mainhand)"
,
o
.
name
)
local
s
,
h
=
self
:
attackTargetWith
(
target
,
combat
,
damtype
,
mult
)
local
s
,
h
,
_curdam
=
self
:
attackTargetWith
(
target
,
combat
,
damtype
,
mult
)
if
_curdam
then
totaldam
=
totaldam
+
_curdam
end
speed
=
math.max
(
speed
or
0
,
s
)
hit
=
hit
or
h
if
hit
and
not
sound
then
sound
=
combat
.
sound
...
...
@@ -205,7 +208,8 @@ function _M:attackTarget(target, damtype, mult, noenergy, force_unarmed)
else
offhand
=
true
print
(
"[ATTACK] attacking with (offhand)"
,
o
.
name
)
local
s
,
h
=
self
:
attackTargetWith
(
target
,
combat
,
damtype
,
offmult
)
local
s
,
h
,
_curdam
=
self
:
attackTargetWith
(
target
,
combat
,
damtype
,
offmult
)
if
_curdam
then
totaldam
=
totaldam
+
_curdam
end
speed
=
math.max
(
speed
or
0
,
s
)
hit
=
hit
or
h
if
hit
and
not
sound
then
sound
=
combat
.
sound
...
...
@@ -220,7 +224,8 @@ function _M:attackTarget(target, damtype, mult, noenergy, force_unarmed)
if
not
speed
and
self
.
combat
then
print
(
"[ATTACK] attacking with innate combat"
)
local
combat
=
self
:
getObjectCombat
(
nil
,
"barehand"
)
local
s
,
h
=
self
:
attackTargetWith
(
target
,
combat
,
damtype
,
mult
)
local
s
,
h
,
_curdam
=
self
:
attackTargetWith
(
target
,
combat
,
damtype
,
mult
)
if
_curdam
then
totaldam
=
totaldam
+
_curdam
end
speed
=
math.max
(
speed
or
0
,
s
)
hit
=
hit
or
h
if
hit
and
not
sound
then
sound
=
combat
.
sound
...
...
@@ -249,7 +254,7 @@ function _M:attackTarget(target, damtype, mult, noenergy, force_unarmed)
-- Cancel stealth!
if
break_stealth
then
self
:
breakStealth
()
end
self
:
breakLightningSpeed
()
return
hit
return
hit
,
totaldam
end
--- Determines the combat field to use for this item
...
...
This diff is collapsed.
Click to expand it.
game/modules/tome/data/gfx/shockbolt/stars/eyal.png
+
0
−
0
View replaced file @
2cb94104
View file @
69c429e7
251 KiB
|
W:
|
H:
346 KiB
|
W:
|
H:
2-up
Swipe
Onion skin
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