oh fuck im gonna have to learn to clean up previous commits

This commit is contained in:
2025-07-18 23:14:51 +10:00
parent a6c503b8ff
commit 4a26cf0ddb
54 changed files with 1066 additions and 163 deletions

View File

@@ -14,3 +14,4 @@ enum Faction {
@export var weapon_scene: PackedScene
@export var weapon_stats: CardText
@export var tower_stats: CardText
@export var tags: Array[Data.CardTags]

View File

@@ -11,7 +11,7 @@ func _ready() -> void:
super._ready()
attack_range = stats.get_attribute("Range")
raycast.target_position = Vector3(0, 0, -attack_range)
range_debug_indicator.radius = attack_range
#range_debug_indicator.radius = attack_range
raycast.global_position = hero.camera.global_position

View File

@@ -87,7 +87,7 @@ func release_second_trigger() -> void:
func shoot() -> void:
animator.play("shoot")
#animator.play("shoot")
audio_player.play()
recharging = false
recharge_speed = 0.0

View File

@@ -16,15 +16,15 @@ func set_card(value: Card) -> void:
target_label.text = str(Data.TargetType.keys()[stats.tower_stats.target_type])
rarity_sprite.region_rect = Rect2(64 * stats.rarity, 0, 64, 64)
if stats.rarity == Data.Rarity.COMMON:
energy_cost.text = "1"
if stats.rarity == Data.Rarity.UNCOMMON:
energy_cost.text = "2"
if stats.rarity == Data.Rarity.RARE:
energy_cost.text = "3"
if stats.rarity == Data.Rarity.EPIC:
if stats.rarity == Data.Rarity.UNCOMMON:
energy_cost.text = "4"
if stats.rarity == Data.Rarity.RARE:
energy_cost.text = "6"
if stats.rarity == Data.Rarity.EPIC:
energy_cost.text = "8"
if stats.rarity == Data.Rarity.LEGENDARY:
energy_cost.text = "5"
energy_cost.text = "10"
duration.text = str(value.duration)

View File

@@ -6,20 +6,14 @@ signal pressed(card_item: CardItem)
@export var outline_mesh: MeshInstance3D
@export var card_ui: CardInHand
var card: Card = null
var rarity_colors: Array[Color] = [
Color8(255, 255, 255),
Color8(50, 204, 36),
Color8(36, 59, 204),
Color8(181, 36, 204),
Color8(225, 112, 30)
]
func set_card(new_card: Card) -> void:
card = new_card
card_ui.set_card(card)
card_ui.view_tower()
outline_mesh.get_surface_override_material(0).albedo_color = rarity_colors[card.rarity]
outline_mesh.get_surface_override_material(0).albedo_color = Data.rarity_colors[card.rarity]
#print(rarity_colors[card.rarity])

View File

@@ -17,6 +17,7 @@ enum EnergyType {UNDEFINED = 0, DISCRETE = 1, CONTINUOUS = 2}
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}
enum CardTags {DAMAGE = 0, UTILITY = 1, TARGETS_FLYING = 2}
static var starting_cash: int = 10
static var wall_cost: int = 1
@@ -26,8 +27,15 @@ static var rarity_weights: Dictionary = {
"UNCOMMON" = 30,
"RARE" = 10,
"EPIC" = 4,
"LEGENDARY" = 1
"LEGENDARY" = 1,
}
static var rarity_colors: Array[Color] = [
Color8(255, 255, 255),
Color8(50, 204, 36),
Color8(36, 59, 204),
Color8(181, 36, 204),
Color8(225, 112, 30),
]
## Recursively searches a folder for any Card resources and loads them

View File

@@ -248,7 +248,7 @@ func end_wave() -> void:
for peer_id: int in connected_players_nodes:
var player: Hero = connected_players_nodes[peer_id] as Hero
player.currency += ceili(pot / connected_players_nodes.size())
player.energy = 8
player.energy = 12
player.iterate_duration()
player.draw_to_hand_size()
player.unready_self()
@@ -318,7 +318,7 @@ func start() -> void:
spawn_players()
for peer_id: int in connected_players_nodes:
connected_players_nodes[peer_id].currency = ceili(float(Data.starting_cash) / float(connected_players_nodes.size()))
connected_players_nodes[peer_id].energy = 8
connected_players_nodes[peer_id].energy = 12
connected_players_nodes[peer_id].draw_pile.shuffle()
connected_players_nodes[peer_id].draw_to_hand_size()

View File

@@ -24,8 +24,8 @@ func add(item: Item) -> bool:
func item_at(index: int) -> Item:
#if size == 0:
#return null
if size == 0:
return null
var item: Item = contents[index]
return item