This commit is contained in:
Page Asgardius 2024-09-26 13:06:33 -07:00
parent 1eb98a23cd
commit f5d435734c
10 changed files with 32 additions and 6 deletions

View file

@ -1,11 +1,19 @@
extends Node2D
var presscontinue
var result
var rmusic := AudioStreamPlayer.new()
var wait
# Called when the node enters the scene tree for the first time.
func _ready():
Global.result[1] = Time.get_ticks_msec() - Global.wait
result = $Label
presscontinue = $Label2
var previoustime
var min = float(Global.result[1] / 60000)
var sec = (Global.result[1] / 1000) - (min*60)
var msec = Global.result[1] - (sec*1000) - (min*60000)
result.set_text("Defeated enemies: "+str(Global.result[0])+"\nClear time: "+str(min)+":"+str(sec)+":"+str(msec)+"\nCharged skill uses: 0\nDamage received: "+str(Global.result[3])+"\nEarned experience: 0")
Global.result = [0, 0, 0, 0, 0]
updatehud()
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
add_child(rmusic)
@ -34,7 +42,12 @@ func _title():
if Global.debug:
get_tree().change_scene_to_file("res://levels/ui/scene.tscn")
else:
get_tree().change_scene_to_file("res://backgounds/wip.tscn")
if Global.cplace == [1, 1, 17]:
Global.cplace = [0, 0, 0]
get_tree().change_scene_to_file("res://backgounds/wip.tscn")
else:
Global.cplace = [0, 0, 0]
get_tree().change_scene_to_file("res://levels/ui/gameplay.tscn")
#get_tree().root.add_child(title)
#get_tree().root.remove_child(boot)
#boot.queue_free()

View file

@ -38,6 +38,7 @@ var dparty = [[0,0], [1,0], [3,0], [9,0]]
var level = [1,1,1,1,1,1,1,1,1,1]
var dlevel = [1,1,1,1,1,1,1,1,1,1]
var cpchar = 0
var result = [0, 0, 0, 0, 0]
var dificulty = 0
var dcpchar = 0
var mangohud = false

View file

@ -27,6 +27,7 @@ func _input(event):
Global.cdialog = []
func _winner():
Global.result[0] = 1
Global.quest[2] = 3
Global.cdialog = [[tr("DIALOG_TROUBLEMAKER_3"), true, 0, 0], [tr("DIALOG_TROUBLEMAKER_4"), true, 7, 0], [tr("DIALOG_TROUBLEMAKER_5"), true, 0, 0]]
Global.live = 3

View file

@ -46,6 +46,7 @@ func _ready():
bgsound.mix_target = 1
sfx1.mix_target = 1
sfx1.bus = &"SFX1"
Global.wait = Time.get_ticks_msec()
if !Global.isboss:
bgsound.play(0)
@ -141,19 +142,20 @@ func _exit():
#get_tree().root.remove_child(player)
get_tree().root.remove_child(level)
if Global.live == 7:
if !Global.debug:
Global.cplace = [0, 0, 0]
get_tree().change_scene_to_file("res://backgounds/result.tscn")
elif Global.live == 8:
get_tree().change_scene_to_file("res://levels/ui/Cutscenes.tscn")
elif Global.live == 5:
Global.result = [0, 0, 0, 0, 0]
_statrebase()
get_tree().change_scene_to_file("res://backgounds/warp.tscn")
elif Global.live == 2:
Global.result = [0, 0, 0, 0, 0]
_statrebase()
get_tree().root.remove_child(thud)
get_tree().change_scene_to_file("res://backgounds/gameover.tscn")
elif Global.live == 6:
Global.result = [0, 0, 0, 0, 0]
if Global.debug:
Global.live = 0
get_tree().change_scene_to_file("res://levels/ui/scene.tscn")

View file

@ -34,7 +34,7 @@ func _input(event):
func _on_back_pressed():
get_tree().change_scene_to_file("res://levels/ui/tmenu.tscn")
get_tree().change_scene_to_file("res://levels/ui/debug.tscn")

View file

@ -36,6 +36,7 @@ func _on_body_entered(body):
if body.weakness == speciality:
print("weakness")
#Input.start_joy_vibration(0,0,1,3)
Global.result[3] += attack * crit
if Global.debug:
if Global.dstats[Global.dparty[Global.dcpchar][0]][0] > (attack * crit):
Global.dstats[Global.dparty[Global.dcpchar][0]][0] -= attack * crit
@ -47,6 +48,7 @@ func _on_body_entered(body):
else:
Global.cstats[Global.party[Global.cpchar][0]][0] = 0
else:
Global.result[3] += attack
#Input.start_joy_vibration(0,1,0,2)
if Global.debug:
if Global.dstats[Global.dparty[Global.dcpchar][0]][0] > attack:

View file

@ -36,7 +36,7 @@ func _on_body_entered(body):
if !body.is_in_group(btype):
if body.is_in_group("players") && Global.dificulty != 1:
if body.weakness == speciality:
print("weakness")
Global.result[3] += attack * crit
#Input.start_joy_vibration(0,0,1,3)
if Global.debug:
if Global.dstats[Global.dparty[Global.dcpchar][0]][0] > (attack * crit):
@ -49,6 +49,7 @@ func _on_body_entered(body):
else:
Global.cstats[Global.party[Global.cpchar][0]][0] = 0
else:
Global.result[3] += attack
#Input.start_joy_vibration(0,1,0,2)
if Global.debug:
if Global.dstats[Global.dparty[Global.dcpchar][0]][0] > attack:

View file

@ -31,6 +31,7 @@ func _on_body_entered(body):
if body.is_in_group("players") && Global.dificulty != 1:
if body.weakness == 3:
print("weakness")
Global.result[3] += attack * crit
#Input.start_joy_vibration(0,0,1,3)
if Global.debug:
if Global.dstats[Global.dparty[Global.dcpchar][0]][0] > (attack * crit):
@ -43,6 +44,7 @@ func _on_body_entered(body):
else:
Global.cstats[Global.party[Global.cpchar][0]][0] = 0
else:
Global.result[3] += attack
#Input.start_joy_vibration(0,1,0,2)
if Global.debug:
if Global.dstats[Global.dparty[Global.dcpchar][0]][0] > attack:

View file

@ -30,6 +30,7 @@ func _on_body_entered(body):
if !body.is_in_group(btype) && Global.live == 1:
if body.is_in_group("players") && Global.dificulty != 1:
if body.weakness == 0:
Global.result[3] += attack * crit
print("weakness")
#Input.start_joy_vibration(0,0,1,3)
if Global.debug:
@ -43,6 +44,7 @@ func _on_body_entered(body):
else:
Global.cstats[Global.party[Global.cpchar][0]][0] = 0
else:
Global.result[3] += attack
#Input.start_joy_vibration(0,1,0,2)
if Global.debug:
if Global.dstats[Global.dparty[Global.dcpchar][0]][0] > attack:

View file

@ -31,6 +31,7 @@ func _on_body_entered(body):
if body.is_in_group("players") && Global.dificulty != 1:
if body.weakness == 1:
print("weakness")
Global.result[3] += attack * crit
#Input.start_joy_vibration(0,0,1,3)
if Global.debug:
if Global.dstats[Global.dparty[Global.dcpchar][0]][0] > (attack * crit):
@ -43,6 +44,7 @@ func _on_body_entered(body):
else:
Global.cstats[Global.party[Global.cpchar][0]][0] = 0
else:
Global.result[3] += attack
#Input.start_joy_vibration(0,1,0,2)
if Global.debug:
if Global.dstats[Global.dparty[Global.dcpchar][0]][0] > attack: