/** Combat-logout stay-in-world + PvP cowardice rules. */ /** How long after combat activity a combat-logged-out character may remain. */ export const COMBAT_LOGOUT_MS = 5 * 60_000; /** Coins that must drop on offline PvP death to skip the cowardice skull. */ export function combatLogoutCoinThreshold (combatLevel) { return Math.max(0, (combatLevel | 0) * 50); } /** Wall-clock hour bucket used for the once-per-hour cowardice forgiveness. */ export function cowardiceHourKey (now = Date.now()) { return Math.floor(Number(now) / 3_600_000); }