mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-04 02:37:12 +08:00
feat(武器): 调整茴香豆武器参数和效果
修改茴香豆武器的散射角度从40°降低到20° 添加反弹伤害衰减20%的机制 当特效纹理ID为1时不计入反弹次数 更新武器描述模板和数值计算 移除不再使用的HXDBoom特效脚本
This commit is contained in:
@@ -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