2023-11-08 14:28:55 +11:00
|
|
|
extends Node
|
|
|
|
|
|
|
|
var characters : Array[HeroClass]
|
|
|
|
var cards : Array[Card]
|
|
|
|
var enemies : Array[Enemy]
|
|
|
|
var keymaps : Array[PlayerKeymap]
|
2023-11-17 20:49:38 +11:00
|
|
|
var graphics : PlayerGraphicsSettings
|
2023-11-08 14:28:55 +11:00
|
|
|
var preferences : PlayerPreferences
|
|
|
|
var player_profile : PlayerProfile
|
|
|
|
var player_keymap : PlayerKeymap
|
|
|
|
|
2023-11-19 18:47:52 +11:00
|
|
|
var wall_cost := 1
|
|
|
|
var printer_cost := 20
|
2023-11-15 15:19:40 +11:00
|
|
|
enum TargetType {UNDEFINED = 0, LAND = 1, AIR = 2, BOTH = 3}
|
|
|
|
enum EnemyType {UNDEFINED = 0, LAND = 1, AIR = 2}
|
|
|
|
enum Rarity {COMMON = 0, UNCOMMON = 1, RARE = 2, EPIC = 3, LEGENDARY = 4}
|
2023-11-08 14:28:55 +11:00
|
|
|
var rarity_weights = {
|
2023-11-11 19:03:01 +11:00
|
|
|
"COMMON" = 50,
|
|
|
|
"UNCOMMON" = 30,
|
|
|
|
"RARE" = 10,
|
|
|
|
"EPIC" = 4,
|
2023-11-08 14:28:55 +11:00
|
|
|
"LEGENDARY" = 1
|
|
|
|
}
|
|
|
|
|
|
|
|
func _ready() -> void:
|
2023-11-17 20:49:38 +11:00
|
|
|
graphics = PlayerGraphicsSettings.load_profile_from_disk()
|
|
|
|
graphics.apply_graphical_settings(get_viewport())
|
2023-11-08 14:28:55 +11:00
|
|
|
player_profile = PlayerProfile.load_profile_from_disk()
|
|
|
|
preferences = PlayerPreferences.load_profile_from_disk()
|
|
|
|
player_keymap = PlayerKeymap.load_profile_from_disk()
|
|
|
|
player_keymap.apply()
|
|
|
|
|
|
|
|
characters.append(preload("res://PCs/Red/red.tres"))
|
|
|
|
characters.append(preload("res://PCs/Green/green.tres"))
|
|
|
|
characters.append(preload("res://PCs/Blue/blue.tres"))
|
|
|
|
|
2023-11-15 15:19:40 +11:00
|
|
|
#Common
|
2023-11-08 14:28:55 +11:00
|
|
|
cards.append(preload("res://PCs/Universal/ClassCards/Assault/card_assault.tres"))
|
2023-11-15 15:19:40 +11:00
|
|
|
cards.append(preload("res://PCs/Universal/ClassCards/BombLauncher/card_bomb_launcher.tres"))
|
2023-11-08 14:28:55 +11:00
|
|
|
cards.append(preload("res://PCs/Universal/ClassCards/Gatling/card_gatling.tres"))
|
|
|
|
cards.append(preload("res://PCs/Universal/ClassCards/RocketLauncher/card_rocket_launcher.tres"))
|
2023-11-15 15:19:40 +11:00
|
|
|
#Uncommon
|
2023-11-27 13:52:46 +11:00
|
|
|
cards.append(preload("res://PCs/Universal/ClassCards/Sniper/card_sniper.tres"))
|
2023-11-16 00:07:41 +11:00
|
|
|
cards.append(preload("res://PCs/Universal/ClassCards/Blowdart/card_blowdart.tres"))
|
2023-11-17 20:49:38 +11:00
|
|
|
cards.append(preload("res://PCs/Universal/ClassCards/Refrigerator/card_refrigerator.tres"))
|
2023-11-16 00:07:41 +11:00
|
|
|
cards.append(preload("res://PCs/Universal/ClassCards/GlueLauncher/card_glue_launcher.tres"))
|
2023-11-15 15:19:40 +11:00
|
|
|
#Rare
|
2023-11-17 20:49:38 +11:00
|
|
|
cards.append(preload("res://PCs/Universal/ClassCards/Flamethrower/card_flamethrower.tres"))
|
2023-11-15 15:19:40 +11:00
|
|
|
#cards.append(preload("res://PCs/Universal/ClassCards/DamageEnhancer/card_damage_enhancer.tres"))
|
|
|
|
#cards.append(preload("res://PCs/Universal/ClassCards/SpeedEnhancer/card_speed_enhancer.tres"))
|
|
|
|
#Epic
|
2023-11-16 00:07:41 +11:00
|
|
|
cards.append(preload("res://PCs/Universal/ClassCards/Icicle/card_icicle.tres"))
|
|
|
|
cards.append(preload("res://PCs/Universal/ClassCards/Fireball/card_fireball.tres"))
|
2023-11-15 15:19:40 +11:00
|
|
|
#cards.append(preload("res://PCs/Universal/ClassCards/GammaLaser/card_gamma_laser.tres"))
|
|
|
|
#Legendary
|
2023-11-17 20:49:38 +11:00
|
|
|
cards.append(preload("res://PCs/Universal/ClassCards/Reactor/card_reactor.tres"))
|
2023-11-15 15:19:40 +11:00
|
|
|
#cards.append(preload("res://PCs/Universal/ClassCards/Lightning/card_lightning.tres"))
|
2023-11-08 14:28:55 +11:00
|
|
|
|
|
|
|
enemies.append(preload("res://Worlds/GreenPlanet/Enemies/dog.tres"))
|
|
|
|
enemies.append(preload("res://Worlds/GreenPlanet/Enemies/dog_fast.tres"))
|
|
|
|
enemies.append(preload("res://Worlds/GreenPlanet/Enemies/dog_heavy.tres"))
|
|
|
|
enemies.append(preload("res://Worlds/GreenPlanet/Enemies/dog_boss.tres"))
|
|
|
|
enemies.append(preload("res://Worlds/GreenPlanet/Enemies/airenemy.tres"))
|
|
|
|
enemies.append(preload("res://Worlds/GreenPlanet/Enemies/airenemy2.tres"))
|
|
|
|
|
|
|
|
keymaps.append(preload("res://Resources/Keymaps/qwerty.tres"))
|
|
|
|
keymaps.append(preload("res://Resources/Keymaps/azerty.tres"))
|
|
|
|
keymaps.append(preload("res://Resources/Keymaps/dvorak.tres"))
|
|
|
|
keymaps.append(preload("res://Resources/Keymaps/colemak.tres"))
|
|
|
|
keymaps.append(preload("res://Resources/Keymaps/workman.tres"))
|