Added decent remix system

This commit is contained in:
2025-08-23 20:27:22 +10:00
parent 57a57d2b91
commit 16c92a4903
68 changed files with 885 additions and 678 deletions

View File

@@ -0,0 +1,6 @@
class_name ExtendedBarrelFeature
extends Feature
func attach_to_tower(tower_stats: CardText) -> void:
tower_stats.set_attribute("Range", tower_stats.get_attribute("Range") * (1.0 + (strength / 100.0)))

View File

@@ -0,0 +1 @@
uid://dwff1058vp6af

View File

@@ -0,0 +1,12 @@
[gd_resource type="Resource" script_class="ExtendedBarrelFeature" load_steps=3 format=3 uid="uid://bij61ul87ka0r"]
[ext_resource type="Script" uid="uid://dwff1058vp6af" path="res://Scripts/Features/ExtendedBarrel/extended_barrel.gd" id="1_5j68e"]
[ext_resource type="Texture2D" uid="uid://dixdtcy64v4s0" path="res://Scripts/Features/ExtendedBarrel/extended_barrel_icon.png" id="1_grhjs"]
[resource]
script = ExtResource("1_5j68e")
display_name = "FEATURE_NAME_EXTENDED_BARREL"
description = "FEATURE_DESC_EXTENDED_BARREL"
icon = ExtResource("1_grhjs")
strength = 30.0
metadata/_custom_type_script = "uid://dwff1058vp6af"

Binary file not shown.

After

