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://b1gd7d12pr52k"]
[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"]
[resource]
script = ExtResource("1_opk1n")
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")

View File

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

View File

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

View File

@ -0,0 +1,16 @@
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,41 @@
[gd_scene load_steps=6 format=3 uid="uid://dr2bmfj8fquxr"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Fireball/fireballtower.gd" id="1_076bl"]
[ext_resource type="PackedScene" uid="uid://dyglfv8lh2rbg" path="res://PCs/Universal/ClassCards/Fireball/fireball.tscn" id="2_0kqdt"]
[ext_resource type="Resource" uid="uid://dbanx8taicddm" path="res://Resources/StatusEffects/on_fire.tres" id="3_88y8d"]
[ext_resource type="Resource" uid="uid://b8a635kajtq6" path="res://Resources/TurretStats/fireball.tres" id="4_cd3q3"]
[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_076bl")
fireball_scene = ExtResource("2_0kqdt")
status_stats = ExtResource("3_88y8d")
stats = ExtResource("4_cd3q3")
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://cxlr31wydvroj"]
[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"]
[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_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")