midori-school/levels/Ceres/map.gd
2024-09-05 17:16:49 -07:00

50 lines
1 KiB
GDScript

extends Node2D
var hkr
var troublemaker
var travel = null
# Called when the node enters the scene tree for the first time.
func _ready():
hkr = $Railwaygirl
troublemaker = $Pamela
if !Global.debug:
_statrebase()
Global.live = 1
#pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _input(event):
if Input.is_action_just_pressed("ui_accept") && travel != null:
if Global.debug:
Global.dplace = travel
else:
Global.cplace = travel
Global.live = 5
func _statrebase():
for i in 4:
if Global.party[i][0] != null:
for j in 7:
Global.cstats[Global.party[i][0]][j] = Global.basestats[Global.party[i][0]][j] * Global.level[Global.dparty[i][0]]
func _on_railwaygirl_body_entered(body: Node2D) -> void:
travel = [1, 8, 11]
func _on_railwaygirl_body_exited(body: Node2D) -> void:
travel = null
func _on_pamela_body_entered(body: Node2D) -> void:
travel = [1, 1, 17]
func _on_pamela_body_exited(body: Node2D) -> void:
travel = null