diff --git a/components/Weapons/AcidWind.tscn b/components/Weapons/AcidWind.tscn index c1178e6..eaaba1a 100644 --- a/components/Weapons/AcidWind.tscn +++ b/components/Weapons/AcidWind.tscn @@ -18,7 +18,7 @@ store = { "cl-speed": 0.001, "n-atk": 1.0, "p-offset": 0.1, -"s-count-max": 3.0, +"s-count-max": 4.0, "weakatk": 0.25 } storeType = { @@ -35,8 +35,8 @@ descriptionTemplate = "高速随机喷射以下五种[b]酸[/b]之一,强酸 [color=green][b]硫酸[/b][/color]:命中时溅射1~$s-count-max滴[b]硫酸[/b]。 [color=lightblue][b]硝酸[/b][/color]:额外造成$n-atk点伤害。 [color=lightyellow][b]盐酸[/b][/color]:使敌人 [i]移动速度[/i] 降低$cl-speed,[i]攻击速度[/i] 降低$cl-atkspeed。 -[color=pink][b]碳酸[/b][/color]:可无限穿透,碰撞体积会越来越大,但飞行速度稍慢且有额外散射。 -[color=orange][b]磷酸[/b][/color]:使敌人 [i]散射角[/i] 增加$p-offset。" +[color=pink][b]碳酸[/b][/color]:不会发生散射,可无限穿透,碰撞体积会越来越大,但飞行速度稍慢。 +[color=orange][b]磷酸[/b][/color]:使敌人 [i]散射角[/i] 增加$p-offset,可无限追踪。" cooldown = 0.0 debugRebuild = true @@ -53,8 +53,8 @@ typeTopic = 3 [node name="description" parent="container" index="2"] text = "[center]高速随机喷射以下五种[b]酸[/b]之一,强酸可造成[color=cyan]0.50[/color]点伤害,弱酸造成[color=cyan]0.25[/color]点伤害。 -[color=green][b]硫酸[/b][/color]:命中时溅射1~[color=cyan]3[/color]滴[b]硫酸[/b]。 +[color=green][b]硫酸[/b][/color]:命中时溅射1~[color=cyan]4[/color]滴[b]硫酸[/b]。 [color=lightblue][b]硝酸[/b][/color]:额外造成[color=cyan]1[/color]点伤害。 [color=lightyellow][b]盐酸[/b][/color]:使敌人 [i]移动速度[/i] 降低[color=cyan]0.1%[/color],[i]攻击速度[/i] 降低[color=cyan]0.1%[/color]。 -[color=pink][b]碳酸[/b][/color]:可无限穿透,碰撞体积会越来越大,但飞行速度稍慢且有额外散射。 -[color=orange][b]磷酸[/b][/color]:使敌人 [i]散射角[/i] 增加[color=cyan]0.1°[/color]。[/center]" +[color=pink][b]碳酸[/b][/color]:不会发生散射,可无限穿透,碰撞体积会越来越大,但飞行速度稍慢。 +[color=orange][b]磷酸[/b][/color]:使敌人 [i]散射角[/i] 增加[color=cyan]0.1°[/color],可无限追踪。[/center]" diff --git a/scripts/Contents/Bullets/AcidBulletBase.gd b/scripts/Contents/Bullets/AcidBulletBase.gd index 70dccc6..b9dd8f2 100644 --- a/scripts/Contents/Bullets/AcidBulletBase.gd +++ b/scripts/Contents/Bullets/AcidBulletBase.gd @@ -7,9 +7,9 @@ enum AcidType { } @export var acidType: AcidType = AcidType.STRONG -var arg1: float = 0 -var arg2: float = 0 -var arg3: float = 0 +var arg1 = 0 +var arg2 = 0 +var arg3 = 0 func register(): scale.y *= MathTool.randomChoiceFrom([-1, 1]) diff --git a/scripts/Contents/Bullets/AcidP.gd b/scripts/Contents/Bullets/AcidP.gd index 8043e95..398c0bc 100644 --- a/scripts/Contents/Bullets/AcidP.gd +++ b/scripts/Contents/Bullets/AcidP.gd @@ -2,4 +2,8 @@ extends AcidBulletBase class_name AcidP func succeedToHit(_dmg: float, entity: EntityBase): - entity.fields[FieldStore.Entity.OFFSET_SHOOT] = clamp(entity.fields[FieldStore.Entity.OFFSET_SHOOT] + arg1, 0, INF) + entity.fields[FieldStore.Entity.OFFSET_SHOOT] = clamp(entity.fields[FieldStore.Entity.OFFSET_SHOOT] + arg1, 0, INF) +func ai(): + super.ai() + if is_instance_valid(arg2): + PresetBulletAI.trace(self, arg2.position, 0.01) diff --git a/scripts/Contents/Weapons/AcidWind.gd b/scripts/Contents/Weapons/AcidWind.gd index 7b47acb..509529d 100644 --- a/scripts/Contents/Weapons/AcidWind.gd +++ b/scripts/Contents/Weapons/AcidWind.gd @@ -14,11 +14,14 @@ func update(to: int, origin: Dictionary, _entity: EntityBase): origin["weakatk"] = 0.05 * soulLevel return origin func attack(entity: EntityBase): + var acid = MathTool.randomChoiceFrom(acids) for bullet in BulletBase.generate( - ComponentManager.getBullet(MathTool.randomChoiceFrom(acids)), + ComponentManager.getBullet(acid), entity, entity.findWeaponAnchor("normal"), - (get_global_mouse_position() - entity.findWeaponAnchor("normal")).angle() + (get_global_mouse_position() - entity.findWeaponAnchor("normal")).angle(), + true, + acid == "AcidC" ): if bullet is AcidBulletBase: if bullet.acidType == AcidBulletBase.AcidType.STRONG: @@ -34,5 +37,6 @@ func attack(entity: EntityBase): bullet.arg2 = readStore("cl-atkspeed") if bullet is AcidP: bullet.arg1 = readStore("p-offset") + bullet.arg2 = EntityTool.findClosetEntity(get_global_mouse_position(), get_tree(), !entity.isPlayer(), entity.isPlayer()) if bullet is AcidC: - bullet.rotation += deg_to_rad(randf_range(-1, 1) * 15) + pass