feat: add initial starvation consequence
This commit is contained in:
@@ -37,15 +37,21 @@ func update_modifiers() -> void:
|
||||
|
||||
|
||||
func apply_npc_task(npc: SimNPC) -> void:
|
||||
var productivity := 1.0
|
||||
if npc.energy < 20.0:
|
||||
productivity = 0.25
|
||||
elif npc.energy < 40.0:
|
||||
productivity = 0.5
|
||||
|
||||
match npc.current_task:
|
||||
"gather_food":
|
||||
food += 2.0
|
||||
food += 2.0 * productivity
|
||||
"gather_wood":
|
||||
wood += 2.0
|
||||
wood += 2.0 * productivity
|
||||
"patrol":
|
||||
safety += 1.0
|
||||
safety += 1.0 * productivity
|
||||
"study":
|
||||
knowledge += 1.0
|
||||
knowledge += 1.0 * productivity
|
||||
"eat":
|
||||
food -= 1.0
|
||||
"rest":
|
||||
|
||||
Reference in New Issue
Block a user