mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
refactor(武器系统): 重构火山武器和火扫弹攻击机制
移除火扫弹的独立脚本和火罐效果,改为直接在子弹中实现 火山武器改为三段伤害机制并调整基础伤害值 添加子弹基础伤害乘数数组支持多段伤害 更新相关场景和资源配置以匹配新机制
This commit is contained in:
@@ -1,17 +1,97 @@
|
|||||||
[gd_scene load_steps=4 format=3 uid="uid://db2cbgyyjpydp"]
|
[gd_scene load_steps=7 format=3 uid="uid://db2cbgyyjpydp"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_cqre5"]
|
[ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_cqre5"]
|
||||||
[ext_resource type="Script" uid="uid://dlg4g03ppdd2x" path="res://scripts/Contents/Bullets/FireScan.gd" id="2_qprdp"]
|
[ext_resource type="PackedScene" uid="uid://dny25qkcvtaa2" path="res://components/Effects/FirePot.tscn" id="3_ybjor"]
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_ybjor"]
|
||||||
|
resource_name = "spawn"
|
||||||
|
step = 0.05
|
||||||
|
tracks/0/type = "method"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("%texture/../firePot")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"values": [{
|
||||||
|
"args": [],
|
||||||
|
"method": &"shot"
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
tracks/1/type = "bezier"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("%hitbox:position:x")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"handle_modes": PackedInt32Array(0, 1),
|
||||||
|
"points": PackedFloat32Array(0, -0.25, 0, 0, 250, 500, 0, 0, 0, 0),
|
||||||
|
"times": PackedFloat32Array(0, 1)
|
||||||
|
}
|
||||||
|
tracks/2/type = "value"
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/path = NodePath("%texture/..:damage")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [15.0, 0.0]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_ikuic"]
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "bezier"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("%hitbox:position:x")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"handle_modes": PackedInt32Array(0),
|
||||||
|
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0),
|
||||||
|
"times": PackedFloat32Array(0)
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("%texture/..:damage")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [10.0]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ikuic"]
|
||||||
|
_data = {
|
||||||
|
&"RESET": SubResource("Animation_ikuic"),
|
||||||
|
&"spawn": SubResource("Animation_ybjor")
|
||||||
|
}
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_4qcsn"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_4qcsn"]
|
||||||
size = Vector2(10, 200)
|
size = Vector2(10, 100)
|
||||||
|
|
||||||
[node name="FireScan" instance=ExtResource("1_cqre5")]
|
[node name="FireScan" instance=ExtResource("1_cqre5")]
|
||||||
script = ExtResource("2_qprdp")
|
displayName = "雪葬"
|
||||||
displayName = "狱炎"
|
penerate = 1.0
|
||||||
speed = 15.0
|
autoSpawnAnimation = true
|
||||||
damage = 15.0
|
freeAfterSpawn = true
|
||||||
lifeDistance = 500.0
|
metadata/_edit_vertical_guides_ = [488.0]
|
||||||
|
|
||||||
|
[node name="animator" parent="texture" index="0"]
|
||||||
|
libraries = {
|
||||||
|
&"": SubResource("AnimationLibrary_ikuic")
|
||||||
|
}
|
||||||
|
|
||||||
[node name="hitbox" parent="." index="1"]
|
[node name="hitbox" parent="." index="1"]
|
||||||
shape = SubResource("RectangleShape2D_4qcsn")
|
shape = SubResource("RectangleShape2D_4qcsn")
|
||||||
|
|
||||||
|
[node name="firePot" parent="." index="2" instance=ExtResource("3_ybjor")]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=15 format=3 uid="uid://b0ncrvm8u4pox"]
|
[gd_scene load_steps=14 format=3 uid="uid://b0ncrvm8u4pox"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_goqmy"]
|
[ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_goqmy"]
|
||||||
[ext_resource type="Script" uid="uid://b2gg1fh0bflu7" path="res://scripts/Contents/Characters/Chick.gd" id="2_r6bub"]
|
[ext_resource type="Script" uid="uid://b2gg1fh0bflu7" path="res://scripts/Contents/Characters/Chick.gd" id="2_r6bub"]
|
||||||
@@ -7,7 +7,6 @@
|
|||||||
[ext_resource type="AudioStream" uid="uid://b10u6iir6uvqn" path="res://resources/sounds/effect/BigLaser.wav" id="4_mrsne"]
|
[ext_resource type="AudioStream" uid="uid://b10u6iir6uvqn" path="res://resources/sounds/effect/BigLaser.wav" id="4_mrsne"]
|
||||||
[ext_resource type="AudioStream" uid="uid://bf34p3xnsosgj" path="res://resources/sounds/effect/Dun Dun Dunnn.wav" id="4_w0sit"]
|
[ext_resource type="AudioStream" uid="uid://bf34p3xnsosgj" path="res://resources/sounds/effect/Dun Dun Dunnn.wav" id="4_w0sit"]
|
||||||
[ext_resource type="AudioStream" uid="uid://cee6rxv2uqynh" path="res://resources/sounds/effect/Flame.ogg" id="5_vcsbb"]
|
[ext_resource type="AudioStream" uid="uid://cee6rxv2uqynh" path="res://resources/sounds/effect/Flame.ogg" id="5_vcsbb"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dny25qkcvtaa2" path="res://components/Effects/FirePot.tscn" id="6_kvx3n"]
|
|
||||||
[ext_resource type="AudioStream" uid="uid://dn6bijr513wyp" path="res://resources/sounds/effect/Drum Boing.wav" id="7_qjhwc"]
|
[ext_resource type="AudioStream" uid="uid://dn6bijr513wyp" path="res://resources/sounds/effect/Drum Boing.wav" id="7_qjhwc"]
|
||||||
[ext_resource type="Texture2D" uid="uid://k0hcr5u2xlk6" path="res://resources/characters/chick/fox.png" id="8_k8ox8"]
|
[ext_resource type="Texture2D" uid="uid://k0hcr5u2xlk6" path="res://resources/characters/chick/fox.png" id="8_k8ox8"]
|
||||||
|
|
||||||
@@ -100,9 +99,6 @@ shape = SubResource("CircleShape2D_w0sit")
|
|||||||
[node name="normal" type="Node2D" parent="texture/weapons" index="0"]
|
[node name="normal" type="Node2D" parent="texture/weapons" index="0"]
|
||||||
position = Vector2(134, -130)
|
position = Vector2(134, -130)
|
||||||
|
|
||||||
[node name="firepot" parent="texture/weapons/normal" index="0" instance=ExtResource("6_kvx3n")]
|
|
||||||
unique_name_in_owner = true
|
|
||||||
|
|
||||||
[node name="foot" type="Node2D" parent="texture/weapons" index="1"]
|
[node name="foot" type="Node2D" parent="texture/weapons" index="1"]
|
||||||
position = Vector2(56, 28)
|
position = Vector2(56, 28)
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
[ext_resource type="PackedScene" uid="uid://bcvuuy2m0pke0" path="res://components/Abstracts/EffectBase.tscn" id="1_k7ukc"]
|
[ext_resource type="PackedScene" uid="uid://bcvuuy2m0pke0" path="res://components/Abstracts/EffectBase.tscn" id="1_k7ukc"]
|
||||||
|
|
||||||
[sub_resource type="Curve" id="Curve_ohc88"]
|
[sub_resource type="Curve" id="Curve_ohc88"]
|
||||||
_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.2, 1), 0.0, 0.0, 0, 0, Vector2(0.5, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.2, 1), 0.0, 0.0, 0, 0, Vector2(0.6, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
||||||
point_count = 4
|
point_count = 4
|
||||||
|
|
||||||
[sub_resource type="CurveTexture" id="CurveTexture_6awim"]
|
[sub_resource type="CurveTexture" id="CurveTexture_6awim"]
|
||||||
@@ -37,10 +37,10 @@ emission_shape = 1
|
|||||||
emission_sphere_radius = 50.0
|
emission_sphere_radius = 50.0
|
||||||
angle_min = 1.07288e-05
|
angle_min = 1.07288e-05
|
||||||
angle_max = 360.0
|
angle_max = 360.0
|
||||||
spread = 5.0
|
spread = 0.0
|
||||||
initial_velocity_min = 10.0
|
initial_velocity_min = 100.0
|
||||||
initial_velocity_max = 500.0
|
initial_velocity_max = 750.0
|
||||||
gravity = Vector3(980, 0, 0)
|
gravity = Vector3(0, 0, 0)
|
||||||
linear_accel_min = -2.23517e-06
|
linear_accel_min = -2.23517e-06
|
||||||
linear_accel_max = -2.23517e-06
|
linear_accel_max = -2.23517e-06
|
||||||
linear_accel_curve = SubResource("CurveTexture_1flsn")
|
linear_accel_curve = SubResource("CurveTexture_1flsn")
|
||||||
@@ -54,6 +54,6 @@ alpha_curve = SubResource("CurveTexture_6awim")
|
|||||||
metadata/_edit_vertical_guides_ = [808.0]
|
metadata/_edit_vertical_guides_ = [808.0]
|
||||||
|
|
||||||
[node name="particles" parent="." index="1"]
|
[node name="particles" parent="." index="1"]
|
||||||
amount = 100
|
amount = 150
|
||||||
local_coords = true
|
local_coords = true
|
||||||
process_material = SubResource("ParticleProcessMaterial_pah3d")
|
process_material = SubResource("ParticleProcessMaterial_pah3d")
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
[ext_resource type="Script" uid="uid://cbihum34xs8ev" path="res://scripts/Contents/Weapons/Volcano.gd" id="2_ihngx"]
|
[ext_resource type="Script" uid="uid://cbihum34xs8ev" path="res://scripts/Contents/Weapons/Volcano.gd" id="2_ihngx"]
|
||||||
|
|
||||||
[node name="Volcano" instance=ExtResource("1_3uhfa")]
|
[node name="Volcano" instance=ExtResource("1_3uhfa")]
|
||||||
|
clip_contents = true
|
||||||
script = ExtResource("2_ihngx")
|
script = ExtResource("2_ihngx")
|
||||||
avatarTexture = ExtResource("2_hh01t")
|
avatarTexture = ExtResource("2_hh01t")
|
||||||
displayName = "火山"
|
displayName = "火山"
|
||||||
@@ -12,15 +13,21 @@ quality = 4
|
|||||||
typeTopic = 2
|
typeTopic = 2
|
||||||
costBeachball = 300
|
costBeachball = 300
|
||||||
store = {
|
store = {
|
||||||
"atk": 20,
|
"atk": 15.0,
|
||||||
|
"dmg1": 1.0,
|
||||||
|
"dmg2": 0.5,
|
||||||
|
"dmg3": 2.0,
|
||||||
"rotate": 0.1
|
"rotate": 0.1
|
||||||
}
|
}
|
||||||
storeType = {
|
storeType = {
|
||||||
"atk": 1,
|
"atk": 1,
|
||||||
|
"dmg1": 2,
|
||||||
|
"dmg2": 2,
|
||||||
|
"dmg3": 2,
|
||||||
"rotate": 2
|
"rotate": 2
|
||||||
}
|
}
|
||||||
descriptionTemplate = "召唤1支[b]火山[/b],以$rotate的效率跟随鼠标指向,接触时造成$atk点伤害。"
|
descriptionTemplate = "召唤1支[b]火山[/b],以$rotate的效率跟随鼠标指向,进行3段攻击。基础接触伤害为$atk,三段造成的伤害分别为$dmg1,$dmg2,$dmg3。"
|
||||||
cooldown = 2000.0
|
cooldown = 1750.0
|
||||||
debugRebuild = true
|
debugRebuild = true
|
||||||
|
|
||||||
[node name="avatar" parent="container/info" index="0"]
|
[node name="avatar" parent="container/info" index="0"]
|
||||||
@@ -38,4 +45,4 @@ quality = 4
|
|||||||
typeTopic = 2
|
typeTopic = 2
|
||||||
|
|
||||||
[node name="description" parent="container" index="2"]
|
[node name="description" parent="container" index="2"]
|
||||||
text = "[center]召唤1支[b]火山[/b],以[color=cyan]10%[/color]的效率跟随鼠标指向,接触时造成[color=cyan]20[/color]点伤害。[/center]"
|
text = "[center]召唤1支[b]火山[/b],以[color=cyan]10%[/color]的效率跟随鼠标指向,进行3段攻击。基础接触伤害为[color=cyan]15[/color],三段造成的伤害分别为[color=cyan]100%[/color],[color=cyan]50%[/color],[color=cyan]200%[/color]。[/center]"
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
extends BulletBase
|
|
||||||
class_name FireScan
|
|
||||||
|
|
||||||
func ai():
|
|
||||||
PresetBulletAI.forward(self, rotation)
|
|
||||||
damage = (1 - lifeDistancePercent()) * originalDamage
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://dlg4g03ppdd2x
|
|
||||||
@@ -5,4 +5,4 @@ class_name FoxZhua
|
|||||||
|
|
||||||
func ai():
|
func ai():
|
||||||
if canTrace:
|
if canTrace:
|
||||||
PresetBulletAI.lerpPosition(self, launcher.currentFocusedBoss.getTrackingAnchor() - Vector2(0, 200), speed)
|
PresetBulletAI.lerpPosition(self, launcher.currentFocusedBoss.getTrackingAnchor() - Vector2(0, 200), speed)
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
extends EntityBase
|
extends EntityBase
|
||||||
class_name Chick
|
class_name Chick
|
||||||
|
|
||||||
@onready var firepot = $"%firepot"
|
|
||||||
|
|
||||||
var played: bool = false
|
var played: bool = false
|
||||||
|
|
||||||
func register():
|
func register():
|
||||||
@@ -43,10 +41,7 @@ func attack(type):
|
|||||||
BulletBase.generate(ComponentManager.getBullet("ChickLaser"), self, texture.global_position, deg_to_rad(360.0 / laserCount * i))
|
BulletBase.generate(ComponentManager.getBullet("ChickLaser"), self, texture.global_position, deg_to_rad(360.0 / laserCount * i))
|
||||||
elif type == 2:
|
elif type == 2:
|
||||||
var weaponPos = findWeaponAnchor("normal")
|
var weaponPos = findWeaponAnchor("normal")
|
||||||
var target = weaponPos.angle_to_point(currentFocusedBoss.getTrackingAnchor())
|
BulletBase.generate(ComponentManager.getBullet("FireScan"), self, weaponPos, weaponPos.angle_to_point(currentFocusedBoss.getTrackingAnchor()))
|
||||||
firepot.global_rotation = target
|
|
||||||
firepot.shot()
|
|
||||||
BulletBase.generate(ComponentManager.getBullet("FireScan"), self, weaponPos, target)
|
|
||||||
elif type == 3:
|
elif type == 3:
|
||||||
BulletBase.generate(ComponentManager.getBullet("ChickSprint"), self, position, 0)
|
BulletBase.generate(ComponentManager.getBullet("ChickSprint"), self, position, 0)
|
||||||
trySprint()
|
trySprint()
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
extends Weapon
|
extends Weapon
|
||||||
|
|
||||||
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
||||||
origin["atk"] += 3 * to * soulLevel
|
|
||||||
origin["rotate"] += 0.015 * to * soulLevel
|
origin["rotate"] += 0.015 * to * soulLevel
|
||||||
return origin
|
return origin
|
||||||
func attack(entity: EntityBase):
|
func attack(entity: EntityBase):
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ var isChildSplit: bool = false
|
|||||||
var isChildRefract: bool = false
|
var isChildRefract: bool = false
|
||||||
var initialSpeed: float = 0
|
var initialSpeed: float = 0
|
||||||
var originalDamage: float = 0
|
var originalDamage: float = 0
|
||||||
|
var damageMultiplier: Array[float] = [1.0]
|
||||||
|
var usingDamageMultiplier: int = 0
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
initialSpeed = speed
|
initialSpeed = speed
|
||||||
@@ -84,6 +86,8 @@ func _physics_process(_delta: float) -> void:
|
|||||||
else:
|
else:
|
||||||
tryDestroy()
|
tryDestroy()
|
||||||
|
|
||||||
|
func getDamage():
|
||||||
|
return originalDamage * damageMultiplier[usingDamageMultiplier]
|
||||||
func hit(target: Node):
|
func hit(target: Node):
|
||||||
var entity: EntityBase = EntityTool.fromHurtbox(target)
|
var entity: EntityBase = EntityTool.fromHurtbox(target)
|
||||||
if !entity || !launcher: return
|
if !entity || !launcher: return
|
||||||
|
|||||||
Reference in New Issue
Block a user