1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 06:51:54 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Weapons/Bow.gd
T
fallingshrimp 5250adc50d feat(资源): 添加新食物和武器资源并调整现有配置
添加蛋挞、香辣鸡腿堡、阴阳球和钓鱼竿等新食物资源
调整Bow武器的攻击力和自身伤害计算逻辑
修改Tree武器的攻击速率和伤害比例
更新BigLaser和Tree的显示名称及配置
添加相关纹理资源及导入配置
2026-04-12 15:27:32 +08:00

22 lines
585 B
GDScript

@tool
extends Weapon
func update(to: int, origin: Dictionary, _entity: EntityBase):
origin["atk"] += 0.1 * to * soulLevel
origin["count"] = 1 * soulLevel
origin["self"] *= soulLevel
return origin
func attack(entity: EntityBase):
entity.takeDamage(readStore("self"))
var weaponPos = entity.findWeaponAnchor("normal")
for i in BulletBase.generate(
ComponentManager.getBullet("Bow"),
entity,
weaponPos,
weaponPos.angle_to_point(get_global_mouse_position())
):
var bullet: Bow = i
bullet.count = readStore("count")
bullet.atk = readStore("atk")
return true