Apply difficulty modifiers to damage

This commit is contained in:
Marco 2025-04-08 19:06:39 +02:00
commit bb0f17124d
15 changed files with 94 additions and 59 deletions

View file

@ -1,4 +1,5 @@
using Cirno.Scripts.Components.Actors;
using Cirno.Scripts.Enums;
using Godot;
namespace Cirno.Scripts.Components.FSM.Player;
@ -40,7 +41,18 @@ public partial class PlayerGrazingModule : PlayerArea2DModule
bullet.Graze();
//bullet.IsGrazed = true;
Shield.CurrentResource += bullet.BulletInfo.GrazeValue;
var baseGrazeValue = bullet.BulletInfo.GrazeValue;
float grazeShield = GlobalState.Instance.SessionSettings.Difficulty switch
{
DifficultyLevel.Easy => baseGrazeValue * 5,
DifficultyLevel.Normal => baseGrazeValue * 2,
DifficultyLevel.Hard or DifficultyLevel.Lunatic => baseGrazeValue,
_ => baseGrazeValue
};
Shield.CurrentResource += grazeShield;
// check if it's grazed
// check if it's grazeable
// restore appropriate amount of shield