mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
refactor(武器系统): 优化Oxygener武器逻辑并更新描述
重构Oxygener武器的攻击逻辑,将浓硝酸子弹作为火焰子弹的附属效果 更新武器描述文本以匹配新的攻击机制 修改AcidBulletBase中storm变量的类型为更通用的Node2D 移除Rooster角色中不再使用的武器
This commit is contained in:
@@ -7,17 +7,23 @@ func update(to: int, origin: Dictionary, _entity: EntityBase):
|
||||
origin["max-n"] += 2 * soulLevel
|
||||
return origin
|
||||
func attack(entity: EntityBase):
|
||||
var bulletName = MathTool.randomChoiceFromWeights(["OxygenFire", "AcidN"], [10, 1])
|
||||
for i in randi_range(readStore("min-n"), readStore("max-n")) if bulletName == "AcidN" else 1:
|
||||
for bullet in BulletBase.generate(
|
||||
ComponentManager.getBullet(bulletName),
|
||||
entity,
|
||||
entity.findWeaponAnchor("normal"),
|
||||
entity.position.angle_to_point(get_global_mouse_position()),
|
||||
):
|
||||
if bullet is OxygenFire:
|
||||
bullet.baseDamage = readStore("fireatk")
|
||||
elif bullet is AcidN:
|
||||
bullet.baseDamage = readStore("atk")
|
||||
bullet.lifeTime *= 0.5
|
||||
for bullet in BulletBase.generate(
|
||||
ComponentManager.getBullet("OxygenFire"),
|
||||
entity,
|
||||
entity.findWeaponAnchor("normal"),
|
||||
entity.position.angle_to_point(get_global_mouse_position()),
|
||||
):
|
||||
if bullet is OxygenFire:
|
||||
bullet.baseDamage = readStore("fireatk")
|
||||
if MathTool.rate(0.1):
|
||||
for i in randi_range(readStore("min-n"), readStore("max-n")):
|
||||
for n in BulletBase.generate(
|
||||
ComponentManager.getBullet("AcidN"),
|
||||
entity,
|
||||
bullet.position,
|
||||
0,
|
||||
):
|
||||
if n is AcidN:
|
||||
n.baseDamage = readStore("atk")
|
||||
n.storm = bullet
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user