1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 15:01:53 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Weapons/Oxygener.gd
T
fallingshrimp 2f2a3fd04b feat(武器): 增强氧炔枪属性并更新描述
调整氧炔枪的攻击属性:
- 基础攻击加成从0.3提升至0.5
- 火焰攻击加成从0.1提升至0.25
- 浓硝酸液滴的生存时间减半
更新武器描述文本,明确说明火焰的击退效果和浓硝酸的射程较短特性
2026-01-26 06:46:37 +08:00

23 lines
910 B
GDScript

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