inching towards better class inheritence and multiplayer compatibility

This commit is contained in:
Lexi Quinn 2023-11-15 15:19:40 +11:00
parent f004f64b71
commit 1500c22ccc
204 changed files with 1920 additions and 1951 deletions

View File

@ -1,7 +0,0 @@
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://d1am28tgvwaa0"]
[ext_resource type="Texture2D" uid="uid://cx5cwn11fuugq" path="res://Assets/Textures/accelerator.png" id="1_e3hoc"]
[resource]
atlas = ExtResource("1_e3hoc")
region = Rect2(0, 0, 64, 64)

View File

@ -1,7 +0,0 @@
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://ca4lwwd3e0y73"]
[ext_resource type="Texture2D" uid="uid://celay30i4soud" path="res://Assets/Textures/g_assault.png" id="1_5fof3"]
[resource]
atlas = ExtResource("1_5fof3")
region = Rect2(0, 0, 64, 64)

View File

@ -1,7 +0,0 @@
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://jmxhiwsiw1f5"]
[ext_resource type="Texture2D" uid="uid://oblavj8vj30n" path="res://Assets/Textures/glue_gun.png" id="1_2wjjm"]
[resource]
atlas = ExtResource("1_2wjjm")
region = Rect2(0, 0, 64, 64)

View File

@ -1,7 +0,0 @@
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://bwufgga1pjyt"]
[ext_resource type="Texture2D" uid="uid://3qcdx7n440sc" path="res://Assets/Textures/grenade_launcher.png" id="1_qc0g6"]
[resource]
atlas = ExtResource("1_qc0g6")
region = Rect2(0, 0, 64, 64)

View File

@ -1,7 +0,0 @@
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://clr6kfyci5jqb"]
[ext_resource type="Texture2D" uid="uid://by1y15lm0bppe" path="res://Assets/Textures/rocket_launcher.png" id="1_0bxom"]
[resource]
atlas = ExtResource("1_0bxom")
region = Rect2(0, 0, 64, 64)

View File

@ -1,7 +0,0 @@
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://fmqq24n7rwvm"]
[ext_resource type="Texture2D" uid="uid://cv2eycs1j0ho7" path="res://Assets/Textures/g_sniper.png" id="1_weegr"]
[resource]
atlas = ExtResource("1_weegr")
region = Rect2(0, 0, 64, 64)

View File

@ -1,8 +0,0 @@
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://d060ag2vw7dp1"]
[ext_resource type="Texture2D" uid="uid://ctjktwiq2fcjm" path="res://Assets/Textures/gun.png" id="1_m5tps"]
[resource]
resource_local_to_scene = true
atlas = ExtResource("1_m5tps")
region = Rect2(0, 0, 64, 64)

View File

@ -1,6 +1,6 @@
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://bgeu8dnqaxq7v"]
[ext_resource type="Texture2D" uid="uid://cc2umukpibmx1" path="res://Assets/Textures/target_list.png" id="1_s0pjb"]
[ext_resource type="Texture2D" uid="uid://cc2umukpibmx1" path="res://PCs/Universal/ClassCards/RocketLauncher/target_list.png" id="1_s0pjb"]
[resource]
atlas = ExtResource("1_s0pjb")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1,9 +1,9 @@
[gd_resource type="Resource" script_class="HeroClass" load_steps=5 format=3 uid="uid://dxonpv8qbyrjy"]
[ext_resource type="Script" path="res://Scripts/Resources/hero_class.gd" id="1_aeu85"]
[ext_resource type="Resource" uid="uid://dh5fjnbp8auw1" path="res://PCs/Universal/ClassCards/RocketLauncher/card_rocket_launcher.tres" id="1_uvyoy"]
[ext_resource type="Resource" uid="uid://bmoreipvttks8" path="res://PCs/Universal/ClassCards/Assault/card_assault.tres" id="2_3yr5a"]
[ext_resource type="Resource" uid="uid://cvf5bxtu6er17" path="res://PCs/Universal/ClassCards/Sniper/card_sniper.tres" id="3_wyb0n"]
[ext_resource type="Resource" uid="uid://b37r54q84vqoi" path="res://PCs/Universal/ClassCards/RocketLauncher/card_rocket_launcher.tres" id="1_uvyoy"]
[ext_resource type="Resource" uid="uid://deer0awg4d18o" path="res://PCs/Universal/ClassCards/Assault/card_assault.tres" id="2_3yr5a"]
[ext_resource type="Resource" uid="uid://ckm88acryitl4" path="res://PCs/Universal/ClassCards/Sniper/card_sniper.tres" id="3_wyb0n"]
[resource]
script = ExtResource("1_aeu85")

View File

@ -1,13 +1,13 @@
[gd_resource type="Resource" script_class="HeroClass" load_steps=6 format=3 uid="uid://ogbkbf1v7j7l"]
[ext_resource type="Script" path="res://Scripts/Resources/hero_class.gd" id="1_cpfpk"]
[ext_resource type="Resource" uid="uid://cvf5bxtu6er17" path="res://PCs/Universal/ClassCards/Sniper/card_sniper.tres" id="1_hv6hq"]
[ext_resource type="Resource" uid="uid://ckm88acryitl4" path="res://PCs/Universal/ClassCards/Sniper/card_sniper.tres" id="1_hv6hq"]
[ext_resource type="Texture2D" uid="uid://bgt3j4cuq814m" path="res://Assets/TextureAtlases/green.tres" id="2_4p73e"]
[ext_resource type="Resource" uid="uid://dh5fjnbp8auw1" path="res://PCs/Universal/ClassCards/RocketLauncher/card_rocket_launcher.tres" id="2_jdi4m"]
[ext_resource type="Resource" uid="uid://bmoreipvttks8" path="res://PCs/Universal/ClassCards/Assault/card_assault.tres" id="3_f04lj"]
[ext_resource type="Resource" uid="uid://b37r54q84vqoi" path="res://PCs/Universal/ClassCards/RocketLauncher/card_rocket_launcher.tres" id="2_jdi4m"]
[ext_resource type="Resource" uid="uid://deer0awg4d18o" path="res://PCs/Universal/ClassCards/Assault/card_assault.tres" id="3_f04lj"]
[resource]
script = ExtResource("1_cpfpk")
hero_name = "Green"
texture = ExtResource("2_4p73e")
deck = Array[Resource("res://Scripts/Resources/card.gd")]([ExtResource("1_hv6hq"), ExtResource("2_jdi4m"), ExtResource("3_f04lj")])
deck = Array[Resource("res://Scripts/Resources/card.gd")]([ExtResource("3_f04lj"), ExtResource("1_hv6hq"), ExtResource("2_jdi4m")])

View File

@ -1,13 +1,13 @@
[gd_resource type="Resource" script_class="HeroClass" load_steps=6 format=3 uid="uid://b5pc3frhx467q"]
[ext_resource type="Script" path="res://Scripts/Resources/hero_class.gd" id="1_1wkap"]
[ext_resource type="Resource" uid="uid://bmoreipvttks8" path="res://PCs/Universal/ClassCards/Assault/card_assault.tres" id="1_iiksa"]
[ext_resource type="Resource" uid="uid://cvf5bxtu6er17" path="res://PCs/Universal/ClassCards/Sniper/card_sniper.tres" id="2_hkiwr"]
[ext_resource type="Resource" uid="uid://deer0awg4d18o" path="res://PCs/Universal/ClassCards/Assault/card_assault.tres" id="1_iiksa"]
[ext_resource type="Resource" uid="uid://ckm88acryitl4" path="res://PCs/Universal/ClassCards/Sniper/card_sniper.tres" id="2_hkiwr"]
[ext_resource type="Texture2D" uid="uid://hxev3a2ktya" path="res://Assets/TextureAtlases/red.tres" id="2_kjc7g"]
[ext_resource type="Resource" uid="uid://dh5fjnbp8auw1" path="res://PCs/Universal/ClassCards/RocketLauncher/card_rocket_launcher.tres" id="3_ruhqi"]
[ext_resource type="Resource" uid="uid://b37r54q84vqoi" path="res://PCs/Universal/ClassCards/RocketLauncher/card_rocket_launcher.tres" id="3_ruhqi"]
[resource]
script = ExtResource("1_1wkap")
hero_name = "Red"
texture = ExtResource("2_kjc7g")
deck = Array[Resource("res://Scripts/Resources/card.gd")]([ExtResource("1_iiksa"), ExtResource("2_hkiwr"), ExtResource("3_ruhqi")])
deck = Array[Resource("res://Scripts/Resources/card.gd")]([ExtResource("2_hkiwr"), ExtResource("3_ruhqi"), ExtResource("1_iiksa")])

View File

@ -1,19 +1,23 @@
[gd_resource type="Resource" script_class="Card" load_steps=7 format=3 uid="uid://bmoreipvttks8"]
[gd_resource type="Resource" script_class="Card" load_steps=8 format=3 uid="uid://deer0awg4d18o"]
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_yqa4b"]
[ext_resource type="Texture2D" uid="uid://ca4lwwd3e0y73" path="res://Assets/TextureAtlases/g_assault.tres" id="2_8j5h0"]
[ext_resource type="PackedScene" uid="uid://fernyl7fsifv" path="res://PCs/Universal/ClassCards/Assault/tower_assault.tscn" id="3_0r6s7"]
[ext_resource type="Resource" uid="uid://w15ojqyxd72q" path="res://Resources/WeaponStats/assault.tres" id="3_k2yr3"]
[ext_resource type="Resource" uid="uid://cktq4o3yuxgsa" path="res://Resources/TurretStats/assault.tres" id="3_p4byc"]
[ext_resource type="PackedScene" uid="uid://d1xe6hsq05110" path="res://PCs/Universal/ClassCards/Assault/weapon_assault.tscn" id="3_wj5gm"]
[ext_resource type="Texture2D" uid="uid://celay30i4soud" path="res://PCs/Universal/ClassCards/Assault/g_assault.png" id="2_a8may"]
[ext_resource type="PackedScene" uid="uid://2eehfcrsednw" path="res://PCs/Universal/ClassCards/Assault/weapon_assault.tscn" id="3_28y3b"]
[ext_resource type="Resource" uid="uid://bdmsiw45xxhiv" path="res://PCs/Universal/ClassCards/Assault/tower_stats.tres" id="3_ks0jw"]
[ext_resource type="PackedScene" uid="uid://bbfm4i4xlkwdr" path="res://PCs/Universal/ClassCards/Assault/tower_assault.tscn" id="4_5nu32"]
[ext_resource type="Resource" uid="uid://smctw4ogm4rx" path="res://PCs/Universal/ClassCards/Assault/weapon_stats.tres" id="4_est7t"]
[sub_resource type="AtlasTexture" id="AtlasTexture_q0mw6"]
atlas = ExtResource("2_a8may")
region = Rect2(0, 0, 64, 64)
[resource]
script = ExtResource("1_yqa4b")
title = "Assault"
rarity = 0
faction = 0
sprite = ExtResource("2_8j5h0")
turret = ExtResource("3_0r6s7")
weapon = ExtResource("3_wj5gm")
weapon_stats = ExtResource("3_k2yr3")
tower_stats = ExtResource("3_p4byc")
sprite = SubResource("AtlasTexture_q0mw6")
turret_scene = ExtResource("4_5nu32")
weapon_scene = ExtResource("3_28y3b")
weapon_stats = ExtResource("4_est7t")
tower_stats = ExtResource("3_ks0jw")

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://celay30i4soud"
path="res://.godot/imported/g_assault.png-18634d790d834a408188c873cb3b1336.ctex"
path="res://.godot/imported/g_assault.png-5ee2b44f3ff930af8f664652779a0f99.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Textures/g_assault.png"
dest_files=["res://.godot/imported/g_assault.png-18634d790d834a408188c873cb3b1336.ctex"]
source_file="res://PCs/Universal/ClassCards/Assault/g_assault.png"
dest_files=["res://.godot/imported/g_assault.png-5ee2b44f3ff930af8f664652779a0f99.ctex"]
[params]

View File

@ -0,0 +1,2 @@
extends HitscanTower
class_name AssaultTower

View File

