mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-02 09:21:54 +08:00
3aa28ecf39
重构Oxygener武器的攻击逻辑,将浓硝酸子弹作为火焰子弹的附属效果 更新武器描述文本以匹配新的攻击机制 修改AcidBulletBase中storm变量的类型为更通用的Node2D 移除Rooster角色中不再使用的武器
30 lines
833 B
GDScript
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
|