mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
2563dc8c81
降低道教石像的攻击加成和rate2加成 提高道教石像的基础攻击力 为无为之剑添加rate2属性并实现伤害计算 更新相关描述文本
30 lines
801 B
GDScript
30 lines
801 B
GDScript
extends BulletBase
|
|
class_name WuweiBullet
|
|
|
|
@export var canMove: bool = true
|
|
|
|
var rate2: float = 0
|
|
|
|
func ai():
|
|
if canMove:
|
|
PresetBulletAI.lockLauncher(self , launcher, true)
|
|
PresetBulletAI.trace(self , launcher.currentFocusedPosition, 0.1)
|
|
func hitBullet(bullet: BulletBase):
|
|
if !is_instance_valid(launcher): return
|
|
if BulletTool.canDamage(bullet, launcher):
|
|
baseDamage *= rate2 ** bullet.getDamage()
|
|
|
|
func shoot():
|
|
for bullet in BulletBase.generate(
|
|
ComponentManager.getBullet("InfinitySword"),
|
|
launcher,
|
|
position + Vector2.from_angle(rotation) * 400,
|
|
rotation
|
|
):
|
|
if bullet is InfinitySwordBullet:
|
|
bullet.baseDamage = baseDamage
|
|
bullet.rate2 = rate2
|
|
func beReady():
|
|
canMove = false
|
|
EffectController.create(ComponentManager.getEffect("Danger"), findAnchor("Spawn")).shot()
|