2026-02-15 19:36:46 +08:00
|
|
|
@tool
|
|
|
|
|
extends Weapon
|
|
|
|
|
|
2026-05-10 16:34:45 +08:00
|
|
|
func sublimateOptions() -> Array[SublimateOption]:
|
|
|
|
|
return [
|
|
|
|
|
SublimateOption.new(
|
|
|
|
|
"锋利齿轮",
|
|
|
|
|
"锋利度+4",
|
|
|
|
|
func(w: Weapon, _e):
|
|
|
|
|
w.addStoreExtra("atk", 4),
|
|
|
|
|
2,
|
|
|
|
|
CategoryStore.Quality.COMMON
|
|
|
|
|
),
|
|
|
|
|
SublimateOption.new(
|
|
|
|
|
"回旋风暴",
|
|
|
|
|
"齿轮回旋时转速额外+15%",
|
|
|
|
|
func(w: Weapon, _e):
|
|
|
|
|
w.addStoreExtra("rotateExtra", 0.15),
|
|
|
|
|
1,
|
|
|
|
|
CategoryStore.Quality.EPIC
|
|
|
|
|
),
|
|
|
|
|
SublimateOption.new(
|
|
|
|
|
"顺手牵羊",
|
|
|
|
|
"齿轮命中敌人时降低其2%攻击速度",
|
|
|
|
|
func(w: Weapon, _e):
|
|
|
|
|
w.addStoreExtra("atkspeed", 1),
|
|
|
|
|
1,
|
|
|
|
|
CategoryStore.Quality.COMMON
|
|
|
|
|
),
|
|
|
|
|
SublimateOption.new(
|
|
|
|
|
"离心甩臂",
|
|
|
|
|
"伤害+5%",
|
|
|
|
|
func(w: Weapon, _e):
|
|
|
|
|
w.addStoreExtra("dmg", 0.05),
|
|
|
|
|
1,
|
|
|
|
|
CategoryStore.Quality.WASTE
|
|
|
|
|
),
|
|
|
|
|
SublimateOption.new(
|
|
|
|
|
"撕裂锯齿",
|
|
|
|
|
"齿轮回旋时可吸附敌人,吸力+15",
|
|
|
|
|
func(w: Weapon, _e):
|
|
|
|
|
w.addStoreExtra("gravity", 15),
|
|
|
|
|
1,
|
|
|
|
|
CategoryStore.Quality.COMMON
|
|
|
|
|
),
|
|
|
|
|
]
|
2026-02-15 19:36:46 +08:00
|
|
|
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
2026-04-04 13:32:15 +08:00
|
|
|
origin["atk"] += 1 * to * soulLevel
|
|
|
|
|
origin["rotate"] += 0.5 * to * soulLevel
|
|
|
|
|
return origin
|
2026-02-15 19:36:46 +08:00
|
|
|
func attack(entity: EntityBase):
|
2026-04-04 13:32:15 +08:00
|
|
|
var weaponPos = entity.findWeaponAnchor("normal")
|
|
|
|
|
for bullet in BulletBase.generate(
|
|
|
|
|
ComponentManager.getBullet("Cogwheel"),
|
|
|
|
|
entity,
|
|
|
|
|
weaponPos,
|
|
|
|
|
weaponPos.angle_to_point(get_global_mouse_position()),
|
|
|
|
|
):
|
|
|
|
|
if bullet is CogwheelBullet:
|
|
|
|
|
bullet.initialRotate = readStore("rotate")
|
|
|
|
|
bullet.rotateSpeed = readStore("rotate")
|
2026-05-10 16:34:45 +08:00
|
|
|
bullet.baseDamage = readStore("atk") * (1 + readStoreExtra("dmg"))
|
|
|
|
|
bullet.rotateExtra = readStoreExtra("rotateExtra")
|
|
|
|
|
bullet.gravityForce = readStoreExtra("gravity")
|
2026-04-04 13:32:15 +08:00
|
|
|
return true
|