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"):