@ -1,41 +1,9 @@
[gd_scene load_steps=4 format=3 uid="uid://fernyl7fsifv"]
[gd_scene load_steps=4 format=3 uid="uid://bbfm4i4xlkwdr"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Assault/tower.gd" id="1_c2874"]
[ext_resource type="Resource" uid="uid://cktq4o3yuxgsa" path="res://Resources/TurretStats/assault.tres" id="2_t516u"]
[ext_resource type="PackedScene" uid="uid://dumiyjlnea4gq" path="res://Scenes/Towers/hitscan_tower.tscn" id="1_uadu5"]
[ext_resource type="Resource" uid="uid://bdmsiw45xxhiv" path="res://PCs/Universal/ClassCards/Assault/tower_stats.tres" id="2_gg1gn"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Assault/tower_assault.gd" id="2_olbck"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_llb88"]
transparency = 1
cull_mode = 2
shading_mode = 0
albedo_color = Color(0.686275, 0, 0, 0.278431)
[node name="Node3D" type="Node3D" node_paths=PackedStringArray("model", "range_sphere", "minimap_range_sphere")]
script = ExtResource("1_c2874")
stats = ExtResource("2_t516u")
model = NodePath("Model")
range_sphere = NodePath("Model/CSGSphere3D")
minimap_range_sphere = NodePath("Model/CSGSphere3D2")
[node name="Model" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0)
[node name="CSGBox3D" type="CSGBox3D" parent="Model"]
[node name="CSGBox3D2" type="CSGBox3D" parent="Model"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.714825, 0, -0.423869)
size = Vector3(0.481654, 0.427749, 1.38438)
[node name="CSGBox3D3" type="CSGBox3D" parent="Model"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.715, 0, -0.424)
size = Vector3(0.481654, 0.427749, 1.38438)
[node name="CSGSphere3D" type="CSGSphere3D" parent="Model"]
visible = false
radius = 7.5
material = SubResource("StandardMaterial3D_llb88")
[node name="CSGSphere3D2" type="CSGSphere3D" parent="Model"]
visible = false
layers = 4
radius = 7.5
material = SubResource("StandardMaterial3D_llb88")
[node name="AssaultTower" instance=ExtResource("1_uadu5")]
script = ExtResource("2_olbck")
stats = ExtResource("2_gg1gn")

View File

@ -0,0 +1,25 @@
[gd_resource type="Resource" script_class="CardText" load_steps=6 format=3 uid="uid://bdmsiw45xxhiv"]
[ext_resource type="Script" path="res://Scripts/Resources/card_text.gd" id="1_50mwk"]
[ext_resource type="Script" path="res://Scripts/Resources/stat_attribute.gd" id="1_cwxf1"]
[sub_resource type="Resource" id="Resource_bukji"]
script = ExtResource("1_cwxf1")
key = "Fire Delay"
value = 1.0
[sub_resource type="Resource" id="Resource_2e75s"]
script = ExtResource("1_cwxf1")
key = "Damage"
value = 1.0
[sub_resource type="Resource" id="Resource_1vpnf"]
script = ExtResource("1_cwxf1")
key = "Range"
value = 10.0
[resource]
script = ExtResource("1_50mwk")
target_type = 1
attributes = Array[ExtResource("1_cwxf1")]([SubResource("Resource_bukji"), SubResource("Resource_2e75s"), SubResource("Resource_1vpnf")])
text = "Fires a shot every /Fire Delay\\ seconds dealing /Damage\\ damage at a range of /Range\\m"

View File

@ -1,73 +0,0 @@
extends Sprite3D
class_name Weapon
@export var stats : WeaponStats
@export var hero : Hero
var cooldown := 0.0
var other_cooldown := 0.0
var trigger_held := false
var second_trigger_held := false
func _ready() -> void:
cooldown = 1.0 / stats.fire_rate
$RayCast3D.target_position = Vector3(0, 0, -stats.fire_range)
func set_raycast_origin(node):
$RayCast3D.global_position = node.global_position
func set_hero(value):
hero = value
func _process(delta: float) -> void:
if stats != null:
other_cooldown -= delta
func _physics_process(_delta: float) -> void:
if trigger_held:
shoot()
func hold_trigger():
trigger_held = true
func release_trigger():
trigger_held = false
func hold_second_trigger():
second_trigger_held = true
func release_second_trigger():
second_trigger_held = false
func shoot():
if other_cooldown <= 0 and stats != null:
other_cooldown = cooldown
$AnimationPlayer.play("shoot")
if $RayCast3D.is_colliding():
var target = $RayCast3D.get_collider()
if target != null:
var target_hitbox = target.shape_owner_get_owner($RayCast3D.get_collider_shape())
if target_hitbox is Hitbox:
target_hitbox.damage(stats.damage)
networked_hit.rpc(get_tree().root.get_path_to(target_hitbox))
@rpc
func networked_shoot():
$AnimationPlayer.play("shoot")
@rpc("reliable")
func networked_hit(target_node_path : String):
var target_node = get_tree().root.get_node(target_node_path)
target_node.damage(stats.damage)

View File

@ -0,0 +1,2 @@
extends HitscanWeapon
class_name AssaultWeapon

View File

@ -1,58 +1,15 @@
[gd_scene load_steps=7 format=3 uid="uid://d1xe6hsq05110"]
[gd_scene load_steps=5 format=3 uid="uid://2eehfcrsednw"]
[ext_resource type="Texture2D" uid="uid://ca4lwwd3e0y73" path="res://Assets/TextureAtlases/g_assault.tres" id="1_117ne"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Assault/weapon.gd" id="2_4ie8w"]
[ext_resource type="Resource" uid="uid://w15ojqyxd72q" path="res://Resources/WeaponStats/assault.tres" id="3_s4ckt"]
[ext_resource type="PackedScene" uid="uid://difwo7wlyqr3h" path="res://Scenes/Weapons/hitscan_weapon.tscn" id="1_wkxf7"]
[ext_resource type="Resource" uid="uid://smctw4ogm4rx" path="res://PCs/Universal/ClassCards/Assault/weapon_stats.tres" id="2_fnp5x"]
[ext_resource type="Texture2D" uid="uid://celay30i4soud" path="res://PCs/Universal/ClassCards/Assault/g_assault.png" id="3_kuj4t"]
[sub_resource type="Animation" id="Animation_n8b32"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:texture:region")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Rect2(0, 0, 64, 64)]
}
[sub_resource type="AtlasTexture" id="AtlasTexture_604rb"]
atlas = ExtResource("3_kuj4t")
region = Rect2(0, 0, 64, 64)
[sub_resource type="Animation" id="Animation_g0h8q"]
resource_name = "shoot"
length = 0.15
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:texture:region")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.15),
"transitions": PackedFloat32Array(0, 0),
"update": 0,
"values": [Rect2(64, 0, 64, 64), Rect2(0, 0, 64, 64)]
}
[node name="HitscanWeapon" instance=ExtResource("1_wkxf7")]
stats = ExtResource("2_fnp5x")
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ntl6p"]
_data = {
"RESET": SubResource("Animation_n8b32"),
"shoot": SubResource("Animation_g0h8q")
}
[node name="Weapon" type="Sprite3D"]
layers = 2
billboard = 1
texture_filter = 0
texture = ExtResource("1_117ne")
script = ExtResource("2_4ie8w")
stats = ExtResource("3_s4ckt")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_ntl6p")
}
[node name="RayCast3D" type="RayCast3D" parent="."]
collision_mask = 4
[node name="Sprite3D" parent="." index="0"]
texture = SubResource("AtlasTexture_604rb")

View File

@ -0,0 +1,25 @@
[gd_resource type="Resource" script_class="CardText" load_steps=6 format=3 uid="uid://smctw4ogm4rx"]
[ext_resource type="Script" path="res://Scripts/Resources/card_text.gd" id="1_gk542"]
[ext_resource type="Script" path="res://Scripts/Resources/stat_attribute.gd" id="1_qt3yl"]
[sub_resource type="Resource" id="Resource_bcrtt"]
script = ExtResource("1_qt3yl")
key = "Damage"
value = 3.0
[sub_resource type="Resource" id="Resource_llper"]
script = ExtResource("1_qt3yl")
key = "Range"
value = 15.0
[sub_resource type="Resource" id="Resource_7i2dt"]
script = ExtResource("1_qt3yl")
key = "Fire Delay"
value = 0.2
[resource]
script = ExtResource("1_gk542")
target_type = 0
attributes = Array[ExtResource("1_qt3yl")]([SubResource("Resource_bcrtt"), SubResource("Resource_llper"), SubResource("Resource_7i2dt")])
text = "Fires a shot every /Fire Delay\\ seconds dealing /Damage\\ damage at a range of /Range\\m"

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dnlplq8duves3"
path.s3tc="res://.godot/imported/blowdart.png-bf139154f6dbb2ce97655e4664c07987.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://PCs/Universal/ClassCards/Blowdart/blowdart.png"
dest_files=["res://.godot/imported/blowdart.png-bf139154f6dbb2ce97655e4664c07987.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
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=0

View File

@ -1,17 +0,0 @@
extends Weapon
class_name BlowdartWeapon
@export var status_stats : StatusStats
func shoot():
if other_cooldown <= 0 and stats != null:
other_cooldown = cooldown
$AnimationPlayer.play("shoot")
if $RayCast3D.is_colliding():
var target = $RayCast3D.get_collider()
if target != null:
var target_hitbox = target.shape_owner_get_owner($RayCast3D.get_collider_shape())
if target_hitbox is Hitbox:
var status = StatusPoison.new()
status.stats = status_stats
target.status_manager.add_effect(status)

View File

@ -1,19 +1,9 @@
[gd_resource type="Resource" script_class="Card" load_steps=7 format=3 uid="uid://dnoi0fx0ppsrf"]
[gd_resource type="Resource" script_class="Card" load_steps=2 format=3 uid="uid://bywwtjdjsgdsj"]
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_vm4gs"]
[ext_resource type="Texture2D" uid="uid://ca4lwwd3e0y73" path="res://Assets/TextureAtlases/g_assault.tres" id="2_lyppa"]
[ext_resource type="Resource" uid="uid://by1gyra5a4aks" path="res://Resources/TurretStats/blowdart.tres" id="3_ybbbf"]
[ext_resource type="PackedScene" uid="uid://qkvo6ibgfrlb" path="res://PCs/Universal/ClassCards/Blowdart/tower_blowdart.tscn" id="4_55xb7"]
[ext_resource type="PackedScene" uid="uid://cqo6wwf5vbilg" path="res://PCs/Universal/ClassCards/Blowdart/weapon_blowdart.tscn" id="5_c4q5e"]
[ext_resource type="Resource" uid="uid://dhegsd45xi7na" path="res://Resources/WeaponStats/blowdart.tres" id="6_ii6x2"]
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_nobd8"]
[resource]
script = ExtResource("1_vm4gs")
script = ExtResource("1_nobd8")
title = "Blowdart"
rarity = 1
rarity = 0
faction = 0
sprite = ExtResource("2_lyppa")
turret = ExtResource("4_55xb7")
weapon = ExtResource("5_c4q5e")
weapon_stats = ExtResource("6_ii6x2")
tower_stats = ExtResource("3_ybbbf")

View File

@ -0,0 +1,8 @@
extends StatusApplyingWeapon
class_name BlowdartWeapon
func build_status_object() -> StatusEffect:
var status = StatusDoT.new()
status.stats = status_stats
return status

View File

@ -1,60 +1,27 @@
[gd_scene load_steps=8 format=3 uid="uid://cqo6wwf5vbilg"]
[gd_scene load_steps=7 format=3 uid="uid://cy05ssd52exf0"]
[ext_resource type="Texture2D" uid="uid://jmxhiwsiw1f5" path="res://Assets/TextureAtlases/g_glue_gun.tres" id="1_3t02x"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Blowdart/blowdartweapon.gd" id="2_ytopx"]
[ext_resource type="Resource" uid="uid://cbskijhnnj3kw" path="res://Resources/StatusEffects/poisoned.tres" id="3_qabj4"]
[ext_resource type="Resource" uid="uid://dhegsd45xi7na" path="res://Resources/WeaponStats/blowdart.tres" id="4_j03wq"]
[ext_resource type="PackedScene" uid="uid://nrdexcyatika" path="res://Scenes/Weapons/status_applying_weapon.tscn" id="1_t3gfv"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Blowdart/weapon_blowdart.gd" id="2_g1m1f"]
[ext_resource type="Resource" uid="uid://cbskijhnnj3kw" path="res://Resources/StatusEffects/poisoned.tres" id="3_wculg"]
[ext_resource type="Resource" uid="uid://c6e50linnk2i7" path="res://PCs/Universal/ClassCards/Blowdart/weapon_stats.tres" id="4_dwqec"]
[ext_resource type="Texture2D" uid="uid://dnlplq8duves3" path="res://PCs/Universal/ClassCards/Blowdart/blowdart.png" id="5_rvf06"]
[sub_resource type="Animation" id="Animation_n8b32"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:texture:region")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Rect2(0, 0, 64, 64)]
}
[sub_resource type="AtlasTexture" id="AtlasTexture_85web"]
atlas = ExtResource("5_rvf06")
region = Rect2(0, 0, 64, 64)
[sub_resource type="Animation" id="Animation_g0h8q"]
resource_name = "shoot"
length = 0.15
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:texture:region")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.15),
"transitions": PackedFloat32Array(0, 0),
"update": 0,
"values": [Rect2(64, 0, 64, 64), Rect2(0, 0, 64, 64)]
}
[node name="BlowdartWeapon" instance=ExtResource("1_t3gfv")]
script = ExtResource("2_g1m1f")
status_stats = ExtResource("3_wculg")
raycast = Object(RayCast3D,"_import_path":NodePath(""),"unique_name_in_owner":false,"process_mode":0,"process_priority":0,"process_physics_priority":0,"process_thread_group":0,"editor_description":"","transform":Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0),"rotation_edit_mode":0,"rotation_order":2,"top_level":false,"visible":true,"visibility_parent":NodePath(""),"enabled":true,"exclude_parent":true,"target_position":Vector3(0, 0, -1),"collision_mask":4,"hit_from_inside":false,"collide_with_areas":false,"collide_with_bodies":true,"debug_shape_custom_color":Color(0, 0, 0, 1),"debug_shape_thickness":2,"script":null)
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ntl6p"]
_data = {
"RESET": SubResource("Animation_n8b32"),
"shoot": SubResource("Animation_g0h8q")
}
range_debug_indicator = Object(CSGSphere3D,"_import_path":NodePath(""),"unique_name_in_owner":false,"process_mode":0,"process_priority":0,"process_physics_priority":0,"process_thread_group":0,"editor_description":"","transform":Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0),"rotation_edit_mode":0,"rotation_order":2,"top_level":false,"visible":false,"visibility_parent":NodePath(""),"layers":1,"sorting_offset":0.0,"sorting_use_aabb_center":true,"material_override":null,"material_overlay":null,"transparency":0.0,"cast_shadow":1,"extra_cull_margin":0.0,"custom_aabb":AABB(0, 0, 0, 0, 0, 0),"lod_bias":1.0,"ignore_occlusion_culling":false,"gi_mode":1,"gi_lightmap_scale":0,"visibility_range_begin":0.0,"visibility_range_begin_margin":0.0,"visibility_range_end":0.0,"visibility_range_end_margin":0.0,"visibility_range_fade_mode":0,"operation":0,"snap":0.001,"calculate_tangents":true,"use_collision":false,"collision_layer":1,"collision_mask":1,"collision_priority":1.0,"flip_faces":false,"radius":4.104,"radial_segments":16,"rings":16,"smooth_faces":true,"material":null,"script":null)
[node name="Weapon" type="Sprite3D"]
layers = 2
billboard = 1
texture_filter = 0
texture = ExtResource("1_3t02x")
script = ExtResource("2_ytopx")
status_stats = ExtResource("3_qabj4")
stats = ExtResource("4_j03wq")
stats = ExtResource("4_dwqec")
animator = Object(AnimationPlayer,"_import_path":NodePath(""),"unique_name_in_owner":false,"process_mode":0,"process_priority":0,"process_physics_priority":0,"process_thread_group":0,"editor_description":"","root_node":NodePath(".."),"autoplay":"","reset_on_save":true,"playback_process_mode":1,"playback_default_blend_time":0.0,"speed_scale":1.0,"method_call_mode":0,"audio_max_polyphony":32,"movie_quit_on_finish":false,"libraries":{
"": null
},"blend_times":[],"script":null)
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_ntl6p")
}
[node name="RayCast3D" type="RayCast3D" parent="."]
collision_mask = 4
[node name="Sprite3D" parent="." index="0"]
texture = SubResource("AtlasTexture_85web")

