@tool extends Weapon class_name BigLaserWeapon func sublimateOptions() -> Array[SublimateOption]: return [ SublimateOption.new( "湮灭强化", "伤害+15", func(w: Weapon, _e): w.addStoreExtra("atk", 15), 1, CategoryStore.Quality.COMMON ), SublimateOption.new( "高频激荡", "间隔-0.01秒", func(w: Weapon, _e): w.addStoreExtra("time", -0.01), 1, CategoryStore.Quality.RARE ), SublimateOption.new( "临界斩杀", "对生命值低于30%的敌人,伤害+25%", func(w: Weapon, _e): w.addStoreExtra("executeAtk", 0.25), 1, CategoryStore.Quality.EPIC ), SublimateOption.new( "蓄能聚焦", "射线伤害+30,但伤害间隔+0.03秒", func(w: Weapon, _e): w.addStoreExtra("atk", 30) w.addStoreExtra("time", 0.03), 1, CategoryStore.Quality.LEGENDARY ), SublimateOption.new( "空间撕裂", "射线持续时间+0.3秒", func(w: Weapon, _e): w.addStoreExtra("duration", 0.3), 2, CategoryStore.Quality.COMMON ), ] func update(to: int, origin: Dictionary, _entity: EntityBase): origin["atk"] += 5 * to * soulLevel origin["time"] /= 1 + 0.05 * to * soulLevel return origin func attack(entity: EntityBase): var weaponPos = entity.findWeaponAnchor("normal") for bullet in BulletBase.generate(ComponentManager.getBullet("BigLaser"), entity, weaponPos, (get_global_mouse_position() - weaponPos).angle()): var bigLaser: BigLaser = bullet bigLaser.dotTime = readStore("time") * 1000 bigLaser.baseDamage = readStore("atk") bigLaser.executeAtk = readStoreExtra("executeAtk") await TickTool.frame() bigLaser.animator.speed_scale = 5 / (5 + readStoreExtra("duration")) return true