2025-11-16 17:22:40 +08:00
|
|
|
@tool
|
|
|
|
|
extends Weapon
|
|
|
|
|
|
2026-05-10 15:31:40 +08:00
|
|
|
func sublimateOptions() -> Array[SublimateOption]:
|
|
|
|
|
return [
|
|
|
|
|
SublimateOption.new(
|
|
|
|
|
"破风之翎",
|
|
|
|
|
"伤害+15%",
|
|
|
|
|
func(w: Weapon, _e):
|
|
|
|
|
w.addStoreExtra("atk", 0.15),
|
|
|
|
|
1,
|
|
|
|
|
CategoryStore.Quality.COMMON
|
|
|
|
|
),
|
|
|
|
|
SublimateOption.new(
|
|
|
|
|
"嗜血",
|
|
|
|
|
"伤害倍率+40%,但额外消耗1点生命值",
|
|
|
|
|
func(w: Weapon, _e):
|
|
|
|
|
w.addStoreExtra("atk", 0.4)
|
|
|
|
|
w.addStoreExtra("self", 1),
|
|
|
|
|
2,
|
|
|
|
|
CategoryStore.Quality.LEGENDARY
|
|
|
|
|
),
|
|
|
|
|
SublimateOption.new(
|
|
|
|
|
"风行者",
|
|
|
|
|
"鸡毛箭出手速度+5%",
|
|
|
|
|
func(w: Weapon, _e):
|
|
|
|
|
w.addStoreExtra("initSpeed", 0.05),
|
|
|
|
|
1,
|
|
|
|
|
CategoryStore.Quality.RARE
|
|
|
|
|
),
|
|
|
|
|
SublimateOption.new(
|
|
|
|
|
"破釜沉舟",
|
|
|
|
|
"每失去5%生命值,伤害+6%",
|
|
|
|
|
func(w: Weapon, _e):
|
|
|
|
|
w.addStoreExtra("missAtk", 0.06),
|
|
|
|
|
2,
|
|
|
|
|
CategoryStore.Quality.EPIC
|
|
|
|
|
),
|
|
|
|
|
SublimateOption.new(
|
|
|
|
|
"生命汲取",
|
|
|
|
|
"鸡毛箭命中时回复0.2点生命值",
|
|
|
|
|
func(w: Weapon, _e):
|
|
|
|
|
w.addStoreExtra("lifesteal", 0.2),
|
|
|
|
|
1,
|
|
|
|
|
CategoryStore.Quality.COMMON
|
|
|
|
|
),
|
|
|
|
|
]
|
2025-11-16 17:22:40 +08:00
|
|
|
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
2026-04-12 15:27:32 +08:00
|
|
|
origin["atk"] += 0.1 * to * soulLevel
|
2025-11-16 17:22:40 +08:00
|
|
|
origin["count"] = 1 * soulLevel
|
2026-05-08 18:54:31 +08:00
|
|
|
origin["self"] += (soulLevel - 1)
|
2025-11-16 17:22:40 +08:00
|
|
|
return origin
|
|
|
|
|
func attack(entity: EntityBase):
|
|
|
|
|
entity.takeDamage(readStore("self"))
|
|
|
|
|
var weaponPos = entity.findWeaponAnchor("normal")
|
2026-05-10 15:31:40 +08:00
|
|
|
for bullet in BulletBase.generate(
|
2025-11-16 17:22:40 +08:00
|
|
|
ComponentManager.getBullet("Bow"),
|
|
|
|
|
entity,
|
|
|
|
|
weaponPos,
|
|
|
|
|
weaponPos.angle_to_point(get_global_mouse_position())
|
|
|
|
|
):
|
2026-05-10 15:31:40 +08:00
|
|
|
if bullet is Bow:
|
|
|
|
|
bullet.count = readStore("count")
|
|
|
|
|
bullet.atk = readStore("atk") * (1 + (1 - entity.getHealthPercent()) * readStoreExtra("missAtk"))
|
|
|
|
|
bullet.speed *= 1 + readStoreExtra("initSpeed")
|
|
|
|
|
bullet.lifesteal = readStoreExtra("lifesteal")
|
2026-03-07 09:08:39 +08:00
|
|
|
return true
|