From 94459db2719e3ee12ff9ef1dbddca4faaf7d4265 Mon Sep 17 00:00:00 2001 From: Gavin McCauley Date: Thu, 3 Dec 2015 19:25:38 -0500 Subject: [PATCH] penalty bug fix When a potential penalty (flashing) exceeds the amount of health, the flashing portion will extend outside of the bar border. A quick comparison of flash_amount to the penalty variable fixes this. --- core/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/core.py b/core/core.py index e28ceef..954e434 100644 --- a/core/core.py +++ b/core/core.py @@ -1612,7 +1612,7 @@ def __init__(self,end=100,var="penalty",flash_amount=None): if end<0: end = 0 self.end = end self.delay = 50 - self.flash_amount = flash_amount + self.flash_amount = min(flash_amount, self.gv()) if flash_amount else flash_amount self.flash_color = [255,242,129,150] self.flash_dir = 1 self.change = 0