View File

@ -0,0 +1,24 @@
[gd_resource type="Resource" script_class="CardText" load_steps=6 format=3 uid="uid://c6e50linnk2i7"]
[ext_resource type="Script" path="res://Scripts/Resources/card_text.gd" id="1_5ldx7"]
[ext_resource type="Script" path="res://Scripts/Resources/stat_attribute.gd" id="1_pw5it"]
[sub_resource type="Resource" id="Resource_1txa7"]
script = ExtResource("1_pw5it")
key = "Damage"
value = 0.0
[sub_resource type="Resource" id="Resource_46kv2"]
script = ExtResource("1_pw5it")
key = "Range"
value = 15.0
[sub_resource type="Resource" id="Resource_gb76x"]
script = ExtResource("1_pw5it")
key = "Fire Delay"
value = 0.8
[resource]
script = ExtResource("1_5ldx7")
attributes = Array[ExtResource("1_pw5it")]([SubResource("Resource_1txa7"), SubResource("Resource_46kv2"), SubResource("Resource_gb76x")])
text = "Fires every /Fire Delay\\s, applying one stack of Poison at a range of /Range\\m"

View File

@ -1,20 +0,0 @@
extends RigidBody3D
class_name Bomb
@export var max_bounces := 1
@export var damage := 10.0
@export var explosion_range := 3.0
var bounces := 0
func _on_body_entered(_body: Node) -> void:
bounces += 1
var collided_body = get_colliding_bodies()[0].get_collision_layer_value(3)
if bounces > max_bounces or collided_body:
explode()
func explode():
for enemy in get_tree().get_nodes_in_group("Enemies"):
if global_position.distance_to(enemy.global_position) <= explosion_range:
enemy.damage(damage)
queue_free()

View File

Before

Width:  |  Height:  |  Size: 799 B

After

Width:  |  Height:  |  Size: 799 B

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://b54d5dc4jmlau"
path="res://.godot/imported/bomb.png-c85d126612097bd650bbb12e0b92da53.ctex"
path="res://.godot/imported/bomb.png-487c0a83cb041cff7ffc29ecb2986a5b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Textures/bomb.png"
dest_files=["res://.godot/imported/bomb.png-c85d126612097bd650bbb12e0b92da53.ctex"]
source_file="res://PCs/Universal/ClassCards/BombLauncher/bomb.png"
dest_files=["res://.godot/imported/bomb.png-487c0a83cb041cff7ffc29ecb2986a5b.ctex"]
[params]

View File

@ -1,29 +0,0 @@
[gd_scene load_steps=5 format=3 uid="uid://d147iwg2wcqc5"]
[ext_resource type="Texture2D" uid="uid://b54d5dc4jmlau" path="res://Assets/Textures/bomb.png" id="1_u615o"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/BombLauncher/bomb.gd" id="1_vekqm"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_whkhx"]
bounce = 0.6
[sub_resource type="SphereShape3D" id="SphereShape3D_mi0in"]
radius = 0.2
[node name="RigidBody3D" type="RigidBody3D"]
collision_layer = 0
collision_mask = 5
physics_material_override = SubResource("PhysicsMaterial_whkhx")
max_contacts_reported = 1
contact_monitor = true
script = ExtResource("1_vekqm")
[node name="Node3D" type="Sprite3D" parent="."]
transform = Transform3D(1.4, 0, 0, 0, 1.4, 0, 0, 0, 1.4, 0, 0, 0)
billboard = 1
texture_filter = 0
texture = ExtResource("1_u615o")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("SphereShape3D_mi0in")
[connection signal="body_entered" from="." to="." method="_on_body_entered"]

View File

@ -0,0 +1,16 @@
extends ExplosiveProjectile
class_name BombProjectile
var max_bounces := 1
var bounces := 0
func _ready() -> void:
apply_central_impulse(direction * force)
func _on_body_entered(_body: Node) -> void:
bounces += 1
var collided_body = get_colliding_bodies()[0].get_collision_layer_value(3)
if bounces > max_bounces or collided_body:
explode()

View File