Width:  |  Height:  |  Size: 728 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dixdtcy64v4s0"
path="res://.godot/imported/extended_barrel_icon.png-1c0812e89e02473dd1787f3bd00ca247.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Scripts/Features/ExtendedBarrel/extended_barrel_icon.png"
dest_files=["res://.godot/imported/extended_barrel_icon.png-1c0812e89e02473dd1787f3bd00ca247.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 816 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dykfm5ad0mxfw"
path="res://.godot/imported/HeavyRounds_icon.png-ce2bc40148089de1cb95a58f0513c8cb.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Scripts/Features/HeavyRounds/HeavyRounds_icon.png"
dest_files=["res://.godot/imported/HeavyRounds_icon.png-ce2bc40148089de1cb95a58f0513c8cb.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@@ -0,0 +1,10 @@
class_name HeavyRoundsFeature
extends Feature
func attach_to_tower(tower_stats: CardText) -> void:
tower_stats.set_attribute("Damage", tower_stats.get_attribute("Damage") * (1.0 + (strength / 100.0)))
func attach_to_weapon(weapon_stats: CardText) -> void:
weapon_stats.set_attribute("Damage", weapon_stats.get_attribute("Damage") * (1.0 + (strength / 100.0)))

View File

@@ -0,0 +1 @@
uid://uabrepvb5cur

View File

@@ -0,0 +1,12 @@
[gd_resource type="Resource" script_class="HeavyRoundsFeature" load_steps=3 format=3 uid="uid://dfup264h2pun7"]
[ext_resource type="Texture2D" uid="uid://dykfm5ad0mxfw" path="res://Scripts/Features/HeavyRounds/HeavyRounds_icon.png" id="1_drp05"]
[ext_resource type="Script" uid="uid://uabrepvb5cur" path="res://Scripts/Features/HeavyRounds/heavy_rounds.gd" id="1_hyapt"]
[resource]
script = ExtResource("1_hyapt")
display_name = "FEATURE_NAME_HEAVY_ROUNDS"
description = "FEATURE_DESC_HEAVY_ROUNDS"
icon = ExtResource("1_drp05")
strength = 15.0
metadata/_custom_type_script = "uid://uabrepvb5cur"

View File

@@ -0,0 +1,6 @@
class_name RadarFeature
extends Feature
func attach_to_tower(tower_stats: CardText) -> void:
tower_stats.target_type.append(Data.TargetType.AIR)

View File

@@ -0,0 +1 @@
uid://b8tigm0aru8nu

View File

@@ -0,0 +1,11 @@
[gd_resource type="Resource" script_class="RadarFeature" load_steps=3 format=3 uid="uid://nh7g23b3rnvr"]
[ext_resource type="Texture2D" uid="uid://cps7onfe2s1gi" path="res://Scripts/Features/Radar/radar_icon.png" id="1_tw681"]
[ext_resource type="Script" uid="uid://b8tigm0aru8nu" path="res://Scripts/Features/Radar/radar.gd" id="2_f4mox"]
[resource]
script = ExtResource("2_f4mox")
display_name = "FEATURE_NAME_RADAR"
description = "FEATURE_DESC_RADAR"
icon = ExtResource("1_tw681")
metadata/_custom_type_script = "uid://b8tigm0aru8nu"

Binary file not shown.

After

Width:  |  Height:  |  Size: 802 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cps7onfe2s1gi"
path="res://.godot/imported/radar_icon.png-3ea7bb6ea2b253a4a5535d5dd7d1158e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Scripts/Features/Radar/radar_icon.png"
dest_files=["res://.godot/imported/radar_icon.png-3ea7bb6ea2b253a4a5535d5dd7d1158e.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@@ -3,12 +3,30 @@ extends Resource
@export var target_type: Array[Data.TargetType]
@export var energy_type: Data.EnergyType
@export var attributes: Array[StatAttribute]
@export var attributes: Dictionary[String, float]
@export var features: Array[Feature]
@export_multiline var text: String
func get_attribute(attribute: String) -> float:
for stat: StatAttribute in attributes:
if stat.key == attribute:
return stat.value
if attributes.has(attribute):
return attributes[attribute]
return 0.0
func set_attribute(attribute: String, value: float) -> void:
attributes[attribute] = value
func tower_features_applied() -> CardText:
var card_text: CardText = self.duplicate()
for feature: Feature in features:
feature.attach_to_tower(card_text)
return card_text
func weapon_features_applied() -> CardText:
var card_text: CardText = self.duplicate()
for feature: Feature in features:
feature.attach_to_weapon(card_text)
return card_text

View File

@@ -0,0 +1,15 @@
class_name Feature
extends Resource
@export var display_name: String
@export var description: String
@export var icon: Texture2D
@export var strength: float
func attach_to_tower(tower_stats: CardText) -> void:
pass
func attach_to_weapon(weapon_stats: CardText) -> void:
pass

View File

@@ -0,0 +1 @@
uid://bsuinotkvh7eu

View File

@@ -20,8 +20,8 @@ func set_card(value: Card) -> void:
func process_card_text(card_text: CardText) -> String:
var processed_string: String = card_text.text
for stat: StatAttribute in card_text.attributes:
processed_string = processed_string.replace(stat.key, str(stat.value))
for key: String in card_text.attributes:
processed_string = processed_string.replace(key, str(card_text.attributes[key]))
processed_string = processed_string.replace("%", "")
return processed_string

View File

@@ -19,6 +19,11 @@ 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 target_type_names: Dictionary[TargetType, String] = {
TargetType.LAND : "TARGET_TYPE_LAND",
TargetType.AIR : "TARGET_TYPE_AIR",
}
static var weapon_recharge_delay: float = 0.5
static var starting_cash: int = 10
static var player_energy: int = 6

View File

@@ -30,6 +30,7 @@ var wave_limit: int = 20
var shop_chance: float = 0.0
var stats: RoundStats
var card_gameplay: bool = false
var starting_blanks: int = 10
#TODO: Create a reference to some generic Lobby object that wraps the multiplayer players list stuff
@@ -126,6 +127,7 @@ func spawn_players() -> void:
player.game_manager = self
player.edit_tool.level = level
player.hud.map_anchor = level
player.blank_cassettes += starting_blanks
player.player_name_tag.text = connected_player_profiles[peer_id].display_name
player.position = level.player_spawns[p_i].global_position
player.profile = connected_player_profiles[peer_id]