mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
0b97de0fcc
feat(游戏流程): 添加初始选择界面自动触发开始按钮逻辑 refactor(战斗系统): 分离调试和发布版的波次配置 style(资源): 更新图片导入配置为VRAM压缩格式 chore: 忽略zip文件并修复.gitignore格式
31 lines
1.1 KiB
GDScript
31 lines
1.1 KiB
GDScript
@tool
|
|
extends Weapon
|
|
|
|
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
|
origin["atk"] += 4 * to * soulLevel
|
|
origin["rate1"] *= soulLevel
|
|
origin["rate2"] *= soulLevel
|
|
origin["rate3"] *= soulLevel
|
|
return origin
|
|
func attack(entity: EntityBase):
|
|
var parryCounter = entity.getOrCreateCycleTimer("parry", 2000, 100)
|
|
for bullet in BulletBase.generate(
|
|
ComponentManager.getBullet("Wuwei"),
|
|
entity,
|
|
entity.position,
|
|
entity.position.angle_to_point(get_global_mouse_position())
|
|
):
|
|
if bullet is WuweiBullet:
|
|
bullet.baseDamage = readStore("atk")
|
|
bullet.baseDamage *= max(-0.99, readStore("rate2") * ((1.0 - entity.fields[FieldStore.Entity.ATTACK_SPEED]) * 100)) + 1
|
|
bullet.baseDamage *= max(-0.99, readStore("rate1") * (entity.fields[FieldStore.Entity.MAX_HEALTH] - entity.health)) + 1
|
|
var atkAll = 0
|
|
for bulle in parryCounter.bullets:
|
|
if bulle is ParryBallBullet:
|
|
atkAll += bulle.atk
|
|
bullet.baseDamage *= max(-0.99, readStore("rate3") * atkAll) + 1
|
|
for bulle in parryCounter.bullets:
|
|
if bulle is ParryBallBullet:
|
|
bulle.tryDestroy()
|
|
return true
|