mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-06 03:37:13 +08:00
17 lines
648 B
GDScript
17 lines
648 B
GDScript
|
|
@tool
|
||
|
|
extends Weapon
|
||
|
|
|
||
|
|
func attack(entity: EntityBase):
|
||
|
|
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 *= (readStore("rate2") + 1) ** ((1.0 - entity.fields[FieldStore.Entity.ATTACK_SPEED]) * 100)
|
||
|
|
bullet.baseDamage *= (readStore("rate1") + 1) ** (entity.fields[FieldStore.Entity.MAX_HEALTH] - entity.health)
|
||
|
|
bullet.baseDamage *= (readStore("rate3") + 1) ** len(entity.getOrCreateCycleTimer("parry", 2000, 100).bullets)
|
||
|
|
return true
|