mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
fbcab848e2
调整Wuwei子弹的伤害计算方式,移除冗余计算并添加rate2变量控制伤害倍率。修改Parrier子弹的反射伤害计算,加入子弹伤害因子。优化DaoStatue武器的攻击触发条件,从检测1颗子弹改为3颗,并简化子弹生成逻辑。
28 lines
972 B
GDScript
28 lines
972 B
GDScript
@tool
|
|
extends Weapon
|
|
|
|
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
|
origin["atk"] += 4 * to * soulLevel
|
|
origin["rate1"] *= soulLevel
|
|
origin["rate2"] += 0.06 * (soulLevel - 1)
|
|
return origin
|
|
func checkAttack(entity: EntityBase) -> bool:
|
|
return len(entity.getOrCreateCycleTimer("parry", 2000, 100).bullets) > 2
|
|
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("rate1") * (entity.fields[FieldStore.Entity.MAX_HEALTH] - entity.health)) + 1
|
|
bullet.rate2 = readStore("rate2")
|
|
for bulle in parryCounter.bullets.slice(0, 3):
|
|
if bulle is ParryBallBullet:
|
|
bulle.tryDestroy()
|
|
parryCounter.forceFilter()
|
|
return true
|