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/Tree.gd
T
fallingshrimp 7c1cdc05d4 feat(战斗系统): 实现实体格挡效果并增强武器伤害配置
添加ParryEntity效果,用于实体格挡时的视觉表现
修改Tree武器攻击逻辑,增加基础伤害配置
优化Parrier子弹格挡逻辑,修正效果生成位置
2026-03-28 12:25:45 +08:00

24 lines
738 B
GDScript

@tool
extends Weapon
func update(to: int, origin: Dictionary, _entity: EntityBase):
origin["atk"] += 5 * to * soulLevel
origin["count"] += 1 * (soulLevel - 1)
origin["max"] += 2 * (soulLevel - 1)
origin["rate"] += 0.15 * (soulLevel - 1)
return origin
func attack(entity: EntityBase):
for bullet in BulletBase.generate(
ComponentManager.getBullet("Parrier"),
entity,
entity.texture.global_position,
entity.texture.global_position.angle_to_point(get_global_mouse_position()),
):
if bullet is ParrierBullet:
bullet.atk = readStore("atk")
bullet.maxParryTimes = readStore("count")
bullet.maxBallCount = readStore("max")
bullet.reflectRate = readStore("rate")
bullet.baseDamage = readStore("atk")
return true