1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-02 09:21:54 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Weapons/Oxygener.gd
T
fallingshrimp 3aa28ecf39 refactor(武器系统): 优化Oxygener武器逻辑并更新描述
重构Oxygener武器的攻击逻辑,将浓硝酸子弹作为火焰子弹的附属效果
更新武器描述文本以匹配新的攻击机制
修改AcidBulletBase中storm变量的类型为更通用的Node2D
移除Rooster角色中不再使用的武器
2026-03-07 09:27:42 +08:00

30 lines
833 B
GDScript

@tool
extends Weapon
func update(to: int, origin: Dictionary, _entity: EntityBase):
origin["atk"] += 1 * to * soulLevel
origin["fireatk"] += 0.5 * to * soulLevel
origin["max-n"] += 2 * soulLevel
return origin
func attack(entity: EntityBase):
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