mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-29 23:41:54 +08:00
feat(子弹): 增强鸡毛箭和鸡毛弓效果
- 为 ChickSprint 子弹添加 atk 属性并调整伤害计算 - 猫角色攻击时设置 ChickSprint 子弹的 atk 为 0.2 - 调整 Bow 子弹的生成延迟和角度计算精度 - 将 Bow 的箭矢数量从 1 增加到 2 - 增强 Arrow 子弹的速度、射程和视觉效果
This commit is contained in:
@@ -1,23 +1,47 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://wy8wqwhwr4fb"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://wy8wqwhwr4fb"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_0wuio"]
|
||||
[ext_resource type="Texture2D" uid="uid://dadbn306owsy3" path="res://resources/bullets/arrow/arrow.png" id="2_b2ohg"]
|
||||
[ext_resource type="Script" uid="uid://u5x40y0cvqq2" path="res://scripts/Contents/Bullets/Arrow.gd" id="2_qddg0"]
|
||||
|
||||
[sub_resource type="Curve" id="Curve_uu3a4"]
|
||||
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
||||
point_count = 2
|
||||
|
||||
[sub_resource type="CurveTexture" id="CurveTexture_cawe8"]
|
||||
curve = SubResource("Curve_uu3a4")
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_afwvr"]
|
||||
particle_flag_disable_z = true
|
||||
direction = Vector3(-1, 0, 0)
|
||||
spread = 0.0
|
||||
initial_velocity_min = 3000.0
|
||||
initial_velocity_max = 3000.0
|
||||
gravity = Vector3(0, 0, 0)
|
||||
alpha_curve = SubResource("CurveTexture_cawe8")
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_b2ohg"]
|
||||
|
||||
[node name="Arrow" instance=ExtResource("1_0wuio")]
|
||||
script = ExtResource("2_qddg0")
|
||||
displayName = "鸡毛箭"
|
||||
speed = 20.0
|
||||
damage = 50.0
|
||||
speed = 50.0
|
||||
penerate = 1.0
|
||||
lifeDistance = 1200.0
|
||||
lifeDistance = 2000.0
|
||||
|
||||
[node name="static" type="Sprite2D" parent="texture" index="1"]
|
||||
position = Vector2(0, -3)
|
||||
scale = Vector2(0.06775362, 0.06775362)
|
||||
texture = ExtResource("2_b2ohg")
|
||||
|
||||
[node name="trail" type="GPUParticles2D" parent="texture/static" index="0"]
|
||||
z_index = -1
|
||||
amount = 12
|
||||
texture = ExtResource("2_b2ohg")
|
||||
preprocess = 1.0
|
||||
local_coords = true
|
||||
process_material = SubResource("ParticleProcessMaterial_afwvr")
|
||||
|
||||
[node name="hitbox" parent="." index="1"]
|
||||
position = Vector2(79, 2)
|
||||
position = Vector2(85, 0)
|
||||
shape = SubResource("CircleShape2D_b2ohg")
|
||||
|
||||
@@ -12,7 +12,7 @@ quality = 2
|
||||
costBeachball = 50
|
||||
store = {
|
||||
"atk": 3,
|
||||
"count": 1,
|
||||
"count": 2,
|
||||
"self": 0.5
|
||||
}
|
||||
storeType = {
|
||||
@@ -42,4 +42,4 @@ displayName = "鸡毛弓"
|
||||
quality = 2
|
||||
|
||||
[node name="description" parent="container" index="2"]
|
||||
text = "[center]消耗[color=cyan]0.50[/color]点生命值,发射[color=cyan]1[/color]支[b]鸡毛箭[/b],每支造成当前飞行速度的[color=cyan]300%[/color]伤害。[/center]"
|
||||
text = "[center]消耗[color=cyan]0.50[/color]点生命值,发射[color=cyan]2[/color]支[b]鸡毛箭[/b],每支造成当前飞行速度的[color=cyan]300%[/color]伤害。[/center]"
|
||||
|
||||
@@ -5,14 +5,14 @@ var count: int = 0
|
||||
var atk: float = 0
|
||||
|
||||
func spawn():
|
||||
await TickTool.millseconds(250)
|
||||
await TickTool.millseconds(1000)
|
||||
var startAngle = rotation - deg_to_rad(count * 10.0 / 2)
|
||||
for c in count:
|
||||
for i in BulletBase.generate(
|
||||
ComponentManager.getBullet("Arrow"),
|
||||
launcher,
|
||||
position,
|
||||
startAngle + deg_to_rad(c * 10)
|
||||
startAngle + deg_to_rad(c * 10.0)
|
||||
):
|
||||
var bullet: Arrow = i
|
||||
bullet.atk = atk
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
extends BulletBase
|
||||
class_name ChickSprint
|
||||
|
||||
var atk: float = 1
|
||||
|
||||
func register():
|
||||
speed = 0
|
||||
penerate = 1
|
||||
func ai():
|
||||
damage = launcher.velocity.length() / 500
|
||||
damage = launcher.velocity.length() / 500 * atk
|
||||
PresetBulletAI.lockLauncher(self, launcher, true)
|
||||
if !launcher.sprinting:
|
||||
tryDestroy()
|
||||
|
||||
@@ -11,7 +11,9 @@ func ai():
|
||||
tryAttack(0, true)
|
||||
func attack(type: int):
|
||||
if type == 0:
|
||||
BulletBase.generate(ComponentManager.getBullet("ChickSprint"), self, position, 0)
|
||||
for bullet in BulletBase.generate(ComponentManager.getBullet("ChickSprint"), self, position, 0):
|
||||
if bullet is ChickSprint:
|
||||
bullet.atk = 0.2
|
||||
trySprint()
|
||||
return true
|
||||
func sprint():
|
||||
|
||||
Reference in New Issue
Block a user