test level

This commit is contained in:
Page Asgardius 2024-05-19 12:12:02 -07:00
parent dc061b2dea
commit c207a8be65
10 changed files with 152 additions and 41 deletions

View file

@ -20,28 +20,47 @@ func _process(delta):
func _physics_process(delta):
pass
func _on_body_entered(body):if !body.is_in_group(btype):
if body.is_in_group("players") || body.is_in_group("boss") || body.is_in_group("enemies"):
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 == speciality:
print("weakness")
Input.start_joy_vibration(0,0,1,3)
if Global.debug:
Global.dstats[Global.dparty[Global.dcpchar][0]][0] -= attack * crit
if Global.dstats[Global.dparty[Global.dcpchar][0]][0] > (attack * crit):
Global.dstats[Global.dparty[Global.dcpchar][0]][0] -= attack * crit
else:
Global.dstats[Global.dparty[Global.dcpchar][0]][0] = 0
else:
Global.dstats[Global.party[Global.cpchar][0]][0] -= attack * crit
if Global.cstats[Global.party[Global.cpchar][0]][0] > (attack * crit):
Global.cstats[Global.party[Global.cpchar][0]][0] -= attack * crit
else:
Global.cstats[Global.party[Global.cpchar][0]][0] = 0
else:
Input.start_joy_vibration(0,1,0,2)
if Global.debug:
Global.dstats[Global.dparty[Global.dcpchar][0]][0] -= attack
if Global.dstats[Global.dparty[Global.dcpchar][0]][0] > attack:
Global.dstats[Global.dparty[Global.dcpchar][0]][0] -= attack
else:
Global.dstats[Global.dparty[Global.dcpchar][0]][0] = 0
else:
Global.dstats[Global.party[Global.cpchar][0]][0] -= attack
if Global.cstats[Global.party[Global.cpchar][0]][0] > attack:
Global.cstats[Global.party[Global.cpchar][0]][0] -= attack
else:
Global.cstats[Global.party[Global.cpchar][0]][0] = 0
elif body.is_in_group("boss") && Global.dificulty != 1:
if body.weakness == 0:
print("weakness")
elif body.is_in_group("enemies") && Global.dificulty != 1:
if body.weakness == 0:
print("weakness")
#if body.is_in_group("players"):
# Global.live = 2
#elif body.is_in_group("enemies"):
# Global.live = 3
#elif body.is_in_group("boss"):
# Global.live = 3
#queue_free()
queue_free()

View file

@ -34,22 +34,37 @@ func _physics_process(delta):
func _on_body_entered(body):
if !body.is_in_group(btype):
if body.is_in_group("players"):
if body.is_in_group("players") && Global.dificulty != 1:
if body.weakness == speciality:
print("weakness")
Input.start_joy_vibration(0,0,1,3)
if Global.debug:
Global.dstats[Global.dparty[Global.dcpchar][0]][0] -= attack * crit
if Global.dstats[Global.dparty[Global.dcpchar][0]][0] > (attack * crit):
Global.dstats[Global.dparty[Global.dcpchar][0]][0] -= attack * crit
else:
Global.dstats[Global.dparty[Global.dcpchar][0]][0] = 0
else:
Global.dstats[Global.party[Global.cpchar][0]][0] -= attack * crit
if Global.cstats[Global.party[Global.cpchar][0]][0] > (attack * crit):
Global.cstats[Global.party[Global.cpchar][0]][0] -= attack * crit
else:
Global.cstats[Global.party[Global.cpchar][0]][0] = 0
else:
Input.start_joy_vibration(0,1,0,2)
if Global.debug:
Global.dstats[Global.dparty[Global.dcpchar][0]][0] -= attack
if Global.dstats[Global.dparty[Global.dcpchar][0]][0] > attack:
Global.dstats[Global.dparty[Global.dcpchar][0]][0] -= attack
else:
Global.dstats[Global.dparty[Global.dcpchar][0]][0] = 0
else:
Global.dstats[Global.party[Global.cpchar][0]][0] -= attack
elif body.is_in_group("boss") || body.is_in_group("enemies"):
if body.weakness == speciality:
if Global.cstats[Global.party[Global.cpchar][0]][0] > attack:
Global.cstats[Global.party[Global.cpchar][0]][0] -= attack
else:
Global.cstats[Global.party[Global.cpchar][0]][0] = 0
elif body.is_in_group("boss") && Global.dificulty != 1:
if body.weakness == 0:
print("weakness")
elif body.is_in_group("enemies") && Global.dificulty != 1:
if body.weakness == 0:
print("weakness")
#if body.is_in_group("players"):
# Global.live = 2

View file

