diff --git a/components/Bullets/Arrow.tscn b/components/Bullets/Arrow.tscn index 904e719..6ae2446 100644 --- a/components/Bullets/Arrow.tscn +++ b/components/Bullets/Arrow.tscn @@ -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") diff --git a/components/Weapons/Bow.tscn b/components/Weapons/Bow.tscn index 37785d2..f93ab73 100644 --- a/components/Weapons/Bow.tscn +++ b/components/Weapons/Bow.tscn @@ -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]" diff --git a/scripts/Contents/Bullets/Bow.gd b/scripts/Contents/Bullets/Bow.gd index d68b302..bf010e7 100644 --- a/scripts/Contents/Bullets/Bow.gd +++ b/scripts/Contents/Bullets/Bow.gd @@ -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 diff --git a/scripts/Contents/Bullets/ChickSprint.gd b/scripts/Contents/Bullets/ChickSprint.gd index f19fdeb..b33e210 100644 --- a/scripts/Contents/Bullets/ChickSprint.gd +++ b/scripts/Contents/Bullets/ChickSprint.gd @@ -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() diff --git a/scripts/Contents/Characters/Cat.gd b/scripts/Contents/Characters/Cat.gd index ea7d2fe..76b5d21 100644 --- a/scripts/Contents/Characters/Cat.gd +++ b/scripts/Contents/Characters/Cat.gd @@ -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():