Initial Commit

This commit is contained in:
June
2026-03-24 22:00:03 -07:00
parent bf9620bbb6
commit 5533b95cff
73 changed files with 1647 additions and 293 deletions

View File

@@ -0,0 +1,2 @@
class_name npcAkers
extends cCharacter

View File

@@ -0,0 +1 @@
uid://bfo4bx2r2j3cw

View File

@@ -0,0 +1,39 @@
class_name npcConstruct
extends cCharacter
signal location_changed(ai, old_location, new_location)
signal state_changed(ai, old_state, new_state)
var state: int = 0
func advance_state() -> void:
if state >= MAX_STATE:
if reset_after_climax:
state = 0
else:
state += 1
func _ready():
super._ready()
print("Construct Ready")
Global.game.night.hour_changed.connect(_on_hour_changed)
func _on_hour_changed(hour: int):
if hour == 1:
ai_level += 2
if hour == 3:
ai_level += 5
func _process(delta: float) -> void:
super._process(delta)
match state:
0: pass # dormant
1: pass
2: pass
3: pass
4: pass
5: pass
6: pass
advance_state()
if (randi_range(1, 20) > 10):
stunted = true

View File

@@ -0,0 +1,11 @@
class_name npcFlesher
extends cCharacter
signal location_changed(ai, old_location, new_location)
signal state_changed(ai, old_state, new_state)
enum state {
IDLE,
MOVE,
SEEN,
HIDDEN
}

View File

@@ -0,0 +1 @@
uid://d3y7qtu4ox1dv

View File

@@ -0,0 +1,2 @@
class_name npcYoshida
extends cCharacter

View File

@@ -0,0 +1 @@
uid://dguqfb6ddsehj

View File

@@ -1,30 +1,32 @@
class_name cCharacter
extends Node
const Map = preload("res://Scripts/Levels/lsOffice.gd")
# --- Parameters ---
@export_range(0, 20) var ai_level := 10
@export var min_interval := 8
@export var max_interval := 12
@export var reset_after_climax := true
@export var character_name := "template"
# --- Constants ---
const MAX_STATE := 6
const DEBUG := true
# --- Runtime ---
var state: int = 0
var current_location: int = Global.LocationID.POWER_STATION
var current_room: int = -1
var move_timer := 0.0
var stunted: bool = false
func get_room_presence(room_id):
if current_location != room_id:
return -1
return state
func move_to(room_id: int):
if current_room != -1:
Global.rooms[current_room].remove_enemy(self)
current_room = room_id
Global.rooms[current_room].add_enemy(self)
func _init():
_ready()
func _ready() -> void:
randomize()
@@ -47,31 +49,12 @@ func try_move(delta: float) -> bool:
var roll := randi_range(1, 20)
if DEBUG:
print(name, " | AI:", ai_level, " | Roll:", roll)
print(character_name, " | AI:", ai_level, " | Roll:", roll)
return roll <= ai_level
func advance_state() -> void:
if state >= MAX_STATE:
if reset_after_climax:
state = 0
else:
state += 1
func _process(delta: float) -> void:
if try_move(delta):
if(stunted):
stunted = false
return
advance_state()
if (randi_range(1, 20) > 10):
stunted = true
match state:
0: pass # dormant
1: pass
2: pass
3: pass
4: pass
5: pass
6: pass

View File

@@ -1,7 +1,8 @@
extends Node2D
@export var target: Node
@export var night_manager: NightManager
var night_manager = Global.game.night
func _process(_delta: float) -> void:
queue_redraw()

View File

@@ -1,15 +0,0 @@
class_name cConstruct extends cCharacter
signal location_changed(ai, old_location, new_location)
signal state_changed(ai, old_state, new_state)
@export var night_manager: NightManager
func _ready():
night_manager.hour_changed.connect(_on_hour_changed)
func _on_hour_changed(hour: int):
if hour == 1:
ai_level += 2
if hour == 3:
ai_level += 5