2025-12-13 07:55:02 +08:00
|
|
|
|
@tool
|
|
|
|
|
|
extends Weapon
|
|
|
|
|
|
|
2026-05-10 15:17:57 +08:00
|
|
|
|
func sublimateOptions() -> Array[SublimateOption]:
|
|
|
|
|
|
return [
|
|
|
|
|
|
SublimateOption.new(
|
|
|
|
|
|
"晶核提纯",
|
|
|
|
|
|
"蓝水晶与钻石伤害+1",
|
|
|
|
|
|
func(w: Weapon, _e):
|
|
|
|
|
|
w.addStoreExtra("atk", 1),
|
|
|
|
|
|
1,
|
|
|
|
|
|
CategoryStore.Quality.COMMON
|
|
|
|
|
|
),
|
|
|
|
|
|
SublimateOption.new(
|
|
|
|
|
|
"钻石护盾",
|
|
|
|
|
|
"环绕钻石数量+1",
|
|
|
|
|
|
func(w: Weapon, _e):
|
|
|
|
|
|
w.addStoreExtra("count", 1),
|
|
|
|
|
|
1,
|
|
|
|
|
|
CategoryStore.Quality.RARE
|
|
|
|
|
|
),
|
|
|
|
|
|
SublimateOption.new(
|
|
|
|
|
|
"贯穿棱镜",
|
|
|
|
|
|
"穿透+10%",
|
|
|
|
|
|
func(w: Weapon, _e):
|
|
|
|
|
|
w.addStoreExtra("penerate", 0.1),
|
|
|
|
|
|
1,
|
|
|
|
|
|
CategoryStore.Quality.EPIC
|
|
|
|
|
|
),
|
|
|
|
|
|
SublimateOption.new(
|
|
|
|
|
|
"碎晶裂变",
|
|
|
|
|
|
"蓝水晶命中敌人时,有8%概率分裂出1颗钻石(伤害-20%)",
|
|
|
|
|
|
func(w: Weapon, _e):
|
|
|
|
|
|
w.addStoreExtra("splitRate", 0.08),
|
|
|
|
|
|
1,
|
|
|
|
|
|
CategoryStore.Quality.LEGENDARY
|
|
|
|
|
|
),
|
|
|
|
|
|
SublimateOption.new(
|
|
|
|
|
|
"动能贯穿",
|
|
|
|
|
|
"蓝水晶飞行速度+10%",
|
|
|
|
|
|
func(w: Weapon, _e):
|
|
|
|
|
|
w.addStoreExtra("speed", 0.1),
|
|
|
|
|
|
1,
|
|
|
|
|
|
CategoryStore.Quality.COMMON
|
|
|
|
|
|
),
|
|
|
|
|
|
]
|
2025-12-13 07:55:02 +08:00
|
|
|
|
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
2025-12-13 10:55:02 +08:00
|
|
|
|
origin["atk"] += 2 * to * soulLevel
|
2025-12-13 08:24:45 +08:00
|
|
|
|
origin["count"] = 1 + 1 * soulLevel
|
2025-12-13 07:55:02 +08:00
|
|
|
|
return origin
|
|
|
|
|
|
func attack(entity: EntityBase):
|
2026-05-10 15:17:57 +08:00
|
|
|
|
for crystal in BulletBase.generate(ComponentManager.getBullet("BlueCrystal"), entity, entity.findWeaponAnchor("normal"), deg_to_rad(randf_range(0, 360))):
|
|
|
|
|
|
if crystal is BlueCrystalBullet:
|
|
|
|
|
|
crystal.tracer = EntityTool.findClosetEntity(get_global_mouse_position(), get_tree(), !entity.isPlayer(), entity.isPlayer())
|
|
|
|
|
|
crystal.baseDamage = readStore("atk")
|
|
|
|
|
|
crystal.penerate += readStoreExtra("penerate")
|
|
|
|
|
|
crystal.speedBoost = readStoreExtra("speed")
|
2025-12-13 07:55:02 +08:00
|
|
|
|
for index in readStore("count"):
|
2026-05-10 15:17:57 +08:00
|
|
|
|
for diamond in BulletBase.generate(ComponentManager.getBullet("Diamond2"), entity, crystal.position, deg_to_rad(360.0 / readStore("count") * index)):
|
|
|
|
|
|
if diamond is Diamond2Bullet:
|
|
|
|
|
|
diamond.baseDamage = readStore("atk")
|
|
|
|
|
|
diamond.parent = crystal
|
|
|
|
|
|
diamond.penerate += readStoreExtra("penerate")
|
2025-12-13 10:55:02 +08:00
|
|
|
|
return true
|