1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-27 22:41:56 +08:00
Files
fallingshrimp df8ea7c466 fix(武器): 限制追踪强度在0到1之间并调整攻击力
将LGBT武器的追踪强度限制在0到1之间,防止数值溢出。同时将基础攻击力从15提升到20,增强武器效果。
2026-05-08 15:19:48 +08:00

21 lines
666 B
GDScript

@tool
extends Weapon
class_name LGBTWeapon
func update(to: int, origin: Dictionary, _entity: EntityBase):
origin["angle"] /= 1 + 0.025 * to * soulLevel
origin["count"] = soulLevel + 1
origin["atk"] += 2 * to * soulLevel
origin["power"] += 0.005 * to * soulLevel
origin["trace"] += 0.05 * to * soulLevel
return origin
func attack(entity: EntityBase):
var summon = entity.summon(ComponentManager.getSummon("LGBTFlag"))
if !summon: return true
summon.atk = readStore("atk")
summon.maxTraceTime = readStore("trace") * 1000
summon.tracePower = clamp(readStore("power"), 0, 1)
summon.count = readStore("count")
summon.angle = readStore("angle")
return true