captainbattle 1.0.5 → 1.0.7
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 +230 -17
- package/dist/register-all.d.ts +2 -0
- package/dist/register-all.js +2 -0
- package/package.json +1 -1
- package/resources/config/GameJsonCfg.bin +0 -0
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.ProjectileEmitter30 = void 0;
|
|
10
|
+
const battle_interface_1 = require("../../../battle.interface");
|
|
11
|
+
const EntityEvent_1 = require("../../../event/EntityEvent");
|
|
12
|
+
const GameEvent_1 = require("../../../event/GameEvent");
|
|
13
|
+
const BattleUtils_1 = require("../../../util/BattleUtils");
|
|
14
|
+
const BVec2_1 = require("../../../util/BVec2");
|
|
15
|
+
const ProjectileEmitter_1 = require("./ProjectileEmitter");
|
|
16
|
+
const ProjectileEmitterShared_1 = require("./ProjectileEmitterShared");
|
|
17
|
+
/** 相互融合弹道:停留等待同释放者同技能的另一颗弹道30,配对后回弹再互相汇聚,重合后融合消失。 */
|
|
18
|
+
let ProjectileEmitter30 = class ProjectileEmitter30 extends ProjectileEmitter_1.ProjectileEmitter {
|
|
19
|
+
static STATE_WAIT = 0;
|
|
20
|
+
static STATE_BACK = 1;
|
|
21
|
+
static STATE_CHASE = 2;
|
|
22
|
+
static STATE_DONE = 3;
|
|
23
|
+
/** 配对成功后沿发射反方向后退的距离(像素),用作回弹表现 */
|
|
24
|
+
static BACK_DISTANCE = 20;
|
|
25
|
+
static EPSILON_SQR = 1e-8;
|
|
26
|
+
static _getPartner(projectile, emitter) {
|
|
27
|
+
if (!emitter.partnerId)
|
|
28
|
+
return null;
|
|
29
|
+
const partner = projectile.game.getEntityLogic(emitter.partnerId, battle_interface_1.EntityType.PROJECTILE);
|
|
30
|
+
if (!partner || partner.isDead)
|
|
31
|
+
return null;
|
|
32
|
+
if (partner.owner !== projectile.owner || partner.skillId !== projectile.skillId)
|
|
33
|
+
return null;
|
|
34
|
+
const partnerEmitter = partner.emitter;
|
|
35
|
+
if (!partnerEmitter || partnerEmitter.emitterName !== "ProjectileEmitter30")
|
|
36
|
+
return null;
|
|
37
|
+
if (partnerEmitter.state === this.STATE_DONE || partnerEmitter.partnerId !== projectile.ID)
|
|
38
|
+
return null;
|
|
39
|
+
if (!emitter.masterId || partnerEmitter.masterId !== emitter.masterId)
|
|
40
|
+
return null;
|
|
41
|
+
return partner;
|
|
42
|
+
}
|
|
43
|
+
/** 每帧寻找最近的一颗未配对同组弹道30,双方互相记录 ID 并确定主从关系。 */
|
|
44
|
+
static _tryBindPartner(projectile) {
|
|
45
|
+
const projectiles = projectile.game.gameContext.projectiles;
|
|
46
|
+
let best = null;
|
|
47
|
+
let bestDistanceSqr = Number.POSITIVE_INFINITY;
|
|
48
|
+
for (let i = 0; i < projectiles.length; i++) {
|
|
49
|
+
const other = projectiles[i];
|
|
50
|
+
if (other === projectile || other.isDead || other.delayBornTime > 0)
|
|
51
|
+
continue;
|
|
52
|
+
if (other.owner !== projectile.owner || other.skillId !== projectile.skillId)
|
|
53
|
+
continue;
|
|
54
|
+
const otherEmitter = other.emitter;
|
|
55
|
+
if (!otherEmitter || otherEmitter.emitterName !== "ProjectileEmitter30")
|
|
56
|
+
continue;
|
|
57
|
+
if (otherEmitter.state === this.STATE_DONE || otherEmitter.partnerId !== 0)
|
|
58
|
+
continue;
|
|
59
|
+
const distanceSqr = BVec2_1.BVecHelper.distanceSqr(projectile, other);
|
|
60
|
+
if (distanceSqr < bestDistanceSqr) {
|
|
61
|
+
bestDistanceSqr = distanceSqr;
|
|
62
|
+
best = other;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (!best)
|
|
66
|
+
return;
|
|
67
|
+
// 创建更早(ID 更小)的子弹为主弹,主从双方都记录同一个主弹 ID
|
|
68
|
+
const master = projectile.ID < best.ID ? projectile : best;
|
|
69
|
+
const slave = master === projectile ? best : projectile;
|
|
70
|
+
const masterEmitter = master.emitter;
|
|
71
|
+
const slaveEmitter = slave.emitter;
|
|
72
|
+
masterEmitter.partnerId = slave.ID;
|
|
73
|
+
slaveEmitter.partnerId = master.ID;
|
|
74
|
+
masterEmitter.masterId = master.ID;
|
|
75
|
+
slaveEmitter.masterId = master.ID;
|
|
76
|
+
}
|
|
77
|
+
static _startBack(projectile, emitter) {
|
|
78
|
+
const directionLengthSqr = BVec2_1.BVecHelper.lengthSqr(emitter.shootDir);
|
|
79
|
+
if (directionLengthSqr <= this.EPSILON_SQR || projectile.moveSpeed <= 0)
|
|
80
|
+
return false;
|
|
81
|
+
BVec2_1.BVecHelper.normalize(ProjectileEmitterShared_1.tempVec2, emitter.shootDir);
|
|
82
|
+
emitter.backX = projectile.x - ProjectileEmitterShared_1.tempVec2.x * this.BACK_DISTANCE;
|
|
83
|
+
emitter.backY = projectile.y - ProjectileEmitterShared_1.tempVec2.y * this.BACK_DISTANCE;
|
|
84
|
+
emitter.state = this.STATE_BACK;
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
/** 后退阶段保持原始朝向不回正,形成回弹观感;返回本帧剩余可用于追击的时间。 */
|
|
88
|
+
static _updateBack(projectile, emitter, dt) {
|
|
89
|
+
if (emitter.state === this.STATE_DONE)
|
|
90
|
+
return 0;
|
|
91
|
+
const speed = Math.max(0, projectile.moveSpeed);
|
|
92
|
+
if (speed <= 0) {
|
|
93
|
+
emitter.state = this.STATE_CHASE;
|
|
94
|
+
return dt;
|
|
95
|
+
}
|
|
96
|
+
BVec2_1.BVecHelper.set(ProjectileEmitterShared_1.tempVec2, emitter.backX - projectile.x, emitter.backY - projectile.y);
|
|
97
|
+
const distance = BVec2_1.BVecHelper.length(ProjectileEmitterShared_1.tempVec2);
|
|
98
|
+
const step = speed * dt;
|
|
99
|
+
if (distance <= step) {
|
|
100
|
+
projectile.setPosition(emitter.backX, emitter.backY);
|
|
101
|
+
emitter.state = this.STATE_CHASE;
|
|
102
|
+
return dt - distance / speed;
|
|
103
|
+
}
|
|
104
|
+
BVec2_1.BVecHelper.mulScalar(ProjectileEmitterShared_1.tempVec2, ProjectileEmitterShared_1.tempVec2, step / distance);
|
|
105
|
+
projectile.setPosition(projectile.x + ProjectileEmitterShared_1.tempVec2.x, projectile.y + ProjectileEmitterShared_1.tempVec2.y);
|
|
106
|
+
return 0;
|
|
107
|
+
}
|
|
108
|
+
static _updateChase(projectile, emitter, partner, dt) {
|
|
109
|
+
if (emitter.state === this.STATE_DONE)
|
|
110
|
+
return;
|
|
111
|
+
const selfStep = Math.max(0, projectile.moveSpeed) * dt;
|
|
112
|
+
const partnerStep = Math.max(0, partner.moveSpeed) * dt;
|
|
113
|
+
const closure = selfStep + partnerStep;
|
|
114
|
+
// 本帧合计位移足以相遇时直接融合,避免互相穿过
|
|
115
|
+
if (BVec2_1.BVecHelper.distanceSqr(projectile, partner) <= closure * closure + this.EPSILON_SQR) {
|
|
116
|
+
this._finishMerge(projectile, partner);
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
BVec2_1.BVecHelper.set(ProjectileEmitterShared_1.tempVec2, partner.x - projectile.x, partner.y - projectile.y);
|
|
120
|
+
BVec2_1.BVecHelper.normalize(emitter.shootDir, ProjectileEmitterShared_1.tempVec2);
|
|
121
|
+
this._updateAngle(projectile);
|
|
122
|
+
BVec2_1.BVecHelper.mulScalar(ProjectileEmitterShared_1.tempVec22, emitter.shootDir, selfStep);
|
|
123
|
+
projectile.setPosition(projectile.x + ProjectileEmitterShared_1.tempVec22.x, projectile.y + ProjectileEmitterShared_1.tempVec22.y);
|
|
124
|
+
}
|
|
125
|
+
static _finishMerge(projectile, partner) {
|
|
126
|
+
const emitter = projectile.emitter;
|
|
127
|
+
// 主从关系在配对时确定:ID 更小(创建更早)的为主弹
|
|
128
|
+
const master = emitter.masterId === partner.ID ? partner : projectile;
|
|
129
|
+
const slave = master === projectile ? partner : projectile;
|
|
130
|
+
const masterEmitter = master.emitter;
|
|
131
|
+
const slaveEmitter = slave.emitter;
|
|
132
|
+
masterEmitter.state = this.STATE_DONE;
|
|
133
|
+
masterEmitter.partnerId = 0;
|
|
134
|
+
masterEmitter.masterId = 0;
|
|
135
|
+
slaveEmitter.state = this.STATE_DONE;
|
|
136
|
+
slaveEmitter.partnerId = 0;
|
|
137
|
+
slaveEmitter.masterId = 0;
|
|
138
|
+
// 双方都落到中点,监听方取融合位置时一致
|
|
139
|
+
const centerX = (projectile.x + partner.x) * 0.5;
|
|
140
|
+
const centerY = (projectile.y + partner.y) * 0.5;
|
|
141
|
+
projectile.setPosition(centerX, centerY);
|
|
142
|
+
partner.setPosition(centerX, centerY);
|
|
143
|
+
// 融合完成事件只由主子弹发出,业务参数固定为(主弹,从弹)
|
|
144
|
+
const owner = master.game.getEntityLogic(master.owner);
|
|
145
|
+
if (owner) {
|
|
146
|
+
master.game.emit1(owner, EntityEvent_1.EntityEvent.ProjectileMergeFinish, master);
|
|
147
|
+
}
|
|
148
|
+
master.game.emit(GameEvent_1.GameEvent.ProjectileToDead, master);
|
|
149
|
+
slave.game.emit(GameEvent_1.GameEvent.ProjectileToDead, slave);
|
|
150
|
+
}
|
|
151
|
+
static onUpdate(projectile, dt) {
|
|
152
|
+
const emitter = projectile.emitter;
|
|
153
|
+
if (emitter.state === this.STATE_DONE)
|
|
154
|
+
return;
|
|
155
|
+
// 强制停留计时,未配对时同样消耗
|
|
156
|
+
const stayDt = Math.min(emitter.stayTime, dt);
|
|
157
|
+
emitter.stayTime -= stayDt;
|
|
158
|
+
if (emitter.partnerId === 0) {
|
|
159
|
+
this._tryBindPartner(projectile);
|
|
160
|
+
}
|
|
161
|
+
let partner = this._getPartner(projectile, emitter);
|
|
162
|
+
if (!partner) {
|
|
163
|
+
// 配对目标失效:回到等待状态并恢复存活时间倒计时,随后重新搜索
|
|
164
|
+
emitter.partnerId = 0;
|
|
165
|
+
emitter.masterId = 0;
|
|
166
|
+
emitter.state = this.STATE_WAIT;
|
|
167
|
+
this._tryBindPartner(projectile);
|
|
168
|
+
partner = this._getPartner(projectile, emitter);
|
|
169
|
+
}
|
|
170
|
+
else if ((projectile.moveSpeed > 0 || partner.moveSpeed > 0)
|
|
171
|
+
&& (projectile.timeType !== 1 || projectile.hitCount > 0)) {
|
|
172
|
+
// 配对成功后暂停存活时间:ProjectileSystem 在本帧 onUpdate 之后还会扣减 dt。
|
|
173
|
+
// 双方速度都为 0 时无法靠拢,不补偿,避免子弹永久滞留。
|
|
174
|
+
projectile.lifeTime += dt;
|
|
175
|
+
}
|
|
176
|
+
if (!partner || emitter.stayTime > 0)
|
|
177
|
+
return;
|
|
178
|
+
const remainDt = dt - stayDt;
|
|
179
|
+
if (remainDt <= 0)
|
|
180
|
+
return;
|
|
181
|
+
if (emitter.state === this.STATE_WAIT) {
|
|
182
|
+
if (!this._startBack(projectile, emitter)) {
|
|
183
|
+
emitter.state = this.STATE_CHASE;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
let chaseDt = remainDt;
|
|
187
|
+
if (emitter.state === this.STATE_BACK) {
|
|
188
|
+
chaseDt = this._updateBack(projectile, emitter, remainDt);
|
|
189
|
+
if (chaseDt <= 0)
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
if (emitter.state === this.STATE_CHASE) {
|
|
193
|
+
this._updateChase(projectile, emitter, partner, chaseDt);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
static _updateAngle(owner) {
|
|
197
|
+
const emitter = owner.emitter;
|
|
198
|
+
if (emitter.fixAngle) {
|
|
199
|
+
owner.setAngle(0);
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
super._updateAngle(owner);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
/** p9 = 强制停留时间(秒)。 */
|
|
206
|
+
static execute(owner, target, p9, p10, p11) {
|
|
207
|
+
const emitter = owner.emitter;
|
|
208
|
+
emitter.stayTime = Math.max(0, p9 || 0);
|
|
209
|
+
emitter.fixAngle = p10 || 0;
|
|
210
|
+
emitter.partnerId = 0;
|
|
211
|
+
emitter.masterId = 0;
|
|
212
|
+
emitter.state = this.STATE_WAIT;
|
|
213
|
+
emitter.backX = owner.x;
|
|
214
|
+
emitter.backY = owner.y;
|
|
215
|
+
this._updateAngle(owner);
|
|
216
|
+
}
|
|
217
|
+
static getData() {
|
|
218
|
+
return {
|
|
219
|
+
emitterValue: 30,
|
|
220
|
+
emitterName: "ProjectileEmitter30",
|
|
221
|
+
shootDir: { x: 0, y: 0 },
|
|
222
|
+
stayTime: 0,
|
|
223
|
+
partnerId: 0,
|
|
224
|
+
masterId: 0,
|
|
225
|
+
state: this.STATE_WAIT,
|
|
226
|
+
backX: 0,
|
|
227
|
+
backY: 0,
|
|
228
|
+
fixAngle: 0,
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
exports.ProjectileEmitter30 = ProjectileEmitter30;
|
|
233
|
+
exports.ProjectileEmitter30 = ProjectileEmitter30 = __decorate([
|
|
234
|
+
(0, BattleUtils_1.cacheFunction)("ProjectileEmitter30")
|
|
235
|
+
], ProjectileEmitter30);
|
|
@@ -0,0 +1,13 @@
|
|
|
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 IProjectileEmitter31 extends IProjectileEmitter {
|
|
6
|
+
curTime: number;
|
|
7
|
+
}
|
|
8
|
+
/** 一定时间后对目标造成指定效果,弹道只是作为传递效果的载体。 */
|
|
9
|
+
export declare class ProjectileEmitter31 extends ProjectileEmitter {
|
|
10
|
+
static onUpdate(projectile: ProjectileData, dt: number): void;
|
|
11
|
+
static execute(owner: ProjectileData, target: FighterData, p9?: number, p10?: number, p11?: number[]): void;
|
|
12
|
+
static getData(): IProjectileEmitter31;
|
|
13
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.ProjectileEmitter31 = void 0;
|
|
10
|
+
const GameEvent_1 = require("../../../event/GameEvent");
|
|
11
|
+
const BattleUtils_1 = require("../../../util/BattleUtils");
|
|
12
|
+
const BVec2_1 = require("../../../util/BVec2");
|
|
13
|
+
const ProjectileEmitter_1 = require("./ProjectileEmitter");
|
|
14
|
+
const ProjectileEmitterShared_1 = require("./ProjectileEmitterShared");
|
|
15
|
+
/** 一定时间后对目标造成指定效果,弹道只是作为传递效果的载体。 */
|
|
16
|
+
let ProjectileEmitter31 = class ProjectileEmitter31 extends ProjectileEmitter_1.ProjectileEmitter {
|
|
17
|
+
static onUpdate(projectile, dt) {
|
|
18
|
+
const emitter = projectile.emitter;
|
|
19
|
+
emitter.curTime -= dt;
|
|
20
|
+
this.moveUpdate(projectile, dt);
|
|
21
|
+
if (emitter.curTime <= 0) {
|
|
22
|
+
projectile.game.emit(GameEvent_1.GameEvent.ProjectileHit, projectile, projectile.game.getEntityLogic(projectile.target));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
static execute(owner, target, p9, p10, p11) {
|
|
26
|
+
const emitter = owner.emitter;
|
|
27
|
+
target.getBeHitPoint(owner.owner, ProjectileEmitterShared_1.tempVec2);
|
|
28
|
+
BVec2_1.BVecHelper.sub(ProjectileEmitterShared_1.tempVec2, ProjectileEmitterShared_1.tempVec2, owner);
|
|
29
|
+
const dist = BVec2_1.BVecHelper.length(ProjectileEmitterShared_1.tempVec2);
|
|
30
|
+
owner.lifeTime = dist / owner.moveSpeed;
|
|
31
|
+
BVec2_1.BVecHelper.normalize(emitter.shootDir, ProjectileEmitterShared_1.tempVec2);
|
|
32
|
+
emitter.curTime = owner.lifeTime;
|
|
33
|
+
this._updateAngle(owner);
|
|
34
|
+
}
|
|
35
|
+
static getData() {
|
|
36
|
+
return {
|
|
37
|
+
emitterValue: 31,
|
|
38
|
+
emitterName: "ProjectileEmitter31",
|
|
39
|
+
shootDir: { x: 0, y: 0 },
|
|
40
|
+
curTime: 0,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
exports.ProjectileEmitter31 = ProjectileEmitter31;
|
|
45
|
+
exports.ProjectileEmitter31 = ProjectileEmitter31 = __decorate([
|
|
46
|
+
(0, BattleUtils_1.cacheFunction)("ProjectileEmitter31")
|
|
47
|
+
], ProjectileEmitter31);
|
|
@@ -45,6 +45,7 @@ export interface IProjectileEmitter4 extends IProjectileEmitter {
|
|
|
45
45
|
boundTime: number;
|
|
46
46
|
isFindEnemy: number;
|
|
47
47
|
warningEffectId: number;
|
|
48
|
+
delayTime: number;
|
|
48
49
|
}
|
|
49
50
|
export declare class ProjectileEmitter4 extends ProjectileEmitter {
|
|
50
51
|
private static _isPointInSceneRect;
|
|
@@ -163,6 +163,15 @@ let ProjectileEmitter4 = class ProjectileEmitter4 extends ProjectileEmitter_1.Pr
|
|
|
163
163
|
}
|
|
164
164
|
static onUpdate(owner, dt) {
|
|
165
165
|
const emitter = owner.emitter;
|
|
166
|
+
//弹跳延迟: 停在弹跳点等待, 延迟结束后用本帧剩余时间继续运动
|
|
167
|
+
if (emitter.delayTime > 0) {
|
|
168
|
+
emitter.delayTime -= dt;
|
|
169
|
+
if (emitter.delayTime > 0) {
|
|
170
|
+
return false;
|
|
171
|
+
}
|
|
172
|
+
dt = -emitter.delayTime;
|
|
173
|
+
emitter.delayTime = 0;
|
|
174
|
+
}
|
|
166
175
|
if (emitter.curTime < emitter.totalTime) {
|
|
167
176
|
emitter.curTime += dt;
|
|
168
177
|
let t = emitter.curTime / emitter.totalTime;
|
|
@@ -225,7 +234,7 @@ let ProjectileEmitter4 = class ProjectileEmitter4 extends ProjectileEmitter_1.Pr
|
|
|
225
234
|
target.getBeHitPoint(owner.owner, ProjectileEmitterShared_1.tempVec22);
|
|
226
235
|
if (!this._isPointInSceneRect(ProjectileEmitterShared_1.tempVec22.x, ProjectileEmitterShared_1.tempVec22.y)
|
|
227
236
|
|| !this._isPointInBoundDistance(owner, ProjectileEmitterShared_1.tempVec22.x, ProjectileEmitterShared_1.tempVec22.y, boundDis.minSqr, boundDis.maxSqr)) {
|
|
228
|
-
|
|
237
|
+
BattleUtils_1.BattleUtils.removeAt(subList, i);
|
|
229
238
|
}
|
|
230
239
|
}
|
|
231
240
|
}
|
|
@@ -258,7 +267,17 @@ let ProjectileEmitter4 = class ProjectileEmitter4 extends ProjectileEmitter_1.Pr
|
|
|
258
267
|
// let totalDistance = this.calculateCubicBezierLength(emitter.startPoint, emitter.controlPoint1, emitter.controlPoint2, emitter.endPoint);
|
|
259
268
|
emitter.totalTime = emitter.boundTime;
|
|
260
269
|
emitter.curTime = 0;
|
|
261
|
-
|
|
270
|
+
//弹跳延迟 p11[12] 从技能配置实时读取, 不在发射器参数里冗余保存
|
|
271
|
+
const index = owner.impact[owner.impact.length - 1];
|
|
272
|
+
owner.impact.length = owner.impact.length - 1;
|
|
273
|
+
const impactCfg = owner.game.getSkillImpactByImpactPath(owner.impact);
|
|
274
|
+
owner.impact.push(index);
|
|
275
|
+
const bounceDelayTime = impactCfg && impactCfg.p11 && impactCfg.p11[12] || 0;
|
|
276
|
+
emitter.delayTime = bounceDelayTime;
|
|
277
|
+
owner.lifeTime = bounceDelayTime + emitter.totalTime + 0.2;
|
|
278
|
+
if (emitter.warningEffectId) {
|
|
279
|
+
owner.game.emit(GameEvent_1.GameEvent.ShowProjectileWarning, owner.ID, emitter.warningEffectId, emitter.endPoint, owner.owner, owner.scaleX, owner.scaleY, owner.lifeTime);
|
|
280
|
+
}
|
|
262
281
|
}
|
|
263
282
|
static calculateParabolicProgress(t) {
|
|
264
283
|
const speedBias = 0.10;
|
|
@@ -276,6 +295,7 @@ let ProjectileEmitter4 = class ProjectileEmitter4 extends ProjectileEmitter_1.Pr
|
|
|
276
295
|
emitter.boundTime = p11 && p11[7] || 1;
|
|
277
296
|
emitter.isFindEnemy = p11 && p11[4] || 0;
|
|
278
297
|
emitter.warningEffectId = p11 && p11[10] || 0;
|
|
298
|
+
emitter.delayTime = 0;
|
|
279
299
|
emitter.curTime = 0;
|
|
280
300
|
emitter.bounceCount = p9 || 0;
|
|
281
301
|
const followTarget = p11 && p11[8] || 0;
|
|
@@ -327,6 +347,8 @@ let ProjectileEmitter4 = class ProjectileEmitter4 extends ProjectileEmitter_1.Pr
|
|
|
327
347
|
target.getBeHitPoint(owner.owner, emitter.endPoint);
|
|
328
348
|
}
|
|
329
349
|
}
|
|
350
|
+
// 目标x位置需要添加偏移量
|
|
351
|
+
emitter.endPoint.x += emitter.offsetDegress;
|
|
330
352
|
}
|
|
331
353
|
else {
|
|
332
354
|
emitter.endPoint.x = owner.x;
|
|
@@ -404,6 +426,7 @@ let ProjectileEmitter4 = class ProjectileEmitter4 extends ProjectileEmitter_1.Pr
|
|
|
404
426
|
boundTime: 0.5,
|
|
405
427
|
isFindEnemy: 0,
|
|
406
428
|
warningEffectId: 0,
|
|
429
|
+
delayTime: 0,
|
|
407
430
|
};
|
|
408
431
|
}
|
|
409
432
|
};
|
|
@@ -23,11 +23,15 @@ let ProjectileEmitter6 = class ProjectileEmitter6 extends ProjectileEmitter_1.Pr
|
|
|
23
23
|
//越界量折回:x = 边界 - 越界量
|
|
24
24
|
if (x > halfMoveDis) {
|
|
25
25
|
x = 2 * halfMoveDis - x;
|
|
26
|
-
|
|
26
|
+
if (projectile.lifeTime - dt > 0) {
|
|
27
|
+
emitter.shootDir.x = -1;
|
|
28
|
+
}
|
|
27
29
|
}
|
|
28
30
|
else if (x < -halfMoveDis) {
|
|
29
31
|
x = -2 * halfMoveDis - x;
|
|
30
|
-
|
|
32
|
+
if (projectile.lifeTime - dt > 0) {
|
|
33
|
+
emitter.shootDir.x = 1;
|
|
34
|
+
}
|
|
31
35
|
}
|
|
32
36
|
}
|
|
33
37
|
this._syncHorDir(projectile, emitter);
|
|
@@ -72,11 +76,11 @@ let ProjectileEmitter6 = class ProjectileEmitter6 extends ProjectileEmitter_1.Pr
|
|
|
72
76
|
let baseX = owner.x;
|
|
73
77
|
if (emitter.curDir === 0) {
|
|
74
78
|
emitter.shootDir.x = 1;
|
|
75
|
-
baseX = -emitter.halfMoveDis
|
|
79
|
+
baseX = -emitter.halfMoveDis;
|
|
76
80
|
}
|
|
77
81
|
else {
|
|
78
82
|
emitter.shootDir.x = -1;
|
|
79
|
-
baseX = emitter.halfMoveDis
|
|
83
|
+
baseX = emitter.halfMoveDis;
|
|
80
84
|
}
|
|
81
85
|
let baseY = owner.game.gameModule.myPosIndexs[0][1];
|
|
82
86
|
if (target) {
|
|
@@ -86,10 +90,10 @@ let ProjectileEmitter6 = class ProjectileEmitter6 extends ProjectileEmitter_1.Pr
|
|
|
86
90
|
this._syncHorDir(owner, emitter);
|
|
87
91
|
owner.setPosition(baseX, baseY);
|
|
88
92
|
this._updateAngle(owner);
|
|
89
|
-
if (warnEffectId) {
|
|
93
|
+
if (warnEffectId && (owner.index + 1) == owner.allNum) {
|
|
90
94
|
ProjectileEmitterShared_1.tempVec2.x = 0;
|
|
91
95
|
ProjectileEmitterShared_1.tempVec2.y = baseY;
|
|
92
|
-
owner.game.emit(GameEvent_1.GameEvent.ShowProjectileWarning, owner.ID, warnEffectId, ProjectileEmitterShared_1.tempVec2, owner.owner, 1, owner.scaleY, owner.lifeTime);
|
|
96
|
+
owner.game.emit(GameEvent_1.GameEvent.ShowProjectileWarning, owner.ID, warnEffectId, ProjectileEmitterShared_1.tempVec2, owner.owner, 1, owner.scaleY, owner.lifeTime + owner.delayBornTime);
|
|
93
97
|
}
|
|
94
98
|
}
|
|
95
99
|
static getData() {
|
|
@@ -61,13 +61,13 @@ let ProjectileEmitter8 = class ProjectileEmitter8 extends ProjectileEmitter_1.Pr
|
|
|
61
61
|
else {
|
|
62
62
|
let pos = BVec2_1.BVecHelper.pop();
|
|
63
63
|
enemy.getBeHitPoint(owner.owner, pos);
|
|
64
|
-
owner.game.
|
|
64
|
+
owner.game.emit1(role, EntityEvent_1.EntityEvent.ThunderLastHit, { beHiter: enemy, skillId: owner.skillId, x: pos.x, y: pos.y });
|
|
65
65
|
BVec2_1.BVecHelper.push(pos);
|
|
66
66
|
}
|
|
67
67
|
break;
|
|
68
68
|
}
|
|
69
69
|
else {
|
|
70
|
-
|
|
70
|
+
BattleUtils_1.BattleUtils.removeAt(subTarget, j);
|
|
71
71
|
j--;
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -23,6 +23,8 @@ import "./ProjectileEmitter27";
|
|
|
23
23
|
import "./ProjectileEmitter28";
|
|
24
24
|
import "./ProjectileEmitter29";
|
|
25
25
|
import "./ProjectileEmitter3";
|
|
26
|
+
import "./ProjectileEmitter30";
|
|
27
|
+
import "./ProjectileEmitter31";
|
|
26
28
|
import "./ProjectileEmitter4";
|
|
27
29
|
import "./ProjectileEmitter5";
|
|
28
30
|
import "./ProjectileEmitter6";
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// Cocos 的资源系统会把 assets 下所有脚本加载一遍,所以引擎里天然成立;
|
|
9
9
|
// Node 只执行从入口 import 可达的模块,不引这一下,注册表就是空的。
|
|
10
10
|
//
|
|
11
|
-
// 共
|
|
11
|
+
// 共 34 个模块。下面的 import 只为副作用,不需要用到导出。
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
require("./ProjectileEmitter");
|
|
14
14
|
require("./ProjectileEmitter0");
|
|
@@ -35,6 +35,8 @@ require("./ProjectileEmitter27");
|
|
|
35
35
|
require("./ProjectileEmitter28");
|
|
36
36
|
require("./ProjectileEmitter29");
|
|
37
37
|
require("./ProjectileEmitter3");
|
|
38
|
+
require("./ProjectileEmitter30");
|
|
39
|
+
require("./ProjectileEmitter31");
|
|
38
40
|
require("./ProjectileEmitter4");
|
|
39
41
|
require("./ProjectileEmitter5");
|
|
40
42
|
require("./ProjectileEmitter6");
|
|
@@ -46,8 +46,10 @@ let Impact1 = class Impact1 extends SkillImpact_1.SkillImpact {
|
|
|
46
46
|
hitData.projectileID = skillData.realOwnerId;
|
|
47
47
|
const isIgnoreCrit = impactData.p2 || 0;
|
|
48
48
|
const isNoHit = impactData.p3 || 0;
|
|
49
|
+
const isIgnoreMiss = impactData.p4 || 0;
|
|
49
50
|
hitData.event.isNoHit = isNoHit > 0;
|
|
50
51
|
hitData.event.isIgnoreCrit = isIgnoreCrit > 0;
|
|
52
|
+
hitData.event.isIgnoreMiss = isIgnoreMiss > 0;
|
|
51
53
|
if (impactData.hitId) {
|
|
52
54
|
let scaleX = fighters[i].scaleX * (impactData.hitScale || 1);
|
|
53
55
|
let scaleY = fighters[i].scaleY * (impactData.hitScaleY || impactData.hitScale || 1);
|
|
@@ -43,7 +43,7 @@ let Impact10 = class Impact10 extends SkillImpact_1.SkillImpact {
|
|
|
43
43
|
fighter.isDead = false;
|
|
44
44
|
}
|
|
45
45
|
fighter.setCurHp(fighter.curHp + add);
|
|
46
|
-
fighter.game.emit(GameEvent_1.GameEvent.ShowDisplay, 1 /* DisplayType.Heal */, add, fighter
|
|
46
|
+
fighter.game.emit(GameEvent_1.GameEvent.ShowDisplay, 1 /* DisplayType.Heal */, add, fighter);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
return true;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IImpact } from "../../battle.interface";
|
|
2
|
+
import type FighterData from "../../entity/FighterData";
|
|
3
|
+
import { SkillData } from "../SkillData";
|
|
4
|
+
import { SkillImpact } from "./SkillImpact";
|
|
5
|
+
/**
|
|
6
|
+
* 回合制维修效果
|
|
7
|
+
* 获取当前回合损失的生命值作为基础值
|
|
8
|
+
* value=维修量万分比(废弃)读取角色属性表维修量
|
|
9
|
+
* effectId=维修特效id
|
|
10
|
+
*/
|
|
11
|
+
export declare class Impact100 extends SkillImpact {
|
|
12
|
+
execute(owner: FighterData, skilData: SkillData, effectFighters: FighterData[], impactData: IImpact): boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.Impact100 = void 0;
|
|
10
|
+
const Property_1 = require("../../../property/Property");
|
|
11
|
+
const battle_interface_1 = require("../../battle.interface");
|
|
12
|
+
const GameEvent_1 = require("../../event/GameEvent");
|
|
13
|
+
const SkillEffectByIdParamsPool_1 = require("../../util/SkillEffectByIdParamsPool");
|
|
14
|
+
const ImpactRegistry_1 = require("./ImpactRegistry");
|
|
15
|
+
const SkillImpact_1 = require("./SkillImpact");
|
|
16
|
+
/**
|
|
17
|
+
* 回合制维修效果
|
|
18
|
+
* 获取当前回合损失的生命值作为基础值
|
|
19
|
+
* value=维修量万分比(废弃)读取角色属性表维修量
|
|
20
|
+
* effectId=维修特效id
|
|
21
|
+
*/
|
|
22
|
+
let Impact100 = class Impact100 extends SkillImpact_1.SkillImpact {
|
|
23
|
+
execute(owner, skilData, effectFighters, impactData) {
|
|
24
|
+
const game = owner.game;
|
|
25
|
+
// 本回合实际损失的生命值,作为维修基础值
|
|
26
|
+
const hurtHp = game.getTurnHurtHp(owner.campType);
|
|
27
|
+
const other = owner.campType === battle_interface_1.CampType.MY ? game.getEntityLogic(game.enemyMainRoleId) : game.getEntityLogic(game.mainRoleId);
|
|
28
|
+
let fighter = owner;
|
|
29
|
+
if (impactData.effectId) {
|
|
30
|
+
const params = SkillEffectByIdParamsPool_1.SkillEffectByIdParamsPool.pop();
|
|
31
|
+
fighter.getBodyCenter(params.pos);
|
|
32
|
+
params.scaleX = impactData.effectScale || 1;
|
|
33
|
+
params.scaleY = impactData.effectScaleY || impactData.effectScale || 1;
|
|
34
|
+
fighter.game.emit(GameEvent_1.GameEvent.ShowSkillEffectById, impactData.effectId, fighter, params);
|
|
35
|
+
}
|
|
36
|
+
const otherResist = other ? (other.property[50810] || 0) : 0;
|
|
37
|
+
let addvalue = owner.property[50820] + owner.property[50800] - otherResist;
|
|
38
|
+
const minValue = game.proMinMap.get(50820);
|
|
39
|
+
if (addvalue < minValue) {
|
|
40
|
+
addvalue = minValue;
|
|
41
|
+
}
|
|
42
|
+
let add = hurtHp * addvalue / Property_1.PROPERTY_SCALE;
|
|
43
|
+
// 以角色真实生命上限封顶,避免治疗溢出
|
|
44
|
+
const maxHp = Property_1.PropertyHelper.hp(fighter.property);
|
|
45
|
+
if (fighter.curHp + add > maxHp) {
|
|
46
|
+
add = maxHp - fighter.curHp;
|
|
47
|
+
}
|
|
48
|
+
if (add > 0) {
|
|
49
|
+
if (fighter.isDead) {
|
|
50
|
+
fighter.isDead = false;
|
|
51
|
+
}
|
|
52
|
+
fighter.setCurHp(fighter.curHp + add);
|
|
53
|
+
fighter.game.emit(GameEvent_1.GameEvent.ShowDisplay, 1 /* DisplayType.Heal */, add, fighter);
|
|
54
|
+
}
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
exports.Impact100 = Impact100;
|
|
59
|
+
exports.Impact100 = Impact100 = __decorate([
|
|
60
|
+
(0, ImpactRegistry_1.registerImpact)(100)
|
|
61
|
+
], Impact100);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IImpact } from "../../battle.interface";
|
|
2
|
+
import type FighterData from "../../entity/FighterData";
|
|
3
|
+
import { SkillData } from "../SkillData";
|
|
4
|
+
import { SkillImpact } from "./SkillImpact";
|
|
5
|
+
/**
|
|
6
|
+
* 回合制添加屏障效果
|
|
7
|
+
* 获取当前回合损失的生命值作为基础值
|
|
8
|
+
* value=屏障量万分比读取
|
|
9
|
+
* effectId=屏障特效id
|
|
10
|
+
*/
|
|
11
|
+
export declare class Impact101 extends SkillImpact {
|
|
12
|
+
execute(owner: FighterData, skilData: SkillData, effectFighters: FighterData[], impactData: IImpact): boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.Impact101 = void 0;
|
|
10
|
+
const Property_1 = require("../../../property/Property");
|
|
11
|
+
const Property_2 = require("./../../../property/Property");
|
|
12
|
+
const battle_interface_1 = require("../../battle.interface");
|
|
13
|
+
const GameEvent_1 = require("../../event/GameEvent");
|
|
14
|
+
const SkillEffectByIdParamsPool_1 = require("../../util/SkillEffectByIdParamsPool");
|
|
15
|
+
const ImpactRegistry_1 = require("./ImpactRegistry");
|
|
16
|
+
const SkillImpact_1 = require("./SkillImpact");
|
|
17
|
+
/**
|
|
18
|
+
* 回合制添加屏障效果
|
|
19
|
+
* 获取当前回合损失的生命值作为基础值
|
|
20
|
+
* value=屏障量万分比读取
|
|
21
|
+
* effectId=屏障特效id
|
|
22
|
+
*/
|
|
23
|
+
let Impact101 = class Impact101 extends SkillImpact_1.SkillImpact {
|
|
24
|
+
execute(owner, skilData, effectFighters, impactData) {
|
|
25
|
+
const game = owner.game;
|
|
26
|
+
const other = owner.campType === battle_interface_1.CampType.MY ? game.getEntityLogic(game.enemyMainRoleId) : game.getEntityLogic(game.mainRoleId);
|
|
27
|
+
for (let i = 0; i < effectFighters.length; i++) {
|
|
28
|
+
const fighter = effectFighters[i];
|
|
29
|
+
if (impactData.effectId) {
|
|
30
|
+
const params = SkillEffectByIdParamsPool_1.SkillEffectByIdParamsPool.pop();
|
|
31
|
+
fighter.getBodyCenter(params.pos);
|
|
32
|
+
params.scaleX = impactData.effectScale || 1;
|
|
33
|
+
params.scaleY = impactData.effectScaleY || impactData.effectScale || 1;
|
|
34
|
+
fighter.game.emit(GameEvent_1.GameEvent.ShowSkillEffectById, impactData.effectId, fighter, params);
|
|
35
|
+
}
|
|
36
|
+
const maxHp = Property_2.PropertyHelper.hp(fighter.property);
|
|
37
|
+
let addvalue = owner.property[50700] - other.property[50710];
|
|
38
|
+
let add = maxHp * addvalue / Property_1.PROPERTY_SCALE;
|
|
39
|
+
if (add > 0) {
|
|
40
|
+
fighter.property[50720] += add;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
exports.Impact101 = Impact101;
|
|
47
|
+
exports.Impact101 = Impact101 = __decorate([
|
|
48
|
+
(0, ImpactRegistry_1.registerImpact)(101)
|
|
49
|
+
], Impact101);
|