captainbattle 1.0.6 → 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 +215 -11
- package/dist/register-all.d.ts +2 -0
- package/dist/register-all.js +2 -0
- package/package.json +1 -1
|
@@ -76,22 +76,20 @@ let MonitorBuff = class MonitorBuff extends BaseBuff_1.BaseBuff {
|
|
|
76
76
|
}
|
|
77
77
|
if (filter === 1) {
|
|
78
78
|
let hitdata = tparam;
|
|
79
|
-
if (hitdata) {
|
|
80
|
-
if (hitdata.beHiter) {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
fighter = entity.game.getRandomSDiffInArray(fighter, impact.target[1]);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
fighter = [hitdata.beHiter];
|
|
79
|
+
if (hitdata && hitdata.beHiter) {
|
|
80
|
+
if (Array.isArray(hitdata.beHiter)) {
|
|
81
|
+
fighter = [...hitdata.beHiter];
|
|
82
|
+
if (impact.target[1] && impact.target[1] < fighter.length) {
|
|
83
|
+
fighter = entity.game.getRandomSDiffInArray(fighter, impact.target[1]);
|
|
89
84
|
}
|
|
90
85
|
}
|
|
91
|
-
else
|
|
92
|
-
fighter = [hitdata];
|
|
86
|
+
else {
|
|
87
|
+
fighter = [hitdata.beHiter];
|
|
93
88
|
}
|
|
94
89
|
}
|
|
90
|
+
else if (hitdata && hitdata instanceof FighterData_1.default) {
|
|
91
|
+
fighter = [hitdata];
|
|
92
|
+
}
|
|
95
93
|
else if (entity.attackTarget) {
|
|
96
94
|
let attackTarget = entity.game.getEntityLogic(entity.attackTarget);
|
|
97
95
|
if (attackTarget) {
|
|
@@ -0,0 +1,18 @@
|
|
|
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.PosionBanCureBuff = void 0;
|
|
10
|
+
const BuffCfg_1 = require("../../../../config/BuffCfg");
|
|
11
|
+
const BuffMgr_1 = require("../BuffMgr");
|
|
12
|
+
const BaseBuff_1 = require("./BaseBuff");
|
|
13
|
+
let PosionBanCureBuff = class PosionBanCureBuff extends BaseBuff_1.BaseBuff {
|
|
14
|
+
};
|
|
15
|
+
exports.PosionBanCureBuff = PosionBanCureBuff;
|
|
16
|
+
exports.PosionBanCureBuff = PosionBanCureBuff = __decorate([
|
|
17
|
+
BuffMgr_1.Buff.cacheBuff(BuffCfg_1.BuffDefine.PosionBanCure)
|
|
18
|
+
], PosionBanCureBuff);
|
|
@@ -11,5 +11,6 @@ import { BaseBuff } from "./BaseBuff";
|
|
|
11
11
|
export declare class PosionBuff extends BaseBuff {
|
|
12
12
|
static onEnter(entity: FighterData, buff: Buff.BuffItem): void;
|
|
13
13
|
static onExecute(entity: FighterData, buff: Buff.BuffItem, dt: number): boolean;
|
|
14
|
+
static onExit(entity: FighterData, buff: Buff.BuffItem): void;
|
|
14
15
|
static layerChange(entity: FighterData, buff: Buff.BuffItem, layer: number): void;
|
|
15
16
|
}
|
|
@@ -8,6 +8,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.PosionBuff = void 0;
|
|
10
10
|
const BuffCfg_1 = require("../../../../config/BuffCfg");
|
|
11
|
+
const Cfg_1 = require("../../../../config/Cfg");
|
|
11
12
|
const Property_1 = require("../../../property/Property");
|
|
12
13
|
const EntityEvent_1 = require("../../event/EntityEvent");
|
|
13
14
|
const GameEvent_1 = require("../../event/GameEvent");
|
|
@@ -39,8 +40,9 @@ let PosionBuff = class PosionBuff extends BaseBuff_1.BaseBuff {
|
|
|
39
40
|
const roleId = entity.game.roles[entity.playerId];
|
|
40
41
|
const role = entity.game.getEntityLogic(roleId);
|
|
41
42
|
let noreduce = impact.p9 ? entity.game.IsHitOrNot(impact.p9) : false;
|
|
42
|
-
const
|
|
43
|
-
const
|
|
43
|
+
const normalLeftLayer = Math.floor(buff.buffLayer * (10000 - impact.p8) / 10000);
|
|
44
|
+
const leftlayer = noreduce ? buff.buffLayer : normalLeftLayer;
|
|
45
|
+
const reduce = Math.max(0, buff.buffLayer - normalLeftLayer);
|
|
44
46
|
buff.buffLayer = leftlayer;
|
|
45
47
|
entity.udpateEffectInfo(buff.buffTypeId);
|
|
46
48
|
entity.game.emit(GameEvent_1.GameEvent.SkillInitSkillById, role, useSkillId);
|
|
@@ -64,19 +66,28 @@ let PosionBuff = class PosionBuff extends BaseBuff_1.BaseBuff {
|
|
|
64
66
|
}
|
|
65
67
|
return true;
|
|
66
68
|
}
|
|
69
|
+
static onExit(entity, buff) {
|
|
70
|
+
entity.game.emit(GameEvent_1.GameEvent.BuffClearByType, entity, BuffCfg_1.BuffDefine.PosionBanCure, false, 0);
|
|
71
|
+
}
|
|
67
72
|
static layerChange(entity, buff, layer) {
|
|
68
73
|
// let extraLayer = buff.buffValue || 0;
|
|
69
74
|
const impact = (0, BuffMgr_1.getBuffImpact)((0, BuffMgr_1.getBuffCaster)(entity, buff), buff);
|
|
70
75
|
const debuffRatio = impact.p7 / 10000;
|
|
71
76
|
const reallayer = (buff.buffValue || 1);
|
|
72
|
-
const
|
|
77
|
+
const caster = (0, BuffMgr_1.getBuffCaster)(entity, buff);
|
|
78
|
+
const extraAddBuffs = caster.getBuffsByType(BuffCfg_1.BuffDefine.PosionExtraAdd);
|
|
73
79
|
buff.buffLayer += Math.floor(reallayer * (1 + debuffRatio));
|
|
74
80
|
if (extraAddBuffs && extraAddBuffs.length > 0) {
|
|
75
81
|
const extraBuff = extraAddBuffs[0];
|
|
76
|
-
const extraImpact = (0, BuffMgr_1.getBuffImpact)(
|
|
82
|
+
const extraImpact = (0, BuffMgr_1.getBuffImpact)(caster, extraBuff);
|
|
77
83
|
const extraLayer = entity.game.randomRange(extraImpact.p5, extraImpact.p6);
|
|
78
84
|
buff.buffLayer += extraLayer;
|
|
79
85
|
}
|
|
86
|
+
const buffCfg = Cfg_1.Cfg.Buff.get(buff.buffTypeId);
|
|
87
|
+
const maxLayer = (entity.game.gameContext.buffMaxLayer[buff.buffTypeId] || buffCfg.maxLayer);
|
|
88
|
+
if (buff.buffLayer > maxLayer) {
|
|
89
|
+
buff.buffLayer = maxLayer;
|
|
90
|
+
}
|
|
80
91
|
}
|
|
81
92
|
};
|
|
82
93
|
exports.PosionBuff = PosionBuff;
|
|
@@ -357,7 +357,7 @@ let ProjectileOrbLinkBuff = class ProjectileOrbLinkBuff extends BaseBuff_1.BaseB
|
|
|
357
357
|
group.time -= dt;
|
|
358
358
|
if (group.time <= 0) {
|
|
359
359
|
this.killOrbsByIds(entity, group.orbIds);
|
|
360
|
-
|
|
360
|
+
BattleUtils_1.BattleUtils.removeAt(groups, i);
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
}
|
|
@@ -57,7 +57,8 @@ let ProjectileScaleUpBuff = class ProjectileScaleUpBuff extends BaseBuff_1.BaseB
|
|
|
57
57
|
if (!buff.context.projectileMap) {
|
|
58
58
|
buff.context.projectileMap = {};
|
|
59
59
|
}
|
|
60
|
-
|
|
60
|
+
let includeSub = impact.p7;
|
|
61
|
+
if (skillId === projectile.skillId && (includeSub || !projectile.parentID)) {
|
|
61
62
|
if (!buff.context.projectileMap[projectile.ID]) {
|
|
62
63
|
buff.context.projectileMap[projectile.ID] = projectile.scaleY;
|
|
63
64
|
}
|
|
@@ -72,7 +73,8 @@ let ProjectileScaleUpBuff = class ProjectileScaleUpBuff extends BaseBuff_1.BaseB
|
|
|
72
73
|
const buff = buffs[i];
|
|
73
74
|
const impact = (0, BuffMgr_1.getBuffImpact)((0, BuffMgr_1.getBuffCaster)(entity, buff), buff);
|
|
74
75
|
const skillId = impact.p5 || 0;
|
|
75
|
-
|
|
76
|
+
let includeSub = impact.p7;
|
|
77
|
+
if (skillId === projectile.skillId && (includeSub || !projectile.parentID)) {
|
|
76
78
|
if (buff.context.projectileMap && buff.context.projectileMap[projectile.ID]) {
|
|
77
79
|
delete buff.context.projectileMap[projectile.ID];
|
|
78
80
|
}
|
|
@@ -8,11 +8,19 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
const BuffCfg_1 = require("../../../../config/BuffCfg");
|
|
10
10
|
const EntityEvent_1 = require("../../event/EntityEvent");
|
|
11
|
+
const GameEvent_1 = require("../../event/GameEvent");
|
|
11
12
|
const BuffMgr_1 = require("../BuffMgr");
|
|
12
13
|
const BaseBuff_1 = require("./BaseBuff");
|
|
13
14
|
let SameHitAddDamageBuff = class SameHitAddDamageBuff extends BaseBuff_1.BaseBuff {
|
|
14
15
|
static onEnter(entity, buff) {
|
|
15
16
|
buff.curBuffTime = 0;
|
|
17
|
+
//需要移除其他目标buff
|
|
18
|
+
for (let i = 0; i < entity.game.gameContext.fighters.length; i++) {
|
|
19
|
+
let fighter = entity.game.gameContext.fighters[i];
|
|
20
|
+
if (fighter.ID !== entity.ID) {
|
|
21
|
+
entity.game.emit(GameEvent_1.GameEvent.BuffClearByType, fighter, BuffCfg_1.BuffDefine.SameHitAddDamage);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
16
24
|
entity.game.on(entity.ID, EntityEvent_1.EntityEvent.SkillHurtCalStart, this.onCalSkillStart, this);
|
|
17
25
|
entity.game.on(entity.ID, EntityEvent_1.EntityEvent.SkillHurtCalEnd, this.onCalSkillEnd, this);
|
|
18
26
|
}
|
|
@@ -32,7 +32,7 @@ let SlayBuff = class SlayBuff extends BaseBuff_1.BaseBuff {
|
|
|
32
32
|
const impact = (0, BuffMgr_1.getBuffImpact)((0, BuffMgr_1.getBuffCaster)(entity, buff), buff);
|
|
33
33
|
if (impact.p5) {
|
|
34
34
|
const param = SkillEffectByIdParamsPool_1.SkillEffectByIdParamsPool.pop();
|
|
35
|
-
entity.
|
|
35
|
+
entity.getBodyCenter(param.pos);
|
|
36
36
|
entity.game.emit(GameEvent_1.GameEvent.ShowSkillEffectById, impact.p5, entity, param);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -5,7 +5,7 @@ import { BaseBuff } from "./BaseBuff";
|
|
|
5
5
|
export default class TimeAddDamageBuff extends BaseBuff {
|
|
6
6
|
static onEnter(entity: FighterData, buff: Buff.BuffItem): void;
|
|
7
7
|
static onExit(entity: FighterData, buff: Buff.BuffItem): void;
|
|
8
|
+
static onExecute(entity: FighterData, buff: Buff.BuffItem, dt: number): boolean;
|
|
8
9
|
static onProjectileCreate(entity: FighterData, projectile: ProjectileData): void;
|
|
9
|
-
static onProjectileBeforeCross(entity: FighterData, projectile: ProjectileData): void;
|
|
10
10
|
static onProjectileDead(entity: FighterData, projectile: ProjectileData): void;
|
|
11
11
|
}
|
|
@@ -7,6 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
const BuffCfg_1 = require("../../../../config/BuffCfg");
|
|
10
|
+
const battle_interface_1 = require("../../battle.interface");
|
|
10
11
|
const EntityEvent_1 = require("../../event/EntityEvent");
|
|
11
12
|
const BuffMgr_1 = require("../BuffMgr");
|
|
12
13
|
const BaseBuff_1 = require("./BaseBuff");
|
|
@@ -14,31 +15,44 @@ let TimeAddDamageBuff = class TimeAddDamageBuff extends BaseBuff_1.BaseBuff {
|
|
|
14
15
|
static onEnter(entity, buff) {
|
|
15
16
|
buff.curBuffTime = 0;
|
|
16
17
|
entity.game.on(entity.ID, EntityEvent_1.EntityEvent.ProjectileCreate, this.onProjectileCreate, this);
|
|
17
|
-
entity.game.on(entity.ID, EntityEvent_1.EntityEvent.ProjectileBeforeCross, this.onProjectileBeforeCross, this);
|
|
18
18
|
entity.game.on(entity.ID, EntityEvent_1.EntityEvent.ProjectileDead, this.onProjectileDead, this);
|
|
19
19
|
}
|
|
20
20
|
static onExit(entity, buff) {
|
|
21
21
|
entity.game.off(entity.ID, EntityEvent_1.EntityEvent.ProjectileCreate, this.onProjectileCreate, this);
|
|
22
|
-
entity.game.off(entity.ID, EntityEvent_1.EntityEvent.ProjectileBeforeCross, this.onProjectileBeforeCross, this);
|
|
23
22
|
entity.game.off(entity.ID, EntityEvent_1.EntityEvent.ProjectileDead, this.onProjectileDead, this);
|
|
24
23
|
}
|
|
25
|
-
static
|
|
26
|
-
|
|
27
|
-
if (
|
|
28
|
-
return;
|
|
29
|
-
for (let i = 0; i < buffs.length; i++) {
|
|
30
|
-
let buff = buffs[i];
|
|
24
|
+
static onExecute(entity, buff, dt) {
|
|
25
|
+
buff.curBuffTime += dt;
|
|
26
|
+
if (buff.context.projectileMap) {
|
|
31
27
|
const impact = (0, BuffMgr_1.getBuffImpact)((0, BuffMgr_1.getBuffCaster)(entity, buff), buff);
|
|
32
|
-
let
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
for (let key in buff.context.projectileMap) {
|
|
29
|
+
const projectileID = +key;
|
|
30
|
+
const curProjectInfo = buff.context.projectileMap[projectileID];
|
|
31
|
+
if (!curProjectInfo)
|
|
32
|
+
continue;
|
|
33
|
+
if (curProjectInfo.maxDamage >= impact.p7)
|
|
34
|
+
continue;
|
|
35
|
+
curProjectInfo.time -= dt;
|
|
36
|
+
if (curProjectInfo.time <= 0) {
|
|
37
|
+
curProjectInfo.time = impact.p5;
|
|
38
|
+
const maxDamage = impact.p7;
|
|
39
|
+
const projectile = entity.game.getEntityLogic(projectileID, battle_interface_1.EntityType.PROJECTILE);
|
|
40
|
+
if (projectile) {
|
|
41
|
+
if (maxDamage > curProjectInfo.maxDamage) {
|
|
42
|
+
const addValue = Math.min(maxDamage - curProjectInfo.maxDamage, buff.buffValue);
|
|
43
|
+
projectile.extraHurtRatio += addValue;
|
|
44
|
+
curProjectInfo.maxDamage += addValue;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
36
47
|
}
|
|
37
|
-
buff.context.projectileMap[projectile.ID] = buff.curBuffTime;
|
|
38
48
|
}
|
|
39
49
|
}
|
|
50
|
+
if (buff.buffTime >= 0 && buff.curBuffTime > buff.buffTime) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
return true;
|
|
40
54
|
}
|
|
41
|
-
static
|
|
55
|
+
static onProjectileCreate(entity, projectile) {
|
|
42
56
|
let buffs = entity.getBuffsByType(BuffCfg_1.BuffDefine.TimeAddDamage);
|
|
43
57
|
if (!buffs || !buffs.length)
|
|
44
58
|
return;
|
|
@@ -46,19 +60,13 @@ let TimeAddDamageBuff = class TimeAddDamageBuff extends BaseBuff_1.BaseBuff {
|
|
|
46
60
|
let buff = buffs[i];
|
|
47
61
|
const impact = (0, BuffMgr_1.getBuffImpact)((0, BuffMgr_1.getBuffCaster)(entity, buff), buff);
|
|
48
62
|
let skillId = impact.p6;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
let curDelay = buffTime - startTime;
|
|
55
|
-
if (curDelay > 0) {
|
|
56
|
-
let addDamage = buff.buffValue * Math.floor(curDelay / n);
|
|
57
|
-
if (addDamage > maxDamage) {
|
|
58
|
-
addDamage = maxDamage;
|
|
59
|
-
}
|
|
60
|
-
projectile.extraHurtRatio += addDamage;
|
|
63
|
+
const maxDamage = impact.p7 || 0;
|
|
64
|
+
const includeSub = impact.p8 || 0;
|
|
65
|
+
if (skillId === projectile.skillId && (includeSub || !projectile.parentID)) {
|
|
66
|
+
if (!buff.context.projectileMap) {
|
|
67
|
+
buff.context.projectileMap = {};
|
|
61
68
|
}
|
|
69
|
+
buff.context.projectileMap[projectile.ID] = { startTime: buff.curBuffTime, maxDamage: 0, time: impact.p5 || 0.1 };
|
|
62
70
|
}
|
|
63
71
|
}
|
|
64
72
|
}
|
|
@@ -70,7 +78,8 @@ let TimeAddDamageBuff = class TimeAddDamageBuff extends BaseBuff_1.BaseBuff {
|
|
|
70
78
|
let buff = buffs[i];
|
|
71
79
|
const impact = (0, BuffMgr_1.getBuffImpact)((0, BuffMgr_1.getBuffCaster)(entity, buff), buff);
|
|
72
80
|
let skillId = impact.p6;
|
|
73
|
-
|
|
81
|
+
let includeSub = impact.p8;
|
|
82
|
+
if (skillId === projectile.skillId && (includeSub || !projectile.parentID)) {
|
|
74
83
|
if (buff.context.projectileMap[projectile.ID]) {
|
|
75
84
|
delete buff.context.projectileMap[projectile.ID];
|
|
76
85
|
}
|
|
@@ -30,6 +30,7 @@ import "./DamMarkBuff";
|
|
|
30
30
|
import "./DebuffAddAttrBuff";
|
|
31
31
|
import "./DeltaUseSkillBuff";
|
|
32
32
|
import "./DiceAddAttrBuff";
|
|
33
|
+
import "./DiceAddCritBuff";
|
|
33
34
|
import "./DisarmBuff";
|
|
34
35
|
import "./DizzinessBuff";
|
|
35
36
|
import "./DominationBuff";
|
|
@@ -37,6 +38,7 @@ import "./ElectricMarkBuff";
|
|
|
37
38
|
import "./ElectrifyBuff";
|
|
38
39
|
import "./EnemyBuff1Buff";
|
|
39
40
|
import "./EnemyRatioBuff";
|
|
41
|
+
import "./FireHurtLayerBuff";
|
|
40
42
|
import "./FixedProjectileNumBuff";
|
|
41
43
|
import "./FollowMainEntityBuff";
|
|
42
44
|
import "./ForceTargetBuff";
|
|
@@ -44,6 +46,7 @@ import "./FrozenBuff";
|
|
|
44
46
|
import "./HaulBuff";
|
|
45
47
|
import "./HightHpAddCritBuff";
|
|
46
48
|
import "./HitBoundAddDamageBuff";
|
|
49
|
+
import "./HitBoundAddScaleBuff";
|
|
47
50
|
import "./HitEnemyAddDamBuff";
|
|
48
51
|
import "./HornBuff";
|
|
49
52
|
import "./HpAddDamageBuff";
|
|
@@ -80,6 +83,7 @@ import "./ModifyProjectileAttrBuff";
|
|
|
80
83
|
import "./MonitorBuff";
|
|
81
84
|
import "./NotAllowSplitBuff";
|
|
82
85
|
import "./ParalysisBuff";
|
|
86
|
+
import "./PosionBanCureBuff";
|
|
83
87
|
import "./PosionBuff";
|
|
84
88
|
import "./PosionExtraAddBuff";
|
|
85
89
|
import "./PowerUpAddDamBuff";
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// Cocos 的资源系统会把 assets 下所有脚本加载一遍,所以引擎里天然成立;
|
|
9
9
|
// Node 只执行从入口 import 可达的模块,不引这一下,注册表就是空的。
|
|
10
10
|
//
|
|
11
|
-
// 共
|
|
11
|
+
// 共 126 个模块。下面的 import 只为副作用,不需要用到导出。
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
require("./AddActionTimeBuff");
|
|
14
14
|
require("./AddAtrBuff");
|
|
@@ -42,6 +42,7 @@ require("./DamMarkBuff");
|
|
|
42
42
|
require("./DebuffAddAttrBuff");
|
|
43
43
|
require("./DeltaUseSkillBuff");
|
|
44
44
|
require("./DiceAddAttrBuff");
|
|
45
|
+
require("./DiceAddCritBuff");
|
|
45
46
|
require("./DisarmBuff");
|
|
46
47
|
require("./DizzinessBuff");
|
|
47
48
|
require("./DominationBuff");
|
|
@@ -49,6 +50,7 @@ require("./ElectricMarkBuff");
|
|
|
49
50
|
require("./ElectrifyBuff");
|
|
50
51
|
require("./EnemyBuff1Buff");
|
|
51
52
|
require("./EnemyRatioBuff");
|
|
53
|
+
require("./FireHurtLayerBuff");
|
|
52
54
|
require("./FixedProjectileNumBuff");
|
|
53
55
|
require("./FollowMainEntityBuff");
|
|
54
56
|
require("./ForceTargetBuff");
|
|
@@ -56,6 +58,7 @@ require("./FrozenBuff");
|
|
|
56
58
|
require("./HaulBuff");
|
|
57
59
|
require("./HightHpAddCritBuff");
|
|
58
60
|
require("./HitBoundAddDamageBuff");
|
|
61
|
+
require("./HitBoundAddScaleBuff");
|
|
59
62
|
require("./HitEnemyAddDamBuff");
|
|
60
63
|
require("./HornBuff");
|
|
61
64
|
require("./HpAddDamageBuff");
|
|
@@ -92,6 +95,7 @@ require("./ModifyProjectileAttrBuff");
|
|
|
92
95
|
require("./MonitorBuff");
|
|
93
96
|
require("./NotAllowSplitBuff");
|
|
94
97
|
require("./ParalysisBuff");
|
|
98
|
+
require("./PosionBanCureBuff");
|
|
95
99
|
require("./PosionBuff");
|
|
96
100
|
require("./PosionExtraAddBuff");
|
|
97
101
|
require("./PowerUpAddDamBuff");
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { PoolItem, PoolSpawner } from "../../../framework/Pool";
|
|
1
2
|
import { EntityType, SubEntityType } from "../battle.interface";
|
|
2
3
|
import { ColliderShape } from "../collider/Collider";
|
|
3
4
|
import type Game from "../Game";
|
|
@@ -78,10 +79,12 @@ export interface IBaseEntityValueSnapshot {
|
|
|
78
79
|
x: number;
|
|
79
80
|
y: number;
|
|
80
81
|
}
|
|
81
|
-
export default class BaseEntityData {
|
|
82
|
+
export default class BaseEntityData implements PoolItem {
|
|
82
83
|
ID: number;
|
|
83
84
|
game: Game;
|
|
84
85
|
dataName: string;
|
|
86
|
+
/** 创建该实例的池生成器,回池时按它定位 */
|
|
87
|
+
spawner: PoolSpawner;
|
|
85
88
|
entityType: EntityType;
|
|
86
89
|
subType: SubEntityType;
|
|
87
90
|
isPause: boolean;
|
|
@@ -103,6 +106,17 @@ export default class BaseEntityData {
|
|
|
103
106
|
x: number;
|
|
104
107
|
y: number;
|
|
105
108
|
isDirty: number;
|
|
109
|
+
/**
|
|
110
|
+
* 回收:先归还碰撞体并标记死亡,再交给子类清理自身状态,
|
|
111
|
+
* 最后清理实体事件并断开 game 引用。
|
|
112
|
+
*/
|
|
113
|
+
unuse(): void;
|
|
114
|
+
/** 子类在此清理自身运行时状态;此时碰撞体已归还、game 仍然有效 */
|
|
115
|
+
protected onUnuse(): void;
|
|
116
|
+
/** 取出时由工厂或快照重建状态,基类无需处理 */
|
|
117
|
+
reuse(..._param: any[]): void;
|
|
118
|
+
/** 池裁剪时销毁实例;实体没有额外资源需要释放 */
|
|
119
|
+
destroy(): void;
|
|
106
120
|
setPosition(x: number, y: number): void;
|
|
107
121
|
setScale(scaleX: number, scaleY: number): void;
|
|
108
122
|
setAngle(angle: number): void;
|
|
@@ -19,6 +19,8 @@ class BaseEntityData {
|
|
|
19
19
|
ID = -1;
|
|
20
20
|
game = null;
|
|
21
21
|
dataName = "";
|
|
22
|
+
/** 创建该实例的池生成器,回池时按它定位 */
|
|
23
|
+
spawner = null;
|
|
22
24
|
entityType = battle_interface_1.EntityType.NONE;
|
|
23
25
|
subType = battle_interface_1.SubEntityType.NONE;
|
|
24
26
|
isPause = false;
|
|
@@ -45,6 +47,31 @@ class BaseEntityData {
|
|
|
45
47
|
x = 0;
|
|
46
48
|
y = 0;
|
|
47
49
|
isDirty = 1 /* LocalDirtyFlag.POSITION */ | 2 /* LocalDirtyFlag.SCALE */ | 4 /* LocalDirtyFlag.ROTATION */; //脏数据标记
|
|
50
|
+
// region 对象池
|
|
51
|
+
/**
|
|
52
|
+
* 回收:先归还碰撞体并标记死亡,再交给子类清理自身状态,
|
|
53
|
+
* 最后清理实体事件并断开 game 引用。
|
|
54
|
+
*/
|
|
55
|
+
unuse() {
|
|
56
|
+
if (this.shape) {
|
|
57
|
+
ColliderPool_1.ColliderPool.despawn(this.shape);
|
|
58
|
+
this.shape = null;
|
|
59
|
+
}
|
|
60
|
+
this.isDead = true;
|
|
61
|
+
this.onUnuse();
|
|
62
|
+
const game = this.game;
|
|
63
|
+
if (game && game.gameContext.entityEvents.entityEventList.has(this.ID)) {
|
|
64
|
+
game.gameContext.entityEvents.entityEventList.delete(this.ID);
|
|
65
|
+
}
|
|
66
|
+
this.game = null;
|
|
67
|
+
}
|
|
68
|
+
/** 子类在此清理自身运行时状态;此时碰撞体已归还、game 仍然有效 */
|
|
69
|
+
onUnuse() { }
|
|
70
|
+
/** 取出时由工厂或快照重建状态,基类无需处理 */
|
|
71
|
+
reuse(..._param) { }
|
|
72
|
+
/** 池裁剪时销毁实例;实体没有额外资源需要释放 */
|
|
73
|
+
destroy() { }
|
|
74
|
+
// endregion
|
|
48
75
|
// region 变换
|
|
49
76
|
setPosition(x, y) {
|
|
50
77
|
this.x = x;
|
|
@@ -1,4 +1,20 @@
|
|
|
1
|
-
import FighterData from "./FighterData";
|
|
1
|
+
import FighterData, { IFighterValueSnapshot } from "./FighterData";
|
|
2
|
+
/** DragonBodyData 权威值快照 */
|
|
3
|
+
export interface IDragonBodyValueSnapshot extends IFighterValueSnapshot {
|
|
4
|
+
curDis: number;
|
|
5
|
+
targetDis: number;
|
|
6
|
+
isRotationHead: boolean;
|
|
7
|
+
ownerId: number;
|
|
8
|
+
bodyIndex: number;
|
|
9
|
+
renderHp: number;
|
|
10
|
+
mainId: number;
|
|
11
|
+
subIds: number[];
|
|
12
|
+
renderIndex: number;
|
|
13
|
+
isTail: boolean;
|
|
14
|
+
bodyDirX: number;
|
|
15
|
+
bodyDirY: number;
|
|
16
|
+
forceNoShape: boolean;
|
|
17
|
+
}
|
|
2
18
|
export default class DragonBodyData extends FighterData {
|
|
3
19
|
curDis: number;
|
|
4
20
|
targetDis: number;
|
|
@@ -13,4 +29,6 @@ export default class DragonBodyData extends FighterData {
|
|
|
13
29
|
bodyDirX: number;
|
|
14
30
|
bodyDirY: number;
|
|
15
31
|
forceNoShape: boolean;
|
|
32
|
+
getValueSnapshot(out?: IDragonBodyValueSnapshot): IDragonBodyValueSnapshot;
|
|
33
|
+
resetFromSnapshot(snapshot: IDragonBodyValueSnapshot): void;
|
|
16
34
|
}
|
|
@@ -10,6 +10,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
const BattleUtils_1 = require("../util/BattleUtils");
|
|
13
|
+
const BaseEntityData_1 = require("./BaseEntityData");
|
|
13
14
|
const FighterData_1 = __importDefault(require("./FighterData"));
|
|
14
15
|
let DragonBodyData = class DragonBodyData extends FighterData_1.default {
|
|
15
16
|
curDis = 0; //当前在线段上的距离
|
|
@@ -25,6 +26,39 @@ let DragonBodyData = class DragonBodyData extends FighterData_1.default {
|
|
|
25
26
|
bodyDirX = 0;
|
|
26
27
|
bodyDirY = 0;
|
|
27
28
|
forceNoShape = false; //强制不创建碰撞体,主要用于龙身的装饰单位
|
|
29
|
+
getValueSnapshot(out) {
|
|
30
|
+
const snapshot = super.getValueSnapshot(out);
|
|
31
|
+
snapshot.curDis = this.curDis;
|
|
32
|
+
snapshot.targetDis = this.targetDis;
|
|
33
|
+
snapshot.isRotationHead = this.isRotationHead;
|
|
34
|
+
snapshot.ownerId = this.ownerId;
|
|
35
|
+
snapshot.bodyIndex = this.bodyIndex;
|
|
36
|
+
snapshot.renderHp = this.renderHp;
|
|
37
|
+
snapshot.mainId = this.mainId;
|
|
38
|
+
snapshot.subIds = (0, BaseEntityData_1.copySnapshotValue)(this.subIds, snapshot.subIds);
|
|
39
|
+
snapshot.renderIndex = this.renderIndex;
|
|
40
|
+
snapshot.isTail = this.isTail;
|
|
41
|
+
snapshot.bodyDirX = this.bodyDirX;
|
|
42
|
+
snapshot.bodyDirY = this.bodyDirY;
|
|
43
|
+
snapshot.forceNoShape = this.forceNoShape;
|
|
44
|
+
return snapshot;
|
|
45
|
+
}
|
|
46
|
+
resetFromSnapshot(snapshot) {
|
|
47
|
+
super.resetFromSnapshot(snapshot);
|
|
48
|
+
this.curDis = snapshot.curDis;
|
|
49
|
+
this.targetDis = snapshot.targetDis;
|
|
50
|
+
this.isRotationHead = snapshot.isRotationHead;
|
|
51
|
+
this.ownerId = snapshot.ownerId;
|
|
52
|
+
this.bodyIndex = snapshot.bodyIndex;
|
|
53
|
+
this.renderHp = snapshot.renderHp;
|
|
54
|
+
this.mainId = snapshot.mainId;
|
|
55
|
+
this.subIds = (0, BaseEntityData_1.copySnapshotValue)(snapshot.subIds, this.subIds);
|
|
56
|
+
this.renderIndex = snapshot.renderIndex;
|
|
57
|
+
this.isTail = snapshot.isTail;
|
|
58
|
+
this.bodyDirX = snapshot.bodyDirX;
|
|
59
|
+
this.bodyDirY = snapshot.bodyDirY;
|
|
60
|
+
this.forceNoShape = snapshot.forceNoShape;
|
|
61
|
+
}
|
|
28
62
|
};
|
|
29
63
|
DragonBodyData = __decorate([
|
|
30
64
|
(0, BattleUtils_1.cacheFunction)("DragonBodyData")
|
|
@@ -1,4 +1,19 @@
|
|
|
1
|
-
import FighterData from "./FighterData";
|
|
1
|
+
import FighterData, { IFighterValueSnapshot } from "./FighterData";
|
|
2
|
+
/** DragonData 权威值快照 */
|
|
3
|
+
export interface IDragonValueSnapshot extends IFighterValueSnapshot {
|
|
4
|
+
pathIndex: number;
|
|
5
|
+
curDis: number;
|
|
6
|
+
targetDis: number;
|
|
7
|
+
spacing: number;
|
|
8
|
+
backExtraSpeed: number;
|
|
9
|
+
reliveExtraSpeed: number;
|
|
10
|
+
loadBodyIndex: number;
|
|
11
|
+
curCreateTime: number;
|
|
12
|
+
isRotationHead: boolean;
|
|
13
|
+
bodyOtherPath: string;
|
|
14
|
+
jointNum: number;
|
|
15
|
+
dragonBodyIds: number[];
|
|
16
|
+
}
|
|
2
17
|
export default class DragonData extends FighterData {
|
|
3
18
|
pathIndex: number;
|
|
4
19
|
curDis: number;
|
|
@@ -12,4 +27,6 @@ export default class DragonData extends FighterData {
|
|
|
12
27
|
bodyOtherPath: string;
|
|
13
28
|
jointNum: number;
|
|
14
29
|
dragonBodyIds: number[];
|
|
30
|
+
getValueSnapshot(out?: IDragonValueSnapshot): IDragonValueSnapshot;
|
|
31
|
+
resetFromSnapshot(snapshot: IDragonValueSnapshot): void;
|
|
15
32
|
}
|
|
@@ -10,6 +10,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
const BattleUtils_1 = require("../util/BattleUtils");
|
|
13
|
+
const BaseEntityData_1 = require("./BaseEntityData");
|
|
13
14
|
const FighterData_1 = __importDefault(require("./FighterData"));
|
|
14
15
|
let DragonData = class DragonData extends FighterData_1.default {
|
|
15
16
|
pathIndex = 0; //路径下标
|
|
@@ -24,6 +25,37 @@ let DragonData = class DragonData extends FighterData_1.default {
|
|
|
24
25
|
bodyOtherPath = "";
|
|
25
26
|
jointNum = 8; //关节数量
|
|
26
27
|
dragonBodyIds = [];
|
|
28
|
+
getValueSnapshot(out) {
|
|
29
|
+
const snapshot = super.getValueSnapshot(out);
|
|
30
|
+
snapshot.pathIndex = this.pathIndex;
|
|
31
|
+
snapshot.curDis = this.curDis;
|
|
32
|
+
snapshot.targetDis = this.targetDis;
|
|
33
|
+
snapshot.spacing = this.spacing;
|
|
34
|
+
snapshot.backExtraSpeed = this.backExtraSpeed;
|
|
35
|
+
snapshot.reliveExtraSpeed = this.reliveExtraSpeed;
|
|
36
|
+
snapshot.loadBodyIndex = this.loadBodyIndex;
|
|
37
|
+
snapshot.curCreateTime = this.curCreateTime;
|
|
38
|
+
snapshot.isRotationHead = this.isRotationHead;
|
|
39
|
+
snapshot.bodyOtherPath = this.bodyOtherPath;
|
|
40
|
+
snapshot.jointNum = this.jointNum;
|
|
41
|
+
snapshot.dragonBodyIds = (0, BaseEntityData_1.copySnapshotValue)(this.dragonBodyIds, snapshot.dragonBodyIds);
|
|
42
|
+
return snapshot;
|
|
43
|
+
}
|
|
44
|
+
resetFromSnapshot(snapshot) {
|
|
45
|
+
super.resetFromSnapshot(snapshot);
|
|
46
|
+
this.pathIndex = snapshot.pathIndex;
|
|
47
|
+
this.curDis = snapshot.curDis;
|
|
48
|
+
this.targetDis = snapshot.targetDis;
|
|
49
|
+
this.spacing = snapshot.spacing;
|
|
50
|
+
this.backExtraSpeed = snapshot.backExtraSpeed;
|
|
51
|
+
this.reliveExtraSpeed = snapshot.reliveExtraSpeed;
|
|
52
|
+
this.loadBodyIndex = snapshot.loadBodyIndex;
|
|
53
|
+
this.curCreateTime = snapshot.curCreateTime;
|
|
54
|
+
this.isRotationHead = snapshot.isRotationHead;
|
|
55
|
+
this.bodyOtherPath = snapshot.bodyOtherPath;
|
|
56
|
+
this.jointNum = snapshot.jointNum;
|
|
57
|
+
this.dragonBodyIds = (0, BaseEntityData_1.copySnapshotValue)(snapshot.dragonBodyIds, this.dragonBodyIds);
|
|
58
|
+
}
|
|
27
59
|
};
|
|
28
60
|
DragonData = __decorate([
|
|
29
61
|
(0, BattleUtils_1.cacheFunction)("DragonData")
|
|
@@ -2,11 +2,10 @@ import BaseEntityData from "./BaseEntityData";
|
|
|
2
2
|
declare class _EntityPool {
|
|
3
3
|
private _poolType;
|
|
4
4
|
private _pool;
|
|
5
|
-
private _spawnerMap;
|
|
6
5
|
constructor();
|
|
7
6
|
private initPool;
|
|
8
7
|
private compCreateDelegate;
|
|
9
|
-
despawn(item: BaseEntityData
|
|
8
|
+
despawn(item: BaseEntityData): void;
|
|
10
9
|
spawn<T extends BaseEntityData>(id: number | string, ...param: any[]): T;
|
|
11
10
|
}
|
|
12
11
|
export declare const EntityPool: _EntityPool;
|