inching towards better class inheritence and multiplayer compatibility

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

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"