mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-31 08:21:54 +08:00
fix(武器): 调整茴香豆武器参数和逻辑
修改茴香豆武器的散射角度从20°降低到4° 将反弹伤害减免从20%降低到4% 调整反弹次数不计入概率从20%改为25% 添加count属性并关联soulLevel 移除随机纹理影响反弹次数的逻辑 更新武器描述文本以匹配新参数
This commit is contained in:
@@ -40,7 +40,7 @@ size = Vector2(32, 20)
|
||||
script = ExtResource("2_4lnkm")
|
||||
displayName = "茴香豆"
|
||||
penerate = 1.0
|
||||
penerateDamageReduction = 0.2
|
||||
penerateDamageReduction = 0.04
|
||||
lifeTime = 5000.0
|
||||
|
||||
[node name="texture" parent="." index="0"]
|
||||
|
||||
@@ -12,9 +12,14 @@ quality = 3
|
||||
typeTopic = 3
|
||||
costBeachball = 4000
|
||||
store = {
|
||||
"atk": 4
|
||||
"atk": 4,
|
||||
"count": 4.0
|
||||
}
|
||||
descriptionTemplate = "发射$atk颗[b]茴香豆[/b],在敌人间反弹,每颗茴香豆最多可以反弹$atk次,每次反弹对敌人造成$atk点伤害,有20%概率不计入反弹总次数。散射+20°,茴香豆每次反弹伤害-20%"
|
||||
storeType = {
|
||||
"atk": 1,
|
||||
"count": 1
|
||||
}
|
||||
descriptionTemplate = "发射$count颗[b]茴香豆[/b],在敌人间反弹,每颗茴香豆最多可以反弹$atk次,每次反弹对敌人造成$atk点伤害,有1/4的概率不计入反弹总次数。散射+4°,反弹时伤害-4%"
|
||||
cooldown = 1000.0
|
||||
debugRebuild = true
|
||||
|
||||
@@ -30,4 +35,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]点伤害,有20%概率不计入反弹总次数。散射+20°,茴香豆每次反弹伤害-20%[/center]"
|
||||
text = "[center]发射[color=cyan]4[/color]颗[b]茴香豆[/b],在敌人间反弹,每颗茴香豆最多可以反弹[color=cyan]4[/color]次,每次反弹对敌人造成[color=cyan]4[/color]点伤害,有1/4的概率不计入反弹总次数。散射+4°,反弹时伤害-4%[/center]"
|
||||
|
||||
@@ -13,12 +13,10 @@ func succeedToHit(_dmg: float, entity: EntityBase):
|
||||
var newEntity = EntityTool.findClosetEntity(position, get_tree(), !launcher.isPlayer(), launcher.isPlayer(), [entity])
|
||||
if is_instance_valid(newEntity):
|
||||
look_at(newEntity.getTrackingAnchor())
|
||||
bouncedTime += 1
|
||||
if !MathTool.rate(0.25):
|
||||
bouncedTime += 1
|
||||
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.particles.texture = load("res://resources/bullets/HXD/effect/%d.png" % randi_range(0, 4))
|
||||
effect.shot()
|
||||
func split(newBullet: BulletBase, _index: int, _total: int, _lastBullet: float):
|
||||
if newBullet is HXDBullet:
|
||||
|
||||
@@ -3,6 +3,7 @@ extends Weapon
|
||||
|
||||
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
||||
origin["atk"] += 1 * to * soulLevel
|
||||
origin["count"] *= soulLevel
|
||||
return origin
|
||||
func attack(entity: EntityBase):
|
||||
for i in readStore("atk"):
|
||||
@@ -10,7 +11,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) * 20)
|
||||
entity.findWeaponAnchor("normal").angle_to_point(get_global_mouse_position()) + deg_to_rad(randf_range(-1, 1) * 4)
|
||||
):
|
||||
if bullet is HXDBullet:
|
||||
bullet.maxBouncedTime = readStore("atk")
|
||||
|
||||
Reference in New Issue
Block a user