1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-03 18:27:13 +08:00

feat(武器): 实现酸蚀风暴武器及其相关子弹效果

添加酸蚀风暴武器,它会发射一个吸引五种不同类型酸液子弹的风暴中心
修改酸液子弹基类以支持风暴效果
调整酸风武器的属性值和描述
移除旧版随机发射酸液子弹的逻辑
This commit is contained in:
2026-03-06 23:19:22 +08:00
parent e44458e816
commit 561be7c734
12 changed files with 241 additions and 72 deletions
+27 -35
View File
@@ -4,39 +4,31 @@ extends Weapon
var acids: Array[String] = ["AcidS", "AcidN", "AcidCl", "AcidP", "AcidC"]
func update(to: int, origin: Dictionary, _entity: EntityBase):
origin["atk"] += 0.075 * to * soulLevel
origin["c-atk"] *= soulLevel
origin["cl-atkspeed"] *= soulLevel
origin["cl-speed"] *= soulLevel
origin["n-atk"] *= soulLevel
origin["p-offset"] *= soulLevel
origin["s-count-max"] *= soulLevel
origin["weakatk"] = 0.05 * soulLevel
return origin
origin["atk"] += 0.15 * to * soulLevel
origin["c-atk"] *= soulLevel
origin["cl-atkspeed"] *= soulLevel
origin["cl-speed"] *= soulLevel
origin["n-atk"] *= soulLevel
origin["p-offset"] *= soulLevel
origin["s-count-max"] *= soulLevel
origin["weakatk"] += 0.075 * to * soulLevel
origin["f"] += 25 * (soulLevel - 1)
return origin
func attack(entity: EntityBase):
var acid = MathTool.randomChoiceFrom(acids)
for bullet in BulletBase.generate(
ComponentManager.getBullet(acid),
entity,
entity.findWeaponAnchor("normal"),
(get_global_mouse_position() - entity.findWeaponAnchor("normal")).angle(),
true,
acid == "AcidC"
):
if bullet is AcidBulletBase:
if bullet.acidType == AcidBulletBase.AcidType.STRONG:
bullet.baseDamage = readStore("atk")
else:
bullet.baseDamage = readStore("weakatk")
if bullet is AcidS:
bullet.arg1 = readStore("s-count-max")
if bullet is AcidN:
bullet.arg1 = readStore("n-atk")
if bullet is AcidCl:
bullet.arg1 = readStore("cl-speed")
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:
pass
for bullet in BulletBase.generate(
ComponentManager.getBullet("AcidStorm"),
entity,
entity.findWeaponAnchor("normal"),
(get_global_mouse_position() - entity.findWeaponAnchor("normal")).angle(),
):
if bullet is AcidStormBullet:
bullet.strongAtk = readStore("atk")
bullet.weakAtk = readStore("weakatk")
bullet.sCountMax = readStore("s-count-max")
bullet.nAtk = readStore("n-atk")
bullet.clSpeed = readStore("cl-speed")
bullet.clAtkSpeed = readStore("cl-atkspeed")
bullet.cAtk = readStore("c-atk")
bullet.pOffset = readStore("p-offset")
bullet.f = readStore("f")
return true