2024-10-18 09:39:14 -06:00
|
|
|
# file containing type information to be referrenced by other classes
|
|
|
|
extends Node
|
|
|
|
|
2024-10-21 06:44:52 -06:00
|
|
|
|
2024-10-22 14:11:05 -06:00
|
|
|
var debugSpeedEnabled : bool
|
|
|
|
|
2024-10-18 11:25:29 -06:00
|
|
|
class World:
|
2024-10-20 16:44:08 -06:00
|
|
|
enum Zone {
|
2024-10-18 11:25:29 -06:00
|
|
|
TUTORIAL,
|
|
|
|
}
|
2024-10-20 16:44:08 -06:00
|
|
|
enum AreaType {
|
2024-10-18 11:25:29 -06:00
|
|
|
PEACEFUL,
|
|
|
|
URBAN,
|
|
|
|
WILDS,
|
|
|
|
DEEP_WILDS,
|
|
|
|
DUNGEON,
|
|
|
|
}
|
2024-10-20 16:44:08 -06:00
|
|
|
enum Faction {
|
|
|
|
CREATURE,
|
|
|
|
MONSTER,
|
|
|
|
}
|
2024-10-18 09:39:14 -06:00
|
|
|
|
|
|
|
class Ability:
|
2024-10-20 16:44:08 -06:00
|
|
|
enum PDamageType {
|
2024-10-18 09:39:14 -06:00
|
|
|
SLICE,
|
|
|
|
PUNCTURE,
|
|
|
|
BASH,
|
|
|
|
HACK,
|
|
|
|
SHRED,
|
|
|
|
}
|
2024-10-20 16:44:08 -06:00
|
|
|
enum MDamageType {
|
2024-10-18 09:39:14 -06:00
|
|
|
BURN,
|
|
|
|
FREEZE,
|
|
|
|
SHOCK,
|
|
|
|
POISON,
|
|
|
|
LIFE,
|
|
|
|
MENTAL,
|
|
|
|
RADIANT,
|
|
|
|
ARCANE,
|
|
|
|
FORCE
|
|
|
|
}
|
2024-10-20 16:44:08 -06:00
|
|
|
enum StatusModType {
|
2024-10-18 09:39:14 -06:00
|
|
|
STUN,
|
|
|
|
SLOW,
|
|
|
|
ABSORB,
|
|
|
|
SHIELD,
|
2024-10-20 16:44:08 -06:00
|
|
|
DOT,
|
2024-10-18 09:39:14 -06:00
|
|
|
DOTB,
|
|
|
|
DOTE
|
|
|
|
}
|
2024-10-21 11:22:38 -06:00
|
|
|
|
2024-10-23 20:58:44 -06:00
|
|
|
class Weapon:
|
|
|
|
enum WeaponType {
|
|
|
|
SWORD,
|
|
|
|
BOW,
|
|
|
|
}
|
|
|
|
|
2024-10-22 12:11:56 -06:00
|
|
|
func debug_print(value: String) -> void:
|
2024-10-21 11:22:38 -06:00
|
|
|
if OS.is_debug_build():
|
2024-10-21 13:09:51 -06:00
|
|
|
print(value)
|
2024-10-22 14:11:05 -06:00
|
|
|
|
|
|
|
|
|
|
|
func fade_node(node: Node, direction: String, duration: float) -> void:
|
|
|
|
var modulation_step = 1.0 / (100 * duration)
|
|
|
|
match direction:
|
|
|
|
"in":
|
|
|
|
node.modulate.a = 0
|
|
|
|
node.show()
|
|
|
|
while node.modulate.a < 1:
|
|
|
|
await get_tree().create_timer(0.01).timeout
|
|
|
|
node.modulate.a += modulation_step
|
|
|
|
"out":
|
|
|
|
node.modulate.a = 1
|
|
|
|
while node.modulate.a > 0:
|
|
|
|
await get_tree().create_timer(0.01).timeout
|
|
|
|
node.modulate.a -= modulation_step
|
|
|
|
node.hide()
|
|
|
|
_:
|
|
|
|
print("Unknown fade direction")
|
|
|
|
|
|
|
|
|
|
|
|
func _input(event: InputEvent) -> void:
|
2024-10-22 18:55:47 -06:00
|
|
|
if OS.is_debug_build():
|
|
|
|
if event.is_action_pressed("game_speed_fast"):
|
|
|
|
Engine.time_scale = 10.0
|
|
|
|
if event.is_action_pressed("game_speed_normal"):
|
|
|
|
Engine.time_scale = 1.0
|