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/MushroomPickaxe.gd
T
fallingshrimp 06fdfd1586 feat(武器系统): 添加灵魂等级机制并重构武器升级逻辑
- 在UI中添加灵魂资源显示和操作按钮
- 修改武器升级公式加入灵魂等级系数
- 实现灵魂的提取和镶嵌功能
- 为武器卡牌添加灵魂等级颜色映射
- 初始化玩家灵魂资源为10个
2025-09-20 07:01:17 +08:00

17 lines
637 B
GDScript

@tool
extends Weapon
func update(to: int, origin: Dictionary, _entity: EntityBase):
origin["atk"] += 1 * to * soulLevel
origin["rate"] += 0.04 * to * soulLevel
origin["count"] += 1 * to * soulLevel
return origin
func attack(entity: EntityBase):
var weaponPos = entity.findWeaponAnchor("normal")
for j in BulletBase.generate(preload("res://components/Bullets/MushroomPickaxe.tscn"), entity, entity.texture.global_position, weaponPos.angle_to_point(get_global_mouse_position())):
var bullet: MushroomPickaxe = j
bullet.damage = readStore("atk")
bullet.rate = readStore("rate")
bullet.count = readStore("count")
return true