captainbattle 1.0.7 → 1.0.9
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 +21 -13
- package/dist/core/CallID.js +23 -13
- package/dist/core/ListenID.d.ts +551 -501
- package/dist/core/ListenID.js +552 -501
- package/dist/core/config/BadgeCfg.d.ts +18 -4
- package/dist/core/config/BadgeCfg.js +20 -6
- package/dist/core/config/BattlePassCfg.d.ts +1 -1
- package/dist/core/config/BuffCfg.d.ts +7 -1
- package/dist/core/config/BuffCfg.js +6 -0
- package/dist/core/config/Cfg.d.ts +36 -4
- package/dist/core/config/Cfg.js +46 -6
- package/dist/core/config/ChatLogCfg.d.ts +18 -0
- package/dist/core/config/ChatLogCfg.js +17 -0
- package/dist/core/config/Const.d.ts +2 -1
- package/dist/core/config/Const.js +1 -0
- package/dist/core/config/ConstConfigCfg.d.ts +2 -0
- package/dist/core/config/ConstConfigCfg.js +2 -0
- package/dist/core/config/DragonPathCfg.d.ts +1 -1
- package/dist/core/config/EmailCfg.d.ts +5 -3
- package/dist/core/config/EmailCfg.js +7 -5
- package/dist/core/config/EndlessConfigCfg.d.ts +1 -0
- package/dist/core/config/EndlessConfigCfg.js +1 -0
- package/dist/core/config/EnemyGridCfg.d.ts +1 -1
- package/dist/core/config/FormationCfg.d.ts +1 -1
- package/dist/core/config/FuncDescCfg.d.ts +4 -0
- package/dist/core/config/FuncDescCfg.js +4 -0
- package/dist/core/config/GemCfg.d.ts +1 -1
- package/dist/core/config/GuildBossWaveCfg.d.ts +1 -0
- package/dist/core/config/GuildIslandBuildCfg.d.ts +2 -1
- package/dist/core/config/GuildIslandTaskCfg.d.ts +13 -0
- package/dist/core/config/GuildIslandTaskCfg.js +8 -0
- package/dist/core/config/ItemsCfg.d.ts +1 -1
- package/dist/core/config/PetCfg.d.ts +1 -1
- package/dist/core/config/PetConfigCfg.d.ts +7 -0
- package/dist/core/config/PetConfigCfg.js +7 -0
- package/dist/core/config/PetSkillCfg.d.ts +1 -0
- package/dist/core/config/PetSlotLvCfg.d.ts +1 -0
- package/dist/core/config/PrivilegeCfg.d.ts +1 -0
- package/dist/core/config/PrivilegeCfg.js +1 -0
- package/dist/core/config/RankListCfg.d.ts +10 -0
- package/dist/core/config/RankListCfg.js +8 -0
- package/dist/core/config/RelicDungeonConfigCfg.d.ts +0 -1
- package/dist/core/config/RelicDungeonConfigCfg.js +0 -1
- package/dist/core/config/RelicDungeonGrowCfg.d.ts +5 -0
- package/dist/core/config/RobotConfigCfg.d.ts +7 -6
- package/dist/core/config/RuleDescCfg.d.ts +6 -2
- package/dist/core/config/RuleDescCfg.js +9 -5
- package/dist/core/config/SeaArenaConfigCfg.d.ts +2 -1
- package/dist/core/config/SeaArenaConfigCfg.js +1 -0
- package/dist/core/config/SprintActivityConfigCfg.d.ts +12 -0
- package/dist/core/config/SprintActivityConfigCfg.js +12 -0
- package/dist/core/config/SprintActivityRankRewardCfg.d.ts +3 -1
- package/dist/core/config/StageCfg.d.ts +2 -0
- package/dist/core/config/TreasureMatchConfigCfg.d.ts +19 -0
- package/dist/core/config/TreasureMatchConfigCfg.js +16 -0
- package/dist/core/config/TreasureMatchIconCfg.d.ts +12 -0
- package/dist/core/config/TreasureMatchIconCfg.js +8 -0
- package/dist/core/config/TreasureMatchRankRewardCfg.d.ts +10 -0
- package/dist/core/config/TreasureMatchRankRewardCfg.js +8 -0
- package/dist/core/config/VehicleUpgradeAttrCfg.d.ts +10 -0
- package/dist/core/config/VehicleUpgradeAttrCfg.js +8 -0
- package/dist/core/config/VehicleUpgradeConfigCfg.d.ts +16 -0
- package/dist/core/config/VehicleUpgradeConfigCfg.js +13 -0
- package/dist/core/config/VehicleUpgradeLevelCfg.d.ts +13 -0
- package/dist/core/config/VehicleUpgradeLevelCfg.js +8 -0
- package/dist/core/framework/Time.d.ts +1 -0
- package/dist/core/framework/Time.js +1 -0
- package/dist/core/module/arena/ArenaBattleModule.d.ts +3 -0
- package/dist/core/module/arena/ArenaBattleModule.js +14 -2
- package/dist/core/module/battle/Game.d.ts +13 -3
- package/dist/core/module/battle/Game.js +36 -6
- package/dist/core/module/battle/IGameModule.d.ts +1 -0
- package/dist/core/module/battle/IGameModule.js +7 -3
- package/dist/core/module/battle/battle.interface.d.ts +17 -1
- package/dist/core/module/battle/battle.interface.js +3 -0
- package/dist/core/module/battle/buff/buffitem/BossCloneBuff.d.ts +10 -0
- package/dist/core/module/battle/buff/buffitem/BossCloneBuff.js +89 -0
- package/dist/core/module/battle/buff/buffitem/BossPetrifyBuff.d.ts +9 -0
- package/dist/core/module/battle/buff/buffitem/BossPetrifyBuff.js +60 -0
- package/dist/core/module/battle/buff/buffitem/BossReinforcementBuff.d.ts +7 -0
- package/dist/core/module/battle/buff/buffitem/BossReinforcementBuff.js +26 -0
- package/dist/core/module/battle/buff/buffitem/ForceDizzinessBuff.d.ts +6 -0
- package/dist/core/module/battle/buff/buffitem/ForceDizzinessBuff.js +26 -0
- package/dist/core/module/battle/buff/buffitem/ImmuneForceDizziness.d.ts +3 -0
- package/dist/core/module/battle/buff/buffitem/ImmuneForceDizziness.js +18 -0
- package/dist/core/module/battle/buff/buffitem/PosionBuff.js +8 -2
- package/dist/core/module/battle/buff/buffitem/ReplaceSkillBuff.d.ts +1 -1
- package/dist/core/module/battle/buff/buffitem/ReplaceSkillBuff.js +4 -3
- package/dist/core/module/battle/buff/buffitem/SprintBuff.js +40 -17
- package/dist/core/module/battle/buff/buffitem/VenomBurstBuff.d.ts +8 -0
- package/dist/core/module/battle/buff/buffitem/VenomBurstBuff.js +40 -0
- package/dist/core/module/battle/buff/buffitem/index.d.ts +6 -0
- package/dist/core/module/battle/buff/buffitem/index.js +7 -1
- package/dist/core/module/battle/entity/FighterData.js +5 -1
- package/dist/core/module/battle/event/EntityEvent.d.ts +2 -0
- package/dist/core/module/battle/event/EntityEvent.js +2 -0
- package/dist/core/module/battle/factory/FighterFactory.js +17 -5
- package/dist/core/module/battle/fsm-state/Boss38210State.d.ts +11 -0
- package/dist/core/module/battle/fsm-state/Boss38210State.js +30 -0
- package/dist/core/module/battle/fsm-state/FighterStateProfiles.d.ts +2 -1
- package/dist/core/module/battle/fsm-state/FighterStateProfiles.js +4 -2
- package/dist/core/module/battle/fsm-state/TurnState.js +4 -4
- package/dist/core/module/battle/fsm-state/TurnTransitions.js +4 -4
- package/dist/core/module/battle/fsm-state/index.d.ts +1 -0
- package/dist/core/module/battle/fsm-state/index.js +2 -1
- package/dist/core/module/battle/manager/EntityManager.js +7 -3
- package/dist/core/module/battle/skill/emitter/SkillTargetHorRandomEmitter.d.ts +12 -0
- package/dist/core/module/battle/skill/emitter/SkillTargetHorRandomEmitter.js +62 -0
- package/dist/core/module/battle/skill/emitter/index.d.ts +1 -0
- package/dist/core/module/battle/skill/emitter/index.js +2 -1
- package/dist/core/module/battle/skill/impacts/Impact101.js +1 -0
- package/dist/core/module/battle/skill/impacts/Impact3.js +2 -1
- package/dist/core/module/battle/skill/impacts/Impact5.js +5 -1
- package/dist/core/module/battle/system/BornSystem.js +4 -0
- package/dist/core/module/battle/system/BuffSystem.js +9 -3
- package/dist/core/module/battle/system/SkillSystem.js +1 -1
- package/dist/core/module/battle/system/TurnPhaseSystem.js +1 -1
- package/dist/core/module/battle/target/RandomPosSelection.d.ts +4 -0
- package/dist/core/module/battle/target/RandomPosSelection.js +61 -0
- package/dist/core/module/battle/target/index.d.ts +1 -0
- package/dist/core/module/battle/target/index.js +2 -1
- package/dist/core/module/battle/turn/TurnBattleGame.d.ts +11 -3
- package/dist/core/module/battle/turn/TurnBattleGame.js +53 -12
- package/dist/core/module/battle/turn/TurnBattleModule.js +2 -2
- package/dist/core/module/battle/turn/TurnBattleTypes.d.ts +1 -6
- package/dist/core/module/battle/turn/TurnBattleTypes.js +1 -4
- package/dist/core/module/battle/util/BattleConfig.js +2 -2
- package/dist/core/module/battle/util/BattleUtils.d.ts +7 -1
- package/dist/core/module/battle/util/BattleUtils.js +67 -33
- package/dist/core/module/guild/island/battle/GuildIsLandBattleModule.d.ts +11 -0
- package/dist/core/module/guild/island/battle/GuildIsLandBattleModule.js +44 -0
- package/dist/core/module/guild/island/battle/index.d.ts +1 -0
- package/dist/core/module/guild/island/battle/index.js +13 -0
- package/dist/core/module/guild/view/boss/GuildBossBattleModule.js +1 -0
- package/dist/core/module/module.interface.d.ts +24 -0
- package/dist/core/module/module.interface.js +3 -0
- package/dist/core/module/property/Property.d.ts +2 -1
- package/dist/core/module/property/Property.js +8 -7
- package/dist/core/module/property/PropertyUtil.d.ts +17 -0
- package/dist/core/module/property/PropertyUtil.js +75 -1
- package/dist/core/module/relicDungeon/RelicBattleModule.d.ts +18 -0
- package/dist/core/module/relicDungeon/RelicBattleModule.js +148 -5
- package/dist/core/proto/CommonProto.d.ts +8740 -4068
- package/dist/core/proto/Proto.d.ts +129 -39
- package/dist/index.d.ts +47 -4
- package/dist/index.js +69 -12
- package/dist/register-all.d.ts +1 -0
- package/dist/register-all.js +1 -0
- package/package.json +1 -1
|
@@ -9,10 +9,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
exports.SprintBuff = void 0;
|
|
10
10
|
const BuffCfg_1 = require("../../../../config/BuffCfg");
|
|
11
11
|
const Property_1 = require("../../../property/Property");
|
|
12
|
+
const GameEvent_1 = require("../../event/GameEvent");
|
|
12
13
|
const FighterStateType_1 = require("../../fsm-state/FighterStateType");
|
|
13
14
|
const BVec2_1 = require("../../util/BVec2");
|
|
14
15
|
const BuffMgr_1 = require("../BuffMgr");
|
|
15
|
-
const GameEvent_1 = require("../../event/GameEvent");
|
|
16
16
|
const BaseBuff_1 = require("./BaseBuff");
|
|
17
17
|
let SprintBuff = class SprintBuff extends BaseBuff_1.BaseBuff {
|
|
18
18
|
static onEnter(entity, buff) {
|
|
@@ -20,29 +20,52 @@ let SprintBuff = class SprintBuff extends BaseBuff_1.BaseBuff {
|
|
|
20
20
|
if (!entity.isDead) {
|
|
21
21
|
const impact = (0, BuffMgr_1.getBuffImpact)((0, BuffMgr_1.getBuffCaster)(entity, buff), buff);
|
|
22
22
|
let target = null;
|
|
23
|
-
let targets = entity.game.getFighterByTargetType(entity, [impact.p5, impact.p6]);
|
|
24
23
|
let fixedDis = impact.p7 || 0;
|
|
25
24
|
let delayTime = impact.p8 || 0;
|
|
26
|
-
target = targets && targets[0];
|
|
27
25
|
let tempVec2 = BVec2_1.BVecHelper.pop();
|
|
28
|
-
if (
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if (fixedDis) {
|
|
35
|
-
BVec2_1.BVecHelper.set(tempVec2, entity.sprintPos[0], entity.sprintPos[1]);
|
|
26
|
+
if (impact.p5 === 999) { //指定坐标冲刺
|
|
27
|
+
const len = impact.p11.length / 2;
|
|
28
|
+
const dissqrt = 2500; //排除距离较近的
|
|
29
|
+
const list = [];
|
|
30
|
+
for (let i = 0; i < impact.p11.length; i += 2) {
|
|
31
|
+
BVec2_1.BVecHelper.set(tempVec2, list[i], list[i + 1]);
|
|
36
32
|
BVec2_1.BVecHelper.sub(tempVec2, tempVec2, entity);
|
|
37
|
-
BVec2_1.BVecHelper.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
const lensqrt = BVec2_1.BVecHelper.lengthSqr(tempVec2);
|
|
34
|
+
if (lensqrt > dissqrt) {
|
|
35
|
+
list.push(impact.p11[i]);
|
|
36
|
+
list.push(impact.p11[i + 1]);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
if (list.length) {
|
|
40
|
+
const index = entity.game.randomRange(0, list.length / 2);
|
|
41
|
+
entity.sprintPos = [list[index], list[index + 1]];
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
entity.sprintPos = [0, 0];
|
|
42
45
|
}
|
|
43
46
|
}
|
|
44
47
|
else {
|
|
45
|
-
|
|
48
|
+
let targets = entity.game.getFighterByTargetType(entity, [impact.p5, impact.p6]);
|
|
49
|
+
target = targets && targets[0];
|
|
50
|
+
if (!target) {
|
|
51
|
+
target = entity.game.getClosestTarget(entity, true);
|
|
52
|
+
}
|
|
53
|
+
if (target) {
|
|
54
|
+
entity.getSprintPoint(target, tempVec2);
|
|
55
|
+
entity.sprintPos = [tempVec2.x, tempVec2.y];
|
|
56
|
+
if (fixedDis) {
|
|
57
|
+
BVec2_1.BVecHelper.set(tempVec2, entity.sprintPos[0], entity.sprintPos[1]);
|
|
58
|
+
BVec2_1.BVecHelper.sub(tempVec2, tempVec2, entity);
|
|
59
|
+
BVec2_1.BVecHelper.normalize(tempVec2, tempVec2);
|
|
60
|
+
BVec2_1.BVecHelper.mulScalar(tempVec2, tempVec2, fixedDis);
|
|
61
|
+
BVec2_1.BVecHelper.add(tempVec2, tempVec2, entity);
|
|
62
|
+
entity.sprintPos[0] = tempVec2.x;
|
|
63
|
+
entity.sprintPos[1] = tempVec2.y;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
entity.sprintPos = [entity.x, entity.y];
|
|
68
|
+
}
|
|
46
69
|
}
|
|
47
70
|
if (delayTime) {
|
|
48
71
|
entity.sprintPos[2] = delayTime;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import FighterData from "../../entity/FighterData";
|
|
2
|
+
import { Buff } from "../BuffMgr";
|
|
3
|
+
import { BaseBuff } from "./BaseBuff";
|
|
4
|
+
export declare class VenomBurstBuff extends BaseBuff {
|
|
5
|
+
static onEnter(entity: FighterData, buff: Buff.BuffItem): void;
|
|
6
|
+
static onExit(entity: FighterData, buff: Buff.BuffItem): void;
|
|
7
|
+
private static onHurtCalStart;
|
|
8
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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.VenomBurstBuff = void 0;
|
|
10
|
+
const BuffCfg_1 = require("../../../../config/BuffCfg");
|
|
11
|
+
const EntityEvent_1 = require("../../event/EntityEvent");
|
|
12
|
+
const BuffMgr_1 = require("../BuffMgr");
|
|
13
|
+
const BaseBuff_1 = require("./BaseBuff");
|
|
14
|
+
let VenomBurstBuff = class VenomBurstBuff extends BaseBuff_1.BaseBuff {
|
|
15
|
+
static onEnter(entity, buff) {
|
|
16
|
+
buff.curBuffTime = 0;
|
|
17
|
+
entity.game.on(entity.ID, EntityEvent_1.EntityEvent.SkillHurtCalStart, this.onHurtCalStart, this);
|
|
18
|
+
}
|
|
19
|
+
static onExit(entity, buff) {
|
|
20
|
+
entity.game.off(entity.ID, EntityEvent_1.EntityEvent.SkillHurtCalStart, this.onHurtCalStart, this);
|
|
21
|
+
}
|
|
22
|
+
static onHurtCalStart(entity, hurtData) {
|
|
23
|
+
let buffs = entity.getBuffsByType(BuffCfg_1.BuffDefine.VenomBurst);
|
|
24
|
+
if (buffs && buffs.length) {
|
|
25
|
+
const buff = buffs[0];
|
|
26
|
+
if (buff.buffValue === hurtData.skillData.skillId && entity.ID === hurtData.attacker.ID) {
|
|
27
|
+
if (hurtData.beHiter) {
|
|
28
|
+
const posions = hurtData.beHiter.getBuffsByType(BuffCfg_1.BuffDefine.Posion);
|
|
29
|
+
if (posions && posions.length && posions[0].buffLayer) {
|
|
30
|
+
hurtData.attackRatio *= posions[0].buffLayer;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
exports.VenomBurstBuff = VenomBurstBuff;
|
|
38
|
+
exports.VenomBurstBuff = VenomBurstBuff = __decorate([
|
|
39
|
+
BuffMgr_1.Buff.cacheBuff(BuffCfg_1.BuffDefine.VenomBurst)
|
|
40
|
+
], VenomBurstBuff);
|
|
@@ -12,6 +12,9 @@ import "./BackHitAddAttrBuff";
|
|
|
12
12
|
import "./BaseBuff";
|
|
13
13
|
import "./BleedBuff";
|
|
14
14
|
import "./BlizzardBuff";
|
|
15
|
+
import "./BossCloneBuff";
|
|
16
|
+
import "./BossPetrifyBuff";
|
|
17
|
+
import "./BossReinforcementBuff";
|
|
15
18
|
import "./BounceCutDamageBuff";
|
|
16
19
|
import "./BulletDeviationBuff";
|
|
17
20
|
import "./BurnBuff";
|
|
@@ -41,6 +44,7 @@ import "./EnemyRatioBuff";
|
|
|
41
44
|
import "./FireHurtLayerBuff";
|
|
42
45
|
import "./FixedProjectileNumBuff";
|
|
43
46
|
import "./FollowMainEntityBuff";
|
|
47
|
+
import "./ForceDizzinessBuff";
|
|
44
48
|
import "./ForceTargetBuff";
|
|
45
49
|
import "./FrozenBuff";
|
|
46
50
|
import "./HaulBuff";
|
|
@@ -64,6 +68,7 @@ import "./ImmueSlayBuff";
|
|
|
64
68
|
import "./ImmueSlowBuff";
|
|
65
69
|
import "./ImmueVulnerableBuff";
|
|
66
70
|
import "./ImmuneDizzinessBuff";
|
|
71
|
+
import "./ImmuneForceDizziness";
|
|
67
72
|
import "./ImmuneFrozenBuff";
|
|
68
73
|
import "./ImmuneParalysisBuff";
|
|
69
74
|
import "./InDebuffAddAttrBuff";
|
|
@@ -123,4 +128,5 @@ import "./SwordWindWallBuff";
|
|
|
123
128
|
import "./TeleportBuff";
|
|
124
129
|
import "./TimeAddDamageBuff";
|
|
125
130
|
import "./TowerCritBuff";
|
|
131
|
+
import "./VenomBurstBuff";
|
|
126
132
|
import "./VulnerableBuff";
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// Cocos 的资源系统会把 assets 下所有脚本加载一遍,所以引擎里天然成立;
|
|
9
9
|
// Node 只执行从入口 import 可达的模块,不引这一下,注册表就是空的。
|
|
10
10
|
//
|
|
11
|
-
// 共
|
|
11
|
+
// 共 132 个模块。下面的 import 只为副作用,不需要用到导出。
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
require("./AddActionTimeBuff");
|
|
14
14
|
require("./AddAtrBuff");
|
|
@@ -24,6 +24,9 @@ require("./BackHitAddAttrBuff");
|
|
|
24
24
|
require("./BaseBuff");
|
|
25
25
|
require("./BleedBuff");
|
|
26
26
|
require("./BlizzardBuff");
|
|
27
|
+
require("./BossCloneBuff");
|
|
28
|
+
require("./BossPetrifyBuff");
|
|
29
|
+
require("./BossReinforcementBuff");
|
|
27
30
|
require("./BounceCutDamageBuff");
|
|
28
31
|
require("./BulletDeviationBuff");
|
|
29
32
|
require("./BurnBuff");
|
|
@@ -53,6 +56,7 @@ require("./EnemyRatioBuff");
|
|
|
53
56
|
require("./FireHurtLayerBuff");
|
|
54
57
|
require("./FixedProjectileNumBuff");
|
|
55
58
|
require("./FollowMainEntityBuff");
|
|
59
|
+
require("./ForceDizzinessBuff");
|
|
56
60
|
require("./ForceTargetBuff");
|
|
57
61
|
require("./FrozenBuff");
|
|
58
62
|
require("./HaulBuff");
|
|
@@ -76,6 +80,7 @@ require("./ImmueSlayBuff");
|
|
|
76
80
|
require("./ImmueSlowBuff");
|
|
77
81
|
require("./ImmueVulnerableBuff");
|
|
78
82
|
require("./ImmuneDizzinessBuff");
|
|
83
|
+
require("./ImmuneForceDizziness");
|
|
79
84
|
require("./ImmuneFrozenBuff");
|
|
80
85
|
require("./ImmuneParalysisBuff");
|
|
81
86
|
require("./InDebuffAddAttrBuff");
|
|
@@ -135,4 +140,5 @@ require("./SwordWindWallBuff");
|
|
|
135
140
|
require("./TeleportBuff");
|
|
136
141
|
require("./TimeAddDamageBuff");
|
|
137
142
|
require("./TowerCritBuff");
|
|
143
|
+
require("./VenomBurstBuff");
|
|
138
144
|
require("./VulnerableBuff");
|
|
@@ -224,7 +224,11 @@ let FighterData = class FighterData extends BaseEntityData_1.default {
|
|
|
224
224
|
sprintSpeed = 0;
|
|
225
225
|
getSprintPoint(entity, out) {
|
|
226
226
|
out = out || { x: 0, y: 0 };
|
|
227
|
-
if (entity.
|
|
227
|
+
if (entity.ID < 0) {
|
|
228
|
+
out.x = entity.x;
|
|
229
|
+
out.y = entity.y;
|
|
230
|
+
}
|
|
231
|
+
else if (entity.subType === battle_interface_1.SubEntityType.ROLE && entity.campType === battle_interface_1.CampType.MY && entity.game.rolePosType === 0) {
|
|
228
232
|
out.x = this.x;
|
|
229
233
|
out.y = entity.y + entity.shape.height / 2 + entity.shape.offset.y;
|
|
230
234
|
}
|
|
@@ -68,6 +68,7 @@ export declare const EntityEvent: {
|
|
|
68
68
|
ProjectileMergeFinish: number;
|
|
69
69
|
AfterBeMiss: number;
|
|
70
70
|
AfterMiss: number;
|
|
71
|
+
TimesShieldBreak: number;
|
|
71
72
|
BuffTrigger: number;
|
|
72
73
|
BeHit: number;
|
|
73
74
|
SkillHurtCalStart: number;
|
|
@@ -80,6 +81,7 @@ export declare const EntityEvent: {
|
|
|
80
81
|
ProjectilePriorityTarget: number;
|
|
81
82
|
BuffExit: number;
|
|
82
83
|
ShieldReduce: number;
|
|
84
|
+
CallFighter: number;
|
|
83
85
|
TurnStart: number;
|
|
84
86
|
TurnEnd: number;
|
|
85
87
|
TurnActionStart: number;
|
|
@@ -71,6 +71,7 @@ exports.EntityEvent = {
|
|
|
71
71
|
ProjectileMergeFinish: 67, //子弹融合完成时
|
|
72
72
|
AfterBeMiss: 68, //攻击被闪避后
|
|
73
73
|
AfterMiss: 69, //闪避后
|
|
74
|
+
TimesShieldBreak: 70, //护盾次数用尽时触发
|
|
74
75
|
BuffTrigger: 100, //buff触发时
|
|
75
76
|
BeHit: 101, //受到伤害后
|
|
76
77
|
SkillHurtCalStart: 102, //攻击伤害计算开始
|
|
@@ -84,6 +85,7 @@ exports.EntityEvent = {
|
|
|
84
85
|
BuffExit: 110, //buff退出时
|
|
85
86
|
//恢复
|
|
86
87
|
ShieldReduce: 200, //护盾减少时
|
|
88
|
+
CallFighter: 201, //召唤单位后
|
|
87
89
|
//回合制
|
|
88
90
|
TurnStart: 1000, //整体回合开始时
|
|
89
91
|
TurnEnd: 1001, //整体回合结束时
|
|
@@ -57,7 +57,7 @@ class FighterFactory {
|
|
|
57
57
|
fighter.fsmType = 0 /* FighterStateProfile.Fighter */;
|
|
58
58
|
}
|
|
59
59
|
if (game.gameModule.moduleState.isTurn) {
|
|
60
|
-
fighter.fsmType =
|
|
60
|
+
fighter.fsmType = 100 /* FighterStateProfile.Turn */;
|
|
61
61
|
}
|
|
62
62
|
fighter.fsmType = (0, FighterStateProfiles_1.resolveFighterStateProfile)(rolecfg.id, fighter.fsmType);
|
|
63
63
|
return fighter;
|
|
@@ -129,11 +129,11 @@ class FighterFactory {
|
|
|
129
129
|
if (rolecfg.type === battle_interface_1.SubEntityType.BOAT) {
|
|
130
130
|
game.wall[data.playerId] = fighter.ID;
|
|
131
131
|
}
|
|
132
|
-
if (rolecfg.type === battle_interface_1.SubEntityType.ROLE && ismy) {
|
|
132
|
+
if (rolecfg.type === battle_interface_1.SubEntityType.ROLE && (ismy || game.isPVP)) {
|
|
133
133
|
game.roles[data.playerId] = fighter.ID;
|
|
134
134
|
}
|
|
135
135
|
//出生信息
|
|
136
|
-
if (ismy) {
|
|
136
|
+
if (ismy || game.isPVP) {
|
|
137
137
|
if (rolecfg.type === battle_interface_1.SubEntityType.ROLE || rolecfg.type === battle_interface_1.SubEntityType.TOWER) {
|
|
138
138
|
let bronids = game.gameContext.curBornRole[data.playerId];
|
|
139
139
|
if (!bronids) {
|
|
@@ -155,8 +155,8 @@ class FighterFactory {
|
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
-
if (ismy && (fighter.cfg.type === battle_interface_1.SubEntityType.TOWER || fighter.cfg.type === battle_interface_1.SubEntityType.ROLE)) {
|
|
159
|
-
game.gameContext.myFightData[fighter.ID] = { oid: fighter.oid, ID: fighter.ID, fightId: fighter.cfg.id, hurtBoss: 0, hurtNormal: 0, level: 0, star: 0, maxQuality: 2, isself: 1, stage: 1, attackSkillId: fighter.normalSkillIds[0] || 0 };
|
|
158
|
+
if ((ismy && !game.isPVP) && (fighter.cfg.type === battle_interface_1.SubEntityType.TOWER || fighter.cfg.type === battle_interface_1.SubEntityType.ROLE)) {
|
|
159
|
+
game.gameContext.myFightData[fighter.ID] = { oid: fighter.oid, ID: fighter.ID, fightId: fighter.cfg.id, hurtBoss: 0, hurtNormal: 0, level: 0, star: 0, maxQuality: 2, isself: 1, stage: 1, attackSkillId: fighter.normalSkillIds[0] || 0, takeDamage: 0, heal: 0, shield: fighter.property[10070] };
|
|
160
160
|
if (game.selfPlayerId === fighter.playerId) {
|
|
161
161
|
let rolelevel = game.getRoleLevelByRoleId(fighter.cfg.id);
|
|
162
162
|
const myfightdata = game.gameContext.myFightData[fighter.ID];
|
|
@@ -166,6 +166,18 @@ class FighterFactory {
|
|
|
166
166
|
Notifier_1.Notifier.send(ListenID_1.ListenID.Battle_CreateRole, fighter);
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
|
+
if (game.isPVP) {
|
|
170
|
+
if (!game.gameContext.playerFightData[fighter.playerId]) {
|
|
171
|
+
game.gameContext.playerFightData[fighter.playerId] = {};
|
|
172
|
+
}
|
|
173
|
+
game.gameContext.playerFightData[fighter.playerId][fighter.ID] = {
|
|
174
|
+
oid: fighter.oid, ID: fighter.ID, fightId: fighter.cfg.id, hurt: 0,
|
|
175
|
+
takeDamage: 0, shield: fighter.property[50720], heal: 0,
|
|
176
|
+
};
|
|
177
|
+
if (fighter.cfg.type === battle_interface_1.SubEntityType.ROLE) {
|
|
178
|
+
Notifier_1.Notifier.send(ListenID_1.ListenID.Battle_CreateRole, fighter);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
169
181
|
game.gameModule.setFighterPosition(fighter, data);
|
|
170
182
|
fighter.isDead = false;
|
|
171
183
|
fighter.atkDir.x = 0;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type FighterData from "../entity/FighterData";
|
|
2
|
+
import { SprintState } from "./AnyFighterStates";
|
|
3
|
+
import { FighterStateProfile } from "./FighterStateProfiles";
|
|
4
|
+
import { StateType } from "./FighterStateType";
|
|
5
|
+
export declare class Boss38210SprintState extends SprintState {
|
|
6
|
+
static state: StateType;
|
|
7
|
+
static profile: FighterStateProfile;
|
|
8
|
+
static onEnter(entity: FighterData): void;
|
|
9
|
+
static onUpdate(entity: FighterData, dt: number): void;
|
|
10
|
+
static onExit(entity: FighterData): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Boss38210SprintState = void 0;
|
|
4
|
+
const BVec2_1 = require("../util/BVec2");
|
|
5
|
+
const AnyFighterStates_1 = require("./AnyFighterStates");
|
|
6
|
+
const FighterStateRegistry_1 = require("./FighterStateRegistry");
|
|
7
|
+
const FighterStateType_1 = require("./FighterStateType");
|
|
8
|
+
const normalUp = { x: 0, y: 1 };
|
|
9
|
+
class Boss38210SprintState extends AnyFighterStates_1.SprintState {
|
|
10
|
+
static state = FighterStateType_1.StateType.SPRINT;
|
|
11
|
+
static profile = 7 /* FighterStateProfile.Boss38210 */;
|
|
12
|
+
static onEnter(entity) {
|
|
13
|
+
super.onEnter(entity);
|
|
14
|
+
entity.horDir = 1;
|
|
15
|
+
//旋转方向
|
|
16
|
+
let angle = BVec2_1.BVecHelper.signAngle({ x: entity.sprintPos[0], y: entity.sprintPos[1] }, normalUp);
|
|
17
|
+
entity.setAngle(-angle);
|
|
18
|
+
}
|
|
19
|
+
static onUpdate(entity, dt) {
|
|
20
|
+
if (entity.actionTime - dt <= 0) {
|
|
21
|
+
entity.setAngle(0);
|
|
22
|
+
}
|
|
23
|
+
super.onUpdate(entity, dt);
|
|
24
|
+
}
|
|
25
|
+
static onExit(entity) {
|
|
26
|
+
entity.setAngle(0);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.Boss38210SprintState = Boss38210SprintState;
|
|
30
|
+
(0, FighterStateRegistry_1.registerFighterStateNode)(Boss38210SprintState);
|
|
@@ -112,8 +112,10 @@ registerFighterStateProfile(18112, 5 /* FighterStateProfile.Boss18110Call */);
|
|
|
112
112
|
registerFighterStateProfile(18113, 5 /* FighterStateProfile.Boss18110Call */);
|
|
113
113
|
registerFighterStateProfile(18114, 5 /* FighterStateProfile.Boss18110Call */);
|
|
114
114
|
registerFighterStateProfile(18115, 5 /* FighterStateProfile.Boss18110Call */);
|
|
115
|
+
registerFighterStateProfile(38210, 7 /* FighterStateProfile.Boss38210 */);
|
|
116
|
+
registerFighterStateProfile(38211, 7 /* FighterStateProfile.Boss38210 */);
|
|
115
117
|
// 回合制:只有“进入前摇”必须由 TurnSchedulerSystem 手动触发;前摇→攻击、收招、回 IDLE 均自动
|
|
116
|
-
registerFighterProfileManualStates(
|
|
118
|
+
registerFighterProfileManualStates(100 /* FighterStateProfile.Turn */, [
|
|
117
119
|
FighterStateType_1.StateType.PREATTACK,
|
|
118
120
|
FighterStateType_1.StateType.IDLE,
|
|
119
121
|
]);
|
|
@@ -131,7 +133,7 @@ function getFighterStateMask(profile) {
|
|
|
131
133
|
return dragonStates;
|
|
132
134
|
case 4 /* FighterStateProfile.DragonBody */:
|
|
133
135
|
return dragonBodyStates;
|
|
134
|
-
case
|
|
136
|
+
case 100 /* FighterStateProfile.Turn */:
|
|
135
137
|
return turnStates;
|
|
136
138
|
default:
|
|
137
139
|
// A custom monster profile inherits the normal fighter state set.
|
|
@@ -14,7 +14,7 @@ const FighterStateType_1 = require("./FighterStateType");
|
|
|
14
14
|
const moveSpeed = 1500;
|
|
15
15
|
class WaitState extends FighterStateShared_1.BaseFighterState {
|
|
16
16
|
static state = FighterStateType_1.StateType.WAIT;
|
|
17
|
-
static profile =
|
|
17
|
+
static profile = 100 /* FighterStateProfile.Turn */;
|
|
18
18
|
static onEnter(entity) {
|
|
19
19
|
let name = (0, FighterStateShared_1.getActionNameByType)(FighterStateType_1.StateType.IDLE, entity.actionType);
|
|
20
20
|
if ((entity.campType === battle_interface_1.CampType.MY || entity.game.isPVP) && entity.cfg.type === battle_interface_1.SubEntityType.ROLE) {
|
|
@@ -29,7 +29,7 @@ class WaitState extends FighterStateShared_1.BaseFighterState {
|
|
|
29
29
|
exports.WaitState = WaitState;
|
|
30
30
|
class TurnPreAttackState extends FighterStateShared_1.BaseFighterState {
|
|
31
31
|
static state = FighterStateType_1.StateType.PREATTACK;
|
|
32
|
-
static profile =
|
|
32
|
+
static profile = 100 /* FighterStateProfile.Turn */;
|
|
33
33
|
static onEnter(entity) {
|
|
34
34
|
const skillData = entity.skillDatas[entity.curSkillId];
|
|
35
35
|
if (entity.curSkillId != entity.counterSkillId && skillData.cfg.skillImpacts[0].type === 1) {
|
|
@@ -85,7 +85,7 @@ class TurnPreAttackState extends FighterStateShared_1.BaseFighterState {
|
|
|
85
85
|
exports.TurnPreAttackState = TurnPreAttackState;
|
|
86
86
|
class TurnAttackState extends AnyFighterStates_1.AttackState {
|
|
87
87
|
static state = FighterStateType_1.StateType.ATTACK;
|
|
88
|
-
static profile =
|
|
88
|
+
static profile = 100 /* FighterStateProfile.Turn */;
|
|
89
89
|
static onEnter(entity) {
|
|
90
90
|
entity.eventIndex = 0;
|
|
91
91
|
// 连击技能:头顶飘“连击”(参考 StateDisplay 的一次性飘字)
|
|
@@ -158,7 +158,7 @@ class TurnAttackState extends AnyFighterStates_1.AttackState {
|
|
|
158
158
|
exports.TurnAttackState = TurnAttackState;
|
|
159
159
|
class TurnBackState extends FighterStateShared_1.BaseFighterState {
|
|
160
160
|
static state = FighterStateType_1.StateType.BACK;
|
|
161
|
-
static profile =
|
|
161
|
+
static profile = 100 /* FighterStateProfile.Turn */;
|
|
162
162
|
static onEnter(entity) {
|
|
163
163
|
if (!entity.targetPos) {
|
|
164
164
|
entity.targetPos = new BVec2_1.BVec2();
|
|
@@ -14,7 +14,7 @@ const WAIT_DEFAULT_TIME = 0.5;
|
|
|
14
14
|
* 攻击结束或存在插入行动请求:进入 WAIT 等待被打断。
|
|
15
15
|
*/
|
|
16
16
|
class TurnAttackToWait extends FighterStateTransition_1.BaseFighterStateTransition {
|
|
17
|
-
static profile =
|
|
17
|
+
static profile = 100 /* FighterStateProfile.Turn */;
|
|
18
18
|
static fromState = FighterStateType_1.StateType.ATTACK;
|
|
19
19
|
static toState = FighterStateType_1.StateType.WAIT;
|
|
20
20
|
static priority = 60;
|
|
@@ -34,7 +34,7 @@ class TurnAttackToWait extends FighterStateTransition_1.BaseFighterStateTransiti
|
|
|
34
34
|
}
|
|
35
35
|
exports.TurnAttackToWait = TurnAttackToWait;
|
|
36
36
|
class TurnWaitToBack extends FighterStateTransition_1.BaseFighterStateTransition {
|
|
37
|
-
static profile =
|
|
37
|
+
static profile = 100 /* FighterStateProfile.Turn */;
|
|
38
38
|
static fromState = FighterStateType_1.StateType.WAIT;
|
|
39
39
|
static toState = FighterStateType_1.StateType.BACK;
|
|
40
40
|
static priority = 40;
|
|
@@ -46,7 +46,7 @@ class TurnWaitToBack extends FighterStateTransition_1.BaseFighterStateTransition
|
|
|
46
46
|
}
|
|
47
47
|
exports.TurnWaitToBack = TurnWaitToBack;
|
|
48
48
|
class TurnIdleToPreAttack extends AnyFighterStateTransitions_1.IdleToPreAttack {
|
|
49
|
-
static profile =
|
|
49
|
+
static profile = 100 /* FighterStateProfile.Turn */;
|
|
50
50
|
static fromState = FighterStateType_1.StateType.IDLE;
|
|
51
51
|
static toState = FighterStateType_1.StateType.PREATTACK;
|
|
52
52
|
static priority = 40;
|
|
@@ -75,7 +75,7 @@ class TurnIdleToPreAttack extends AnyFighterStateTransitions_1.IdleToPreAttack {
|
|
|
75
75
|
}
|
|
76
76
|
exports.TurnIdleToPreAttack = TurnIdleToPreAttack;
|
|
77
77
|
class TurnPreAttackToAttack extends FighterStateTransition_1.BaseFighterStateTransition {
|
|
78
|
-
static profile =
|
|
78
|
+
static profile = 100 /* FighterStateProfile.Turn */;
|
|
79
79
|
static fromState = FighterStateType_1.StateType.PREATTACK;
|
|
80
80
|
static toState = FighterStateType_1.StateType.ATTACK;
|
|
81
81
|
static priority = 40;
|
|
@@ -8,13 +8,14 @@
|
|
|
8
8
|
// Cocos 的资源系统会把 assets 下所有脚本加载一遍,所以引擎里天然成立;
|
|
9
9
|
// Node 只执行从入口 import 可达的模块,不引这一下,注册表就是空的。
|
|
10
10
|
//
|
|
11
|
-
// 共
|
|
11
|
+
// 共 10 个模块。下面的 import 只为副作用,不需要用到导出。
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
require("./AnyFighterStates");
|
|
14
14
|
require("./AnyFighterStateTransitions");
|
|
15
15
|
require("./Boss18110CallState");
|
|
16
16
|
require("./Boss18110State");
|
|
17
17
|
require("./Boss18110Transitions");
|
|
18
|
+
require("./Boss38210State");
|
|
18
19
|
require("./DragonBodyFighterStates");
|
|
19
20
|
require("./DragonFighterStates");
|
|
20
21
|
require("./TurnState");
|
|
@@ -44,6 +44,9 @@ class EntityManager {
|
|
|
44
44
|
}
|
|
45
45
|
if (defen.property[10080] > 0) { //扣除护盾次数
|
|
46
46
|
defen.property[10080]--;
|
|
47
|
+
if (defen.property[10080] === 0) {
|
|
48
|
+
defen.game.emit1(defen, EntityEvent_1.EntityEvent.TimesShieldBreak, defen);
|
|
49
|
+
}
|
|
47
50
|
return;
|
|
48
51
|
}
|
|
49
52
|
const game = defen.game;
|
|
@@ -108,7 +111,7 @@ class EntityManager {
|
|
|
108
111
|
let fightType = defen.isBoss === 1 ? 1 : 0;
|
|
109
112
|
let skillId = hurtData.event.isRealHit ? hurtData.skillId : hurtData.skillData.cfg.id;
|
|
110
113
|
if (attacker.campType === battle_interface_1.CampType.MY && !defen.isKillSelf) {
|
|
111
|
-
defen.game.
|
|
114
|
+
defen.game.logHurtData(attacker, fightType, hurtData.hurt, skillId);
|
|
112
115
|
}
|
|
113
116
|
if (hurtData.hurt > 0) {
|
|
114
117
|
if (!hurtData.event.isRealHit && hurtData.skillData.isNormalAttack) {
|
|
@@ -232,8 +235,9 @@ class EntityManager {
|
|
|
232
235
|
if (attacker) {
|
|
233
236
|
let fightType = defen.isBoss === 1 ? 1 : 0;
|
|
234
237
|
let skillId = hurtData.event.isRealHit ? hurtData.skillId : hurtData.skillData.cfg.id;
|
|
235
|
-
if (
|
|
236
|
-
defen.game.
|
|
238
|
+
if (!defen.isKillSelf) {
|
|
239
|
+
defen.game.logHurtData(attacker, fightType, hurtData.hurt, skillId);
|
|
240
|
+
defen.game.logTakeDamage(defen, hurtData.hurt);
|
|
237
241
|
}
|
|
238
242
|
if (hurtData.hurt > 0) {
|
|
239
243
|
if (!hurtData.event.isRealHit && hurtData.skillData.isNormalAttack) {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import FighterData from "../../entity/FighterData";
|
|
2
|
+
import type { ISkillEmitter } from "../../system/SkillSystem";
|
|
3
|
+
import { SkillData } from "../SkillData";
|
|
4
|
+
import { SkillEmitter } from "./SkillEmitter";
|
|
5
|
+
/**
|
|
6
|
+
* 目标位置水平随机点发射器
|
|
7
|
+
*/
|
|
8
|
+
export declare class SkillTargetHorRandomEmitter extends SkillEmitter {
|
|
9
|
+
static onUpdate(fighter: FighterData, skillEmitter: ISkillEmitter, skillData: SkillData, dt: number): boolean;
|
|
10
|
+
static execute(fighter: FighterData, skillEmitter: ISkillEmitter, skillData: SkillData, param: number[]): void;
|
|
11
|
+
static getData(): ISkillEmitter;
|
|
12
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
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.SkillTargetHorRandomEmitter = void 0;
|
|
10
|
+
const EntityEvent_1 = require("../../event/EntityEvent");
|
|
11
|
+
const BattleAudioAdpater_1 = require("../../util/BattleAudioAdpater");
|
|
12
|
+
const BattleUtils_1 = require("../../util/BattleUtils");
|
|
13
|
+
const SkillImpactPool_1 = require("../pool/SkillImpactPool");
|
|
14
|
+
const SkillEmitter_1 = require("./SkillEmitter");
|
|
15
|
+
/**
|
|
16
|
+
* 目标位置水平随机点发射器
|
|
17
|
+
*/
|
|
18
|
+
let SkillTargetHorRandomEmitter = class SkillTargetHorRandomEmitter extends SkillEmitter_1.SkillEmitter {
|
|
19
|
+
static onUpdate(fighter, skillEmitter, skillData, dt) {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
static execute(fighter, skillEmitter, skillData, param) {
|
|
23
|
+
let impacts = skillData.cfg.skillImpacts;
|
|
24
|
+
let offset = param[1] || 1;
|
|
25
|
+
for (let i = 0; i < impacts.length; i++) {
|
|
26
|
+
let impact = impacts[i];
|
|
27
|
+
let fighters = this.filterFighter(fighter, impact, skillData, skillEmitter.position.x, skillEmitter.position.y);
|
|
28
|
+
let skillImpact = SkillImpactPool_1.SkillImpactPool.spawn(impact.type);
|
|
29
|
+
skillImpact.position.x = skillEmitter.position.x;
|
|
30
|
+
skillImpact.position.y = skillEmitter.position.y;
|
|
31
|
+
skillImpact.parentID = skillData.parentID;
|
|
32
|
+
if (fighters && fighters.length) {
|
|
33
|
+
if (!skillImpact.impactPath)
|
|
34
|
+
skillImpact.impactPath = [];
|
|
35
|
+
skillImpact.impactPath.length = 0;
|
|
36
|
+
skillImpact.impactPath.push(fighter.ID, skillData.skillId, i);
|
|
37
|
+
skillImpact.position.x = fighters[0].x + fighter.game.randomRange(-offset, offset);
|
|
38
|
+
skillImpact.position.y = fighters[0].y;
|
|
39
|
+
skillImpact.execute(fighter, skillData, fighters, impact);
|
|
40
|
+
}
|
|
41
|
+
SkillImpactPool_1.SkillImpactPool.despawn(skillImpact);
|
|
42
|
+
}
|
|
43
|
+
if (skillData.isNormalAttack) {
|
|
44
|
+
if (skillData.cfg.soundId) {
|
|
45
|
+
BattleAudioAdpater_1.BattleAudioAdpater.playAudio(skillData.cfg.soundId, BattleAudioAdpater_1.BattleAudioType.Gun);
|
|
46
|
+
}
|
|
47
|
+
fighter.game.emit(fighter, EntityEvent_1.EntityEvent.TriggerNormalAttack, skillData.skillId);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
static getData() {
|
|
51
|
+
return {
|
|
52
|
+
position: { x: 0, y: 0 },
|
|
53
|
+
atkDir: { x: 0, y: 0 },
|
|
54
|
+
emitterName: "SkillTargetHorRandomEmitter",
|
|
55
|
+
skillId: 0,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
exports.SkillTargetHorRandomEmitter = SkillTargetHorRandomEmitter;
|
|
60
|
+
exports.SkillTargetHorRandomEmitter = SkillTargetHorRandomEmitter = __decorate([
|
|
61
|
+
(0, BattleUtils_1.cacheFunction)("SkillTargetHorRandomEmitter")
|
|
62
|
+
], SkillTargetHorRandomEmitter);
|
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
// Cocos 的资源系统会把 assets 下所有脚本加载一遍,所以引擎里天然成立;
|
|
9
9
|
// Node 只执行从入口 import 可达的模块,不引这一下,注册表就是空的。
|
|
10
10
|
//
|
|
11
|
-
// 共
|
|
11
|
+
// 共 5 个模块。下面的 import 只为副作用,不需要用到导出。
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
require("./SkillDirectEmitter");
|
|
14
14
|
require("./SkillEmitter");
|
|
15
15
|
require("./SkillRandomDirEmitter");
|
|
16
16
|
require("./SkillRandomIndexEmitter");
|
|
17
|
+
require("./SkillTargetHorRandomEmitter");
|
|
@@ -69,7 +69,8 @@ let Impact3 = class Impact3 extends SkillImpact_1.SkillImpact {
|
|
|
69
69
|
for (let index = 0; index < num; index++) {
|
|
70
70
|
let fighter = fighters[index] || fighters[index % fighters.length];
|
|
71
71
|
if (!fighter || !fighter.ID) {
|
|
72
|
-
console.error('Impact3 execute fighter is null', index, fighters.length, fighters);
|
|
72
|
+
// console.error('Impact3 execute fighter is null', index, fighters.length, fighters);
|
|
73
|
+
continue;
|
|
73
74
|
}
|
|
74
75
|
this.realExecute(impactData, index, owner, skillData, fighter, crossNum, num, hurtData);
|
|
75
76
|
}
|
|
@@ -84,7 +84,11 @@ let Impact5 = class Impact5 extends SkillImpact_1.SkillImpact {
|
|
|
84
84
|
SkillImpactShared_1.tempVec2.x = this.position.x;
|
|
85
85
|
SkillImpactShared_1.tempVec2.y = this.position.y;
|
|
86
86
|
}
|
|
87
|
-
else if (posType ===
|
|
87
|
+
else if (posType === 9) { //发射点随机
|
|
88
|
+
owner.getAttackPoint(SkillImpactShared_1.tempVec2);
|
|
89
|
+
let offsets = impactData.p11;
|
|
90
|
+
SkillImpactShared_1.tempVec2.x += owner.game.randomRange(offsets && offsets[0] || 0, offsets && offsets[1] || 0);
|
|
91
|
+
SkillImpactShared_1.tempVec2.y += owner.game.randomRange(offsets && offsets[2] || 0, offsets && offsets[3] || 0);
|
|
88
92
|
}
|
|
89
93
|
for (let i = 0; i < t.length / 2; i++) {
|
|
90
94
|
let roleId = t[i * 2];
|