2024-08-24 05:54:38 +02:00
|
|
|
extends Node2D
|
2024-11-07 21:39:59 +01:00
|
|
|
var talk = load("res://levels/ui/talk.tscn").instance()
|
2024-08-24 05:54:38 +02:00
|
|
|
var boss
|
|
|
|
var player
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
|
|
func _ready():
|
|
|
|
boss = $Pamela
|
|
|
|
player = $Player
|
|
|
|
boss.add_to_group("boss")
|
|
|
|
Global.cdialog = [[tr("DIALOG_TROUBLEMAKER_0"), true, 0, 0], [tr("DIALOG_TROUBLEMAKER_1"), true, 7, 0], [tr("DIALOG_TROUBLEMAKER_2"), true, 0, 0]]
|
|
|
|
Global.live = 0
|
2024-11-07 21:39:59 +01:00
|
|
|
call_deferred("_talk")
|
2024-08-24 05:54:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
|
|
func _process(delta):
|
|
|
|
pass
|
|
|
|
|
|
|
|
func _physics_process(delta):
|
2024-09-05 02:15:22 +02:00
|
|
|
pass
|
2024-08-24 05:54:38 +02:00
|
|
|
|
|
|
|
func _input(event):
|
2024-09-05 02:15:22 +02:00
|
|
|
if Global.cboss[1] <= 0 && Global.live == 1:
|
|
|
|
_winner()
|
2024-08-24 05:54:38 +02:00
|
|
|
if Global.cdialog.size() != 0 && Global.live == 1:
|
|
|
|
get_tree().root.remove_child(talk)
|
|
|
|
Global.cdialog = []
|
|
|
|
|
|
|
|
func _winner():
|
2024-09-26 22:06:33 +02:00
|
|
|
Global.result[0] = 1
|
2024-09-05 02:15:22 +02:00
|
|
|
Global.cdialog = [[tr("DIALOG_TROUBLEMAKER_3"), true, 0, 0], [tr("DIALOG_TROUBLEMAKER_4"), true, 7, 0], [tr("DIALOG_TROUBLEMAKER_5"), true, 0, 0]]
|
2024-08-24 05:54:38 +02:00
|
|
|
Global.live = 3
|
2024-12-02 20:49:07 +01:00
|
|
|
Global.ccutscene = 16
|
2024-08-24 05:54:38 +02:00
|
|
|
#talk.queue_free()
|
2024-11-07 21:39:59 +01:00
|
|
|
talk = load("res://levels/ui/talk.tscn").instance()
|
|
|
|
call_deferred("_talk")
|
2024-08-24 05:54:38 +02:00
|
|
|
|
|
|
|
func _statrebase():
|
|
|
|
if Global.debug:
|
|
|
|
for i in 4:
|
|
|
|
if Global.dparty[i][0] != null:
|
|
|
|
for j in 7:
|
|
|
|
Global.mstats[Global.dparty[i][0]][j] = Global.basestats[Global.dparty[i][0]][j] * Global.dlevel[Global.dparty[i][0]]
|
|
|
|
else:
|
|
|
|
for i in 4:
|
|
|
|
if Global.party[i][0] != null:
|
|
|
|
for j in 7:
|
|
|
|
Global.mstats[Global.party[i][0]][j] = Global.basestats[Global.party[i][0]][j] * Global.level[Global.dparty[i][0]]
|
2024-11-07 21:39:59 +01:00
|
|
|
|
|
|
|
func _talk():
|
|
|
|
get_tree().root.add_child(talk)
|