mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-27 22:41:56 +08:00
feat(武器): 调整茴香豆武器参数和效果
修改茴香豆武器的散射角度从40°降低到20° 添加反弹伤害衰减20%的机制 当特效纹理ID为1时不计入反弹次数 更新武器描述模板和数值计算 移除不再使用的HXDBoom特效脚本
This commit is contained in:
@@ -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"]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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]"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
extends EffectController
|
||||
|
||||
func register():
|
||||
particles.texture = load("res://resources/bullets/HXD/effect/%d.png" % randi_range(0, 4))
|
||||
@@ -1 +0,0 @@
|
||||
uid://bxvgpyb3fyko1
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user