way too many changes to list, oops. big rewrite.
This commit is contained in:
BIN
Weapons/Overclock/g_asssrault-export.png
Normal file
BIN
Weapons/Overclock/g_asssrault-export.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
35
Weapons/Overclock/g_asssrault-export.png.import
Normal file
35
Weapons/Overclock/g_asssrault-export.png.import
Normal file
@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cufk22apg8kqv"
|
||||
path.s3tc="res://.godot/imported/g_asssrault-export.png-58b6525a5c474bc76f125375a72b58c0.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Weapons/Overclock/g_asssrault-export.png"
|
||||
dest_files=["res://.godot/imported/g_asssrault-export.png-58b6525a5c474bc76f125375a72b58c0.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
|
45
Weapons/Overclock/overclock_weapon.gd
Normal file
45
Weapons/Overclock/overclock_weapon.gd
Normal file
@ -0,0 +1,45 @@
|
||||
class_name OverclockWeapon extends Weapon
|
||||
|
||||
|
||||
@export var raycast: RayCast3D
|
||||
@export var range_debug_indicator: CSGSphere3D
|
||||
|
||||
var attack_range: float = 0.0
|
||||
var effect_duration: float = 0.0
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
super._ready()
|
||||
attack_range = stats.get_attribute("Range")
|
||||
effect_duration = stats.get_attribute("EffectDuration")
|
||||
raycast.target_position = Vector3(0, 0, -attack_range)
|
||||
range_debug_indicator.radius = attack_range
|
||||
raycast.global_position = hero.camera.global_position
|
||||
|
||||
|
||||
func shoot() -> void:
|
||||
super.shoot()
|
||||
if raycast.is_colliding():
|
||||
var target: CharacterBody3D = raycast.get_collider()
|
||||
if target != null:
|
||||
var target_hitbox: CollisionShape3D = target.shape_owner_get_owner(raycast.get_collider_shape())
|
||||
if target_hitbox.get_parent() is TowerBase:
|
||||
hit(target, target_hitbox.get_parent())
|
||||
#if Data.preferences.display_self_damage_indicators:
|
||||
#spawn_damage_indicator(raycast.get_collision_point())
|
||||
networked_hit.rpc(get_tree().root.get_path_to(target), get_tree().root.get_path_to(target_hitbox.get_parent()))
|
||||
|
||||
|
||||
func hit(_target: CharacterBody3D, target_hitbox: TowerBase) -> void:
|
||||
#target_hitbox.damage(damage)
|
||||
if target_hitbox.tower:
|
||||
target_hitbox.tower.big_speed_buff_timer += effect_duration
|
||||
|
||||
|
||||
@rpc("reliable")
|
||||
func networked_hit(target_path: String, target_hitbox_path: String) -> void:
|
||||
#var target: CharacterBody3D = get_tree().root.get_node(target_path)
|
||||
var target_hitbox: TowerBase = get_tree().root.get_node(target_hitbox_path) as TowerBase
|
||||
hit(null, target_hitbox)
|
||||
#if Data.preferences.display_party_damage_indicators:
|
||||
#spawn_damage_indicator(target.sprite.global_position)
|
1
Weapons/Overclock/overclock_weapon.gd.uid
Normal file
1
Weapons/Overclock/overclock_weapon.gd.uid
Normal file
@ -0,0 +1 @@
|
||||
uid://bxqellvwo4d7n
|
17
Weapons/Overclock/overclock_weapon.tscn
Normal file
17
Weapons/Overclock/overclock_weapon.tscn
Normal file
@ -0,0 +1,17 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://dmbd7ivisjm3w"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://difwo7wlyqr3h" path="res://Scenes/Weapons/hitscan_weapon.tscn" id="1_y7piy"]
|
||||
[ext_resource type="Script" uid="uid://bxqellvwo4d7n" path="res://Weapons/Overclock/overclock_weapon.gd" id="2_5uumc"]
|
||||
[ext_resource type="Resource" uid="uid://d3qmy6puuh1gl" path="res://Weapons/Overclock/weapon_stats.tres" id="3_tptkd"]
|
||||
[ext_resource type="Texture2D" uid="uid://cufk22apg8kqv" path="res://Weapons/Overclock/g_asssrault-export.png" id="4_5uumc"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_tptkd"]
|
||||
atlas = ExtResource("4_5uumc")
|
||||
region = Rect2(0, 0, 64, 64)
|
||||
|
||||
[node name="HitscanWeapon" instance=ExtResource("1_y7piy")]
|
||||
script = ExtResource("2_5uumc")
|
||||
stats = ExtResource("3_tptkd")
|
||||
|
||||
[node name="Sprite3D" parent="." index="0"]
|
||||
texture = SubResource("AtlasTexture_tptkd")
|
42
Weapons/Overclock/weapon_stats.tres
Normal file
42
Weapons/Overclock/weapon_stats.tres
Normal file
@ -0,0 +1,42 @@
|
||||
[gd_resource type="Resource" script_class="CardText" load_steps=8 format=3 uid="uid://d3qmy6puuh1gl"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://yjb0uv6og430" path="res://Scripts/Resources/stat_attribute.gd" id="1_m84e5"]
|
||||
[ext_resource type="Script" uid="uid://dg7gxxqfqxcmc" path="res://Scripts/Resources/card_text.gd" id="2_rl1ek"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_m84e5"]
|
||||
script = ExtResource("1_m84e5")
|
||||
key = "Fire Delay"
|
||||
value = 0.3
|
||||
metadata/_custom_type_script = "uid://yjb0uv6og430"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_rl1ek"]
|
||||
script = ExtResource("1_m84e5")
|
||||
key = "Damage"
|
||||
value = 0.0
|
||||
metadata/_custom_type_script = "uid://yjb0uv6og430"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_gglou"]
|
||||
script = ExtResource("1_m84e5")
|
||||
key = "Energy"
|
||||
value = 20.0
|
||||
metadata/_custom_type_script = "uid://yjb0uv6og430"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_0g051"]
|
||||
script = ExtResource("1_m84e5")
|
||||
key = "Range"
|
||||
value = 100.0
|
||||
metadata/_custom_type_script = "uid://yjb0uv6og430"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_uq2yv"]
|
||||
script = ExtResource("1_m84e5")
|
||||
key = "EffectDuration"
|
||||
value = 1.0
|
||||
metadata/_custom_type_script = "uid://yjb0uv6og430"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_rl1ek")
|
||||
target_type = 1
|
||||
energy_type = 2
|
||||
attributes = Array[ExtResource("1_m84e5")]([SubResource("Resource_m84e5"), SubResource("Resource_rl1ek"), SubResource("Resource_gglou"), SubResource("Resource_0g051"), SubResource("Resource_uq2yv")])
|
||||
text = "Fire a machine-energizing pellet every /Fire Delay\\ seconds that speeds up tower fire rate by 35% for /EffectDuration\\ seconds at a range of /Range\\m"
|
||||
metadata/_custom_type_script = "uid://dg7gxxqfqxcmc"
|
Reference in New Issue
Block a user