diff options
-rw-r--r-- | npc/functions/honor.txt | 21 |
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 |