diff --git a/Assets/KSH/GameConstants.cs b/Assets/KSH/GameConstants.cs index 61771aa4..065d0426 100644 --- a/Assets/KSH/GameConstants.cs +++ b/Assets/KSH/GameConstants.cs @@ -9,6 +9,7 @@ public enum ActionType LessSleep, // 5시간 취침 SleepWell, // 8시간 취침 ForcedSleep, // 강제 수면(10시간) + Sleep, Eat, Work, Dungeon, @@ -24,7 +25,7 @@ public class GameConstants // 기본 스탯 값 public float baseHealth = 8f; public float baseTime = 8f; - public float baseReputation = 5f; + public float baseReputation = 2f; // 스탯 한계 값 public float maxHealth = 10f; diff --git a/Assets/KSH/PlayerStats.cs b/Assets/KSH/PlayerStats.cs index cb37aec3..ea693331 100644 --- a/Assets/KSH/PlayerStats.cs +++ b/Assets/KSH/PlayerStats.cs @@ -51,6 +51,15 @@ public class PlayerStats : MonoBehaviour ModifyHealth(effect.healthChange); ModifyReputation(effect.reputationChange); } + + // 출근 가능 여부 확인 메서드 + public bool CanWork() + { + bool isTimeToWork = TimeStat is >= 8.0f and < 9.0f; // 8시에서 9시 사이만 true + bool isCanPerformWork = CanPerformByHealth(ActionType.Work); // 체력상 가능한지 확인 + + return isTimeToWork && isCanPerformWork; + } // 하루 종료 처리 private void EndDay(bool isForced) //bool isForced? 해서 true면 강제 수면이라 8시에 깨는 diff --git a/Assets/KSH/ValueByAction.cs b/Assets/KSH/ValueByAction.cs index 03df3f7e..3d7796e3 100644 --- a/Assets/KSH/ValueByAction.cs +++ b/Assets/KSH/ValueByAction.cs @@ -33,10 +33,8 @@ public class ValueByAction actionEffects = new Dictionary { // 기본 액션들, 효과(시간, 체력, 평판 순) - { ActionType.NotSleep, new ActionEffect(_gameConstants.forcedValue, 0, 0) }, // 8시 강제 기상 - { ActionType.LessSleep, new ActionEffect(+5.0f, +6.0f, 0) }, - { ActionType.SleepWell, new ActionEffect(+8.0f, +8.0f, 0) }, - { ActionType.ForcedSleep, new ActionEffect(+10.0f, +4.0f, 0) }, + { ActionType.Sleep, new ActionEffect(_gameConstants.forcedValue, 0, 0) }, // 8시 강제 기상 + { ActionType.ForcedSleep, new ActionEffect(+10.0f, +4.0f, 0) }, // 체력 0 { ActionType.Eat, new ActionEffect(+1.0f, +1.0f, 0) }, { ActionType.Work, new ActionEffect(+10.0f, -3.0f, +0.2f) }, // 8to6: 10시간 { ActionType.Dungeon, new ActionEffect(+3.0f, -3.0f, 0) },