mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-31 08:21:54 +08:00
fix: 修复子弹伤害计算并调整触发条件
调整Wuwei子弹的伤害计算方式,移除冗余计算并添加rate2变量控制伤害倍率。修改Parrier子弹的反射伤害计算,加入子弹伤害因子。优化DaoStatue武器的攻击触发条件,从检测1颗子弹改为3颗,并简化子弹生成逻辑。
This commit is contained in:
@@ -7,7 +7,7 @@ func update(to: int, origin: Dictionary, _entity: EntityBase):
|
||||
origin["rate2"] += 0.06 * (soulLevel - 1)
|
||||
return origin
|
||||
func checkAttack(entity: EntityBase) -> bool:
|
||||
return len(entity.getOrCreateCycleTimer("parry", 2000, 100).bullets) > 0
|
||||
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(
|
||||
@@ -18,14 +18,9 @@ func attack(entity: EntityBase):
|
||||
):
|
||||
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:
|
||||
bullet.rate2 = readStore("rate2")
|
||||
for bulle in parryCounter.bullets.slice(0, 3):
|
||||
if bulle is ParryBallBullet:
|
||||
bulle.tryDestroy()
|
||||
parryCounter.forceFilter()
|
||||
|
||||
Reference in New Issue
Block a user