@ -0,0 +1,17 @@
[gd_scene load_steps=5 format=3 uid="uid://c8oq5unisjqne"]
[ext_resource type="PackedScene" uid="uid://7f4dfphgiswr" path="res://Scenes/Projectiles/explosive_projectile.tscn" id="1_kf2wi"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/BombLauncher/bomb_projectile.gd" id="2_qvo4u"]
[ext_resource type="Texture2D" uid="uid://b54d5dc4jmlau" path="res://PCs/Universal/ClassCards/BombLauncher/bomb.png" id="3_ilhep"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_bbpul"]
bounce = 0.3
[node name="Bomb" instance=ExtResource("1_kf2wi")]
physics_material_override = SubResource("PhysicsMaterial_bbpul")
gravity_scale = 1.0
script = ExtResource("2_qvo4u")
[node name="Sprite3D" parent="." index="1"]
pixel_size = 0.015
texture = ExtResource("3_ilhep")

View File

@ -1,21 +0,0 @@
extends Weapon
class_name BombWeapon
@export var bomb_scene: PackedScene
var firing_velocity
func _ready() -> void:
cooldown = 1.0 / stats.fire_rate
firing_velocity = sqrt((stats.fire_range * ProjectSettings.get_setting("physics/3d/default_gravity")) / sin(2 * 45))
$RayCast3D.target_position = Vector3(0, 0, -stats.fire_range)
func shoot():
if other_cooldown <= 0 and stats != null:
other_cooldown = cooldown
$AnimationPlayer.play("shoot")
var bomb = bomb_scene.instantiate() as Bomb
bomb.position = $RayCast3D.global_position
bomb.damage = stats.damage
get_tree().root.add_child(bomb)
bomb.apply_impulse(-global_transform.basis.z * firing_velocity)

View File

@ -0,0 +1,23 @@
[gd_resource type="Resource" script_class="Card" load_steps=8 format=3 uid="uid://blgngx360vff1"]
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_qtxcq"]
[ext_resource type="Texture2D" uid="uid://3qcdx7n440sc" path="res://PCs/Universal/ClassCards/BombLauncher/grenade_launcher.png" id="2_qpxaq"]
[ext_resource type="Resource" uid="uid://8eaecilvan23" path="res://PCs/Universal/ClassCards/BombLauncher/tower_stats.tres" id="3_gknxe"]
[ext_resource type="PackedScene" uid="uid://c3fqlkytyc62u" path="res://PCs/Universal/ClassCards/BombLauncher/weapon_bomb_launcher.tscn" id="3_s56j6"]
[ext_resource type="Resource" uid="uid://co6eorobj1xuu" path="res://PCs/Universal/ClassCards/BombLauncher/weapon_stats.tres" id="4_s74ea"]
[ext_resource type="PackedScene" uid="uid://d2cch7qrwocg8" path="res://PCs/Universal/ClassCards/BombLauncher/tower_bomb_launcher.tscn" id="4_vc8pe"]
[sub_resource type="AtlasTexture" id="AtlasTexture_rat6o"]
atlas = ExtResource("2_qpxaq")
region = Rect2(0, 0, 64, 64)
[resource]
script = ExtResource("1_qtxcq")
title = "Bomb Launcher"
rarity = 0
faction = 0
sprite = SubResource("AtlasTexture_rat6o")
turret_scene = ExtResource("4_vc8pe")
weapon_scene = ExtResource("3_s56j6")
weapon_stats = ExtResource("4_s74ea")
tower_stats = ExtResource("3_gknxe")

View File

@ -1,19 +0,0 @@
[gd_resource type="Resource" script_class="Card" load_steps=7 format=3 uid="uid://bvpkvmda845o5"]
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_bscy2"]
[ext_resource type="Texture2D" uid="uid://bwufgga1pjyt" path="res://Assets/TextureAtlases/g_grenade_launcher.tres" id="2_xtrq2"]
[ext_resource type="Resource" uid="uid://crmsk6lvp5i4e" path="res://Resources/TurretStats/bomblauncher.tres" id="3_c1c3t"]
[ext_resource type="PackedScene" uid="uid://6ckryuql3bh8" path="res://PCs/Universal/ClassCards/BombLauncher/weapon_bomb_launcher.tscn" id="4_iaadg"]
[ext_resource type="PackedScene" uid="uid://cwc8y1nv53btu" path="res://PCs/Universal/ClassCards/BombLauncher/tower_bomb_launcher.tscn" id="4_ux0v3"]
[ext_resource type="Resource" uid="uid://kbaiy5u6imtu" path="res://Resources/WeaponStats/bomblauncher.tres" id="5_mhhrq"]
[resource]
script = ExtResource("1_bscy2")
title = "Bomb Launcher"
rarity = 0
faction = 0
sprite = ExtResource("2_xtrq2")
turret = ExtResource("4_ux0v3")
weapon = ExtResource("4_iaadg")
weapon_stats = ExtResource("5_mhhrq")
tower_stats = ExtResource("3_c1c3t")

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://3qcdx7n440sc"
path="res://.godot/imported/grenade_launcher.png-3275b92d0df686a016f2abc93d27971f.ctex"
path="res://.godot/imported/grenade_launcher.png-1e7f404a8d0cf786acfd3eff044b4f0c.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Textures/grenade_launcher.png"
dest_files=["res://.godot/imported/grenade_launcher.png-3275b92d0df686a016f2abc93d27971f.ctex"]
source_file="res://PCs/Universal/ClassCards/BombLauncher/grenade_launcher.png"
dest_files=["res://.godot/imported/grenade_launcher.png-1e7f404a8d0cf786acfd3eff044b4f0c.ctex"]
[params]

View File

@ -0,0 +1,20 @@
extends ProjectileTower
class_name BombLauncherTower
func _ready() -> void:
super._ready()
force = sqrt((target_range * ProjectSettings.get_setting("physics/3d/default_gravity")) / sin(2 * 45))
func aim():
super.aim()
var pos = Vector2(global_position.x, global_position.z)
var t_pos = Vector2(targeted_enemy.global_position.x, targeted_enemy.global_position.z)
var x = pos.distance_to(t_pos)
var y = targeted_enemy.global_position.y - (global_position.y + 1)
var v = force
var g = ProjectSettings.get_setting("physics/3d/default_gravity")
var v2 = pow(v, 2)
var angle = atan((v2 + sqrt(pow(v, 4) - g * ((g * pow(x, 2)) + (2 * y * v2)))) / (g * x))
yaw_model.look_at(Vector3(t_pos.x, yaw_model.global_position.y, t_pos.y))
yaw_model.rotate(yaw_model.global_transform.basis.x.normalized(), angle)

View File

@ -1,39 +1,11 @@
[gd_scene load_steps=5 format=3 uid="uid://cwc8y1nv53btu"]
[gd_scene load_steps=5 format=3 uid="uid://d2cch7qrwocg8"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/BombLauncher/bombtower.gd" id="1_u2hyk"]
[ext_resource type="PackedScene" uid="uid://d147iwg2wcqc5" path="res://PCs/Universal/ClassCards/BombLauncher/bomb.tscn" id="2_n307r"]
[ext_resource type="Resource" uid="uid://crmsk6lvp5i4e" path="res://Resources/TurretStats/bomblauncher.tres" id="3_xv5rx"]
[ext_resource type="PackedScene" uid="uid://t0b32qb8eub2" path="res://Scenes/Towers/projectile_tower.tscn" id="1_r8hbo"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/BombLauncher/tower_bomb_launcher.gd" id="2_vlaa6"]
[ext_resource type="PackedScene" uid="uid://c8oq5unisjqne" path="res://PCs/Universal/ClassCards/BombLauncher/bomb_projectile.tscn" id="3_562if"]
[ext_resource type="Resource" uid="uid://8eaecilvan23" path="res://PCs/Universal/ClassCards/BombLauncher/tower_stats.tres" id="4_xgwj1"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_nr2od"]
transparency = 1
cull_mode = 2
shading_mode = 0
albedo_color = Color(0.686275, 0, 0, 0.278431)
[node name="Node3D" type="Node3D" node_paths=PackedStringArray("model", "range_sphere", "minimap_range_sphere")]
script = ExtResource("1_u2hyk")
bomb_scene = ExtResource("2_n307r")
stats = ExtResource("3_xv5rx")
model = NodePath("Model")
range_sphere = NodePath("Model/CSGSphere3D")
minimap_range_sphere = NodePath("Model/CSGSphere3D2")
[node name="Model" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.13842, 0)
[node name="CSGBox3D" type="CSGBox3D" parent="Model"]
[node name="CSGBox3D2" type="CSGBox3D" parent="Model"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.65)
size = Vector3(0.596453, 0.632841, 0.539216)
[node name="CSGSphere3D" type="CSGSphere3D" parent="Model"]
visible = false
radius = 7.5
material = SubResource("StandardMaterial3D_nr2od")
[node name="CSGSphere3D2" type="CSGSphere3D" parent="Model"]
visible = false
layers = 4
radius = 7.5
material = SubResource("StandardMaterial3D_nr2od")
[node name="BombLauncherTower" instance=ExtResource("1_r8hbo")]
script = ExtResource("2_vlaa6")
projectile_scene = ExtResource("3_562if")
stats = ExtResource("4_xgwj1")

View File

@ -0,0 +1,25 @@
[gd_resource type="Resource" script_class="CardText" load_steps=6 format=3 uid="uid://8eaecilvan23"]
[ext_resource type="Script" path="res://Scripts/Resources/stat_attribute.gd" id="1_gjldi"]
[ext_resource type="Script" path="res://Scripts/Resources/card_text.gd" id="2_jt2vs"]
[sub_resource type="Resource" id="Resource_yb48y"]
script = ExtResource("1_gjldi")
key = "Fire Delay"
value = 4.0
[sub_resource type="Resource" id="Resource_ewwvw"]
script = ExtResource("1_gjldi")
key = "Damage"
value = 10.0
[sub_resource type="Resource" id="Resource_qu5dv"]
script = ExtResource("1_gjldi")
key = "Range"
value = 8.0
[resource]
script = ExtResource("2_jt2vs")
target_type = 1
attributes = Array[ExtResource("1_gjldi")]([SubResource("Resource_yb48y"), SubResource("Resource_ewwvw"), SubResource("Resource_qu5dv")])
text = "Launch a bomb that deals /Damage\\ damage every /Fire Delay\\ seconds"

View File

@ -0,0 +1,8 @@
extends ProjectileWeapon
class_name BombLauncherWeapon
func _ready() -> void:
super._ready()
var launch_range = stats.get_attribute("Range")
force = sqrt((launch_range * ProjectSettings.get_setting("physics/3d/default_gravity")) / sin(2 * 45))

View File

@ -1,59 +1,11 @@
[gd_scene load_steps=8 format=3 uid="uid://6ckryuql3bh8"]
[gd_scene load_steps=5 format=3 uid="uid://c3fqlkytyc62u"]
[ext_resource type="Texture2D" uid="uid://bwufgga1pjyt" path="res://Assets/TextureAtlases/g_grenade_launcher.tres" id="1_n7mif"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/BombLauncher/bombweapon.gd" id="2_4iyo6"]
[ext_resource type="PackedScene" uid="uid://d147iwg2wcqc5" path="res://PCs/Universal/ClassCards/BombLauncher/bomb.tscn" id="3_506dv"]
[ext_resource type="Resource" uid="uid://kbaiy5u6imtu" path="res://Resources/WeaponStats/bomblauncher.tres" id="4_45cu2"]
[ext_resource type="PackedScene" uid="uid://bqdllitxbbpyp" path="res://Scenes/Weapons/projectile_weapon.tscn" id="1_gbycb"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/BombLauncher/weapon_bomb_launcher.gd" id="2_g5ihb"]
[ext_resource type="Resource" uid="uid://co6eorobj1xuu" path="res://PCs/Universal/ClassCards/BombLauncher/weapon_stats.tres" id="3_73ol1"]
[ext_resource type="PackedScene" uid="uid://c8oq5unisjqne" path="res://PCs/Universal/ClassCards/BombLauncher/bomb_projectile.tscn" id="3_jxt6m"]
[sub_resource type="Animation" id="Animation_n8b32"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:texture:region")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Rect2(0, 0, 64, 64)]
}
[sub_resource type="Animation" id="Animation_g0h8q"]
resource_name = "shoot"
length = 0.15
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:texture:region")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.15),
"transitions": PackedFloat32Array(0, 0),
"update": 0,
"values": [Rect2(64, 0, 64, 64), Rect2(0, 0, 64, 64)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ntl6p"]
_data = {
"RESET": SubResource("Animation_n8b32"),
"shoot": SubResource("Animation_g0h8q")
}
[node name="Weapon" type="Sprite3D"]
layers = 2
billboard = 1
texture_filter = 0
texture = ExtResource("1_n7mif")
script = ExtResource("2_4iyo6")
bomb_scene = ExtResource("3_506dv")
stats = ExtResource("4_45cu2")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_ntl6p")
}
[node name="RayCast3D" type="RayCast3D" parent="."]
[node name="BombLauncherWeapon" instance=ExtResource("1_gbycb")]
script = ExtResource("2_g5ihb")
projectile_scene = ExtResource("3_jxt6m")
stats = ExtResource("3_73ol1")

View File

@ -0,0 +1,25 @@
[gd_resource type="Resource" script_class="CardText" load_steps=6 format=3 uid="uid://co6eorobj1xuu"]
[ext_resource type="Script" path="res://Scripts/Resources/card_text.gd" id="1_8i32s"]
[ext_resource type="Script" path="res://Scripts/Resources/stat_attribute.gd" id="1_kj8v0"]
[sub_resource type="Resource" id="Resource_yb48y"]
script = ExtResource("1_kj8v0")
key = "Fire Delay"
value = 2.0
[sub_resource type="Resource" id="Resource_ewwvw"]
script = ExtResource("1_kj8v0")
key = "Damage"
value = 10.0
[sub_resource type="Resource" id="Resource_qu5dv"]
script = ExtResource("1_kj8v0")
key = "Range"
value = 10.0
[resource]
script = ExtResource("1_8i32s")
target_type = 0
attributes = Array[ExtResource("1_kj8v0")]([SubResource("Resource_yb48y"), SubResource("Resource_ewwvw"), SubResource("Resource_qu5dv")])
text = "Launch a bomb that deals /Damage\\ damage every /Fire Delay\\ seconds"

View File

@ -1,7 +1,7 @@
[gd_resource type="Resource" script_class="Card" load_steps=3 format=3 uid="uid://0p0i7m5ciwtq"]
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_hj6hq"]
[ext_resource type="Texture2D" uid="uid://ca4lwwd3e0y73" path="res://Assets/TextureAtlases/g_assault.tres" id="2_irvam"]
[ext_resource type="Texture2D" uid="uid://ca4lwwd3e0y73" path="res://PCs/Universal/ClassCards/Assault/g_assault.tres" id="2_irvam"]
[resource]
script = ExtResource("1_hj6hq")

View File

@ -1,19 +1,19 @@
[gd_resource type="Resource" script_class="Card" load_steps=7 format=3 uid="uid://b1gd7d12pr52k"]
[gd_resource type="Resource" script_class="Card" load_steps=6 format=3 uid="uid://bibx2my7igspq"]
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_opk1n"]
[ext_resource type="Texture2D" uid="uid://ca4lwwd3e0y73" path="res://Assets/TextureAtlases/g_assault.tres" id="2_51tvo"]
[ext_resource type="Resource" uid="uid://b8a635kajtq6" path="res://Resources/TurretStats/fireball.tres" id="3_8w2yo"]
[ext_resource type="PackedScene" uid="uid://dr2bmfj8fquxr" path="res://PCs/Universal/ClassCards/Fireball/tower_fireball.tscn" id="4_cxojl"]
[ext_resource type="PackedScene" uid="uid://cxlr31wydvroj" path="res://PCs/Universal/ClassCards/Fireball/weapon_fireball.tscn" id="5_47hbf"]
[ext_resource type="Resource" uid="uid://c473xvhm2g6m0" path="res://Resources/WeaponStats/fireball.tres" id="6_05wvy"]
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_qktm8"]
[ext_resource type="Texture2D" uid="uid://mwgpnnm3g3re" path="res://PCs/Universal/ClassCards/Fireball/fireball.png" id="2_lfltq"]
[ext_resource type="PackedScene" uid="uid://dnwjfb4fexr0o" path="res://PCs/Universal/ClassCards/Fireball/weapon_fireball.tscn" id="3_4c0mu"]
[ext_resource type="Resource" uid="uid://dhwhwicgpw7yh" path="res://PCs/Universal/ClassCards/Fireball/weapon_stats.tres" id="4_folo6"]
[sub_resource type="AtlasTexture" id="AtlasTexture_wvh1s"]
atlas = ExtResource("2_lfltq")
region = Rect2(0, 0, 64, 64)
[resource]
script = ExtResource("1_opk1n")
script = ExtResource("1_qktm8")
title = "Fireball"
rarity = 3
faction = 0
sprite = ExtResource("2_51tvo")
turret = ExtResource("4_cxojl")
weapon = ExtResource("5_47hbf")
weapon_stats = ExtResource("6_05wvy")
tower_stats = ExtResource("3_8w2yo")
sprite = SubResource("AtlasTexture_wvh1s")
weapon_scene = ExtResource("3_4c0mu")
weapon_stats = ExtResource("4_folo6")

View File

@ -1,32 +0,0 @@
extends RigidBody3D
class_name Fireball
@export var explosion_range := 6.0
var acceleration := 15.0
var direction
var status_stats : StatusStats
var lifetime := 15.0
var time_alive := 0.0
func _process(delta: float) -> void:
time_alive += delta
if time_alive >= lifetime:
explode()
func _physics_process(_delta: float) -> void:
apply_central_force(direction * acceleration)
func _on_body_entered(_body: Node) -> void:
explode()
func explode():
for enemy in get_tree().get_nodes_in_group("Enemies"):
if global_position.distance_to(enemy.global_position) <= explosion_range:
var status = StatusOnFire.new()
status.stats = status_stats
enemy.status_manager.add_effect(status)
queue_free()

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://mwgpnnm3g3re"
path="res://.godot/imported/fireball.png-a75470cb6074cbc91efe353b08c6eb50.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://PCs/Universal/ClassCards/Fireball/fireball.png"
dest_files=["res://.godot/imported/fireball.png-a75470cb6074cbc91efe353b08c6eb50.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=true
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=0

View File

@ -1,30 +0,0 @@
[gd_scene load_steps=5 format=3 uid="uid://dyglfv8lh2rbg"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Fireball/fireball.gd" id="1_a3evl"]
[ext_resource type="Texture2D" uid="uid://b54d5dc4jmlau" path="res://Assets/Textures/bomb.png" id="2_h8lqn"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_whkhx"]
bounce = 0.6
[sub_resource type="SphereShape3D" id="SphereShape3D_mi0in"]
radius = 0.2
[node name="RigidBody3D" type="RigidBody3D"]
collision_layer = 0
collision_mask = 5
physics_material_override = SubResource("PhysicsMaterial_whkhx")
gravity_scale = 0.0
max_contacts_reported = 1
contact_monitor = true
script = ExtResource("1_a3evl")
[node name="Node3D" type="Sprite3D" parent="."]
transform = Transform3D(1.4, 0, 0, 0, 1.4, 0, 0, 0, 1.4, 0, 0, 0)
billboard = 1
texture_filter = 0
texture = ExtResource("2_h8lqn")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("SphereShape3D_mi0in")
[connection signal="body_entered" from="." to="." method="_on_body_entered"]

View File

@ -0,0 +1,8 @@
extends StatusApplyingProjectile
class_name FireballProjectile
func build_status_object() -> StatusEffect:
var status = StatusDoT.new()
status.stats = status_stats
return status

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://baarbcx0nxi7w"
path="res://.godot/imported/fireball_projectile.png-bb6edb8e296f3f750c1296e8d3dde180.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://PCs/Universal/ClassCards/Fireball/fireball_projectile.png"
dest_files=["res://.godot/imported/fireball_projectile.png-bb6edb8e296f3f750c1296e8d3dde180.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=true
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=0

View File

@ -0,0 +1,13 @@
[gd_scene load_steps=5 format=3 uid="uid://ddpixntjsbpqp"]
[ext_resource type="PackedScene" uid="uid://beq6rn0babncg" path="res://Scenes/Projectiles/status_applying_projectile.tscn" id="1_a8cjq"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Fireball/fireball_projectile.gd" id="2_rin44"]
[ext_resource type="Resource" uid="uid://dbanx8taicddm" path="res://Resources/StatusEffects/on_fire.tres" id="3_vb4ff"]
[ext_resource type="Texture2D" uid="uid://baarbcx0nxi7w" path="res://PCs/Universal/ClassCards/Fireball/fireball_projectile.png" id="4_uua74"]
[node name="Fireball" instance=ExtResource("1_a8cjq")]
script = ExtResource("2_rin44")
status_stats = ExtResource("3_vb4ff")
[node name="Sprite3D" parent="." index="1"]
texture = ExtResource("4_uua74")

View File

@ -1,16 +0,0 @@
extends Weapon
class_name FireballWeapon
@export var fireball_scene : PackedScene
@export var status_stats : StatusStats
func shoot():
if other_cooldown <= 0 and stats != null:
other_cooldown = cooldown
$AnimationPlayer.play("shoot")
var fireball = fireball_scene.instantiate() as Fireball
fireball.position = $RayCast3D.global_position
fireball.status_stats = status_stats
get_tree().root.add_child(fireball)
fireball.direction = -global_transform.basis.z

View File

@ -0,0 +1,2 @@
extends ProjectileWeapon
class_name FireballWeapon

View File

@ -1,79 +1,19 @@
[gd_scene load_steps=10 format=3 uid="uid://cxlr31wydvroj"]
[gd_scene load_steps=7 format=3 uid="uid://dnwjfb4fexr0o"]
[ext_resource type="Texture2D" uid="uid://clr6kfyci5jqb" path="res://Assets/TextureAtlases/g_rocket_launcher.tres" id="1_jmfbt"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Fireball/fireballweapon.gd" id="2_rmmdm"]
[ext_resource type="PackedScene" uid="uid://dyglfv8lh2rbg" path="res://PCs/Universal/ClassCards/Fireball/fireball.tscn" id="3_xtqoc"]
[ext_resource type="Resource" uid="uid://dbanx8taicddm" path="res://Resources/StatusEffects/on_fire.tres" id="4_a0kl2"]
[ext_resource type="Resource" uid="uid://c473xvhm2g6m0" path="res://Resources/WeaponStats/fireball.tres" id="5_n36an"]
[ext_resource type="Texture2D" uid="uid://bgeu8dnqaxq7v" path="res://Assets/TextureAtlases/target_list.tres" id="6_bpghv"]
[ext_resource type="PackedScene" uid="uid://bqdllitxbbpyp" path="res://Scenes/Weapons/projectile_weapon.tscn" id="1_7k6fb"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Fireball/weapon_fireball.gd" id="2_nprco"]
[ext_resource type="PackedScene" uid="uid://ddpixntjsbpqp" path="res://PCs/Universal/ClassCards/Fireball/fireball_projectile.tscn" id="3_2j1mm"]
[ext_resource type="Resource" uid="uid://dhwhwicgpw7yh" path="res://PCs/Universal/ClassCards/Fireball/weapon_stats.tres" id="4_rqdnu"]
[ext_resource type="Texture2D" uid="uid://mwgpnnm3g3re" path="res://PCs/Universal/ClassCards/Fireball/fireball.png" id="5_r42ic"]
[sub_resource type="Animation" id="Animation_n8b32"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:texture:region")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Rect2(0, 0, 64, 64)]
}
[sub_resource type="AtlasTexture" id="AtlasTexture_hfmm6"]
atlas = ExtResource("5_r42ic")
region = Rect2(0, 0, 64, 64)
[sub_resource type="Animation" id="Animation_g0h8q"]
resource_name = "shoot"
length = 0.15
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:texture:region")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.15),
"transitions": PackedFloat32Array(0, 0),
"update": 0,
"values": [Rect2(64, 0, 64, 64), Rect2(0, 0, 64, 64)]
}
[node name="FireballWeapon" instance=ExtResource("1_7k6fb")]
script = ExtResource("2_nprco")
projectile_scene = ExtResource("3_2j1mm")
stats = ExtResource("4_rqdnu")
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ntl6p"]
_data = {
"RESET": SubResource("Animation_n8b32"),
"shoot": SubResource("Animation_g0h8q")
}
[node name="Weapon" type="Sprite3D"]
layers = 2
billboard = 1
texture_filter = 0
texture = ExtResource("1_jmfbt")
script = ExtResource("2_rmmdm")
fireball_scene = ExtResource("3_xtqoc")
status_stats = ExtResource("4_a0kl2")
stats = ExtResource("5_n36an")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_ntl6p")
}
[node name="RayCast3D" type="RayCast3D" parent="."]
collision_mask = 4
[node name="TextureRect" type="TextureRect" parent="."]
visible = false
texture_filter = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -20.0
offset_top = -20.0
offset_right = 20.0
offset_bottom = 20.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("6_bpghv")
[node name="Sprite3D" parent="." index="0"]
texture = SubResource("AtlasTexture_hfmm6")

View File

@ -0,0 +1,8 @@
[gd_resource type="Resource" script_class="CardText" load_steps=2 format=3 uid="uid://dhwhwicgpw7yh"]
[ext_resource type="Script" path="res://Scripts/Resources/card_text.gd" id="1_hmbwy"]
[resource]
script = ExtResource("1_hmbwy")
attributes = Array[Resource("res://Scripts/Resources/stat_attribute.gd")]([])
text = ""

View File

@ -1,7 +1,7 @@
[gd_resource type="Resource" script_class="Card" load_steps=3 format=3 uid="uid://qyhlpglghda3"]
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_goeex"]
[ext_resource type="Texture2D" uid="uid://ca4lwwd3e0y73" path="res://Assets/TextureAtlases/g_assault.tres" id="2_a7b2p"]
[ext_resource type="Texture2D" uid="uid://ca4lwwd3e0y73" path="res://PCs/Universal/ClassCards/Assault/g_assault.tres" id="2_a7b2p"]
[resource]
script = ExtResource("1_goeex")

View File

@ -1,19 +1,23 @@
[gd_resource type="Resource" script_class="Card" load_steps=7 format=3 uid="uid://q23ludhji5p4"]
[gd_resource type="Resource" script_class="Card" load_steps=8 format=3 uid="uid://cvto66tp7rrst"]
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_5html"]
[ext_resource type="Texture2D" uid="uid://d1am28tgvwaa0" path="res://Assets/TextureAtlases/g_accelerator.tres" id="2_a3hso"]
[ext_resource type="Resource" uid="uid://cc20tomywj0jm" path="res://Resources/TurretStats/accelerator.tres" id="3_yj53i"]
[ext_resource type="PackedScene" uid="uid://rcqf3vangjlp" path="res://PCs/Universal/ClassCards/Gatling/weapon_gatling.tscn" id="4_4xp1m"]
[ext_resource type="PackedScene" uid="uid://bwcdgglljbmot" path="res://PCs/Universal/ClassCards/Gatling/tower_gatling.tscn" id="4_maix8"]
[ext_resource type="Resource" uid="uid://ouwge5etb4me" path="res://Resources/WeaponStats/accelerator.tres" id="5_hguan"]
[ext_resource type="Texture2D" uid="uid://cx5cwn11fuugq" path="res://PCs/Universal/ClassCards/Gatling/gatling.png" id="2_rof1s"]
[ext_resource type="Resource" uid="uid://nxl5wabgl36t" path="res://PCs/Universal/ClassCards/Gatling/tower_stats.tres" id="3_4hykq"]
[ext_resource type="PackedScene" uid="uid://dkxi1ssoa44jn" path="res://PCs/Universal/ClassCards/Gatling/weapon_gatling.tscn" id="3_wkjyf"]
[ext_resource type="Resource" uid="uid://cj2x1jvo8l4ot" path="res://PCs/Universal/ClassCards/Gatling/weapon_stats.tres" id="4_76fd1"]
[ext_resource type="PackedScene" uid="uid://bjuc3x7u3f271" path="res://PCs/Universal/ClassCards/Gatling/tower_gatling.tscn" id="4_thk7u"]
[sub_resource type="AtlasTexture" id="AtlasTexture_rwa4l"]
atlas = ExtResource("2_rof1s")
region = Rect2(0, 0, 64, 64)
[resource]
script = ExtResource("1_5html")
title = "Gatling"
rarity = 0
faction = 0
sprite = ExtResource("2_a3hso")
turret = ExtResource("4_maix8")
weapon = ExtResource("4_4xp1m")
weapon_stats = ExtResource("5_hguan")
tower_stats = ExtResource("3_yj53i")
sprite = SubResource("AtlasTexture_rwa4l")
turret_scene = ExtResource("4_thk7u")
weapon_scene = ExtResource("3_wkjyf")
weapon_stats = ExtResource("4_76fd1")
tower_stats = ExtResource("3_4hykq")

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cx5cwn11fuugq"
path="res://.godot/imported/accelerator.png-1a0f15190d75444ec6328a57ff1e8fbe.ctex"
path="res://.godot/imported/gatling.png-884c4cce4654c4213d5c047580076c33.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Textures/accelerator.png"
dest_files=["res://.godot/imported/accelerator.png-1a0f15190d75444ec6328a57ff1e8fbe.ctex"]
source_file="res://PCs/Universal/ClassCards/Gatling/gatling.png"
dest_files=["res://.godot/imported/gatling.png-884c4cce4654c4213d5c047580076c33.ctex"]
[params]

View File

@ -1,32 +0,0 @@
extends Tower
class_name SpeedyTower
var third_cooldown := 0.0
var time_since_firing_started := 0.0
var time_to_reach_max_speed := 3.0
var max_speed_multiplier := 2.0
var destination_multiplier := 0.0
func _ready() -> void:
cooldown = 1.0 / stats.fire_rate
destination_multiplier = 1.0 / max_speed_multiplier
func _process(delta: float) -> void:
other_cooldown -= delta
if !targeted_enemy:
acquire_target()
else:
if model.global_position.distance_to(targeted_enemy.global_position) > stats.fire_range:
targeted_enemy = null
time_since_firing_started = 0.0
third_cooldown = cooldown
if targeted_enemy:
time_since_firing_started += delta
var progress = clamp(time_since_firing_started / time_to_reach_max_speed, 0, 1.0)
third_cooldown = cooldown * (1.0 - (destination_multiplier * progress))
aim()
if other_cooldown <= 0:
shoot()
other_cooldown = third_cooldown

View File

@ -1,60 +0,0 @@
extends Weapon
class_name SpeedyWeapon
var third_cooldown := 0.0
var time_since_firing_started := 0.0
var time_to_reach_max_speed := 3.0
var max_speed_multiplier := 2.0
var destination_multiplier := 0.0
func _ready() -> void:
cooldown = 1.0 / stats.fire_rate
destination_multiplier = 1.0 / max_speed_multiplier
$RayCast3D.target_position = Vector3(0, 0, -stats.fire_range)
func set_raycast_origin(node):
$RayCast3D.global_position = node.global_position
func _process(delta: float) -> void:
if stats != null:
other_cooldown -= delta
if trigger_held:
time_since_firing_started += delta
var progress = clamp(time_since_firing_started / time_to_reach_max_speed, 0, 1.0)
third_cooldown = cooldown * (1.0 - (destination_multiplier * progress))
func _physics_process(_delta: float) -> void:
if trigger_held:
shoot()
func hold_trigger():
trigger_held = true
func release_trigger():
trigger_held = false
time_since_firing_started = 0.0
third_cooldown = cooldown
func shoot():
if other_cooldown <= 0 and stats != null:
other_cooldown = third_cooldown
$AnimationPlayer.play("shoot")
if $RayCast3D.is_colliding():
var target = $RayCast3D.get_collider()
if target != null:
var target_hitbox = target.shape_owner_get_owner($RayCast3D.get_collider_shape())
if target_hitbox is Hitbox:
target_hitbox.damage(stats.damage)
@rpc
func networked_shoot():
$AnimationPlayer.play("shoot")

View File

@ -0,0 +1,38 @@
extends HitscanTower
class_name GatlingTower
var time_since_firing_started := 0.0
var time_to_reach_max_speed := 0.0
var max_speed_multiplier := 0.0
var current_time_between_shots := 0.0
var final_time_between_shots := 0.0
func _ready() -> void:
super._ready()
time_to_reach_max_speed = stats.get_attribute("Speed Time")
max_speed_multiplier = stats.get_attribute("Speed Multiplier")
final_time_between_shots = time_between_shots / max_speed_multiplier
func _process(delta: float) -> void:
if time_since_firing < current_time_between_shots:
time_since_firing += delta
func _physics_process(delta: float) -> void:
if !targeted_enemy:
acquire_target()
else:
if !targeted_enemy.alive or global_position.distance_to(targeted_enemy.global_position) > target_range:
targeted_enemy = null
time_since_firing_started = 0.0
current_time_between_shots = time_between_shots
if targeted_enemy:
aim()
time_since_firing_started += delta
var progress = clamp(time_since_firing_started / time_to_reach_max_speed, 0, 1.0)
current_time_between_shots = lerpf(time_between_shots, final_time_between_shots, progress)
if time_since_firing >= current_time_between_shots:
time_since_firing -= current_time_between_shots
shoot()

View File

@ -1,57 +1,9 @@
[gd_scene load_steps=4 format=3 uid="uid://bwcdgglljbmot"]
[gd_scene load_steps=4 format=3 uid="uid://bjuc3x7u3f271"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Gatling/speedytower.gd" id="1_26he3"]
[ext_resource type="Resource" uid="uid://cc20tomywj0jm" path="res://Resources/TurretStats/accelerator.tres" id="2_puwlv"]
[ext_resource type="PackedScene" uid="uid://dumiyjlnea4gq" path="res://Scenes/Towers/hitscan_tower.tscn" id="1_su74p"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Gatling/tower_gatling.gd" id="2_ipjp1"]
[ext_resource type="Resource" uid="uid://nxl5wabgl36t" path="res://PCs/Universal/ClassCards/Gatling/tower_stats.tres" id="3_oicqw"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_73y0x"]
transparency = 1
cull_mode = 2
shading_mode = 0
albedo_color = Color(0.686275, 0, 0, 0.278431)
[node name="Node3D" type="Node3D" node_paths=PackedStringArray("model", "range_sphere", "minimap_range_sphere")]
script = ExtResource("1_26he3")
stats = ExtResource("2_puwlv")
model = NodePath("Model")
range_sphere = NodePath("Model/CSGSphere3D")
minimap_range_sphere = NodePath("Model/CSGSphere3D2")
[node name="Model" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0)
[node name="CSGBox3D" type="CSGBox3D" parent="Model"]
[node name="CSGBox3D2" type="CSGBox3D" parent="Model"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00131059, 0.27342, -0.880753)
size = Vector3(0.177, 0.148, 0.929)
[node name="CSGBox3D3" type="CSGBox3D" parent="Model"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.226066, 0.0918715, -0.880753)
size = Vector3(0.177, 0.148, 0.929)
[node name="CSGBox3D4" type="CSGBox3D" parent="Model"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.227674, -0.174673, -0.880753)
size = Vector3(0.177, 0.148, 0.929)
[node name="CSGBox3D5" type="CSGBox3D" parent="Model"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00246562, -0.314903, -0.880753)
size = Vector3(0.177, 0.148, 0.929)
[node name="CSGBox3D6" type="CSGBox3D" parent="Model"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.259054, -0.125834, -0.880753)
size = Vector3(0.177, 0.148, 0.929)
[node name="CSGBox3D7" type="CSGBox3D" parent="Model"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.26701, 0.102116, -0.880753)
size = Vector3(0.177, 0.148, 0.929)
[node name="CSGSphere3D" type="CSGSphere3D" parent="Model"]
visible = false
radius = 7.5
material = SubResource("StandardMaterial3D_73y0x")
[node name="CSGSphere3D2" type="CSGSphere3D" parent="Model"]
visible = false
layers = 4
radius = 7.5
material = SubResource("StandardMaterial3D_73y0x")
[node name="GatlingTower" instance=ExtResource("1_su74p")]
script = ExtResource("2_ipjp1")
stats = ExtResource("3_oicqw")

View File

@ -0,0 +1,37 @@
[gd_resource type="Resource" script_class="CardText" load_steps=8 format=3 uid="uid://nxl5wabgl36t"]
[ext_resource type="Script" path="res://Scripts/Resources/card_text.gd" id="1_80xci"]
[ext_resource type="Script" path="res://Scripts/Resources/stat_attribute.gd" id="1_nu6vr"]
[sub_resource type="Resource" id="Resource_oayfg"]
script = ExtResource("1_nu6vr")
key = "Fire Delay"
value = 1.0
[sub_resource type="Resource" id="Resource_fekle"]
script = ExtResource("1_nu6vr")
key = "Damage"
value = 1.0
[sub_resource type="Resource" id="Resource_ud8xi"]
script = ExtResource("1_nu6vr")
key = "Range"
value = 10.0
[sub_resource type="Resource" id="Resource_cvkxf"]
script = ExtResource("1_nu6vr")
key = "Speed Multiplier"
value = 2.0
[sub_resource type="Resource" id="Resource_pivwn"]
script = ExtResource("1_nu6vr")
key = "Speed Time"
value = 3.0
[resource]
script = ExtResource("1_80xci")
target_type = 1
attributes = Array[ExtResource("1_nu6vr")]([SubResource("Resource_oayfg"), SubResource("Resource_fekle"), SubResource("Resource_ud8xi"), SubResource("Resource_cvkxf"), SubResource("Resource_pivwn")])
text = "Fires a shot every [Fire Delay] seconds dealing [Damage] damage at a range of [Range]m
While attacking the same target, gradually accelerates to [Speed Multiplier] times the fire rate over [Speed Time]"

View File

@ -0,0 +1,36 @@
extends HitscanWeapon
class_name GatlingWeapon
var time_since_firing_started := 0.0
var time_to_reach_max_speed := 0.0
var max_speed_multiplier := 0.0
var current_time_between_shots := 0.0
var final_time_between_shots := 0.0
func _ready() -> void:
super._ready()
time_to_reach_max_speed = stats.get_attribute("Speed Time")
max_speed_multiplier = stats.get_attribute("Speed Multiplier")
final_time_between_shots = time_between_shots / max_speed_multiplier
func _process(delta: float) -> void:
super._process(delta)
if trigger_held:
time_since_firing_started += delta
var progress = clamp(time_since_firing_started / time_to_reach_max_speed, 0, 1.0)
current_time_between_shots = lerpf(time_between_shots, final_time_between_shots, progress)
func _physics_process(_delta: float) -> void:
if trigger_held and time_since_firing >= current_time_between_shots:
time_since_firing -= current_time_between_shots
shoot()
networked_shoot.rpc()
func release_trigger():
super.release_trigger()
time_since_firing_started = 0.0
current_time_between_shots = time_between_shots

View File

@ -1,58 +1,15 @@
[gd_scene load_steps=7 format=3 uid="uid://rcqf3vangjlp"]
[gd_scene load_steps=5 format=3 uid="uid://dkxi1ssoa44jn"]
[ext_resource type="Texture2D" uid="uid://d1am28tgvwaa0" path="res://Assets/TextureAtlases/g_accelerator.tres" id="1_n3tw0"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Gatling/speedyweapon.gd" id="2_fkecd"]
[ext_resource type="Resource" uid="uid://ouwge5etb4me" path="res://Resources/WeaponStats/accelerator.tres" id="3_nq6wu"]
[ext_resource type="PackedScene" uid="uid://difwo7wlyqr3h" path="res://Scenes/Weapons/hitscan_weapon.tscn" id="1_fwlu5"]
[ext_resource type="Resource" uid="uid://cj2x1jvo8l4ot" path="res://PCs/Universal/ClassCards/Gatling/weapon_stats.tres" id="2_fnyjd"]
[ext_resource type="Texture2D" uid="uid://cx5cwn11fuugq" path="res://PCs/Universal/ClassCards/Gatling/gatling.png" id="2_rv8ps"]
[sub_resource type="Animation" id="Animation_n8b32"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:texture:region")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Rect2(0, 0, 64, 64)]
}
[sub_resource type="AtlasTexture" id="AtlasTexture_0im1y"]
atlas = ExtResource("2_rv8ps")
region = Rect2(0, 0, 64, 64)
[sub_resource type="Animation" id="Animation_g0h8q"]
resource_name = "shoot"
length = 0.15
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:texture:region")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.15),
"transitions": PackedFloat32Array(0, 0),
"update": 0,
"values": [Rect2(64, 0, 64, 64), Rect2(0, 0, 64, 64)]
}
[node name="HitscanWeapon" instance=ExtResource("1_fwlu5")]
stats = ExtResource("2_fnyjd")
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ntl6p"]
_data = {
"RESET": SubResource("Animation_n8b32"),
"shoot": SubResource("Animation_g0h8q")
}
[node name="Weapon" type="Sprite3D"]
layers = 2
billboard = 1
texture_filter = 0
texture = ExtResource("1_n3tw0")
script = ExtResource("2_fkecd")
stats = ExtResource("3_nq6wu")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_ntl6p")
}
[node name="RayCast3D" type="RayCast3D" parent="."]
collision_mask = 4
[node name="Sprite3D" parent="." index="0"]
texture = SubResource("AtlasTexture_0im1y")

View File

@ -0,0 +1,37 @@
[gd_resource type="Resource" script_class="CardText" load_steps=8 format=3 uid="uid://cj2x1jvo8l4ot"]
[ext_resource type="Script" path="res://Scripts/Resources/card_text.gd" id="1_630yu"]
[ext_resource type="Script" path="res://Scripts/Resources/stat_attribute.gd" id="1_vpmor"]
[sub_resource type="Resource" id="Resource_fi7tc"]
script = ExtResource("1_vpmor")
key = "Fire Delay"
value = 0.4
[sub_resource type="Resource" id="Resource_r6h5d"]
script = ExtResource("1_vpmor")
key = "Damage"
value = 2.0
[sub_resource type="Resource" id="Resource_gwg1i"]
script = ExtResource("1_vpmor")
key = "Range"
value = 20.0
[sub_resource type="Resource" id="Resource_ogk1x"]
script = ExtResource("1_vpmor")
key = "Speed Multiplier"
value = 2.0
[sub_resource type="Resource" id="Resource_wdp3h"]
script = ExtResource("1_vpmor")
key = "Speed Time"
value = 3.0
[resource]
script = ExtResource("1_630yu")
target_type = 0
attributes = Array[ExtResource("1_vpmor")]([SubResource("Resource_fi7tc"), SubResource("Resource_r6h5d"), SubResource("Resource_gwg1i"), SubResource("Resource_ogk1x"), SubResource("Resource_wdp3h")])
text = "Fires a shot every [Fire Delay] seconds dealing [Damage] damage at a range of [Range]m
While held, gradually accelerates to [Speed Multiplier] times the fire rate over [Speed Time]"

View File

@ -1,19 +1,9 @@
[gd_resource type="Resource" script_class="Card" load_steps=7 format=3 uid="uid://bhmbk26whdsys"]
[gd_resource type="Resource" script_class="Card" load_steps=2 format=3 uid="uid://fwsg5av1egp2"]
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_4m1rh"]
[ext_resource type="Texture2D" uid="uid://jmxhiwsiw1f5" path="res://Assets/TextureAtlases/g_glue_gun.tres" id="2_xsq3l"]
[ext_resource type="Resource" uid="uid://dhcukj44khkd7" path="res://Resources/TurretStats/glue.tres" id="3_tb5qj"]
[ext_resource type="PackedScene" uid="uid://d24q8j53oiyd4" path="res://PCs/Universal/ClassCards/GlueLauncher/weapon_glue_launcher.tscn" id="4_0jn1x"]
[ext_resource type="PackedScene" uid="uid://dja1b2ke8clo5" path="res://PCs/Universal/ClassCards/GlueLauncher/tower_glue_launcher.tscn" id="4_1nhoo"]
[ext_resource type="Resource" uid="uid://dnucn65m12dmq" path="res://Resources/WeaponStats/glue.tres" id="5_qk2lw"]
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_tdu8a"]
[resource]
script = ExtResource("1_4m1rh")
title = "Glue Gun"
rarity = 1
script = ExtResource("1_tdu8a")
title = ""
rarity = 0
faction = 0
sprite = ExtResource("2_xsq3l")
turret = ExtResource("4_1nhoo")
weapon = ExtResource("4_0jn1x")
weapon_stats = ExtResource("5_qk2lw")
tower_stats = ExtResource("3_tb5qj")

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://oblavj8vj30n"
path="res://.godot/imported/glue_gun.png-e9e16bf72630f36d6fabf28ef7667749.ctex"
path="res://.godot/imported/glue_gun.png-da3fc52d7c51b5aff27c153501f54c6c.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Textures/glue_gun.png"
dest_files=["res://.godot/imported/glue_gun.png-e9e16bf72630f36d6fabf28ef7667749.ctex"]
source_file="res://PCs/Universal/ClassCards/GlueLauncher/glue_gun.png"
dest_files=["res://.godot/imported/glue_gun.png-da3fc52d7c51b5aff27c153501f54c6c.ctex"]
[params]

View File

@ -1,17 +0,0 @@
extends Weapon
class_name StickyWeapon
@export var status_stats : StatusStats
func shoot():
if other_cooldown <= 0 and stats != null:
other_cooldown = cooldown
$AnimationPlayer.play("shoot")
if $RayCast3D.is_colliding():
var target = $RayCast3D.get_collider()
if target != null:
var target_hitbox = target.shape_owner_get_owner($RayCast3D.get_collider_shape())
if target_hitbox is Hitbox:
var status = StatusSticky.new()
status.stats = status_stats
target.status_manager.add_effect(status)

View File

@ -0,0 +1,7 @@
extends StatusApplyingWeapon
func build_status_object() -> StatusEffect:
var status = StatusSlow.new()
status.stats = status_stats
return status

View File

@ -1,60 +1,19 @@
[gd_scene load_steps=8 format=3 uid="uid://d24q8j53oiyd4"]
[gd_scene load_steps=7 format=3 uid="uid://takm6diuy71m"]
[ext_resource type="Texture2D" uid="uid://jmxhiwsiw1f5" path="res://Assets/TextureAtlases/g_glue_gun.tres" id="1_pl6t8"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/GlueLauncher/stickyweapon.gd" id="2_dnhqb"]
[ext_resource type="Resource" uid="uid://d0643gfp52x3s" path="res://Resources/StatusEffects/sticky.tres" id="3_4t7ku"]
[ext_resource type="Resource" uid="uid://dnucn65m12dmq" path="res://Resources/WeaponStats/glue.tres" id="3_li2dn"]
[ext_resource type="PackedScene" uid="uid://nrdexcyatika" path="res://Scenes/Weapons/status_applying_weapon.tscn" id="1_7v0k2"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/GlueLauncher/weapon_glue_launcher.gd" id="2_12ex2"]
[ext_resource type="Resource" uid="uid://d0643gfp52x3s" path="res://Resources/StatusEffects/sticky.tres" id="3_xtk6n"]
[ext_resource type="Resource" uid="uid://boj1ho5x0sxtq" path="res://PCs/Universal/ClassCards/GlueLauncher/weapon_stats.tres" id="4_c3ve8"]
[ext_resource type="Texture2D" uid="uid://oblavj8vj30n" path="res://PCs/Universal/ClassCards/GlueLauncher/glue_gun.png" id="5_obawu"]
[sub_resource type="Animation" id="Animation_n8b32"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:texture:region")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Rect2(0, 0, 64, 64)]
}
[sub_resource type="AtlasTexture" id="AtlasTexture_ehcsl"]
atlas = ExtResource("5_obawu")
region = Rect2(0, 0, 64, 64)
[sub_resource type="Animation" id="Animation_g0h8q"]
resource_name = "shoot"
length = 0.15
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:texture:region")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.15),
"transitions": PackedFloat32Array(0, 0),
"update": 0,
"values": [Rect2(64, 0, 64, 64), Rect2(0, 0, 64, 64)]
}
[node name="GlueLauncherWeapon" instance=ExtResource("1_7v0k2")]
script = ExtResource("2_12ex2")
status_stats = ExtResource("3_xtk6n")
stats = ExtResource("4_c3ve8")
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ntl6p"]
_data = {
"RESET": SubResource("Animation_n8b32"),
"shoot": SubResource("Animation_g0h8q")
}
[node name="Weapon" type="Sprite3D"]
layers = 2
billboard = 1
texture_filter = 0
texture = ExtResource("1_pl6t8")
script = ExtResource("2_dnhqb")
status_stats = ExtResource("3_4t7ku")
stats = ExtResource("3_li2dn")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_ntl6p")
}
[node name="RayCast3D" type="RayCast3D" parent="."]
collision_mask = 4
[node name="Sprite3D" parent="." index="0"]
texture = SubResource("AtlasTexture_ehcsl")

View File

@ -0,0 +1,24 @@
[gd_resource type="Resource" script_class="CardText" load_steps=6 format=3 uid="uid://boj1ho5x0sxtq"]
[ext_resource type="Script" path="res://Scripts/Resources/card_text.gd" id="1_8sdo4"]
[ext_resource type="Script" path="res://Scripts/Resources/stat_attribute.gd" id="1_gheu8"]
[sub_resource type="Resource" id="Resource_gbocu"]
script = ExtResource("1_gheu8")
key = "Damage"
value = 0.0
[sub_resource type="Resource" id="Resource_6a2im"]
script = ExtResource("1_gheu8")
key = "Range"
value = 13.0
[sub_resource type="Resource" id="Resource_7npe0"]
script = ExtResource("1_gheu8")
key = "Fire Delay"
value = 0.5
[resource]
script = ExtResource("1_8sdo4")
attributes = Array[ExtResource("1_gheu8")]([SubResource("Resource_gbocu"), SubResource("Resource_6a2im"), SubResource("Resource_7npe0")])
text = "Fires every [Fire Delay]s, making the target Sticky at a range of [Range]m"

View File

@ -1,19 +1,19 @@
[gd_resource type="Resource" script_class="Card" load_steps=7 format=3 uid="uid://bceyh6nn6h15y"]
[gd_resource type="Resource" script_class="Card" load_steps=6 format=3 uid="uid://cb1uqjl1387kk"]
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_g0mbh"]
[ext_resource type="Texture2D" uid="uid://ca4lwwd3e0y73" path="res://Assets/TextureAtlases/g_assault.tres" id="2_gnblw"]
[ext_resource type="Resource" uid="uid://cdmkajdgfpk6h" path="res://Resources/TurretStats/icicle.tres" id="3_fgq80"]
[ext_resource type="PackedScene" uid="uid://clabvrajn6k3r" path="res://PCs/Universal/ClassCards/Icicle/tower_icicle.tscn" id="4_jwh3d"]
[ext_resource type="PackedScene" uid="uid://dvfpqrrmjfco4" path="res://PCs/Universal/ClassCards/Icicle/weapon_icicle.tscn" id="5_appk0"]
[ext_resource type="Resource" uid="uid://dsmlqik586soo" path="res://Resources/WeaponStats/icicle.tres" id="6_mfnfc"]
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_cmmto"]
[ext_resource type="Texture2D" uid="uid://mqo5qcghfit8" path="res://PCs/Universal/ClassCards/Icicle/icicle.png" id="2_w5fi7"]
[ext_resource type="PackedScene" uid="uid://v3iuf4lt2iff" path="res://PCs/Universal/ClassCards/Icicle/weapon_icicle.tscn" id="3_ve3rv"]
[ext_resource type="Resource" uid="uid://ckjmym1ofww4" path="res://PCs/Universal/ClassCards/Icicle/weapon_stats.tres" id="4_yv37w"]
[sub_resource type="AtlasTexture" id="AtlasTexture_7due4"]
atlas = ExtResource("2_w5fi7")
region = Rect2(0, 0, 64, 64)
[resource]
script = ExtResource("1_g0mbh")
script = ExtResource("1_cmmto")
title = "Icicle"
rarity = 3
faction = 0
sprite = ExtResource("2_gnblw")
turret = ExtResource("4_jwh3d")
weapon = ExtResource("5_appk0")
weapon_stats = ExtResource("6_mfnfc")
tower_stats = ExtResource("3_fgq80")
sprite = SubResource("AtlasTexture_7due4")
weapon_scene = ExtResource("3_ve3rv")
weapon_stats = ExtResource("4_yv37w")

View File

@ -1,32 +0,0 @@
extends RigidBody3D
class_name Icicle
@export var explosion_range := 6.0
var acceleration := 15.0
var direction
var status_stats : StatusStats
var lifetime := 15.0
var time_alive := 0.0
func _process(delta: float) -> void:
time_alive += delta
if time_alive >= lifetime:
explode()
func _physics_process(_delta: float) -> void:
apply_central_force(direction * acceleration)
func _on_body_entered(_body: Node) -> void:
explode()
func explode():
for enemy in get_tree().get_nodes_in_group("Enemies"):
if global_position.distance_to(enemy.global_position) <= explosion_range:
var status = StatusCold.new()
status.stats = status_stats
enemy.status_manager.add_effect(status)
queue_free()

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://mqo5qcghfit8"
path="res://.godot/imported/icicle.png-4a9f91664a318bc31fc04d1f1adfb245.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://PCs/Universal/ClassCards/Icicle/icicle.png"
dest_files=["res://.godot/imported/icicle.png-4a9f91664a318bc31fc04d1f1adfb245.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=true
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=0

View File

@ -1,30 +0,0 @@
[gd_scene load_steps=5 format=3 uid="uid://cdme5v2sq7u3p"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Icicle/icicle.gd" id="1_qlswm"]
[ext_resource type="Texture2D" uid="uid://b54d5dc4jmlau" path="res://Assets/Textures/bomb.png" id="2_8pdfq"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_whkhx"]
bounce = 0.6
[sub_resource type="SphereShape3D" id="SphereShape3D_mi0in"]
radius = 0.2
[node name="RigidBody3D" type="RigidBody3D"]
collision_layer = 0
collision_mask = 5
physics_material_override = SubResource("PhysicsMaterial_whkhx")
gravity_scale = 0.0
max_contacts_reported = 1
contact_monitor = true
script = ExtResource("1_qlswm")
[node name="Node3D" type="Sprite3D" parent="."]
transform = Transform3D(1.4, 0, 0, 0, 1.4, 0, 0, 0, 1.4, 0, 0, 0)
billboard = 1
texture_filter = 0
texture = ExtResource("2_8pdfq")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("SphereShape3D_mi0in")
[connection signal="body_entered" from="." to="." method="_on_body_entered"]

View File

@ -0,0 +1,8 @@
extends StatusApplyingProjectile
class_name IcicleProjectile
func build_status_object() -> StatusEffect:
var status = StatusSlow.new()
status.stats = status_stats
return status

Binary file not shown.

After

Width:  |  Height:  |  Size: 969 B

View File

@ -2,16 +2,16 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cwqifoaxbsbio"
path="res://.godot/imported/8directionplayer.png-9f1d9c7387ae05b7b8a30ff9aa0fac65.ctex"
uid="uid://cqmt5m0grnppx"
path="res://.godot/imported/icicle_projectile.png-1514e55b32fb404fd33060409a1662b1.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Textures/8directionplayer.png"
dest_files=["res://.godot/imported/8directionplayer.png-9f1d9c7387ae05b7b8a30ff9aa0fac65.ctex"]
source_file="res://PCs/Universal/ClassCards/Icicle/icicle_projectile.png"
dest_files=["res://.godot/imported/icicle_projectile.png-1514e55b32fb404fd33060409a1662b1.ctex"]
[params]

View File

@ -0,0 +1,13 @@
[gd_scene load_steps=5 format=3 uid="uid://dyurjxotdkf1u"]
[ext_resource type="PackedScene" uid="uid://beq6rn0babncg" path="res://Scenes/Projectiles/status_applying_projectile.tscn" id="1_mmk8p"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Icicle/icicle_projectile.gd" id="2_nukn5"]
[ext_resource type="Resource" uid="uid://fed6kimfbcwv" path="res://Resources/StatusEffects/cold.tres" id="3_ruu1t"]
[ext_resource type="Texture2D" uid="uid://cqmt5m0grnppx" path="res://PCs/Universal/ClassCards/Icicle/icicle_projectile.png" id="4_ycq5n"]
[node name="Icicle" instance=ExtResource("1_mmk8p")]
script = ExtResource("2_nukn5")
status_stats = ExtResource("3_ruu1t")
[node name="Sprite3D" parent="." index="1"]
texture = ExtResource("4_ycq5n")

View File

@ -1,16 +0,0 @@
extends Weapon
class_name IcicleWeapon
@export var icicle_scene : PackedScene
@export var status_stats : StatusStats
func shoot():
if other_cooldown <= 0 and stats != null:
other_cooldown = cooldown
$AnimationPlayer.play("shoot")
var icicle = icicle_scene.instantiate() as Icicle
icicle.position = $RayCast3D.global_position
icicle.status_stats = status_stats
get_tree().root.add_child(icicle)
icicle.direction = -global_transform.basis.z

View File

@ -0,0 +1,2 @@
extends ProjectileWeapon
class_name IcicleWeapon

View File

@ -1,79 +1,19 @@
[gd_scene load_steps=10 format=3 uid="uid://dvfpqrrmjfco4"]
[gd_scene load_steps=7 format=3 uid="uid://v3iuf4lt2iff"]
[ext_resource type="Texture2D" uid="uid://clr6kfyci5jqb" path="res://Assets/TextureAtlases/g_rocket_launcher.tres" id="1_23r2a"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Icicle/icicleweapon.gd" id="2_j3c63"]
[ext_resource type="PackedScene" uid="uid://cdme5v2sq7u3p" path="res://PCs/Universal/ClassCards/Icicle/icicle.tscn" id="3_hgb5e"]
[ext_resource type="Resource" uid="uid://fed6kimfbcwv" path="res://Resources/StatusEffects/cold.tres" id="4_hsh8q"]
[ext_resource type="Resource" uid="uid://dsmlqik586soo" path="res://Resources/WeaponStats/icicle.tres" id="5_wivww"]
[ext_resource type="Texture2D" uid="uid://bgeu8dnqaxq7v" path="res://Assets/TextureAtlases/target_list.tres" id="6_mqgqx"]
[ext_resource type="PackedScene" uid="uid://bqdllitxbbpyp" path="res://Scenes/Weapons/projectile_weapon.tscn" id="1_oi7x1"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Icicle/weapon_icicle.gd" id="2_6wbx0"]
[ext_resource type="PackedScene" uid="uid://dyurjxotdkf1u" path="res://PCs/Universal/ClassCards/Icicle/icicle_projectile.tscn" id="3_cwl2u"]
[ext_resource type="Resource" uid="uid://ckjmym1ofww4" path="res://PCs/Universal/ClassCards/Icicle/weapon_stats.tres" id="4_r8ss5"]
[ext_resource type="Texture2D" uid="uid://mqo5qcghfit8" path="res://PCs/Universal/ClassCards/Icicle/icicle.png" id="5_iremk"]
[sub_resource type="Animation" id="Animation_n8b32"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:texture:region")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Rect2(0, 0, 64, 64)]
}
[sub_resource type="AtlasTexture" id="AtlasTexture_7uf3s"]
atlas = ExtResource("5_iremk")
region = Rect2(0, 0, 64, 64)
[sub_resource type="Animation" id="Animation_g0h8q"]
resource_name = "shoot"
length = 0.15
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:texture:region")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.15),
"transitions": PackedFloat32Array(0, 0),
"update": 0,
"values": [Rect2(64, 0, 64, 64), Rect2(0, 0, 64, 64)]
}
[node name="IcicleWeapon" instance=ExtResource("1_oi7x1")]
script = ExtResource("2_6wbx0")
projectile_scene = ExtResource("3_cwl2u")
stats = ExtResource("4_r8ss5")
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ntl6p"]
_data = {
"RESET": SubResource("Animation_n8b32"),
"shoot": SubResource("Animation_g0h8q")
}
[node name="Weapon" type="Sprite3D"]
layers = 2
billboard = 1
texture_filter = 0
texture = ExtResource("1_23r2a")
script = ExtResource("2_j3c63")
icicle_scene = ExtResource("3_hgb5e")
status_stats = ExtResource("4_hsh8q")
stats = ExtResource("5_wivww")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_ntl6p")
}
[node name="RayCast3D" type="RayCast3D" parent="."]
collision_mask = 4
[node name="TextureRect" type="TextureRect" parent="."]
visible = false
texture_filter = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -20.0
offset_top = -20.0
offset_right = 20.0
offset_bottom = 20.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("6_mqgqx")
[node name="Sprite3D" parent="." index="0"]
texture = SubResource("AtlasTexture_7uf3s")

View File

@ -0,0 +1,8 @@
[gd_resource type="Resource" script_class="CardText" load_steps=2 format=3 uid="uid://ckjmym1ofww4"]
[ext_resource type="Script" path="res://Scripts/Resources/card_text.gd" id="1_fpi27"]
[resource]
script = ExtResource("1_fpi27")
attributes = Array[Resource("res://Scripts/Resources/stat_attribute.gd")]([])
text = ""

View File

@ -1,7 +1,7 @@
[gd_resource type="Resource" script_class="Card" load_steps=3 format=3 uid="uid://biy2kw34h5t8n"]
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_oj1u6"]
[ext_resource type="Texture2D" uid="uid://ca4lwwd3e0y73" path="res://Assets/TextureAtlases/g_assault.tres" id="2_eyg7w"]
[ext_resource type="Texture2D" uid="uid://ca4lwwd3e0y73" path="res://PCs/Universal/ClassCards/Assault/g_assault.tres" id="2_eyg7w"]
[resource]
script = ExtResource("1_oj1u6")

View File

@ -1,7 +1,7 @@
[gd_resource type="Resource" script_class="Card" load_steps=7 format=3 uid="uid://dra640am6ykri"]
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_7065k"]
[ext_resource type="Texture2D" uid="uid://ca4lwwd3e0y73" path="res://Assets/TextureAtlases/g_assault.tres" id="2_8hvde"]
[ext_resource type="Texture2D" uid="uid://ca4lwwd3e0y73" path="res://PCs/Universal/ClassCards/Assault/g_assault.tres" id="2_8hvde"]
[ext_resource type="Resource" uid="uid://baa8sauri4218" path="res://Resources/TurretStats/reactor.tres" id="3_ikj6b"]
[ext_resource type="PackedScene" uid="uid://byglhh0etuy6" path="res://PCs/Universal/ClassCards/Reactor/tower_reactor.tscn" id="4_y3lkh"]
[ext_resource type="PackedScene" uid="uid://cpe3b700kwj48" path="res://PCs/Universal/ClassCards/Reactor/weapon_reactor.tscn" id="5_atmmn"]

View File

@ -1,7 +1,7 @@
[gd_resource type="Resource" script_class="Card" load_steps=7 format=3 uid="uid://dmd5730tvyp6a"]
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_yreyk"]
[ext_resource type="Texture2D" uid="uid://ca4lwwd3e0y73" path="res://Assets/TextureAtlases/g_assault.tres" id="2_fgsd3"]
[ext_resource type="Texture2D" uid="uid://ca4lwwd3e0y73" path="res://PCs/Universal/ClassCards/Assault/g_assault.tres" id="2_fgsd3"]
[ext_resource type="Resource" uid="uid://ugpxwdjfvssu" path="res://Resources/TurretStats/refridgerator.tres" id="3_b48s2"]
[ext_resource type="PackedScene" uid="uid://bxjyrqs8bvi41" path="res://PCs/Universal/ClassCards/Refridgerator/tower_refridgerator.tscn" id="4_t5vm7"]
[ext_resource type="PackedScene" uid="uid://b1457hrmd4xm7" path="res://PCs/Universal/ClassCards/Refridgerator/weapon_refridgerator.tscn" id="5_axlkp"]

View File

@ -1,19 +1,23 @@
[gd_resource type="Resource" script_class="Card" load_steps=7 format=3 uid="uid://dh5fjnbp8auw1"]
[gd_resource type="Resource" script_class="Card" load_steps=8 format=3 uid="uid://b37r54q84vqoi"]
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_dg0td"]
[ext_resource type="Texture2D" uid="uid://clr6kfyci5jqb" path="res://Assets/TextureAtlases/g_rocket_launcher.tres" id="2_duef5"]
[ext_resource type="Resource" uid="uid://duofn25nuu84q" path="res://Resources/TurretStats/rocketlauncher.tres" id="3_tj17y"]
[ext_resource type="Resource" uid="uid://dtfgyt85mp1ar" path="res://Resources/WeaponStats/rocketlauncher.tres" id="4_hwkrq"]
[ext_resource type="PackedScene" uid="uid://cbmoi73hquaer" path="res://PCs/Universal/ClassCards/RocketLauncher/weapon_rocket_launcher.tscn" id="4_ioexd"]
[ext_resource type="PackedScene" uid="uid://br3bd1jmi235x" path="res://PCs/Universal/ClassCards/RocketLauncher/tower_rocket_launcher.tscn" id="4_mvvp4"]
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_ly0o5"]
[ext_resource type="Texture2D" uid="uid://by1y15lm0bppe" path="res://PCs/Universal/ClassCards/RocketLauncher/rocket_launcher.png" id="2_iqnic"]
[ext_resource type="Resource" uid="uid://c65rq455ma8f6" path="res://PCs/Universal/ClassCards/RocketLauncher/tower_stats.tres" id="3_06my6"]
[ext_resource type="PackedScene" uid="uid://bdp7icdejayvr" path="res://PCs/Universal/ClassCards/RocketLauncher/weapon_rocket_launcher.tscn" id="3_qo5gv"]
[ext_resource type="Resource" uid="uid://d2yo07m2mp2mp" path="res://PCs/Universal/ClassCards/RocketLauncher/weapon_stats.tres" id="4_cmvfg"]
[ext_resource type="PackedScene" uid="uid://b3q0f6w30nwsh" path="res://PCs/Universal/ClassCards/RocketLauncher/tower_rocket_launcher.tscn" id="4_hff2k"]
[sub_resource type="AtlasTexture" id="AtlasTexture_u80vk"]
atlas = ExtResource("2_iqnic")
region = Rect2(0, 0, 64, 64)
[resource]
script = ExtResource("1_dg0td")
script = ExtResource("1_ly0o5")
title = "Rocket Launcher"
rarity = 0
faction = 0
sprite = ExtResource("2_duef5")
turret = ExtResource("4_mvvp4")
weapon = ExtResource("4_ioexd")
weapon_stats = ExtResource("4_hwkrq")
tower_stats = ExtResource("3_tj17y")
sprite = SubResource("AtlasTexture_u80vk")
turret_scene = ExtResource("4_hff2k")
weapon_scene = ExtResource("3_qo5gv")
weapon_stats = ExtResource("4_cmvfg")
tower_stats = ExtResource("3_06my6")

View File

@ -1,33 +0,0 @@
extends RigidBody3D
class_name Rocket
@export var damage := 10.0
@export var explosion_range := 6.0
var target : Node3D
var acceleration := 15.0
var direction
var lifetime := 15.0
var time_alive := 0.0
func _process(delta: float) -> void:
time_alive += delta
if time_alive >= lifetime:
explode()
func _physics_process(_delta: float) -> void:
if is_instance_valid(target):
direction = global_position.direction_to(target.global_position)
apply_central_force(direction * acceleration)
func _on_body_entered(_body: Node) -> void:
explode()
func explode():
for enemy in get_tree().get_nodes_in_group("Enemies"):
if global_position.distance_to(enemy.global_position) <= explosion_range:
enemy.damage(damage)
queue_free()

Binary file not shown.

After

Width:  |  Height:  |  Size: 835 B

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bode8mfmr3r1h"
path="res://.godot/imported/rocket.png-351afd78a91fe9f7469af30003adbe29.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://PCs/Universal/ClassCards/RocketLauncher/rocket.png"
dest_files=["res://.godot/imported/rocket.png-351afd78a91fe9f7469af30003adbe29.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=true
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=0

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More