mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-09 13:17:12 +08:00
feat(武器): 实现酸蚀风暴武器及其相关子弹效果
添加酸蚀风暴武器,它会发射一个吸引五种不同类型酸液子弹的风暴中心 修改酸液子弹基类以支持风暴效果 调整酸风武器的属性值和描述 移除旧版随机发射酸液子弹的逻辑
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
extends BulletBase
|
||||
class_name AcidStormBullet
|
||||
|
||||
var acids: Array[String] = ["AcidS", "AcidN", "AcidCl", "AcidP", "AcidC"]
|
||||
|
||||
var strongAtk: float = 0
|
||||
var weakAtk: float = 0
|
||||
var sCountMax: int = 0
|
||||
var nAtk: float = 0
|
||||
var clSpeed: float = 0
|
||||
var clAtkSpeed: float = 0
|
||||
var cAtk: float = 0
|
||||
var pOffset: float = 0
|
||||
var f: float = 0
|
||||
|
||||
func ai():
|
||||
PresetBulletAI.forward(self , rotation)
|
||||
func applyDot():
|
||||
var acid = MathTool.randomChoiceFrom(acids)
|
||||
for bullet in BulletBase.generate(
|
||||
ComponentManager.getBullet(acid),
|
||||
launcher,
|
||||
position,
|
||||
0,
|
||||
):
|
||||
if bullet is AcidBulletBase:
|
||||
bullet.storm = self
|
||||
if bullet.acidType == AcidBulletBase.AcidType.STRONG:
|
||||
bullet.baseDamage = strongAtk
|
||||
else:
|
||||
bullet.baseDamage = weakAtk
|
||||
if bullet is AcidS:
|
||||
bullet.arg1 = sCountMax
|
||||
if bullet is AcidN:
|
||||
bullet.arg1 = nAtk
|
||||
if bullet is AcidCl:
|
||||
bullet.arg1 = clSpeed
|
||||
bullet.arg2 = clAtkSpeed
|
||||
if bullet is AcidP:
|
||||
bullet.arg1 = pOffset
|
||||
bullet.arg2 = EntityTool.findClosetEntity(get_global_mouse_position(), get_tree(), !launcher.isPlayer(), launcher.isPlayer())
|
||||
if bullet is AcidC:
|
||||
bullet.arg1 = cAtk
|
||||
await TickTool.millseconds(1000.0 / f)
|
||||
return true
|
||||
Reference in New Issue
Block a user