using System;
namespace Prototype;
public static class BuffRules
{
public static float ReducedDamage(float damage,float defense) => damage/(1f+MathF.Max(0f,defense)/100f);
public static bool PreventDeath(float damage,float now,ref float hp,ref int charges,ref float protectedUntil)
{
if(now<protectedUntil)return true;
if(damage<hp || charges<=0)return false;
charges--; hp=1f; protectedUntil=now+10f; return true;
}
}