elemental boost
This commit is contained in:
parent
1c9ab2e2c5
commit
a02d002585
7 changed files with 42 additions and 5 deletions
|
@ -58,6 +58,7 @@ var quest = [0, 0, 0, 0, 0, 0]
|
|||
var isresume = false
|
||||
var xm = 0
|
||||
var ym = 0
|
||||
var spboost = 0
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
|
|
@ -54,6 +54,7 @@ var boss
|
|||
var bossbg
|
||||
var ctime
|
||||
var ctimeset
|
||||
var buffcalc
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
|
@ -132,6 +133,26 @@ func _process(delta):
|
|||
ctimeset = Time.get_time_string_from_system(false)
|
||||
ctimeset.erase(5, 3)
|
||||
ctime.set_text(ctimeset)
|
||||
ctimeset.erase(2, 3)
|
||||
buffcalc = int(ctimeset)
|
||||
if buffcalc < 6 && buffcalc >= 20:
|
||||
#print("water")
|
||||
Global.spboost = 0
|
||||
elif buffcalc < 14 && buffcalc >= 12:
|
||||
#print("fire")
|
||||
Global.spboost = 1
|
||||
elif buffcalc < 20 && buffcalc >= 18:
|
||||
#print("electricity")
|
||||
Global.spboost = 2
|
||||
elif buffcalc < 10 && buffcalc >= 6:
|
||||
#print("wood")
|
||||
Global.spboost = 3
|
||||
elif buffcalc < 12 && buffcalc >= 10:
|
||||
#print("earth")
|
||||
Global.spboost = 4
|
||||
elif buffcalc < 18 && buffcalc >= 14:
|
||||
#print("wind")
|
||||
Global.spboost = 5
|
||||
if Global.debug:
|
||||
chealthf.set_text(str(Global.dstats[Global.dparty[Global.dcpchar][0]][0])+"/"+str(Global.mstats[Global.dparty[Global.dcpchar][0]][0]))
|
||||
cstaminaf.set_text(str(Global.dstats[Global.dparty[Global.dcpchar][0]][1])+"/"+str(Global.mstats[Global.dparty[Global.dcpchar][0]][1]))
|
||||
|
|
|
@ -18,6 +18,9 @@ func _ready():
|
|||
if is_in_group("players"):
|
||||
speciality = Global.pcspecialities[Global.dparty[Global.dcpchar][0]]
|
||||
add_to_group(btype)
|
||||
if Global.spboost == speciality:
|
||||
attack = (attack*attack) * Global.difdamage
|
||||
else:
|
||||
attack = attack * Global.difdamage
|
||||
#pass # Replace with function body.
|
||||
|
||||
|
|
|
@ -18,6 +18,9 @@ func _ready():
|
|||
rotation = velocity.angle()
|
||||
else:
|
||||
rotation = direction.angle()
|
||||
if Global.spboost == speciality:
|
||||
attack = (attack*attack) * Global.difdamage
|
||||
else:
|
||||
attack = attack * Global.difdamage
|
||||
#pass # Replace with function body.
|
||||
|
||||
|
|
|
@ -12,6 +12,9 @@ var isjump = false
|
|||
func _ready():
|
||||
isvisible = $VisibleOnScreenNotifier2D
|
||||
add_to_group(btype)
|
||||
if Global.spboost == 1:
|
||||
attack = (attack*attack) * Global.difdamage
|
||||
else:
|
||||
attack = attack * Global.difdamage
|
||||
#pass # Replace with function body.
|
||||
|
||||
|
|
|
@ -12,6 +12,9 @@ var isjump = false
|
|||
func _ready():
|
||||
isvisible = $VisibleOnScreenNotifier2D
|
||||
add_to_group(btype)
|
||||
if Global.spboost == 0:
|
||||
attack = (attack*attack) * Global.difdamage
|
||||
else:
|
||||
attack = attack * Global.difdamage
|
||||
#pass # Replace with function body.
|
||||
|
||||
|
|
|
@ -12,6 +12,9 @@ var isjump = false
|
|||
func _ready():
|
||||
isvisible = $VisibleOnScreenNotifier2D
|
||||
add_to_group(btype)
|
||||
if Global.spboost == 1:
|
||||
attack = (attack*attack) * Global.difdamage
|
||||
else:
|
||||
attack = attack * Global.difdamage
|
||||
#pass # Replace with function body.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue