mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-10 02:05:54 +00:00
Globally calculated difficulty damage
This commit is contained in:
parent
5624d0178c
commit
4d62a0a385
4 changed files with 12 additions and 22 deletions
|
|
@ -70,13 +70,7 @@ public partial class GenericDamageReceiver : Area2D, IHittable
|
|||
if (Invulnerable) return;
|
||||
|
||||
// Change value based on difficulty
|
||||
float difficultyReducedDmg = GlobalState.Instance.SessionSettings.Difficulty switch
|
||||
{
|
||||
DifficultyLevel.Easy => damage * 5,
|
||||
DifficultyLevel.Normal => damage * 2,
|
||||
DifficultyLevel.Hard or DifficultyLevel.Lunatic => damage,
|
||||
_ => damage
|
||||
};
|
||||
float difficultyReducedDmg = damage * GlobalState.Instance.SessionSettings.DifficultyDamageMultiplier;
|
||||
|
||||
var dmg = DamageResistances.Aggregate(difficultyReducedDmg, (current, resistance) => current * resistance.CalculateDamage(current, damageType));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue