midori-school/levels/Ceres/map.gd

59 lines
1.3 KiB
GDScript3
Raw Normal View History

2024-08-05 00:33:57 +02:00
extends Node2D
2024-09-06 02:16:49 +02:00
var hkr
var troublemaker
var travel = null
2024-08-05 00:33:57 +02:00
# Called when the node enters the scene tree for the first time.
func _ready():
2024-09-06 02:16:49 +02:00
hkr = $Railwaygirl
troublemaker = $Pamela
2024-08-05 00:33:57 +02:00
if !Global.debug:
_statrebase()
Global.live = 1
2024-09-25 13:35:43 +02:00
if Global.quest[1] == 0:
hkr.queue_free()
if Global.quest[2] == 0:
troublemaker.queue_free()
2024-08-05 00:33:57 +02:00
#pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
2024-09-06 02:16:49 +02:00
func _input(event):
2024-12-02 20:49:07 +01:00
if Input.is_action_just_pressed("ui_accept") && travel != null && Global.live == 1:
2024-09-20 20:28:17 +02:00
if Global.ccutscene == null:
if Global.debug:
Global.dplace = travel
else:
Global.cplace = travel
Global.live = 5
2024-09-06 02:16:49 +02:00
else:
2024-09-20 20:28:17 +02:00
Global.live = 8
2024-09-06 02:16:49 +02:00
2024-08-05 00:33:57 +02:00
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]]
2024-09-06 02:16:49 +02:00
func _on_railwaygirl_body_entered(body: Node2D) -> void:
2024-09-20 20:28:17 +02:00
Global.ccutscene = 10
2024-09-06 02:16:49 +02:00
travel = [1, 8, 11]
func _on_railwaygirl_body_exited(body: Node2D) -> void:
travel = null
func _on_pamela_body_entered(body: Node2D) -> void:
2024-09-20 20:28:17 +02:00
Global.ccutscene = 13
2024-09-06 02:16:49 +02:00
travel = [1, 1, 17]
func _on_pamela_body_exited(body: Node2D) -> void:
travel = null