Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F627465
Damage.pl
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
Damage.pl
View Options
#
!
/
usr
/
bin
/
perl
-
w
use
strict
;
=
comment
Damage
entries
are
string
=>
amount
of
damage
associations
.
The
string
is
a
derivation
of
the
state
and
optionally
the
name
of
the
fighter
.
A
full
name
takes
precedence
over
the
partial
name
.
E
.
g
.
if
we
are
looking
for
the
damage
for
"Maci HighPunch"
,
we
first
try
the
full
name
,
then
only
"HighPunch"
.
The
public
method
is
:
GetDamage
(
fighter
,
state
)
=
cut
%::Damage = (
'JumpKick'
=>
18
,
'JumpPunch'
=>
16
,
'KneelingPunch'
=>
6
,
'KneelingKick'
=>
12
,
'HighPunch'
=>
6
,
#
17
'LowPunch'
=>
6
,
#
17
'HighKick'
=>
15
,
#
7
'LowKick'
=>
15
,
#
7
'GroinKick'
=>
20
,
#
5
'KneeKick'
=>
15
,
#
7
'Elbow'
=>
12
,
#
8
'Spin'
=>
19
,
#
6
'Sweep'
=>
12
,
#
8
'Grenade'
=>
15
,
#
7
'Uppercut'
=>
19
,
#
5
+
e
'KneelingUppercut'
=>
19
,
#
5
+
e
'Throw'
=>
19
,
#
5
+
e
'ScissorKick Maci'
=>
18
,
#
5.5
);
sub
GetDamage
(
$$
)
{
my
(
$
fighter
,
$
state
)
=
@
_
;
my
(
$
state2
);
return
$
::
Damage
{
"$state $fighter"
}
if
defined
$
::
Damage
{
"$state $fighter"
};
$
state2
=
substr
(
$
state
,
0
,
index
(
$
state
,
" "
)
);
return
$
::
Damage
{
"$state2 $fighter"
}
if
defined
$
::
Damage
{
"$state2 $fighter"
};
return
$
::
Damage
{
"$state2"
}
if
defined
$
::
Damage
{
"$state2"
};
print
"Not in database: '$state $fighter' => ,\n"
;
return
10
;
#
Fallback
value
...
}
return
1
;
File Metadata
Details
Attached
Mime Type
text/x-perl
Expires
Sun, Nov 15, 2:08 AM (1 d, 23 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
130118
Default Alt Text
Damage.pl (1 KB)
Attached To
Mode
R76 OpenMortal
Attached
Detach File
Event Timeline