diff --git a/components/Bullets/HXD.tscn b/components/Bullets/HXD.tscn index 4c9b65e..9caa99d 100644 --- a/components/Bullets/HXD.tscn +++ b/components/Bullets/HXD.tscn @@ -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"] diff --git a/components/Weapons/HXD.tscn b/components/Weapons/HXD.tscn index 4dae9c6..9904659 100644 --- a/components/Weapons/HXD.tscn +++ b/components/Weapons/HXD.tscn @@ -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]" diff --git a/scripts/Contents/Bullets/HXD.gd b/scripts/Contents/Bullets/HXD.gd index 0b98e61..4a5ee79 100644 --- a/scripts/Contents/Bullets/HXD.gd +++ b/scripts/Contents/Bullets/HXD.gd @@ -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: diff --git a/scripts/Contents/Weapons/HXD.gd b/scripts/Contents/Weapons/HXD.gd index 0d4c24a..48efd15 100644 --- a/scripts/Contents/Weapons/HXD.gd +++ b/scripts/Contents/Weapons/HXD.gd @@ -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")