mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-05 08:15:54 +00:00
Apply difficulty modifiers to damage
This commit is contained in:
parent
3c531bbe04
commit
bb0f17124d
15 changed files with 94 additions and 59 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue