From 13271142c7bb7e47e43a236694e8187e6cef4ad9 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 23 Jan 2020 21:55:21 -0300 Subject: Honor is now on workflow --- npc/functions/hub.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'npc/functions/hub.txt') diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt index 9fc9c9876..6bcda9ccb 100644 --- a/npc/functions/hub.txt +++ b/npc/functions/hub.txt @@ -263,7 +263,27 @@ function script HUB_PvP { .@honor=calc_HR(.@atk, .@def); .@m$=getmap(); + // This is an official PVP Map if (ispvpmap(.@m$)) { + // Honorable Death + if (.@honor) { + HONOR+=.@honor; + } else { + // Dishonorable... But... Legit? + if (is_bandit(killedrid)) + HONOR+=1; + else + HONOR+=.@honor; // It's negative + } + + // It was a duel! + } else { + // Honorable Duel: HONOR +30% + if (.@honor) + HONOR+=max(1, .@honor*3/10); + else + HONOR+=1; + // ^ Dishonorable duel, but was a duel! } // TODO: Start using readparam2() to read if the opponent was worthy -- cgit v1.2.3-60-g2f50