summaryrefslogtreecommitdiff
path: root/npc/functions/honor.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-01-23 21:17:05 -0300
committerJesusaves <cpntb1@ymail.com>2020-01-23 21:17:05 -0300
commit8b7bce95b0eec202b7751de616bc3cf6ba59163a (patch)
treed97b177855ce1e2ee49fb8220e50db8e3da75279 /npc/functions/honor.txt
parentf520c4404d28608fe6dc991f07f21670538a5a20 (diff)
downloadserverdata-8b7bce95b0eec202b7751de616bc3cf6ba59163a.tar.gz
serverdata-8b7bce95b0eec202b7751de616bc3cf6ba59163a.tar.bz2
serverdata-8b7bce95b0eec202b7751de616bc3cf6ba59163a.tar.xz
serverdata-8b7bce95b0eec202b7751de616bc3cf6ba59163a.zip
Sketches
Diffstat (limited to 'npc/functions/honor.txt')
-rw-r--r--npc/functions/honor.txt21
1 files changed, 11 insertions, 10 deletions
diff --git a/npc/functions/honor.txt b/npc/functions/honor.txt
index 0d1c0138d..8ebe86cd8 100644
--- a/npc/functions/honor.txt
+++ b/npc/functions/honor.txt
@@ -42,20 +42,21 @@ function script get_BR {
function script calc_HR {
.@atk_br=getarg(0);
.@def_br=getarg(1);
- .@cbase=10000;
+ .@cbase=1000;
+ .@maxop=300; // 30%
- // Dishonorable
- if (.@atk_br > .@def_br) {
- .@overpower=.@atk_br*.@cbase/.@def_br;
- // Honorable
- } else if (.@def_br > .@atk_br) {
- .@overpower=.@atk_br*.@cbase/.@def_br;
- // Neutral
+ // Calculate how much (%) you've used above needed
+ .@overpower=.@atk_br*.@cbase/.@def_br;
+
+ // Dishonorable: You used maxop above cbase
+ // Maybe we should use level difference?
+ if (.@overpower > .@cbase+.@maxop) {
+ .@honor=-(0);
} else {
- .@overpower=0;
+ .@honor=0;
}
- return 0;
+ return .@honor;
}
// getvariableofpc(HONOR, .@rid, 0) < 0 → determine if other player is bandit