diff --git a/components/Bullets/HXD.tscn b/components/Bullets/HXD.tscn index 1d71291..4c9b65e 100644 --- a/components/Bullets/HXD.tscn +++ b/components/Bullets/HXD.tscn @@ -40,6 +40,7 @@ size = Vector2(32, 20) script = ExtResource("2_4lnkm") displayName = "茴香豆" penerate = 1.0 +penerateDamageReduction = 0.2 lifeTime = 5000.0 [node name="texture" parent="." index="0"] diff --git a/components/Effects/HXDBoom.tscn b/components/Effects/HXDBoom.tscn index 2e32c20..c26fbc4 100644 --- a/components/Effects/HXDBoom.tscn +++ b/components/Effects/HXDBoom.tscn @@ -1,7 +1,6 @@ -[gd_scene load_steps=9 format=3 uid="uid://c0oppv5v8grnu"] +[gd_scene load_steps=8 format=3 uid="uid://c0oppv5v8grnu"] [ext_resource type="PackedScene" uid="uid://bcvuuy2m0pke0" path="res://components/Abstracts/EffectBase.tscn" id="1_41cv2"] -[ext_resource type="Script" uid="uid://bxvgpyb3fyko1" path="res://scripts/Contents/Effects/HXDBoom.gd" id="2_uo6a0"] [ext_resource type="Texture2D" uid="uid://ctvlwl62ieuu6" path="res://resources/bullets/HXD/effect/4.png" id="3_4u6cx"] [sub_resource type="Curve" id="Curve_4u6cx"] @@ -28,7 +27,6 @@ scale_curve = SubResource("CurveTexture_tkfx4") alpha_curve = SubResource("CurveTexture_rt83h") [node name="HXDBoom" instance=ExtResource("1_41cv2")] -script = ExtResource("2_uo6a0") [node name="particles" parent="." index="1"] amount = 1 diff --git a/components/Weapons/HXD.tscn b/components/Weapons/HXD.tscn index 9a9eca6..4dae9c6 100644 --- a/components/Weapons/HXD.tscn +++ b/components/Weapons/HXD.tscn @@ -14,7 +14,7 @@ costBeachball = 4000 store = { "atk": 4 } -descriptionTemplate = "发射$atk颗[b]茴香豆[/b],在敌人间反弹,每颗茴香豆最多可以反弹$atk次,每次反弹对敌人造成$atk点伤害。散射+40°" +descriptionTemplate = "发射$atk颗[b]茴香豆[/b],在敌人间反弹,每颗茴香豆最多可以反弹$atk次,每次反弹对敌人造成$atk点伤害,有20%概率不计入反弹总次数。散射+20°,茴香豆每次反弹伤害-20%" cooldown = 1000.0 debugRebuild = true @@ -30,4 +30,4 @@ quality = 3 typeTopic = 3 [node name="description" parent="container" index="2"] -text = "[center]发射[color=cyan]4[/color]颗[b]茴香豆[/b],在敌人间反弹,每颗茴香豆最多可以反弹[color=cyan]4[/color]次,每次反弹对敌人造成[color=cyan]4[/color]点伤害。散射+40°[/center]" +text = "[center]发射[color=cyan]4[/color]颗[b]茴香豆[/b],在敌人间反弹,每颗茴香豆最多可以反弹[color=cyan]4[/color]次,每次反弹对敌人造成[color=cyan]4[/color]点伤害,有20%概率不计入反弹总次数。散射+20°,茴香豆每次反弹伤害-20%[/center]" diff --git a/scripts/Contents/Bullets/HXD.gd b/scripts/Contents/Bullets/HXD.gd index 20884fb..3dca681 100644 --- a/scripts/Contents/Bullets/HXD.gd +++ b/scripts/Contents/Bullets/HXD.gd @@ -14,7 +14,12 @@ func succeedToHit(_dmg: float, entity: EntityBase): if is_instance_valid(newEntity): look_at(newEntity.position) bouncedTime += 1 - EffectController.create(ComponentManager.getEffect("HXDBoom"), position).shot() + var effect = EffectController.create(ComponentManager.getEffect("HXDBoom"), position) + var textureId = randi_range(0, 4) + if textureId == 1: + bouncedTime -= 1 + effect.particles.texture = load("res://resources/bullets/HXD/effect/%d.png" % textureId) + effect.shot() func split(newBullet: BulletBase, _index: int, _total: int, _lastBullet: float): if newBullet is HXDBullet: newBullet.bouncedTime = 0 diff --git a/scripts/Contents/Effects/.gitkeep b/scripts/Contents/Effects/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/scripts/Contents/Effects/HXDBoom.gd b/scripts/Contents/Effects/HXDBoom.gd deleted file mode 100644 index 19bfa06..0000000 --- a/scripts/Contents/Effects/HXDBoom.gd +++ /dev/null @@ -1,4 +0,0 @@ -extends EffectController - -func register(): - particles.texture = load("res://resources/bullets/HXD/effect/%d.png" % randi_range(0, 4)) diff --git a/scripts/Contents/Effects/HXDBoom.gd.uid b/scripts/Contents/Effects/HXDBoom.gd.uid deleted file mode 100644 index 80bf291..0000000 --- a/scripts/Contents/Effects/HXDBoom.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://bxvgpyb3fyko1 diff --git a/scripts/Contents/Weapons/HXD.gd b/scripts/Contents/Weapons/HXD.gd index 6bab0e4..0d4c24a 100644 --- a/scripts/Contents/Weapons/HXD.gd +++ b/scripts/Contents/Weapons/HXD.gd @@ -2,7 +2,7 @@ extends Weapon func update(to: int, origin: Dictionary, _entity: EntityBase): - origin["atk"] += 1.5 * to * soulLevel + origin["atk"] += 1 * to * soulLevel return origin func attack(entity: EntityBase): for i in readStore("atk"): @@ -10,7 +10,7 @@ func attack(entity: EntityBase): ComponentManager.getBullet("HXD"), entity, entity.findWeaponAnchor("normal"), - entity.findWeaponAnchor("normal").angle_to_point(get_global_mouse_position()) + deg_to_rad(randf_range(-1, 1) * 40) + entity.findWeaponAnchor("normal").angle_to_point(get_global_mouse_position()) + deg_to_rad(randf_range(-1, 1) * 20) ): if bullet is HXDBullet: bullet.maxBouncedTime = readStore("atk")