public static void HandleDefenseProtection(Creature target, ref float damage, bool defense = true, bool protection = true)
{
if (defense)
damage = Math.Max(1, damage - target.Defense);
if (protection && damage > 1)
damage = Math.Max(1, damage - (damage * target.Protection));
}