From 5fa92d8b26996fecf378da6a5c79c19ef99788a8 Mon Sep 17 00:00:00 2001 From: Tegiminis Date: Tue, 26 Jul 2022 11:26:36 -0700 Subject: [PATCH] fixed refresh rule for unique buffs --- evennia/contrib/game_systems/buffs/buff.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/evennia/contrib/game_systems/buffs/buff.py b/evennia/contrib/game_systems/buffs/buff.py index a3c8ddf903..58bdcd1e8b 100644 --- a/evennia/contrib/game_systems/buffs/buff.py +++ b/evennia/contrib/game_systems/buffs/buff.py @@ -459,6 +459,9 @@ class BuffHandler(object): b["stacks"] = min(existing["stacks"] + stacks, buff.maxstacks) elif buff.maxstacks < 1: b["stacks"] = existing["stacks"] + stacks + # refresh rule for uniques + if not buff.refresh: + b["duration"] = existing["duration"] # Carrying over old arbitrary cache values cur_cache = {k: v for k, v in existing.items() if k not in b.keys()} b.update(cur_cache)