Aura.Channel.World.Entities.NPC.ShouldSurvive C# (CSharp) Method

ShouldSurvive() protected method

NPCs may survive randomly.
http://wiki.mabinogiworld.com/view/Stats#Life More Will supposedly increases the chance. Unknown if this applies to players as well. Before certain Gs, NPCs weren't able to survive attacks under any circumstances.
protected ShouldSurvive ( float damage, Creature from, float lifeBefore ) : bool
damage float
from Creature
lifeBefore float
return bool
		protected override bool ShouldSurvive(float damage, Creature from, float lifeBefore)
		{
			// No surviving once you're in deadly
			if (lifeBefore < 0)
				return false;

			if (!AuraData.FeaturesDb.IsEnabled("DeadlyNPCs"))
				return false;

			// Chance = Will/10, capped at 50%
			// (i.e 80 Will = 8%, 500+ Will = 50%)
			// Actual formula unknown
			var chance = Math.Min(50, this.Will / 10);
			return (RandomProvider.Get().Next(101) < chance);
		}