@ -27,22 +27,37 @@ func _physics_process(delta):
func _on_body_entered(body):
if !body.is_in_group(btype):
if body.is_in_group("players"):
if body.is_in_group("players") && Global.dificulty != 1:
if body.weakness == 3:
print("weakness")
Input.start_joy_vibration(0,0,1,3)
if Global.debug:
Global.dstats[Global.dparty[Global.dcpchar][0]][0] -= attack * crit
if Global.dstats[Global.dparty[Global.dcpchar][0]][0] > (attack * crit):
Global.dstats[Global.dparty[Global.dcpchar][0]][0] -= attack * crit
else:
Global.dstats[Global.dparty[Global.dcpchar][0]][0] = 0
else:
Global.dstats[Global.party[Global.cpchar][0]][0] -= attack * crit
if Global.cstats[Global.party[Global.cpchar][0]][0] > (attack * crit):
Global.cstats[Global.party[Global.cpchar][0]][0] -= attack * crit
else:
Global.cstats[Global.party[Global.cpchar][0]][0] = 0
else:
Input.start_joy_vibration(0,1,0,2)
if Global.debug:
Global.dstats[Global.dparty[Global.dcpchar][0]][0] -= attack
if Global.dstats[Global.dparty[Global.dcpchar][0]][0] > attack:
Global.dstats[Global.dparty[Global.dcpchar][0]][0] -= attack
else:
Global.dstats[Global.dparty[Global.dcpchar][0]][0] = 0
else:
Global.dstats[Global.party[Global.cpchar][0]][0] -= attack
elif body.is_in_group("boss") || body.is_in_group("enemies"):
if body.weakness == 3:
if Global.cstats[Global.party[Global.cpchar][0]][0] > attack:
Global.cstats[Global.party[Global.cpchar][0]][0] -= attack
else:
Global.cstats[Global.party[Global.cpchar][0]][0] = 0
elif body.is_in_group("boss") && Global.dificulty != 1:
if body.weakness == 0:
print("weakness")
elif body.is_in_group("enemies") && Global.dificulty != 1:
if body.weakness == 0:
print("weakness")
#if body.is_in_group("players"):
# Global.live = 2

View file

@ -27,21 +27,36 @@ func _physics_process(delta):
func _on_body_entered(body):
if !body.is_in_group(btype) && Global.live == 1:
if body.is_in_group("players"):
if body.is_in_group("players") && Global.dificulty != 1:
if body.weakness == 0:
print("weakness")
Input.start_joy_vibration(0,0,1,3)
if Global.debug:
Global.dstats[Global.dparty[Global.dcpchar][0]][0] -= attack * crit
if Global.dstats[Global.dparty[Global.dcpchar][0]][0] > (attack * crit):
Global.dstats[Global.dparty[Global.dcpchar][0]][0] -= attack * crit
else:
Global.dstats[Global.dparty[Global.dcpchar][0]][0] = 0
else:
Global.dstats[Global.party[Global.cpchar][0]][0] -= attack * crit
if Global.cstats[Global.party[Global.cpchar][0]][0] > (attack * crit):
Global.cstats[Global.party[Global.cpchar][0]][0] -= attack * crit
else:
Global.cstats[Global.party[Global.cpchar][0]][0] = 0
else:
Input.start_joy_vibration(0,1,0,2)
if Global.debug:
Global.dstats[Global.dparty[Global.dcpchar][0]][0] -= attack
if Global.dstats[Global.dparty[Global.dcpchar][0]][0] > attack:
Global.dstats[Global.dparty[Global.dcpchar][0]][0] -= attack
else:
Global.dstats[Global.dparty[Global.dcpchar][0]][0] = 0
else:
Global.dstats[Global.party[Global.cpchar][0]][0] -= attack
elif body.is_in_group("boss") || body.is_in_group("enemies"):
if Global.cstats[Global.party[Global.cpchar][0]][0] > attack:
Global.cstats[Global.party[Global.cpchar][0]][0] -= attack
else:
Global.cstats[Global.party[Global.cpchar][0]][0] = 0
elif body.is_in_group("boss") && Global.dificulty != 1:
if body.weakness == 0:
print("weakness")
elif body.is_in_group("enemies") && Global.dificulty != 1:
if body.weakness == 0:
print("weakness")
#if body.is_in_group("players"):

View file

@ -15,6 +15,7 @@ var attack = 59
var crit = 5
func _ready():
if Global.isboss:
Global.cboss = ["Kimberly Arch",0,0]

View file

@ -85,22 +85,22 @@ func _input(event):
func _charinit():
if Global.debug:
speed = Global.basestats[Global.dparty[Global.dcpchar][0]][6]
speed = Global.mstats[Global.dparty[Global.dcpchar][0]][6]
#print(Global.dparty[Global.dcpchar][0])
#print(speed)
else:
speed = Global.basestats[Global.party[Global.cpchar][0]][6]
speed = Global.mstats[Global.party[Global.cpchar][0]][6]
#print(Global.dparty[Global.cpchar][0])
#print(speed)
_charswitch()
func _charswitch():
if Global.debug:
if csprite != null && speed!=Global.basestats[Global.dparty[csprite][0]][6]:
if csprite != null && speed!=Global.mstats[Global.dparty[csprite][0]][6]:
print("Script Kiddie")
speed = Global.dparty/800
speed = Global.dparty/0
else:
speed = Global.basestats[Global.dparty[Global.dcpchar][0]][6]
speed = Global.mstats[Global.dparty[Global.dcpchar][0]][6]
if Global.dcpchar != csprite:
csprite = Global.dcpchar
sprite.texture = load(Global.pchars[Global.dparty[Global.dcpchar][0]][Global.dparty[Global.dcpchar][1]])
@ -108,11 +108,11 @@ func _charswitch():
print(Global.dparty[Global.dcpchar][0])
print(speed)
else:
if csprite != null && speed!=Global.basestats[Global.party[Global.cpchar][0]][6]:
if csprite != null && speed!=Global.mstats[Global.party[Global.cpchar][0]][6]:
print("Script Kiddie")
speed = Global.party/800
speed = Global.party/0
else:
speed = Global.basestats[Global.party[Global.dcpchar][0]][6]
speed = Global.mstats[Global.party[Global.dcpchar][0]][6]
if Global.cpchar != csprite:
csprite = Global.cpchar
sprite.texture = load(Global.pchars[Global.party[Global.cpchar][0]][Global.party[Global.cpchar][1]])