summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-02-04 12:21:45 -0300
committerJesusaves <cpntb1@ymail.com>2020-02-04 12:21:45 -0300
commitb5e37e3f33df9068127d8dd5c3e557a71dbc23d2 (patch)
tree72c1696bca525e15e1552e0042583a38c337632f /npc
parent7ad63bedb74759ec9a162b451455d2955d4e3823 (diff)
downloadserverdata-b5e37e3f33df9068127d8dd5c3e557a71dbc23d2.tar.gz
serverdata-b5e37e3f33df9068127d8dd5c3e557a71dbc23d2.tar.bz2
serverdata-b5e37e3f33df9068127d8dd5c3e557a71dbc23d2.tar.xz
serverdata-b5e37e3f33df9068127d8dd5c3e557a71dbc23d2.zip
Meh, forget old code.
It is dishonorable if level diference is above 15 It is also dishonorable if you are preying someone with level < 30. Think on it as a rudimentary n00b protection.
Diffstat (limited to 'npc')
-rw-r--r--npc/functions/honor.txt25
1 files changed, 11 insertions, 14 deletions
diff --git a/npc/functions/honor.txt b/npc/functions/honor.txt
index 40f2d583e..255fafcb9 100644
--- a/npc/functions/honor.txt
+++ b/npc/functions/honor.txt
@@ -56,21 +56,18 @@ function script get_BR {
}
// Calculate the Honor Points which are due
-// calc_HR( get_BR(getcharid(3)), get_BR(killedrid) )
+// calc_HR( get_BR(getcharid(3)), get_BR(killedrid), log=True )
function script calc_HR {
- .@atk_br=get_BR(getarg(0));
- .@def_br=get_BR(getarg(1));
- .@cbase=1000;
- .@maxop=300; // 30%
-
- // Calculate how much (%) you've used above needed
- //.@overpower=.@atk_br*.@cbase/.@def_br;
- .@overpower=readparam(BaseLevel, getarg(0))*.@cbase/readparam(BaseLevel, getarg(1));
-
- // Dishonorable: You used maxop above cbase
- // Maybe we should use level difference?
- // FIXME
- if (.@overpower > .@cbase+.@maxop) {
+ //.@atk_br=get_BR(getarg(0));
+ //.@def_br=get_BR(getarg(1));
+ .@atk=readparam(BaseLevel, getarg(0));
+ .@def=readparam(BaseLevel, getarg(1));
+
+ // Calculate how much levels you've used above needed
+ .@overpower=.@atk-.@def;
+
+ // Dishonorable: You used 15 levels above target, or target < level 30
+ if (.@overpower > 15 || .@def < 30) {
.@honor=-(BaseLevel/4);
} else {
.@honor=BaseLevel/4;