captainbattle 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/CallID.d.ts +121 -105
- package/dist/core/CallID.js +128 -105
- package/dist/core/ListenID.d.ts +503 -443
- package/dist/core/ListenID.js +513 -443
- package/dist/core/config/AccessoriesDrawCfg.d.ts +9 -0
- package/dist/core/config/AccessoriesDrawCfg.js +8 -0
- package/dist/core/config/BadgeCfg.d.ts +76 -19
- package/dist/core/config/BadgeCfg.js +76 -19
- package/dist/core/config/BountyTaskCfg.d.ts +1 -1
- package/dist/core/config/BuffCfg.d.ts +3 -0
- package/dist/core/config/BuffCfg.js +3 -0
- package/dist/core/config/Cfg.d.ts +224 -120
- package/dist/core/config/Cfg.js +251 -121
- package/dist/core/config/ChatChannelCfg.d.ts +8 -2
- package/dist/core/config/ChatChannelCfg.js +7 -1
- package/dist/core/config/ChatEmojiCfg.d.ts +0 -2
- package/dist/core/config/Const.d.ts +3 -1
- package/dist/core/config/Const.js +2 -0
- package/dist/core/config/DailyTrialMapCfg.d.ts +1 -2
- package/dist/core/config/EmailCfg.d.ts +13 -1
- package/dist/core/config/EmailCfg.js +13 -1
- package/dist/core/config/FirstRechargeCfg.d.ts +1 -0
- package/dist/core/config/FuncDescCfg.d.ts +33 -3
- package/dist/core/config/FuncDescCfg.js +33 -3
- package/dist/core/config/FusionLevelCfg.d.ts +10 -0
- package/dist/core/config/FusionLevelCfg.js +8 -0
- package/dist/core/config/GuildBonusLogCfg.d.ts +8 -0
- package/dist/core/config/GuildBonusLogCfg.js +8 -0
- package/dist/core/config/GuildBossRankRewardCfg.d.ts +2 -1
- package/dist/core/config/GuildConfigCfg.d.ts +1 -1
- package/dist/core/config/GuildConfigCfg.js +1 -1
- package/dist/core/config/GuildDonateCfg.d.ts +4 -2
- package/dist/core/config/GuildIslandBuildCfg.d.ts +16 -0
- package/dist/core/config/GuildIslandBuildCfg.js +8 -0
- package/dist/core/config/GuildIslandBuildItemCfg.d.ts +11 -0
- package/dist/core/config/GuildIslandBuildItemCfg.js +8 -0
- package/dist/core/config/GuildIslandConfigCfg.d.ts +19 -0
- package/dist/core/config/GuildIslandConfigCfg.js +16 -0
- package/dist/core/config/GuildIslandIslandCfg.d.ts +9 -0
- package/dist/core/config/GuildIslandIslandCfg.js +8 -0
- package/dist/core/config/GuildIslandRankCfg.d.ts +11 -0
- package/dist/core/config/GuildIslandRankCfg.js +8 -0
- package/dist/core/config/GuildIslandZoneCfg.d.ts +11 -0
- package/dist/core/config/GuildIslandZoneCfg.js +8 -0
- package/dist/core/config/GuildLogCfg.d.ts +1 -0
- package/dist/core/config/GuildLvCfg.d.ts +1 -1
- package/dist/core/config/InviteConfigCfg.d.ts +14 -0
- package/dist/core/config/InviteConfigCfg.js +11 -0
- package/dist/core/config/InviteRewardCfg.d.ts +9 -0
- package/dist/core/config/InviteRewardCfg.js +8 -0
- package/dist/core/config/ItemsCfg.d.ts +5 -1
- package/dist/core/config/ItemsCfg.js +4 -0
- package/dist/core/config/MarqueeContentCfg.d.ts +7 -0
- package/dist/core/config/MarqueeContentCfg.js +7 -1
- package/dist/core/config/ModAffixLvCfg.d.ts +12 -0
- package/dist/core/config/ModAffixLvCfg.js +8 -0
- package/dist/core/config/PetCfg.d.ts +0 -2
- package/dist/core/config/PetConfigCfg.d.ts +19 -0
- package/dist/core/config/PetConfigCfg.js +16 -0
- package/dist/core/config/PetDrawCfg.d.ts +9 -0
- package/dist/core/config/PetDrawCfg.js +8 -0
- package/dist/core/config/PetSkillCfg.d.ts +2 -1
- package/dist/core/config/PrivilegeCfg.d.ts +2 -0
- package/dist/core/config/PrivilegeCfg.js +2 -0
- package/dist/core/config/ProDefineCfg.d.ts +2 -0
- package/dist/core/config/QualityCfg.d.ts +1 -0
- package/dist/core/config/RelicDungeonConfigCfg.d.ts +14 -4
- package/dist/core/config/RelicDungeonConfigCfg.js +14 -4
- package/dist/core/config/RelicDungeonGrowCfg.d.ts +7 -0
- package/dist/core/config/RelicDungeonGrowCfg.js +8 -0
- package/dist/core/config/RelicDungeonLevelCfg.d.ts +4 -10
- package/dist/core/config/RelicDungeonRankRewardCfg.d.ts +9 -0
- package/dist/core/config/RelicDungeonRankRewardCfg.js +8 -0
- package/dist/core/config/RelicDungeonScoreCfg.d.ts +11 -0
- package/dist/core/config/RelicDungeonScoreCfg.js +8 -0
- package/dist/core/config/RelicDungeonScoreRewardCfg.d.ts +9 -0
- package/dist/core/config/RelicDungeonScoreRewardCfg.js +8 -0
- package/dist/core/config/RelicTiesCfg.d.ts +1 -0
- package/dist/core/config/RobotConfigCfg.d.ts +17 -0
- package/dist/core/config/RobotConfigCfg.js +8 -0
- package/dist/core/config/RoleCfg.d.ts +1 -0
- package/dist/core/config/RuleDescCfg.d.ts +12 -2
- package/dist/core/config/RuleDescCfg.js +12 -2
- package/dist/core/config/SeaArenaConfigCfg.d.ts +22 -0
- package/dist/core/config/SeaArenaConfigCfg.js +19 -0
- package/dist/core/config/SeaArenaRankRewardCfg.d.ts +10 -0
- package/dist/core/config/SeaArenaRankRewardCfg.js +8 -0
- package/dist/core/config/SeaArenaRobotCfg.d.ts +8 -0
- package/dist/core/config/SeaArenaRobotCfg.js +8 -0
- package/dist/core/config/SeaArenaTierCfg.d.ts +13 -0
- package/dist/core/config/SeaArenaTierCfg.js +8 -0
- package/dist/core/config/ShopCfg.d.ts +1 -0
- package/dist/core/config/SkillLvCfg.d.ts +10 -0
- package/dist/core/config/SkillLvCfg.js +8 -0
- package/dist/core/config/SkinSkillCfg.d.ts +2 -1
- package/dist/core/config/SprintActivityConfigCfg.d.ts +18 -3
- package/dist/core/config/SprintActivityConfigCfg.js +18 -3
- package/dist/core/config/StageCfg.d.ts +2 -0
- package/dist/core/config/TConfig.d.ts +1 -1
- package/dist/core/config/TConfig.js +6 -4
- package/dist/core/config/TalentTreeLvCfg.d.ts +1 -1
- package/dist/core/config/TurretFusionLevelCfg.d.ts +10 -0
- package/dist/core/config/TurretFusionLevelCfg.js +8 -0
- package/dist/core/config/TurretModAffixLvCfg.d.ts +12 -0
- package/dist/core/config/TurretModAffixLvCfg.js +8 -0
- package/dist/core/config/TurretModCfg.d.ts +20 -0
- package/dist/core/config/TurretModCfg.js +8 -0
- package/dist/core/config/TurretModConfigCfg.d.ts +20 -0
- package/dist/core/config/TurretModConfigCfg.js +17 -0
- package/dist/core/config/TurretModQualityCfg.d.ts +12 -0
- package/dist/core/config/TurretModQualityCfg.js +8 -0
- package/dist/core/config/TurretSkillLvCfg.d.ts +10 -0
- package/dist/core/config/TurretSkillLvCfg.js +8 -0
- package/dist/core/config/VehicleWashAffixCfg.d.ts +14 -0
- package/dist/core/config/VehicleWashAffixCfg.js +8 -0
- package/dist/core/config/VehicleWashLevelCfg.d.ts +6 -2
- package/dist/core/framework/Pool.d.ts +4 -1
- package/dist/core/framework/Pool.js +19 -21
- package/dist/core/framework/Time.js +13 -3
- package/dist/core/framework/Watcher.js +0 -1
- package/dist/core/framework/collections/MinSortList.d.ts +0 -2
- package/dist/core/framework/collections/MinSortList.js +9 -33
- package/dist/core/framework/collections/ObjectPool.js +6 -3
- package/dist/core/framework/notify/Notifier.d.ts +1 -1
- package/dist/core/framework/notify/Notifier.js +5 -4
- package/dist/core/framework/notify/NotifyID.d.ts +2 -1
- package/dist/core/framework/notify/NotifyID.js +1 -0
- package/dist/core/framework/notify/NotifyListener.js +35 -9
- package/dist/core/module/arena/ArenaBattleModule.d.ts +7 -0
- package/dist/core/module/arena/ArenaBattleModule.js +32 -0
- package/dist/core/module/arena/index.d.ts +1 -0
- package/dist/core/module/arena/index.js +13 -0
- package/dist/core/module/battle/Game.d.ts +104 -13
- package/dist/core/module/battle/Game.js +218 -45
- package/dist/core/module/battle/IGameModule.d.ts +6 -0
- package/dist/core/module/battle/IGameModule.js +19 -6
- package/dist/core/module/battle/battle.interface.d.ts +31 -7
- package/dist/core/module/battle/battle.interface.js +5 -1
- package/dist/core/module/battle/buff/BuffMgr.d.ts +25 -0
- package/dist/core/module/battle/buff/BuffMgr.js +43 -0
- package/dist/core/module/battle/buff/BuffTrigger.js +9 -1
- package/dist/core/module/battle/buff/buffitem/AddPhysicDamBuff.js +2 -2
- package/dist/core/module/battle/buff/buffitem/ChangeSetpAddDamageBuff.js +3 -2
- package/dist/core/module/battle/buff/buffitem/DeltaUseSkillBuff.js +3 -2
- package/dist/core/module/battle/buff/buffitem/DiceAddCritBuff.d.ts +8 -0
- package/dist/core/module/battle/buff/buffitem/DiceAddCritBuff.js +35 -0
- package/dist/core/module/battle/buff/buffitem/FireHurtLayerBuff.d.ts +7 -0
- package/dist/core/module/battle/buff/buffitem/FireHurtLayerBuff.js +28 -0
- package/dist/core/module/battle/buff/buffitem/ForceTargetBuff.js +2 -1
- package/dist/core/module/battle/buff/buffitem/HitBoundAddDamageBuff.js +1 -1
- package/dist/core/module/battle/buff/buffitem/HitBoundAddScaleBuff.d.ts +11 -0
- package/dist/core/module/battle/buff/buffitem/HitBoundAddScaleBuff.js +79 -0
- package/dist/core/module/battle/buff/buffitem/LinkCurseBuff.js +3 -2
- package/dist/core/module/battle/buff/buffitem/MonitorBuff.js +10 -12
- package/dist/core/module/battle/buff/buffitem/PosionBanCureBuff.d.ts +3 -0
- package/dist/core/module/battle/buff/buffitem/PosionBanCureBuff.js +18 -0
- package/dist/core/module/battle/buff/buffitem/PosionBuff.d.ts +1 -0
- package/dist/core/module/battle/buff/buffitem/PosionBuff.js +15 -4
- package/dist/core/module/battle/buff/buffitem/ProjectileOrbLinkBuff.js +1 -1
- package/dist/core/module/battle/buff/buffitem/ProjectileScaleUpBuff.js +4 -2
- package/dist/core/module/battle/buff/buffitem/SameHitAddDamageBuff.js +8 -0
- package/dist/core/module/battle/buff/buffitem/SlayBuff.js +1 -1
- package/dist/core/module/battle/buff/buffitem/TimeAddDamageBuff.d.ts +1 -1
- package/dist/core/module/battle/buff/buffitem/TimeAddDamageBuff.js +36 -27
- package/dist/core/module/battle/buff/buffitem/index.d.ts +4 -0
- package/dist/core/module/battle/buff/buffitem/index.js +5 -1
- package/dist/core/module/battle/entity/BaseEntityData.d.ts +15 -1
- package/dist/core/module/battle/entity/BaseEntityData.js +27 -0
- package/dist/core/module/battle/entity/DragonBodyData.d.ts +19 -1
- package/dist/core/module/battle/entity/DragonBodyData.js +34 -0
- package/dist/core/module/battle/entity/DragonData.d.ts +18 -1
- package/dist/core/module/battle/entity/DragonData.js +32 -0
- package/dist/core/module/battle/entity/EntityPool.d.ts +1 -2
- package/dist/core/module/battle/entity/EntityPool.js +9 -18
- package/dist/core/module/battle/entity/FighterData.d.ts +114 -3
- package/dist/core/module/battle/entity/FighterData.js +350 -6
- package/dist/core/module/battle/entity/ProjectileData.d.ts +2 -0
- package/dist/core/module/battle/entity/ProjectileData.js +25 -0
- package/dist/core/module/battle/entity/RoleData.d.ts +12 -1
- package/dist/core/module/battle/entity/RoleData.js +19 -0
- package/dist/core/module/battle/entity/TurnUnit.d.ts +36 -0
- package/dist/core/module/battle/entity/TurnUnit.js +74 -0
- package/dist/core/module/battle/entity/index.d.ts +1 -1
- package/dist/core/module/battle/entity/index.js +1 -1
- package/dist/core/module/battle/event/EntityEvent.d.ts +13 -0
- package/dist/core/module/battle/event/EntityEvent.js +14 -0
- package/dist/core/module/battle/event/EntityEventBus.d.ts +10 -0
- package/dist/core/module/battle/event/EntityEventBus.js +35 -0
- package/dist/core/module/battle/event/EventListener.d.ts +6 -1
- package/dist/core/module/battle/event/EventListener.js +140 -7
- package/dist/core/module/battle/event/GameEvent.d.ts +8 -0
- package/dist/core/module/battle/event/GameEvent.js +9 -0
- package/dist/core/module/battle/factory/FighterFactory.js +26 -10
- package/dist/core/module/battle/fsm-state/AnyFighterStateTransitions.js +24 -12
- package/dist/core/module/battle/fsm-state/AnyFighterStates.js +9 -5
- package/dist/core/module/battle/fsm-state/Boss18110CallState.d.ts +1 -1
- package/dist/core/module/battle/fsm-state/Boss18110State.d.ts +1 -1
- package/dist/core/module/battle/fsm-state/FighterStateMachine.d.ts +2 -0
- package/dist/core/module/battle/fsm-state/FighterStateMachine.js +6 -0
- package/dist/core/module/battle/fsm-state/FighterStateProfiles.d.ts +8 -1
- package/dist/core/module/battle/fsm-state/FighterStateProfiles.js +31 -0
- package/dist/core/module/battle/fsm-state/FighterStateRegistry.d.ts +3 -0
- package/dist/core/module/battle/fsm-state/FighterStateRegistry.js +27 -8
- package/dist/core/module/battle/fsm-state/FighterStateShared.js +2 -2
- package/dist/core/module/battle/fsm-state/FighterStateType.d.ts +2 -1
- package/dist/core/module/battle/fsm-state/FighterStateType.js +2 -1
- package/dist/core/module/battle/fsm-state/TurnState.d.ts +29 -0
- package/dist/core/module/battle/fsm-state/TurnState.js +208 -0
- package/dist/core/module/battle/fsm-state/TurnTransitions.d.ts +36 -0
- package/dist/core/module/battle/fsm-state/TurnTransitions.js +90 -0
- package/dist/core/module/battle/fsm-state/index.d.ts +2 -0
- package/dist/core/module/battle/fsm-state/index.js +3 -1
- package/dist/core/module/battle/manager/EntityManager.d.ts +1 -0
- package/dist/core/module/battle/manager/EntityManager.js +138 -20
- package/dist/core/module/battle/skill/SkillData.d.ts +27 -0
- package/dist/core/module/battle/skill/SkillData.js +43 -0
- package/dist/core/module/battle/skill/emitter/SkillEmitter.js +4 -1
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter1.d.ts +3 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter1.js +30 -2
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter10.js +2 -2
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter13.d.ts +1 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter13.js +25 -2
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter15.js +1 -1
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter2.js +1 -1
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter23.d.ts +9 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter23.js +75 -11
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter24.js +1 -1
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter26.js +4 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter28.js +1 -1
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter3.d.ts +14 -8
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter3.js +127 -31
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter30.d.ts +36 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter30.js +235 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter31.d.ts +13 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter31.js +47 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter4.d.ts +1 -0
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter4.js +25 -2
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter6.js +10 -6
- package/dist/core/module/battle/skill/emitter/projectiles/ProjectileEmitter8.js +2 -2
- package/dist/core/module/battle/skill/emitter/projectiles/index.d.ts +2 -0
- package/dist/core/module/battle/skill/emitter/projectiles/index.js +3 -1
- package/dist/core/module/battle/skill/impacts/Impact1.js +2 -0
- package/dist/core/module/battle/skill/impacts/Impact10.js +1 -1
- package/dist/core/module/battle/skill/impacts/Impact100.d.ts +13 -0
- package/dist/core/module/battle/skill/impacts/Impact100.js +61 -0
- package/dist/core/module/battle/skill/impacts/Impact101.d.ts +13 -0
- package/dist/core/module/battle/skill/impacts/Impact101.js +49 -0
- package/dist/core/module/battle/skill/impacts/Impact17.d.ts +1 -1
- package/dist/core/module/battle/skill/impacts/Impact18.d.ts +1 -1
- package/dist/core/module/battle/skill/impacts/Impact19.d.ts +13 -0
- package/dist/core/module/battle/skill/impacts/Impact19.js +31 -0
- package/dist/core/module/battle/skill/impacts/Impact2.js +1 -1
- package/dist/core/module/battle/skill/impacts/Impact3.js +6 -5
- package/dist/core/module/battle/skill/impacts/index.d.ts +3 -0
- package/dist/core/module/battle/skill/impacts/index.js +4 -1
- package/dist/core/module/battle/skill/pool/SkillEmitterPool.js +11 -6
- package/dist/core/module/battle/system/BornSystem.js +2 -2
- package/dist/core/module/battle/system/BuffSystem.d.ts +8 -5
- package/dist/core/module/battle/system/BuffSystem.js +47 -22
- package/dist/core/module/battle/system/CollisionSystem.d.ts +4 -0
- package/dist/core/module/battle/system/CollisionSystem.js +31 -22
- package/dist/core/module/battle/system/DestroySystem.d.ts +6 -0
- package/dist/core/module/battle/system/DestroySystem.js +61 -20
- package/dist/core/module/battle/system/InputSystem.d.ts +3 -1
- package/dist/core/module/battle/system/InputSystem.js +15 -4
- package/dist/core/module/battle/system/ProjectileSystem.d.ts +1 -0
- package/dist/core/module/battle/system/ProjectileSystem.js +49 -29
- package/dist/core/module/battle/system/SkillSystem.d.ts +3 -1
- package/dist/core/module/battle/system/SkillSystem.js +55 -25
- package/dist/core/module/battle/system/TurnPhaseSystem.d.ts +52 -0
- package/dist/core/module/battle/system/TurnPhaseSystem.js +189 -0
- package/dist/core/module/battle/system/TurnSchedulerSystem.d.ts +51 -0
- package/dist/core/module/battle/system/TurnSchedulerSystem.js +363 -0
- package/dist/core/module/battle/target/CloseAngleTargetSelection.js +30 -10
- package/dist/core/module/battle/target/CloseDownTargetSelection.js +64 -17
- package/dist/core/module/battle/target/CloseTargetSelection.js +22 -5
- package/dist/core/module/battle/target/RandomRangeTargetSelection.js +8 -8
- package/dist/core/module/battle/target/SelfRandomTargetSelection.js +2 -0
- package/dist/core/module/battle/target/SelfRandomTowerTargetSelection.js +0 -1
- package/dist/core/module/battle/turn/TurnBattleGame.d.ts +85 -0
- package/dist/core/module/battle/turn/TurnBattleGame.js +453 -0
- package/dist/core/module/battle/turn/TurnBattleModule.d.ts +14 -0
- package/dist/core/module/battle/turn/TurnBattleModule.js +65 -0
- package/dist/core/module/battle/turn/TurnBattleTypes.d.ts +25 -0
- package/dist/core/module/battle/turn/TurnBattleTypes.js +15 -0
- package/dist/core/module/battle/util/BattleInputCodec.d.ts +2 -3
- package/dist/core/module/battle/util/BattleInputCodec.js +14 -3
- package/dist/core/module/battle/util/BattleUtils.d.ts +21 -1
- package/dist/core/module/battle/util/BattleUtils.js +217 -41
- package/dist/core/module/battle/util/EllipseArc.d.ts +2 -0
- package/dist/core/module/battle/util/EllipseArc.js +43 -0
- package/dist/core/module/battle/util/HitDataPool.js +3 -1
- package/dist/core/module/battle/util/Random.js +13 -4
- package/dist/core/module/dailyTrial/DailyTrialBattleModule.d.ts +11 -0
- package/dist/core/module/dailyTrial/DailyTrialBattleModule.js +103 -0
- package/dist/core/module/dailyTrial/index.d.ts +1 -0
- package/dist/core/module/dailyTrial/index.js +13 -0
- package/dist/core/module/guild/view/boss/GuildBossBattleModule.d.ts +2 -1
- package/dist/core/module/guild/view/boss/GuildBossBattleModule.js +12 -2
- package/dist/core/module/module.interface.d.ts +1 -0
- package/dist/core/module/property/Property.d.ts +22 -3
- package/dist/core/module/property/Property.js +43 -5
- package/dist/core/module/property/PropertyUtil.d.ts +17 -2
- package/dist/core/module/property/PropertyUtil.js +67 -7
- package/dist/core/module/relicDungeon/RelicBattleModule.d.ts +5 -0
- package/dist/core/module/relicDungeon/RelicBattleModule.js +26 -2
- package/dist/core/module/stage/StageBattleModule.js +1 -0
- package/dist/core/proto/CommonProto.d.ts +24671 -14643
- package/dist/core/proto/Proto.d.ts +289 -77
- package/dist/index.d.ts +39 -3
- package/dist/index.js +220 -13
- package/dist/register-all.d.ts +2 -0
- package/dist/register-all.js +2 -0
- package/package.json +1 -1
|
@@ -25,9 +25,18 @@ export interface IProjectileEmitter23 extends IProjectileEmitter {
|
|
|
25
25
|
};
|
|
26
26
|
longSide: number;
|
|
27
27
|
shortSide: number;
|
|
28
|
+
noReturn: boolean;
|
|
29
|
+
exitTime: number;
|
|
30
|
+
exitAngleStep: number;
|
|
28
31
|
}
|
|
29
32
|
export declare class ProjectileEmitter23 extends ProjectileEmitter {
|
|
33
|
+
/** 不返回模式退出椭圆后每个逻辑帧的转向角度(度);逻辑步长固定 0.0166s,约等于 180°/s */
|
|
34
|
+
private static readonly EXIT_ANGLE_STEP;
|
|
30
35
|
static onUpdate(projectile: ProjectileData, dt: number, target?: FighterData): void;
|
|
36
|
+
/** 按弧长进度沿椭圆更新位置与朝向,进度超过1按1处理 */
|
|
37
|
+
private static _updateEllipsePosition;
|
|
38
|
+
/** 不返回模式:在到达最远点前提前退出椭圆,之后每帧按固定角度继续同向转向 */
|
|
39
|
+
private static _updateNoReturn;
|
|
31
40
|
static execute(owner: ProjectileData, target: FighterData, p9?: number, p10?: number, p11?: number[]): void;
|
|
32
41
|
static getData(): IProjectileEmitter23;
|
|
33
42
|
}
|
|
@@ -18,17 +18,29 @@ const GameEvent_1 = require("../../../event/GameEvent");
|
|
|
18
18
|
const ProjectileEmitter_1 = require("./ProjectileEmitter");
|
|
19
19
|
const ProjectileEmitterShared_1 = require("./ProjectileEmitterShared");
|
|
20
20
|
let ProjectileEmitter23 = class ProjectileEmitter23 extends ProjectileEmitter_1.ProjectileEmitter {
|
|
21
|
+
/** 不返回模式退出椭圆后每个逻辑帧的转向角度(度);逻辑步长固定 0.0166s,约等于 180°/s */
|
|
22
|
+
static EXIT_ANGLE_STEP = 0.5;
|
|
21
23
|
static onUpdate(projectile, dt, target) {
|
|
22
24
|
const emitter = projectile.emitter;
|
|
25
|
+
if (emitter.noReturn) {
|
|
26
|
+
this._updateNoReturn(projectile, dt);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
23
29
|
if (emitter.totalTime <= 0 || emitter.curTime >= emitter.totalTime) {
|
|
24
30
|
projectile.game.emit(GameEvent_1.GameEvent.ProjectileToDead, projectile);
|
|
25
31
|
return;
|
|
26
32
|
}
|
|
27
33
|
emitter.curTime += dt;
|
|
28
|
-
|
|
29
|
-
if (
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
this._updateEllipsePosition(projectile, emitter, emitter.curTime / emitter.totalTime);
|
|
35
|
+
if (emitter.curTime >= emitter.totalTime) {
|
|
36
|
+
projectile.game.emit(GameEvent_1.GameEvent.ProjectileToDead, projectile);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/** 按弧长进度沿椭圆更新位置与朝向,进度超过1按1处理 */
|
|
40
|
+
static _updateEllipsePosition(projectile, emitter, progress) {
|
|
41
|
+
if (progress > 1)
|
|
42
|
+
progress = 1;
|
|
43
|
+
const angle = (0, EllipseArc_1.getEllipseAngleAtArcProgress)(emitter.semiMajor, emitter.semiMinor, progress);
|
|
32
44
|
const y = -emitter.semiMajor * JMath_1.default.cos(angle);
|
|
33
45
|
const x = emitter.semiMinor * JMath_1.default.sin(angle);
|
|
34
46
|
BVec2_1.BVecHelper.set(ProjectileEmitterShared_1.tempVec2, emitter.centerPoint.x + emitter.majorDir.x * y + emitter.minorDir.x * x, emitter.centerPoint.y + emitter.majorDir.y * y + emitter.minorDir.y * x);
|
|
@@ -38,12 +50,38 @@ let ProjectileEmitter23 = class ProjectileEmitter23 extends ProjectileEmitter_1.
|
|
|
38
50
|
projectile.setPosition(ProjectileEmitterShared_1.tempVec2.x, ProjectileEmitterShared_1.tempVec2.y);
|
|
39
51
|
emitter.lastPoint.x = ProjectileEmitterShared_1.tempVec2.x;
|
|
40
52
|
emitter.lastPoint.y = ProjectileEmitterShared_1.tempVec2.y;
|
|
41
|
-
|
|
53
|
+
}
|
|
54
|
+
/** 不返回模式:在到达最远点前提前退出椭圆,之后每帧按固定角度继续同向转向 */
|
|
55
|
+
static _updateNoReturn(projectile, dt) {
|
|
56
|
+
const emitter = projectile.emitter;
|
|
57
|
+
if (emitter.totalTime <= 0 || emitter.exitTime <= 0) {
|
|
42
58
|
projectile.game.emit(GameEvent_1.GameEvent.ProjectileToDead, projectile);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
let remainDt = dt;
|
|
62
|
+
if (emitter.curTime < emitter.exitTime) {
|
|
63
|
+
// 本帧时间拆成椭圆段与转向段,保证退出点与方向同时精确
|
|
64
|
+
const ellipseDt = Math.min(dt, emitter.exitTime - emitter.curTime);
|
|
65
|
+
emitter.curTime += ellipseDt;
|
|
66
|
+
remainDt -= ellipseDt;
|
|
67
|
+
this._updateEllipsePosition(projectile, emitter, emitter.curTime / emitter.totalTime);
|
|
68
|
+
if (emitter.curTime < emitter.exitTime)
|
|
69
|
+
return;
|
|
70
|
+
// 退出点的切线正是长轴/短轴45°合成方向,与椭圆段末速度连续,无方向突变
|
|
71
|
+
BVec2_1.BVecHelper.sub(emitter.shootDir, emitter.majorDir, emitter.minorDir);
|
|
72
|
+
BVec2_1.BVecHelper.normalize(emitter.shootDir, emitter.shootDir);
|
|
43
73
|
}
|
|
74
|
+
// 退出后不再走直线:每个逻辑帧按固定角度继续同向转向
|
|
75
|
+
BVec2_1.BVecHelper.rotate(emitter.shootDir, emitter.shootDir, emitter.exitAngleStep);
|
|
76
|
+
this._updateAngle(projectile);
|
|
77
|
+
if (remainDt > 0)
|
|
78
|
+
this.moveUpdate(projectile, remainDt);
|
|
44
79
|
}
|
|
45
80
|
static execute(owner, target, p9, p10, p11) {
|
|
46
81
|
const emitter = owner.emitter;
|
|
82
|
+
// p11[0] 是否返回:0不返回 1返回(未配置时保持原返回逻辑)
|
|
83
|
+
const noReturn = !!(p11 && p11[0] === 0);
|
|
84
|
+
emitter.noReturn = noReturn;
|
|
47
85
|
const specifiedLongSide = p10 || 0;
|
|
48
86
|
let targetX;
|
|
49
87
|
let targetY;
|
|
@@ -93,17 +131,40 @@ let ProjectileEmitter23 = class ProjectileEmitter23 extends ProjectileEmitter_1.
|
|
|
93
131
|
emitter.majorDir.x = 1;
|
|
94
132
|
emitter.majorDir.y = 0;
|
|
95
133
|
}
|
|
96
|
-
//
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
134
|
+
// 绕行方向:返回模式由拥有者 horDir 决定(minorDir = 长轴逆时针90° * sign);不返回模式由子弹 index 奇偶决定(偶数向左,奇数向右)
|
|
135
|
+
if (noReturn) {
|
|
136
|
+
if (owner.index % 2 === 0) {
|
|
137
|
+
BVec2_1.BVecHelper.perpendicularLeft(emitter.minorDir, emitter.majorDir);
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
BVec2_1.BVecHelper.perpendicularRight(emitter.minorDir, emitter.majorDir);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
const logicOwner = owner.game.getEntityLogic(owner.owner);
|
|
145
|
+
const sign = logicOwner && logicOwner.horDir === 1 ? 1 : -1;
|
|
146
|
+
emitter.minorDir.x = -emitter.majorDir.y * sign;
|
|
147
|
+
emitter.minorDir.y = emitter.majorDir.x * sign;
|
|
148
|
+
}
|
|
101
149
|
emitter.lastPoint.x = owner.x;
|
|
102
150
|
emitter.lastPoint.y = owner.y;
|
|
103
151
|
emitter.curTime = 0;
|
|
104
152
|
const perimeter = (0, EllipseArc_1.getEllipsePerimeter)(emitter.semiMajor, emitter.semiMinor);
|
|
105
153
|
emitter.totalTime = perimeter > 1e-8 && owner.moveSpeed > 1e-8 ? perimeter / owner.moveSpeed : 0;
|
|
106
|
-
|
|
154
|
+
if (noReturn) {
|
|
155
|
+
// 提前退出点:该参数角处切线正好是长轴/短轴45°合成方向(M - N),从该点开始转为每帧固定角度转向
|
|
156
|
+
const exitAngle = JMath_1.default.PI - JMath_1.default.atan2(emitter.semiMinor, emitter.semiMajor);
|
|
157
|
+
emitter.exitTime = emitter.totalTime > 0
|
|
158
|
+
? emitter.totalTime * (0, EllipseArc_1.getEllipseArcProgressAtAngle)(emitter.semiMajor, emitter.semiMinor, exitAngle)
|
|
159
|
+
: 0;
|
|
160
|
+
// 退出后与椭圆同向转向:minorDir 为长轴左侧(偶数弹)时椭圆顺时针转,右侧(奇数弹)逆时针转
|
|
161
|
+
emitter.exitAngleStep = owner.index % 2 === 0 ? -this.EXIT_ANGLE_STEP : this.EXIT_ANGLE_STEP;
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
emitter.exitTime = 0;
|
|
165
|
+
emitter.exitAngleStep = 0;
|
|
166
|
+
owner.lifeTime = emitter.totalTime > 0 ? emitter.totalTime + 0.05 : 0.01;
|
|
167
|
+
}
|
|
107
168
|
this._updateAngle(owner);
|
|
108
169
|
}
|
|
109
170
|
static getData() {
|
|
@@ -121,6 +182,9 @@ let ProjectileEmitter23 = class ProjectileEmitter23 extends ProjectileEmitter_1.
|
|
|
121
182
|
lastPoint: { x: 0, y: 0 },
|
|
122
183
|
longSide: 0,
|
|
123
184
|
shortSide: 0,
|
|
185
|
+
noReturn: false,
|
|
186
|
+
exitTime: 0,
|
|
187
|
+
exitAngleStep: 0,
|
|
124
188
|
};
|
|
125
189
|
}
|
|
126
190
|
};
|
|
@@ -27,7 +27,7 @@ let ProjectileEmitter24 = class ProjectileEmitter24 extends ProjectileEmitter_1.
|
|
|
27
27
|
projectile.lifeTime = 99999;
|
|
28
28
|
const owner = this._getOwner(projectile);
|
|
29
29
|
if (owner)
|
|
30
|
-
projectile.game.
|
|
30
|
+
projectile.game.emit1(owner, EntityEvent_1.EntityEvent.ProjectileStay, projectile);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
static _startBack(projectile, emitter) {
|
|
@@ -54,6 +54,10 @@ let ProjectileEmitter26 = class ProjectileEmitter26 extends ProjectileEmitter_1.
|
|
|
54
54
|
}
|
|
55
55
|
static execute(owner, target, p9, p10, p11) {
|
|
56
56
|
let emitter = owner.emitter;
|
|
57
|
+
if (p9) {
|
|
58
|
+
BVec2_1.BVecHelper.sub(ProjectileEmitterShared_1.tempVec2, target, owner);
|
|
59
|
+
BVec2_1.BVecHelper.normalize(emitter.shootDir, ProjectileEmitterShared_1.tempVec2);
|
|
60
|
+
}
|
|
57
61
|
emitter.deceleration = p11 && p11[0] || 0;
|
|
58
62
|
this._updateAngle(owner);
|
|
59
63
|
}
|
|
@@ -77,7 +77,7 @@ let ProjectileEmitter28 = class ProjectileEmitter28 extends ProjectileEmitter_1.
|
|
|
77
77
|
continue;
|
|
78
78
|
let target = owner.game.getEntityLogic(endId);
|
|
79
79
|
if (!target || target.isDead) {
|
|
80
|
-
emitter.subTarget
|
|
80
|
+
BattleUtils_1.BattleUtils.removeAt(emitter.subTarget, i);
|
|
81
81
|
}
|
|
82
82
|
else {
|
|
83
83
|
this.ignoreList.push(endId);
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
import type FighterData from "../../../entity/FighterData";
|
|
2
2
|
import ProjectileData from "../../../entity/ProjectileData";
|
|
3
|
-
import type { ISkillEmitter } from "../../../system/SkillSystem";
|
|
4
3
|
import { ProjectileEmitter } from "./ProjectileEmitter";
|
|
5
4
|
import type { IProjectileEmitter } from "./ProjectileEmitter";
|
|
6
|
-
export interface IProjectileEmitter3 extends ISkillEmitter {
|
|
7
|
-
shootDir: {
|
|
8
|
-
x: number;
|
|
9
|
-
y: number;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
5
|
export interface IProjectileEmitter3 extends IProjectileEmitter {
|
|
13
6
|
type: number;
|
|
14
7
|
moveType: number;
|
|
@@ -28,6 +21,8 @@ export interface IProjectileEmitter3 extends IProjectileEmitter {
|
|
|
28
21
|
maxMoveSpeed: number;
|
|
29
22
|
maxAngle: number;
|
|
30
23
|
minAngle: number;
|
|
24
|
+
isTouchMove: number;
|
|
25
|
+
fixAngle: number;
|
|
31
26
|
}
|
|
32
27
|
export declare class ProjectileEmitter3 extends ProjectileEmitter {
|
|
33
28
|
static _outScreenLen: number;
|
|
@@ -37,6 +32,7 @@ export declare class ProjectileEmitter3 extends ProjectileEmitter {
|
|
|
37
32
|
static ANGLE_TURN_BOOST: number;
|
|
38
33
|
static SAFE_DISTANCE_SQR: number;
|
|
39
34
|
static HIT_DISTANCE_SQR: number;
|
|
35
|
+
static HIT_DISTANCE: number;
|
|
40
36
|
static MAX_PREDICT_TIME: number;
|
|
41
37
|
static DEFAULT_START_SPEED_RATIO: number;
|
|
42
38
|
static DEFAULT_SPEED_UP_RATIO: number;
|
|
@@ -54,14 +50,24 @@ export declare class ProjectileEmitter3 extends ProjectileEmitter {
|
|
|
54
50
|
private static _setTargetDirection;
|
|
55
51
|
private static _getTurnAngle;
|
|
56
52
|
static onUpdate(owner: ProjectileData, dt: number): boolean;
|
|
53
|
+
static _updateAngle(owner: ProjectileData): void;
|
|
57
54
|
/** Reset the complete launch state used by execute when a projectile is fired again. */
|
|
58
55
|
private static _resetLaunchState;
|
|
59
56
|
/** Resolve/reselect the target and calculate the direction used by curve movement. */
|
|
60
57
|
private static _prepareTarget;
|
|
61
58
|
/** Check the target overlap before movement and apply the legacy type-specific response. */
|
|
62
59
|
private static _detectDirectAttack;
|
|
63
|
-
/**
|
|
60
|
+
/** type 3/4 到达指定目标位置后的重新索敌:找到新目标则完整重置发射状态;否则重设免触发时间继续直飞,窗口期后再重试 */
|
|
61
|
+
private static _reselectAfterArrival;
|
|
62
|
+
/** Calculate the direct-tracking movement. isTargetPosFresh: Phase 1 本帧已刷新 emitter.position 时免去重取 */
|
|
64
63
|
private static _moveDirect;
|
|
64
|
+
/** 触摸期间弹体朝触摸点移动(参照弹道27),返回是否由触摸接管本帧移动;贴近触摸点时悬停并保留命中判定 */
|
|
65
|
+
private static _moveByTouch;
|
|
66
|
+
/**
|
|
67
|
+
* 拖动扫掠段的命中判定:仅 type 0/3(shape 已禁用,碰撞系统不生效;type 1/2/4 由碰撞系统处理)。
|
|
68
|
+
* 命中不打断触摸跟随:type 0 命中即死;type 3 用 hitoid 标记防止拖动中重复伤害,松手后由索敌流程接管。
|
|
69
|
+
*/
|
|
70
|
+
private static _detectTouchSegmentAttack;
|
|
65
71
|
/** Calculate curve direction and next position. No attack side effects are performed here. */
|
|
66
72
|
private static _calculateCurveNextPosition;
|
|
67
73
|
/** Detect the swept segment attack after movement has been calculated. */
|
|
@@ -27,6 +27,7 @@ let ProjectileEmitter3 = class ProjectileEmitter3 extends ProjectileEmitter_1.Pr
|
|
|
27
27
|
static ANGLE_TURN_BOOST = 2; // 夹角转向增益,方向夹角越大单次偏转角越大(最大放大 1+ANGLE_TURN_BOOST 倍)
|
|
28
28
|
static SAFE_DISTANCE_SQR = 6400; // 安全距离平方(80像素)
|
|
29
29
|
static HIT_DISTANCE_SQR = 1600;
|
|
30
|
+
static HIT_DISTANCE = 40; // 命中半径
|
|
30
31
|
static MAX_PREDICT_TIME = 0.6;
|
|
31
32
|
static DEFAULT_START_SPEED_RATIO = 0.4;
|
|
32
33
|
static DEFAULT_SPEED_UP_RATIO = 1;
|
|
@@ -116,10 +117,10 @@ let ProjectileEmitter3 = class ProjectileEmitter3 extends ProjectileEmitter_1.Pr
|
|
|
116
117
|
const px = targetX - owner.x;
|
|
117
118
|
const py = targetY - owner.y;
|
|
118
119
|
const speed = this._getMoveSpeed(owner, emitter);
|
|
119
|
-
|
|
120
|
+
const c = px * px + py * py;
|
|
121
|
+
let predictTime = speed > 1e-5 ? JMath_1.default.sqrt(c) / speed : 0;
|
|
120
122
|
const a = vx * vx + vy * vy - speed * speed;
|
|
121
123
|
const b = 2 * (px * vx + py * vy);
|
|
122
|
-
const c = px * px + py * py;
|
|
123
124
|
if (Math.abs(a) > 1e-5) {
|
|
124
125
|
const disc = b * b - 4 * a * c;
|
|
125
126
|
if (disc >= 0) {
|
|
@@ -182,7 +183,16 @@ let ProjectileEmitter3 = class ProjectileEmitter3 extends ProjectileEmitter_1.Pr
|
|
|
182
183
|
const moveSpeed = this._updateMoveSpeed(owner, emitter, dt);
|
|
183
184
|
let target = null;
|
|
184
185
|
let targetState = 0;
|
|
186
|
+
if (emitter.type === 0 || emitter.type === 3) {
|
|
187
|
+
if (owner.shape && owner.shape.isActive) {
|
|
188
|
+
owner.shape.isActive = false;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
185
191
|
this.curDisSqrt = Number.MAX_SAFE_INTEGER;
|
|
192
|
+
// 跟随触摸点移动(参照弹道27):触摸期间由触摸点接管本帧移动并跳过索敌(假目标只有坐标,索敌无意义),松手后进入正常索敌流程
|
|
193
|
+
if (emitter.isTouchMove && this._moveByTouch(owner, emitter, dt, moveSpeed)) {
|
|
194
|
+
return false;
|
|
195
|
+
}
|
|
186
196
|
// Phase 1: resolve the attack target and prepare its current/predicted position.
|
|
187
197
|
if (owner.noTriggerTime <= 0 && owner.target) {
|
|
188
198
|
targetState = this._prepareTarget(owner, emitter, dt);
|
|
@@ -201,7 +211,7 @@ let ProjectileEmitter3 = class ProjectileEmitter3 extends ProjectileEmitter_1.Pr
|
|
|
201
211
|
}
|
|
202
212
|
if (emitter.moveType === 1) {
|
|
203
213
|
// Movement mode 1 is direct tracking. It has no curve segment attack check.
|
|
204
|
-
this._moveDirect(owner, emitter, dt, moveSpeed);
|
|
214
|
+
this._moveDirect(owner, emitter, dt, moveSpeed, targetState === this.TARGET_READY);
|
|
205
215
|
return false;
|
|
206
216
|
}
|
|
207
217
|
// Phase 2: calculate the curve movement only. tempVec2 becomes the next position.
|
|
@@ -215,26 +225,38 @@ let ProjectileEmitter3 = class ProjectileEmitter3 extends ProjectileEmitter_1.Pr
|
|
|
215
225
|
this._updateAngle(owner);
|
|
216
226
|
return false;
|
|
217
227
|
}
|
|
228
|
+
static _updateAngle(owner) {
|
|
229
|
+
const emitter = owner.emitter;
|
|
230
|
+
if (emitter.fixAngle) {
|
|
231
|
+
owner.setAngle(0);
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
super._updateAngle(owner);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
218
237
|
/** Reset the complete launch state used by execute when a projectile is fired again. */
|
|
219
238
|
static _resetLaunchState(owner, emitter, target) {
|
|
220
239
|
owner.target = target.ID;
|
|
221
240
|
if (emitter.type === 0 || emitter.type === 3) {
|
|
222
241
|
owner.shape && (owner.shape.isActive = false);
|
|
223
242
|
}
|
|
224
|
-
target.
|
|
243
|
+
if (target.ID < 0) {
|
|
244
|
+
emitter.position.x = target.x;
|
|
245
|
+
emitter.position.y = target.y;
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
target.getBeHitPoint(owner.owner, emitter.position);
|
|
249
|
+
}
|
|
225
250
|
emitter.targetId = 0;
|
|
226
251
|
emitter.hasTargetPosition = false;
|
|
227
252
|
emitter.lastTargetPosition.x = emitter.position.x;
|
|
228
253
|
emitter.lastTargetPosition.y = emitter.position.y;
|
|
229
254
|
emitter.targetVelocity.x = 0;
|
|
230
255
|
emitter.targetVelocity.y = 0;
|
|
231
|
-
const startSpeedRatio = this.DEFAULT_START_SPEED_RATIO;
|
|
232
|
-
const speedUpRatio = this.DEFAULT_SPEED_UP_RATIO;
|
|
233
|
-
const maxSpeedRatio = 2500;
|
|
234
256
|
emitter.baseMoveSpeed = owner.moveSpeed;
|
|
235
|
-
emitter.curMoveSpeed = Math.max(0, owner.moveSpeed *
|
|
236
|
-
emitter.speedUp = Math.max(0, owner.moveSpeed *
|
|
237
|
-
emitter.maxMoveSpeed =
|
|
257
|
+
emitter.curMoveSpeed = Math.max(0, owner.moveSpeed * this.DEFAULT_START_SPEED_RATIO);
|
|
258
|
+
emitter.speedUp = emitter.moveType === 1 ? 0 : Math.max(0, owner.moveSpeed * this.DEFAULT_SPEED_UP_RATIO);
|
|
259
|
+
emitter.maxMoveSpeed = Math.max(emitter.curMoveSpeed, owner.moveSpeed * 2500); //2500 倍上限实际不构成限制,保留字段兼容
|
|
238
260
|
owner.noTriggerTime = owner.shape ? this._getNoTriggerTime(owner.shape.width, emitter.curMoveSpeed, emitter.speedUp) : 0;
|
|
239
261
|
if (!emitter.moveType) {
|
|
240
262
|
this._setInitialCurveDirection(owner, emitter);
|
|
@@ -261,7 +283,7 @@ let ProjectileEmitter3 = class ProjectileEmitter3 extends ProjectileEmitter_1.Pr
|
|
|
261
283
|
}
|
|
262
284
|
const newTarget = this.reSelectTarget(owner, emitter, target);
|
|
263
285
|
if (!newTarget) {
|
|
264
|
-
if (emitter.type === 3) {
|
|
286
|
+
if (emitter.type === 3 || emitter.type === 4) {
|
|
265
287
|
owner.noTriggerTime = owner.shape ? this._getNoTriggerTime(owner.shape.width, emitter.curMoveSpeed, emitter.speedUp) : 0;
|
|
266
288
|
}
|
|
267
289
|
else {
|
|
@@ -280,6 +302,11 @@ let ProjectileEmitter3 = class ProjectileEmitter3 extends ProjectileEmitter_1.Pr
|
|
|
280
302
|
static _detectDirectAttack(owner, emitter, target) {
|
|
281
303
|
if (this.curDisSqrt > this.HIT_DISTANCE_SQR || emitter.type === 2)
|
|
282
304
|
return false;
|
|
305
|
+
if (emitter.type === 4) {
|
|
306
|
+
// type 4:伤害由 shape 碰撞负责,接近判定只用于到达目标位置后重新索敌
|
|
307
|
+
this._reselectAfterArrival(owner, emitter, target);
|
|
308
|
+
return true;
|
|
309
|
+
}
|
|
283
310
|
if (emitter.type === 0 || emitter.type === 3) {
|
|
284
311
|
owner.game.emit(GameEvent_1.GameEvent.ProjectileHit, owner, target);
|
|
285
312
|
}
|
|
@@ -288,26 +315,98 @@ let ProjectileEmitter3 = class ProjectileEmitter3 extends ProjectileEmitter_1.Pr
|
|
|
288
315
|
// Legacy ProjectileEmitter3 keeps calculating this frame after marking type 0/1 dead.
|
|
289
316
|
return false;
|
|
290
317
|
}
|
|
318
|
+
this._reselectAfterArrival(owner, emitter, target);
|
|
319
|
+
return true;
|
|
320
|
+
}
|
|
321
|
+
/** type 3/4 到达指定目标位置后的重新索敌:找到新目标则完整重置发射状态;否则重设免触发时间继续直飞,窗口期后再重试 */
|
|
322
|
+
static _reselectAfterArrival(owner, emitter, target) {
|
|
291
323
|
const newTarget = this.reSelectTarget(owner, emitter, target);
|
|
292
324
|
if (newTarget) {
|
|
293
325
|
const reselectedTarget = owner.game.getEntityLogic(newTarget);
|
|
294
326
|
this._resetLaunchState(owner, emitter, reselectedTarget);
|
|
295
|
-
return
|
|
327
|
+
return;
|
|
296
328
|
}
|
|
297
329
|
owner.noTriggerTime = owner.shape ? this._getNoTriggerTime(owner.shape.width, emitter.curMoveSpeed, emitter.speedUp) : 0;
|
|
298
|
-
|
|
330
|
+
BVec2_1.BVecHelper.sub(ProjectileEmitterShared_1.tempVec2, emitter.position, owner);
|
|
331
|
+
emitter.curTime = BVec2_1.BVecHelper.length(ProjectileEmitterShared_1.tempVec2) / owner.moveSpeed;
|
|
299
332
|
}
|
|
300
|
-
/** Calculate the direct-tracking movement. */
|
|
301
|
-
static _moveDirect(owner, emitter, dt, moveSpeed) {
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
333
|
+
/** Calculate the direct-tracking movement. isTargetPosFresh: Phase 1 本帧已刷新 emitter.position 时免去重取 */
|
|
334
|
+
static _moveDirect(owner, emitter, dt, moveSpeed, isTargetPosFresh) {
|
|
335
|
+
if (!isTargetPosFresh) {
|
|
336
|
+
// Phase 1 空窗期(noTriggerTime>0/无目标):有活目标则刷新目标点,否则按记忆的瞄准点飞行
|
|
337
|
+
const target = owner.game.getEntityLogic(owner.target);
|
|
338
|
+
target && target.getBeHitPoint(owner.owner, emitter.position);
|
|
339
|
+
}
|
|
340
|
+
BVec2_1.BVecHelper.sub(emitter.shootDir, emitter.position, owner);
|
|
307
341
|
BVec2_1.BVecHelper.normalize(emitter.shootDir, emitter.shootDir);
|
|
308
342
|
this._updateAngle(owner);
|
|
309
343
|
this._moveUpdate(owner, emitter, dt, moveSpeed);
|
|
310
344
|
}
|
|
345
|
+
/** 触摸期间弹体朝触摸点移动(参照弹道27),返回是否由触摸接管本帧移动;贴近触摸点时悬停并保留命中判定 */
|
|
346
|
+
static _moveByTouch(owner, emitter, dt, moveSpeed) {
|
|
347
|
+
const role = owner.game.getEntityLogic(owner.owner);
|
|
348
|
+
if (!role.isTouchAtkDir)
|
|
349
|
+
return false;
|
|
350
|
+
BVec2_1.BVecHelper.set(ProjectileEmitterShared_1.tempVec2, role.touchPos.x - owner.x, role.touchPos.y - owner.y);
|
|
351
|
+
const remainDisSqr = BVec2_1.BVecHelper.lengthSqr(ProjectileEmitterShared_1.tempVec2);
|
|
352
|
+
if (remainDisSqr <= 5) {
|
|
353
|
+
// 已贴近触摸点:悬停零位移,仅做命中判定(敌人走进悬停范围也能命中)
|
|
354
|
+
this._detectTouchSegmentAttack(owner, emitter, role, owner.x, owner.y);
|
|
355
|
+
return true;
|
|
356
|
+
}
|
|
357
|
+
BVec2_1.BVecHelper.normalize(ProjectileEmitterShared_1.tempVec2, ProjectileEmitterShared_1.tempVec2);
|
|
358
|
+
// 同步飞行方向与朝向,松手后曲线/直线追踪可无缝衔接
|
|
359
|
+
emitter.shootDir.x = ProjectileEmitterShared_1.tempVec2.x;
|
|
360
|
+
emitter.shootDir.y = ProjectileEmitterShared_1.tempVec2.y;
|
|
361
|
+
// 步长不超过剩余距离,避免在触摸点附近来回抖动
|
|
362
|
+
BVec2_1.BVecHelper.mulScalar(ProjectileEmitterShared_1.tempVec2, ProjectileEmitterShared_1.tempVec2, Math.min(moveSpeed * dt, JMath_1.default.sqrt(remainDisSqr)));
|
|
363
|
+
BVec2_1.BVecHelper.add(ProjectileEmitterShared_1.tempVec2, owner, ProjectileEmitterShared_1.tempVec2);
|
|
364
|
+
this._detectTouchSegmentAttack(owner, emitter, role, ProjectileEmitterShared_1.tempVec2.x, ProjectileEmitterShared_1.tempVec2.y);
|
|
365
|
+
owner.setPosition(ProjectileEmitterShared_1.tempVec2.x, ProjectileEmitterShared_1.tempVec2.y);
|
|
366
|
+
this._updateAngle(owner);
|
|
367
|
+
return true;
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* 拖动扫掠段的命中判定:仅 type 0/3(shape 已禁用,碰撞系统不生效;type 1/2/4 由碰撞系统处理)。
|
|
371
|
+
* 命中不打断触摸跟随:type 0 命中即死;type 3 用 hitoid 标记防止拖动中重复伤害,松手后由索敌流程接管。
|
|
372
|
+
*/
|
|
373
|
+
static _detectTouchSegmentAttack(owner, emitter, role, endX, endY) {
|
|
374
|
+
if (owner.noTriggerTime > 0 || (emitter.type !== 0 && emitter.type !== 3))
|
|
375
|
+
return;
|
|
376
|
+
// 搜索圆心取扫掠段中点,半径 = 半段长 + 命中半径
|
|
377
|
+
BVec2_1.BVecHelper.set(ProjectileEmitterShared_1.tempVec22, endX - owner.x, endY - owner.y);
|
|
378
|
+
const searchDis = BVec2_1.BVecHelper.length(ProjectileEmitterShared_1.tempVec22) / 2 + this.HIT_DISTANCE;
|
|
379
|
+
const fighters = owner.game.getFighterByTargetDis(role, (owner.x + endX) / 2, (owner.y + endY) / 2, searchDis, 99, null, null, owner.skillId);
|
|
380
|
+
if (!fighters || !fighters.length)
|
|
381
|
+
return;
|
|
382
|
+
let best = null;
|
|
383
|
+
let bestDisSqr = 0;
|
|
384
|
+
for (let i = 0; i < fighters.length; i++) {
|
|
385
|
+
const fighter = fighters[i];
|
|
386
|
+
const hitoid = owner.hitoid[fighter.oid];
|
|
387
|
+
if (hitoid && hitoid.length)
|
|
388
|
+
continue; //拖动中已命中过该实体,不重复伤害
|
|
389
|
+
fighter.getBeHitPoint(owner.owner, ProjectileEmitterShared_1.tempVec23);
|
|
390
|
+
if (!this._isSegmentInHitRange(owner.x, owner.y, endX, endY, ProjectileEmitterShared_1.tempVec23.x, ProjectileEmitterShared_1.tempVec23.y))
|
|
391
|
+
continue;
|
|
392
|
+
const dx = ProjectileEmitterShared_1.tempVec23.x - owner.x;
|
|
393
|
+
const dy = ProjectileEmitterShared_1.tempVec23.y - owner.y;
|
|
394
|
+
const disSqr = dx * dx + dy * dy;
|
|
395
|
+
if (!best || disSqr < bestDisSqr) {
|
|
396
|
+
best = fighter;
|
|
397
|
+
bestDisSqr = disSqr;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
if (!best)
|
|
401
|
+
return;
|
|
402
|
+
owner.game.emit(GameEvent_1.GameEvent.ProjectileHit, owner, best);
|
|
403
|
+
if (emitter.type === 0) {
|
|
404
|
+
owner.game.emit(GameEvent_1.GameEvent.ProjectileToDead, owner);
|
|
405
|
+
}
|
|
406
|
+
else {
|
|
407
|
+
owner.hitoid[best.oid] = [best.ID];
|
|
408
|
+
}
|
|
409
|
+
}
|
|
311
410
|
/** Calculate curve direction and next position. No attack side effects are performed here. */
|
|
312
411
|
static _calculateCurveNextPosition(owner, emitter, dt, moveSpeed) {
|
|
313
412
|
BVec2_1.BVecHelper.set(ProjectileEmitterShared_1.tempVec22, emitter.shootDir.x, emitter.shootDir.y);
|
|
@@ -340,18 +439,11 @@ let ProjectileEmitter3 = class ProjectileEmitter3 extends ProjectileEmitter_1.Pr
|
|
|
340
439
|
if (emitter.type === 0 || emitter.type === 3) {
|
|
341
440
|
owner.game.emit(GameEvent_1.GameEvent.ProjectileHit, owner, target);
|
|
342
441
|
}
|
|
343
|
-
if (emitter.type === 3) {
|
|
344
|
-
//
|
|
442
|
+
if (emitter.type === 3 || emitter.type === 4) {
|
|
443
|
+
// 曲线段到达指定目标位置后按 execute 的完整初始化流程重发:在当前位置重选目标,
|
|
345
444
|
// 重置速度、预测位置、曲线方向和免触发时间,避免只换目标而残留上一段状态。
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
const reselectedTarget = owner.game.getEntityLogic(newTarget);
|
|
349
|
-
this._resetLaunchState(owner, emitter, reselectedTarget);
|
|
350
|
-
return;
|
|
351
|
-
}
|
|
352
|
-
owner.noTriggerTime = owner.shape ? this._getNoTriggerTime(owner.shape.width, emitter.curMoveSpeed, emitter.speedUp) : 0;
|
|
353
|
-
BVec2_1.BVecHelper.sub(ProjectileEmitterShared_1.tempVec2, owner.emitter.position, owner);
|
|
354
|
-
owner.emitter.curTime = BVec2_1.BVecHelper.length(ProjectileEmitterShared_1.tempVec2) / owner.moveSpeed;
|
|
445
|
+
// type 4 不结算命中(伤害由 shape 碰撞负责),仅重新索敌。
|
|
446
|
+
this._reselectAfterArrival(owner, emitter, target);
|
|
355
447
|
return;
|
|
356
448
|
}
|
|
357
449
|
owner.game.emit(GameEvent_1.GameEvent.ProjectileToDead, owner);
|
|
@@ -390,6 +482,8 @@ let ProjectileEmitter3 = class ProjectileEmitter3 extends ProjectileEmitter_1.Pr
|
|
|
390
482
|
emitter.maxAngle = p11?.[1] || 120;
|
|
391
483
|
emitter.minAngle = p11?.[0] || 0;
|
|
392
484
|
}
|
|
485
|
+
emitter.isTouchMove = p11?.[2] || 0; //统一取p11[2],避免与曲线模式p11[0..1]的转角范围冲突
|
|
486
|
+
emitter.fixAngle = p11?.[3] || 0;
|
|
393
487
|
this._resetLaunchState(owner, emitter, target);
|
|
394
488
|
}
|
|
395
489
|
static getData() {
|
|
@@ -411,6 +505,8 @@ let ProjectileEmitter3 = class ProjectileEmitter3 extends ProjectileEmitter_1.Pr
|
|
|
411
505
|
maxMoveSpeed: 0,
|
|
412
506
|
maxAngle: 0,
|
|
413
507
|
minAngle: 0,
|
|
508
|
+
isTouchMove: 0,
|
|
509
|
+
fixAngle: 0,
|
|
414
510
|
};
|
|
415
511
|
}
|
|
416
512
|
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type FighterData from "../../../entity/FighterData";
|
|
2
|
+
import ProjectileData from "../../../entity/ProjectileData";
|
|
3
|
+
import { ProjectileEmitter } from "./ProjectileEmitter";
|
|
4
|
+
import type { IProjectileEmitter } from "./ProjectileEmitter";
|
|
5
|
+
export interface IProjectileEmitter30 extends IProjectileEmitter {
|
|
6
|
+
stayTime: number;
|
|
7
|
+
partnerId: number;
|
|
8
|
+
masterId: number;
|
|
9
|
+
state: number;
|
|
10
|
+
backX: number;
|
|
11
|
+
backY: number;
|
|
12
|
+
fixAngle: number;
|
|
13
|
+
}
|
|
14
|
+
/** 相互融合弹道:停留等待同释放者同技能的另一颗弹道30,配对后回弹再互相汇聚,重合后融合消失。 */
|
|
15
|
+
export declare class ProjectileEmitter30 extends ProjectileEmitter {
|
|
16
|
+
private static readonly STATE_WAIT;
|
|
17
|
+
private static readonly STATE_BACK;
|
|
18
|
+
private static readonly STATE_CHASE;
|
|
19
|
+
private static readonly STATE_DONE;
|
|
20
|
+
/** 配对成功后沿发射反方向后退的距离(像素),用作回弹表现 */
|
|
21
|
+
private static readonly BACK_DISTANCE;
|
|
22
|
+
private static readonly EPSILON_SQR;
|
|
23
|
+
private static _getPartner;
|
|
24
|
+
/** 每帧寻找最近的一颗未配对同组弹道30,双方互相记录 ID 并确定主从关系。 */
|
|
25
|
+
private static _tryBindPartner;
|
|
26
|
+
private static _startBack;
|
|
27
|
+
/** 后退阶段保持原始朝向不回正,形成回弹观感;返回本帧剩余可用于追击的时间。 */
|
|
28
|
+
private static _updateBack;
|
|
29
|
+
private static _updateChase;
|
|
30
|
+
private static _finishMerge;
|
|
31
|
+
static onUpdate(projectile: ProjectileData, dt: number): void;
|
|
32
|
+
static _updateAngle(owner: ProjectileData): void;
|
|
33
|
+
/** p9 = 强制停留时间(秒)。 */
|
|
34
|
+
static execute(owner: ProjectileData, target: FighterData, p9?: number, p10?: number, p11?: number[]): void;
|
|
35
|
+
static getData(): IProjectileEmitter30;
|
|
36
|
+
}
|