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/HXD.gd
T
fallingshrimp dd479b0d7b feat(武器): 添加咸亨记账簿武器及茴香豆子弹
实现新的HXD武器系统,包括:
- 咸亨记账簿武器,可发射反弹的茴香豆子弹
- 茴香豆子弹能在敌人间反弹并造成伤害
- 添加相关资源文件及场景配置
- 将新武器添加到公鸡角色的武器库中
2026-02-02 09:40:18 +08:00

18 lines
649 B
GDScript

@tool
extends Weapon
func update(to: int, origin: Dictionary, _entity: EntityBase):
origin["atk"] += 1 * to * soulLevel
return origin
func attack(entity: EntityBase):
for i in readStore("atk"):
for bullet in BulletBase.generate(
ComponentManager.getBullet("HXD"),
entity,
entity.findWeaponAnchor("normal"),
entity.findWeaponAnchor("normal").angle_to_point(get_global_mouse_position()) + deg_to_rad(randf_range(-1, 1) * 40)
):
if bullet is HXDBullet:
bullet.maxBouncedTime = readStore("atk")
bullet.baseDamage = readStore("atk")