fixed the parity between air and land enemies. +added a lot of new cards

This commit is contained in:
2023-11-11 19:03:01 +11:00
parent afc0a19b36
commit b0f8a37f60
99 changed files with 1795 additions and 188 deletions

View File

@ -0,0 +1,19 @@
[gd_resource type="Resource" script_class="Card" load_steps=7 format=3 uid="uid://bceyh6nn6h15y"]
[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"]
[resource]
script = ExtResource("1_g0mbh")
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")

View File

@ -0,0 +1,32 @@
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()

View File

@ -0,0 +1,30 @@
[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,13 @@
extends Tower
class_name IcicleTower
@export var icicle_scene : PackedScene
@export var status_stats : StatusStats
func shoot():
var icicle = icicle_scene.instantiate() as Icicle
icicle.position = model.global_position
icicle.status_stats = status_stats
get_tree().root.add_child(icicle)
icicle.direction = -model.global_transform.basis.z

View File

@ -0,0 +1,16 @@
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,41 @@
[gd_scene load_steps=6 format=3 uid="uid://clabvrajn6k3r"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Icicle/icicletower.gd" id="1_diocy"]
[ext_resource type="PackedScene" uid="uid://cdme5v2sq7u3p" path="res://PCs/Universal/ClassCards/Icicle/icicle.tscn" id="2_706hd"]
[ext_resource type="Resource" uid="uid://fed6kimfbcwv" path="res://Resources/StatusEffects/cold.tres" id="3_ei6qp"]
[ext_resource type="Resource" uid="uid://cdmkajdgfpk6h" path="res://Resources/TurretStats/icicle.tres" id="4_vyj5f"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_fouf8"]
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_diocy")
icicle_scene = ExtResource("2_706hd")
status_stats = ExtResource("3_ei6qp")
stats = ExtResource("4_vyj5f")
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.97939, 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.486166)
size = Vector3(1.10238, 1.08881, 1.04243)
[node name="CSGSphere3D" type="CSGSphere3D" parent="Model"]
visible = false
radius = 7.5
material = SubResource("StandardMaterial3D_fouf8")
[node name="CSGSphere3D2" type="CSGSphere3D" parent="Model"]
visible = false
layers = 4
radius = 7.5
material = SubResource("StandardMaterial3D_fouf8")

View File

@ -0,0 +1,79 @@
[gd_scene load_steps=10 format=3 uid="uid://dvfpqrrmjfco4"]
[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"]
[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_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")