@tool extends Weapon 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 ), ] func update(to: int, origin: Dictionary, _entity: EntityBase): origin["atk"] += 1 * to * soulLevel origin["rotate"] += 0.5 * to * soulLevel return origin func attack(entity: EntityBase): 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") bullet.baseDamage = readStore("atk") * (1 + readStoreExtra("dmg")) bullet.rotateExtra = readStoreExtra("rotateExtra") bullet.gravityForce = readStoreExtra("gravity") return true