2025-09-21 15:00:22 +08:00
|
|
|
@tool
|
|
|
|
|
extends Weapon
|
|
|
|
|
|
2026-05-10 15:47:31 +08:00
|
|
|
func sublimateOptions() -> Array[SublimateOption]:
|
|
|
|
|
return [
|
|
|
|
|
SublimateOption.new(
|
|
|
|
|
"聚焦校准",
|
|
|
|
|
"散射-2°",
|
|
|
|
|
func(w: Weapon, _e):
|
|
|
|
|
w.addStoreExtra("split", -2),
|
|
|
|
|
1,
|
|
|
|
|
CategoryStore.Quality.RARE
|
|
|
|
|
),
|
|
|
|
|
SublimateOption.new(
|
|
|
|
|
"晶核过载",
|
|
|
|
|
"伤害+5,但散射+4°",
|
|
|
|
|
func(w: Weapon, _e):
|
|
|
|
|
w.addStoreExtra("atk", 5)
|
|
|
|
|
w.addStoreExtra("split", 4),
|
|
|
|
|
1,
|
|
|
|
|
CategoryStore.Quality.LEGENDARY
|
|
|
|
|
),
|
|
|
|
|
SublimateOption.new(
|
|
|
|
|
"弹头塑形",
|
|
|
|
|
"穿透+5%",
|
|
|
|
|
func(w: Weapon, _e):
|
|
|
|
|
w.addStoreExtra("penerate", 0.1),
|
|
|
|
|
1,
|
|
|
|
|
CategoryStore.Quality.EPIC
|
|
|
|
|
),
|
|
|
|
|
SublimateOption.new(
|
|
|
|
|
"晶能循环",
|
|
|
|
|
"能量消耗-0.05",
|
|
|
|
|
func(_w, _e):
|
|
|
|
|
needEnergy -= 0.05,
|
|
|
|
|
1,
|
|
|
|
|
CategoryStore.Quality.COMMON
|
|
|
|
|
),
|
|
|
|
|
SublimateOption.new(
|
|
|
|
|
"动能压制",
|
|
|
|
|
"命中敌人时有5%概率回收0.25点能量",
|
|
|
|
|
func(w: Weapon, _e):
|
|
|
|
|
w.addStoreExtra("cycleRate", 0.05)
|
|
|
|
|
w.addStoreExtra("cycleCount", 0.25),
|
|
|
|
|
1,
|
|
|
|
|
CategoryStore.Quality.COMMON
|
|
|
|
|
),
|
|
|
|
|
]
|
2025-09-21 15:00:22 +08:00
|
|
|
func update(to, origin, _entity):
|
2026-01-18 14:14:31 +08:00
|
|
|
origin["atk"] += 1 * to * soulLevel
|
2025-11-16 07:25:38 +08:00
|
|
|
origin["count"] = 1 * soulLevel
|
2026-01-18 14:12:34 +08:00
|
|
|
origin["split"] /= 1 + 0.005 * to * soulLevel
|
2025-09-21 15:00:22 +08:00
|
|
|
return origin
|
|
|
|
|
func attack(entity: EntityBase):
|
2026-05-10 15:47:31 +08:00
|
|
|
for bullet in BulletBase.generate(ComponentManager.getBullet("ChainGun"), entity, entity.texture.global_position, (get_global_mouse_position() - entity.texture.global_position).angle()):
|
|
|
|
|
if bullet is ChainGunBullet:
|
|
|
|
|
bullet.baseDamage = readStore("atk")
|
|
|
|
|
bullet.count = floor(readStore("count"))
|
|
|
|
|
bullet.splits = readStore("split")
|
|
|
|
|
bullet.penerate += readStoreExtra("penerate")
|
|
|
|
|
bullet.cycleRate = readStoreExtra("cycleRate")
|
|
|
|
|
bullet.cycleCount = readStoreExtra("cycleCount")
|
2026-01-18 14:12:34 +08:00
|
|
|
return true
|