genshin-world 4.2.0 → 4.3.3
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/README.md +2 -2
- package/dist/ElementDamageBonusAttributeMap-Cf1kBcTu.js +12 -0
- package/dist/EnemyState-BdsrVDVv.js +13 -0
- package/dist/GameDataset-oS0Tc9KV.js +272 -0
- package/dist/KitEventKind-DinObjiq.js +33 -0
- package/dist/ReactionType-BTiek5WA.js +36 -0
- package/dist/TransformativeReactionType-DYhIEAoe.js +14 -0
- package/dist/addKitEffect-DEhZUuxo.js +19 -0
- package/dist/addKitStatus-CecgwPmO.js +8 -0
- package/dist/ainoKit-Z23iOdpE.js +110 -0
- package/dist/albedoKit-h6MSXqhl.js +132 -0
- package/dist/alhaithamKit-2VrwmZzn.js +225 -0
- package/dist/aloyKit-Dlk_fLbL.js +66 -0
- package/dist/alyoshaKit-3ky4aL_z.js +3 -0
- package/dist/amberKit-BuYU5ACZ.js +85 -0
- package/dist/arlecchinoKit-B2WJP5Y5.js +16 -0
- package/dist/ayakaKit-D7K6RdMw.js +84 -0
- package/dist/ayatoKit-qQp-Ayun.js +136 -0
- package/dist/baizhuKit-9i8Hvfeg.js +81 -0
- package/dist/barbaraKit-DMo_2qWo.js +122 -0
- package/dist/beidouKit-1lURCwhO.js +89 -0
- package/dist/bennettKit-B-ipp-MR.js +75 -0
- package/dist/candaceKit-oGYu9t5n.js +92 -0
- package/dist/castKitField-BhB1fy3l.js +21 -0
- package/dist/characterPack-B3e_YsdJ.d.ts +115 -0
- package/dist/characterPack-DzYMqBNM.js +697 -0
- package/dist/characterPack.d.ts +2 -0
- package/dist/characterPack.js +3 -0
- package/dist/charlotteKit-BjNvcN8w.js +103 -0
- package/dist/chascaKit-isny33W1.js +52 -0
- package/dist/checkIsKitShieldLive-DEn8yb0C.js +3 -0
- package/dist/chevreuseKit-BppMndmv.js +47 -0
- package/dist/chioriKit-CKfqMVtb.js +30 -0
- package/dist/chongyunKit-DeZG-qOb.js +99 -0
- package/dist/citlaliKit-BLY9P2cd.js +62 -0
- package/dist/clorindeKit-DGNp_1SZ.js +61 -0
- package/dist/collectKitEnergyDrops-4kTI3aGH.js +61 -0
- package/dist/colleiKit-CVBvP9-k.js +51 -0
- package/dist/columbinaKit-BqmNtRDK.js +279 -0
- package/dist/computeFacingAngle-DapXsgDc.js +7 -0
- package/dist/constants-6NEnGOni.js +186 -0
- package/dist/constants-BIXoNz1x.js +73 -0
- package/dist/constants-DWgLZz-I.js +45 -0
- package/dist/constants-jHIdcxxW.js +3 -0
- package/dist/constants-r10WzaUG.js +48 -0
- package/dist/consumeKitResource-DknosO6e.js +17 -0
- package/dist/countKitResource-CPve-dw2.js +4 -0
- package/dist/createWindriseGroundPaint-CtFTL5uW.js +293 -0
- package/dist/cynoKit-bhub8RfD.js +203 -0
- package/dist/dahliaKit-BeEPFn33.js +20 -0
- package/dist/dehyaKit-1qJYvLv-.js +23 -0
- package/dist/dilucKit-DslGKmxO.js +166 -0
- package/dist/dionaKit-B33zk3GI.js +68 -0
- package/dist/doriKit-BmYySQcG.js +24 -0
- package/dist/durinKit-CpCXxj-r.js +49 -0
- package/dist/emilieKit-BZqz4PVs.js +20 -0
- package/dist/emitKitEvent-Cb-ZHu50.js +11 -0
- package/dist/escoffierKit-DFRj0Hpo.js +95 -0
- package/dist/eulaKit-BzD8ye_S.js +144 -0
- package/dist/faruzanKit-C5WQz91G.js +72 -0
- package/dist/findKitStatus-Dj_zauGj.js +3 -0
- package/dist/fischlKit-e4xAt26v.js +95 -0
- package/dist/flinsKit-D82N06z5.js +30 -0
- package/dist/freminetKit-Dq9ebIts.js +20 -0
- package/dist/furinaKit-CzTKkE0N.js +289 -0
- package/dist/gainKitResource-3F1z8Aco.js +14 -0
- package/dist/gainPartyMemberEnergy-DUbIxe6i.js +10 -0
- package/dist/gamingKit-yxYvslgf.js +25 -0
- package/dist/ganyuKit-B2pxzHKL.js +84 -0
- package/dist/getActiveCharacterId-D9TtVSWj.js +9 -0
- package/dist/getBuffedCombatant-CwXmBrc6.js +94 -0
- package/dist/getDeployedCharacterIds-TuIRCNKb.js +3 -0
- package/dist/getDeployedCombatants-BQdLjZha.js +16 -0
- package/dist/getPartyMember-BAb9wUiz.js +8 -0
- package/dist/gorouKit--Luf6-WZ.js +153 -0
- package/dist/heizouKit-DRleoyzF.js +49 -0
- package/dist/huTaoKit-WDMpqAzD.js +146 -0
- package/dist/iansanKit-BPzX4C36.js +145 -0
- package/dist/ifaKit-Z57TFRSg.js +39 -0
- package/dist/illugaKit-86u4wqrU.js +111 -0
- package/dist/index-C5rNBYhp.d.ts +26017 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +48495 -0
- package/dist/ineffaKit-D0SA01X2.js +154 -0
- package/dist/ittoKit-hM51Mywb.js +132 -0
- package/dist/jahodaKit-CqtBpzVS.js +344 -0
- package/dist/jeanKit-fwjmnF1v.js +89 -0
- package/dist/kachinaKit-Dyh5F-ob.js +6 -0
- package/dist/kaeyaKit-SBM0QxJ5.js +91 -0
- package/dist/kavehKit-1XyMxtUb.js +33 -0
- package/dist/kazuhaKit-C726LLZy.js +76 -0
- package/dist/keqingKit-O_V-tx1h.js +100 -0
- package/dist/kinichKit-DIVa0P5s.js +71 -0
- package/dist/kiraraKit-nS9iOECm.js +70 -0
- package/dist/kleeKit-DzbELTyN.js +95 -0
- package/dist/kokomiKit-BRzXNRVb.js +83 -0
- package/dist/kujouSaraKit-BpN3Ipay.js +95 -0
- package/dist/kukiKit-DRdmE41e.js +70 -0
- package/dist/lanYanKit-CRK1J-LX.js +26 -0
- package/dist/laumaKit-CRc88J5l.js +161 -0
- package/dist/laylaKit-B7Pjqgzw.js +180 -0
- package/dist/linneaKit-CVZeam_T.js +3 -0
- package/dist/lisaKit-BJqj8t7j.js +65 -0
- package/dist/lohenKit-BZk4IiPV.js +3 -0
- package/dist/lynetteKit-CfwhsLsJ.js +39 -0
- package/dist/lyneyKit-BQiI15dt.js +42 -0
- package/dist/mavuikaKit-MMBY1DJn.js +21 -0
- package/dist/mikaKit-BIMafqBI.js +20 -0
- package/dist/mizukiKit-CC34yGgJ.js +57 -0
- package/dist/monaKit-BlrXXHlB.js +145 -0
- package/dist/mualaniKit-BUTB11j2.js +6 -0
- package/dist/nahidaKit-ZHrD7-m7.js +112 -0
- package/dist/naviaKit-DDttg5Dp.js +139 -0
- package/dist/neferKit-Z-QBM46z.js +29 -0
- package/dist/neuvilletteKit-B4EhID2O.js +117 -0
- package/dist/nicoleKit-Dmrpe0yU.js +281 -0
- package/dist/nilouKit-CoztU-uZ.js +104 -0
- package/dist/ningguangKit-BGOXmwd-.js +112 -0
- package/dist/noelleKit-nl5ar8f1.js +147 -0
- package/dist/odetteKit-Bu1W8GX7.js +101 -0
- package/dist/ororonKit-CboDk9B8.js +91 -0
- package/dist/pruneKit-xgQ9cym6.js +34 -0
- package/dist/qiqiKit-lz_qLyLu.js +104 -0
- package/dist/raidenKit-CVTi4bpy.js +152 -0
- package/dist/razorKit-BHyrlVEl.js +121 -0
- package/dist/readCharacterAvatar-xauJoD8Q.js +291 -0
- package/dist/removeKitEffects-Csap9Xyn.js +5 -0
- package/dist/rosariaKit-DEpP8gj7.js +59 -0
- package/dist/sandroneKit-C7vjjwWY.js +3 -0
- package/dist/save-W-sjOoN_.js +2475 -0
- package/dist/save.d.ts +2 -0
- package/dist/save.js +1 -0
- package/dist/sayuKit-DQbPlL_6.js +67 -0
- package/dist/sceneExport-3Se7hlVa.js +26 -0
- package/dist/sceneExport-C-q_cRxm.d.ts +57 -0
- package/dist/sceneExport.d.ts +2 -0
- package/dist/sceneExport.js +1 -0
- package/dist/sethosKit-o-Tz2GFI.js +6 -0
- package/dist/shenheKit-Xu_rt5aN.js +152 -0
- package/dist/sigewinneKit-NOWCcIW4.js +21 -0
- package/dist/skirkKit-CK183sCe.js +9 -0
- package/dist/spendKitResource-CC5kZDgu.js +9 -0
- package/dist/style.css +4570 -0
- package/dist/sucroseKit-Brr_FwwP.js +124 -0
- package/dist/tartagliaKit-DQzYxDRn.js +136 -0
- package/dist/terrainTileWorker.d.ts +1 -0
- package/dist/terrainTileWorker.js +80 -0
- package/dist/thomaKit-CesNlmDH.js +95 -0
- package/dist/tighnariKit-B9BZlgE9.js +45 -0
- package/dist/varesaKit-D5iKxzdo.js +36 -0
- package/dist/varkaKit-CNpU_rb3.js +3 -0
- package/dist/ventiKit-CM94zgZy.js +52 -0
- package/dist/vesnaKit-DtGBZlNW.js +3 -0
- package/dist/vodyanitsaKit-BurO3Fqh.js +3 -0
- package/dist/wandererKit-CW3sLw53.js +8 -0
- package/dist/wriothesleyKit-CPwNVWnr.js +102 -0
- package/dist/xianglingKit-DAFhr2LW.js +113 -0
- package/dist/xianyunKit-G4ateSub.js +107 -0
- package/dist/xiaoKit-CQljYrZS.js +104 -0
- package/dist/xilonenKit-39u8vLuk.js +41 -0
- package/dist/xingqiuKit-nURrQ7vt.js +126 -0
- package/dist/xinyanKit-DU0WpVms.js +144 -0
- package/dist/yaeMikoKit-kSDqAFyn.js +56 -0
- package/dist/yanfeiKit-Cst973qA.js +118 -0
- package/dist/yaoyaoKit-6yjjf3np.js +201 -0
- package/dist/yelanKit-SSdzqMQa.js +78 -0
- package/dist/yoimiyaKit-DqiQvgAt.js +90 -0
- package/dist/yunjinKit-lCP6TTRP.js +86 -0
- package/dist/zhongliKit-CTjDWUoW.js +109 -0
- package/dist/zibaiKit-CatYt9BG.js +62 -0
- package/package.json +11 -14
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { t as gainPartyMemberEnergy } from "./gainPartyMemberEnergy-DUbIxe6i.js";
|
|
2
|
+
import { t as getPartyMember } from "./getPartyMember-BAb9wUiz.js";
|
|
3
|
+
import "./KitEventKind-DinObjiq.js";
|
|
4
|
+
import { t as findKitStatus } from "./findKitStatus-Dj_zauGj.js";
|
|
5
|
+
import { t as addKitStatus } from "./addKitStatus-CecgwPmO.js";
|
|
6
|
+
import { t as castKitField } from "./castKitField-BhB1fy3l.js";
|
|
7
|
+
import { castKitSummon, enterKitStance, scheduleKitTask } from "./index.js";
|
|
8
|
+
import { takeOne } from "@esposter/shared";
|
|
9
|
+
// src/services/kit/characters/ayatoKit.ts
|
|
10
|
+
const SOUKAI_KANKA_SECONDS = 6;
|
|
11
|
+
const CONSTELLATION_6_HIT_MULTIPLIER = 4.5;
|
|
12
|
+
const ASCENSION_1 = 1;
|
|
13
|
+
const ASCENSION_1_CAST_STACKS = 2;
|
|
14
|
+
const NAMISEN_STACKS_MAX = 4;
|
|
15
|
+
const CONSTELLATION_1 = 1;
|
|
16
|
+
const CONSTELLATION_1_DAMAGE_BONUS = .4;
|
|
17
|
+
const CONSTELLATION_1_HEALTH_SHARE = .5;
|
|
18
|
+
const CONSTELLATION_2 = 2;
|
|
19
|
+
const CONSTELLATION_2_NAMISEN_STACKS_MAX = 5;
|
|
20
|
+
const CONSTELLATION_6 = 6;
|
|
21
|
+
const HELD_UNTIL_SWAP_SECONDS = Number.POSITIVE_INFINITY;
|
|
22
|
+
const NAMISEN_STATUS_ID = "ayato-namisen";
|
|
23
|
+
const ASCENSION_4 = 4;
|
|
24
|
+
const MICHIYUKU_HAGETSU_ENERGY = 2;
|
|
25
|
+
const MICHIYUKU_HAGETSU_ENERGY_CEILING = 40;
|
|
26
|
+
const MICHIYUKU_HAGETSU_ID = "ayato-michiyuku-hagetsu";
|
|
27
|
+
const CONSTELLATION_6_STATUS_ID = "ayato-constellation-6";
|
|
28
|
+
const countNamisenStacks = (effects, characterId) => findKitStatus(effects, characterId, NAMISEN_STATUS_ID)?.stacks ?? 0;
|
|
29
|
+
const getNamisenStacksMax = (combatant) => combatant.constellationCount >= CONSTELLATION_2 ? CONSTELLATION_2_NAMISEN_STACKS_MAX : NAMISEN_STACKS_MAX;
|
|
30
|
+
const castMichiyukuHagetsu = (kitEffectState, combatant) => {
|
|
31
|
+
castKitField(kitEffectState, combatant.characterId, {
|
|
32
|
+
x: 0,
|
|
33
|
+
z: 0
|
|
34
|
+
}, {
|
|
35
|
+
id: MICHIYUKU_HAGETSU_ID,
|
|
36
|
+
nextTickSeconds: 1,
|
|
37
|
+
onTick: ({ party }) => {
|
|
38
|
+
if (getPartyMember(party, combatant.characterId).energy < MICHIYUKU_HAGETSU_ENERGY_CEILING) gainPartyMemberEnergy(party, combatant, MICHIYUKU_HAGETSU_ENERGY);
|
|
39
|
+
},
|
|
40
|
+
secondsRemaining: Number.POSITIVE_INFINITY,
|
|
41
|
+
tickIntervalSeconds: 1
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
const createAyatoKitBehaviour = ({ kit, readHit, readHitFields, readParameter, readParameters, readSeconds, readSecondsList }) => {
|
|
45
|
+
const namisenShare = readParameter("namisenShare");
|
|
46
|
+
const gardenOfPuritySeconds = readParameter("gardenOfPuritySeconds");
|
|
47
|
+
const bloomwaterBladeFirstTickSeconds = readSeconds("bloomwaterBladeFirstTick");
|
|
48
|
+
const bloomwaterBladeIntervalSeconds = readSeconds("bloomwaterBladeInterval");
|
|
49
|
+
const bloomwaterBlade = readHit("bloomwaterBlade");
|
|
50
|
+
const illusionSeconds = takeOne(kit.elementalSkill.hits).hitmarkSeconds;
|
|
51
|
+
const shunsuikenSeconds = readSeconds("shunsuikenStrike");
|
|
52
|
+
const shunsuikenTargetingArea = takeOne(kit.normalAttacks).targetingArea;
|
|
53
|
+
const shunsuiken = readHitFields("shunsuiken", ["talentMultiplier"]);
|
|
54
|
+
const shunsuikenMultipliers = readParameters("shunsuikenMultipliers");
|
|
55
|
+
const constellation6Hits = Array.from(readSecondsList("boundlessOriginHitmarks"), (hitmarkSeconds) => ({
|
|
56
|
+
...shunsuiken,
|
|
57
|
+
hitmarkSeconds: hitmarkSeconds - shunsuiken.hitmarkSeconds,
|
|
58
|
+
talentMultiplier: CONSTELLATION_6_HIT_MULTIPLIER
|
|
59
|
+
}));
|
|
60
|
+
const createShunsuikenHit = (talentMultiplier, combatant, kitEffectState) => ({
|
|
61
|
+
...shunsuiken,
|
|
62
|
+
additiveBaseDamageBonus: (striker) => striker.attributes.maxHealth * namisenShare * countNamisenStacks(kitEffectState.effects, striker.characterId),
|
|
63
|
+
onStrike: ({ kitEffectState: effectState }, { body }) => {
|
|
64
|
+
const { characterId } = combatant;
|
|
65
|
+
const stacks = countNamisenStacks(effectState.effects, characterId);
|
|
66
|
+
if (stacks < getNamisenStacksMax(combatant)) addKitStatus(effectState, characterId, {
|
|
67
|
+
id: NAMISEN_STATUS_ID,
|
|
68
|
+
secondsRemaining: HELD_UNTIL_SWAP_SECONDS,
|
|
69
|
+
stacks: stacks + 1
|
|
70
|
+
});
|
|
71
|
+
const constellation6 = findKitStatus(effectState.effects, characterId, CONSTELLATION_6_STATUS_ID);
|
|
72
|
+
if (!constellation6) return;
|
|
73
|
+
constellation6.secondsRemaining = 0;
|
|
74
|
+
castKitSummon(effectState, body, combatant, constellation6Hits, { attackTag: "NormalAttack" });
|
|
75
|
+
},
|
|
76
|
+
talentMultiplier
|
|
77
|
+
});
|
|
78
|
+
const castGardenOfPurity = (kitEffectState, { facing, height, position }, combatant) => {
|
|
79
|
+
const gardenOfPurity = castKitField(kitEffectState, combatant.characterId, position, {
|
|
80
|
+
isFollowing: true,
|
|
81
|
+
nextTickSeconds: bloomwaterBladeFirstTickSeconds,
|
|
82
|
+
onTick: ({ kitEffectState: tickKitEffectState }) => castKitSummon(tickKitEffectState, {
|
|
83
|
+
facing,
|
|
84
|
+
height,
|
|
85
|
+
position: gardenOfPurity.centre
|
|
86
|
+
}, combatant, [bloomwaterBlade], { attackTag: "ElementalBurst" }),
|
|
87
|
+
secondsRemaining: bloomwaterBladeFirstTickSeconds + gardenOfPuritySeconds,
|
|
88
|
+
tickIntervalSeconds: bloomwaterBladeIntervalSeconds
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
return {
|
|
92
|
+
burst: { onStart: ({ activeCombatant: combatant, body, kitEffectState }) => castGardenOfPurity(kitEffectState, body, combatant) },
|
|
93
|
+
getStrikeDamageBonus: ({ attackTag, combatant }, enemy) => combatant.constellationCount >= CONSTELLATION_1 && attackTag === "NormalAttack" && enemy.health / enemy.maxHealth <= CONSTELLATION_1_HEALTH_SHARE ? CONSTELLATION_1_DAMAGE_BONUS : 0,
|
|
94
|
+
onKitEvent: (event, { kitEffectState }, combatant) => {
|
|
95
|
+
if (event.kind !== "CharacterSwapped") return;
|
|
96
|
+
if (event.characterId === combatant.characterId) {
|
|
97
|
+
for (const effect of kitEffectState.effects) if (effect.kind === "field" && effect.id === MICHIYUKU_HAGETSU_ID) effect.secondsRemaining = 0;
|
|
98
|
+
}
|
|
99
|
+
if (event.previousCharacterId !== combatant.characterId) return;
|
|
100
|
+
const namisen = findKitStatus(kitEffectState.effects, combatant.characterId, NAMISEN_STATUS_ID);
|
|
101
|
+
if (namisen) namisen.secondsRemaining = 0;
|
|
102
|
+
if (combatant.ascension >= ASCENSION_4) castMichiyukuHagetsu(kitEffectState, combatant);
|
|
103
|
+
},
|
|
104
|
+
skill: { onStart: ({ activeCombatant: combatant, kitEffectState }) => {
|
|
105
|
+
const { characterId } = combatant;
|
|
106
|
+
if (combatant.ascension >= ASCENSION_1) {
|
|
107
|
+
addKitStatus(kitEffectState, characterId, {
|
|
108
|
+
id: NAMISEN_STATUS_ID,
|
|
109
|
+
secondsRemaining: HELD_UNTIL_SWAP_SECONDS,
|
|
110
|
+
stacks: ASCENSION_1_CAST_STACKS
|
|
111
|
+
});
|
|
112
|
+
scheduleKitTask(kitEffectState, characterId, illusionSeconds, ({ kitEffectState: effectState }) => addKitStatus(effectState, characterId, {
|
|
113
|
+
id: NAMISEN_STATUS_ID,
|
|
114
|
+
secondsRemaining: HELD_UNTIL_SWAP_SECONDS,
|
|
115
|
+
stacks: getNamisenStacksMax(combatant)
|
|
116
|
+
}));
|
|
117
|
+
}
|
|
118
|
+
if (combatant.constellationCount >= CONSTELLATION_6) addKitStatus(kitEffectState, characterId, {
|
|
119
|
+
id: CONSTELLATION_6_STATUS_ID,
|
|
120
|
+
secondsRemaining: HELD_UNTIL_SWAP_SECONDS
|
|
121
|
+
});
|
|
122
|
+
enterKitStance(kitEffectState, combatant, {
|
|
123
|
+
chargedAttack: kit.chargedAttack,
|
|
124
|
+
chargedAttackStamina: kit.chargedAttackStamina,
|
|
125
|
+
elementalBurst: kit.elementalBurst,
|
|
126
|
+
elementalSkill: kit.elementalSkill,
|
|
127
|
+
normalAttacks: shunsuikenMultipliers.map((talentMultiplier) => ({
|
|
128
|
+
hits: [createShunsuikenHit(talentMultiplier, combatant, kitEffectState)],
|
|
129
|
+
seconds: shunsuikenSeconds,
|
|
130
|
+
targetingArea: shunsuikenTargetingArea
|
|
131
|
+
}))
|
|
132
|
+
}, SOUKAI_KANKA_SECONDS, { isEndedOnSwap: true });
|
|
133
|
+
} }
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
export { createAyatoKitBehaviour };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import "./GameDataset-oS0Tc9KV.js";
|
|
2
|
+
import { t as getPartyMember } from "./getPartyMember-BAb9wUiz.js";
|
|
3
|
+
import "./KitEventKind-DinObjiq.js";
|
|
4
|
+
import { t as castKitField } from "./castKitField-BhB1fy3l.js";
|
|
5
|
+
import { t as getActiveCharacterId } from "./getActiveCharacterId-D9TtVSWj.js";
|
|
6
|
+
import { buffKitTeam, castKitShield, createConstellationSkillChargeBonus, getKitHitElement, getKitMaxHealth, queueKitPassiveHit, startKitCooldown } from "./index.js";
|
|
7
|
+
// src/services/kit/characters/baizhuKit.ts
|
|
8
|
+
const FIVE_FORTUNES_FOREVER_ASCENSION = 1;
|
|
9
|
+
const FIVE_FORTUNES_FOREVER_HEALTH_SHARE = .5;
|
|
10
|
+
const FIVE_FORTUNES_FOREVER_DENDRO_DAMAGE_BONUS = .25;
|
|
11
|
+
const CONSTELLATION_2 = 2;
|
|
12
|
+
const CONSTELLATION_2_COOLDOWN_SECONDS = 5;
|
|
13
|
+
const CONSTELLATION_2_COOLDOWN_STATUS_ID = "baizhu-constellation-2-cooldown";
|
|
14
|
+
const CONSTELLATION_2_MULTIPLIER = 2.5;
|
|
15
|
+
const CONSTELLATION_2_RADIUS = .6;
|
|
16
|
+
const CONSTELLATION_1 = 1;
|
|
17
|
+
const CONSTELLATION_4 = 4;
|
|
18
|
+
const CONSTELLATION_4_ELEMENTAL_MASTERY = 80;
|
|
19
|
+
const CONSTELLATION_4_SECONDS = 15;
|
|
20
|
+
const CONSTELLATION_4_SOURCE = "baizhu-ancient-art-of-perception";
|
|
21
|
+
const gossamerSpliceHit = {
|
|
22
|
+
attackTag: "ElementalSkill",
|
|
23
|
+
element: "Grass",
|
|
24
|
+
hitArea: {
|
|
25
|
+
angle: 2 * Math.PI,
|
|
26
|
+
height: 2,
|
|
27
|
+
radius: CONSTELLATION_2_RADIUS
|
|
28
|
+
},
|
|
29
|
+
hitmarkSeconds: 0,
|
|
30
|
+
poiseDamage: 0,
|
|
31
|
+
talentMultiplier: CONSTELLATION_2_MULTIPLIER
|
|
32
|
+
};
|
|
33
|
+
const createBaizhuKitBehaviour = ({ readHit, readParameter, readSeconds }) => {
|
|
34
|
+
const shieldMaxHealthShare = readParameter("seamlessShieldMaxHealthShare");
|
|
35
|
+
const shieldFlatHealth = readParameter("seamlessShieldFlatHealth");
|
|
36
|
+
const firstShieldSeconds = readSeconds("firstSeamlessShield");
|
|
37
|
+
const shieldSeconds = readSeconds("seamlessShield");
|
|
38
|
+
const firstRefreshSeconds = readSeconds("firstSeamlessShieldRefresh");
|
|
39
|
+
const refreshIntervalSeconds = readSeconds("seamlessShieldRefreshInterval");
|
|
40
|
+
const refreshFieldSeconds = readSeconds("seamlessShieldRefreshField");
|
|
41
|
+
const spiritvein = readHit("spiritvein");
|
|
42
|
+
const castShield = (context, combatant, secondsRemaining) => {
|
|
43
|
+
const { characterIdCombatantMap, kitEffectState, party } = context;
|
|
44
|
+
return castKitShield(context, combatant.characterId, {
|
|
45
|
+
element: "Grass",
|
|
46
|
+
explosion: {
|
|
47
|
+
combatant,
|
|
48
|
+
hit: spiritvein
|
|
49
|
+
},
|
|
50
|
+
health: shieldMaxHealthShare * getKitMaxHealth(combatant, kitEffectState.effects, party, characterIdCombatantMap) + shieldFlatHealth,
|
|
51
|
+
secondsRemaining
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
return {
|
|
55
|
+
burst: { onStart: (context) => {
|
|
56
|
+
const { activeCombatant: combatant, body, kitEffectState, party } = context;
|
|
57
|
+
castShield(context, combatant, firstShieldSeconds);
|
|
58
|
+
if (combatant.constellationCount >= CONSTELLATION_4) buffKitTeam(kitEffectState, party, {
|
|
59
|
+
amount: CONSTELLATION_4_ELEMENTAL_MASTERY,
|
|
60
|
+
attribute: "FIGHT_PROP_ELEMENT_MASTERY",
|
|
61
|
+
secondsRemaining: CONSTELLATION_4_SECONDS,
|
|
62
|
+
source: CONSTELLATION_4_SOURCE
|
|
63
|
+
});
|
|
64
|
+
castKitField(kitEffectState, combatant.characterId, body.position, {
|
|
65
|
+
nextTickSeconds: firstRefreshSeconds,
|
|
66
|
+
onTick: (tick) => castShield(tick, combatant, shieldSeconds),
|
|
67
|
+
secondsRemaining: refreshFieldSeconds,
|
|
68
|
+
tickIntervalSeconds: refreshIntervalSeconds
|
|
69
|
+
});
|
|
70
|
+
} },
|
|
71
|
+
getSkillChargeBonus: createConstellationSkillChargeBonus(CONSTELLATION_1),
|
|
72
|
+
getStrikeDamageBonus: ({ combatant, hit }, _enemy, party) => combatant.ascension >= FIVE_FORTUNES_FOREVER_ASCENSION && getKitHitElement(hit, combatant) === "Grass" && getPartyMember(party, getActiveCharacterId(party)).healthShare >= FIVE_FORTUNES_FOREVER_HEALTH_SHARE ? FIVE_FORTUNES_FOREVER_DENDRO_DAMAGE_BONUS : 0,
|
|
73
|
+
onKitEvent: (event, context, combatant) => {
|
|
74
|
+
if (event.kind !== "DamageTaken" || combatant.constellationCount < CONSTELLATION_2) return;
|
|
75
|
+
if (event.striker.characterId !== context.activeCombatant.characterId) return;
|
|
76
|
+
if (!startKitCooldown(context.kitEffectState, combatant.characterId, CONSTELLATION_2_COOLDOWN_STATUS_ID, CONSTELLATION_2_COOLDOWN_SECONDS)) return;
|
|
77
|
+
queueKitPassiveHit(context, combatant, gossamerSpliceHit, event.enemy);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
export { createBaizhuKitBehaviour };
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import "./GameDataset-oS0Tc9KV.js";
|
|
2
|
+
import { t as gainPartyMemberEnergy } from "./gainPartyMemberEnergy-DUbIxe6i.js";
|
|
3
|
+
import { t as getDeployedCharacterIds } from "./getDeployedCharacterIds-TuIRCNKb.js";
|
|
4
|
+
import { t as getPartyMember } from "./getPartyMember-BAb9wUiz.js";
|
|
5
|
+
import "./KitEventKind-DinObjiq.js";
|
|
6
|
+
import { t as findKitStatus } from "./findKitStatus-Dj_zauGj.js";
|
|
7
|
+
import { t as addKitStatus } from "./addKitStatus-CecgwPmO.js";
|
|
8
|
+
import { t as castKitField } from "./castKitField-BhB1fy3l.js";
|
|
9
|
+
import { buffKitMember, castKitSummon, changeKitMemberHealth, getKitMaxHealth, scheduleKitTask, startKitCooldown } from "./index.js";
|
|
10
|
+
// src/services/kit/characters/barbaraKit.ts
|
|
11
|
+
const MELODY_LOOP_TICK_INTERVAL_SECONDS = 5;
|
|
12
|
+
const ASCENSION_4 = 4;
|
|
13
|
+
const ENCORE_MAX_EXTENSION_SECONDS = 5;
|
|
14
|
+
const ENCORE_SECONDS_PER_PARTICLE = 1;
|
|
15
|
+
const ENCORE_STATUS_ID = "barbara-encore";
|
|
16
|
+
const VITALITY_BURST_CONSTELLATION = 2;
|
|
17
|
+
const VITALITY_BURST_COOLDOWN_MULTIPLIER = .85;
|
|
18
|
+
const VITALITY_BURST_HYDRO_DAMAGE_BONUS = .15;
|
|
19
|
+
const DEDICATING_EVERYTHING_TO_YOU_CONSTELLATION = 6;
|
|
20
|
+
const DEDICATING_EVERYTHING_TO_YOU_COOLDOWN_SECONDS = 900;
|
|
21
|
+
const DEDICATING_EVERYTHING_TO_YOU_HEALTH_SHARE = 1;
|
|
22
|
+
const DEDICATING_EVERYTHING_TO_YOU_STATUS_ID = "barbara-dedicating-everything-to-you";
|
|
23
|
+
const GLEEFUL_SONGS_CONSTELLATION = 1;
|
|
24
|
+
const GLEEFUL_SONGS_ENERGY = 1;
|
|
25
|
+
const GLEEFUL_SONGS_SECONDS = 10;
|
|
26
|
+
const GLEEFUL_SONGS_STATUS_ID = "barbara-gleeful-songs";
|
|
27
|
+
const ATTENTIVENESS_CONSTELLATION = 4;
|
|
28
|
+
const ATTENTIVENESS_ENERGY = 1;
|
|
29
|
+
const ATTENTIVENESS_MAX_ENERGY = 5;
|
|
30
|
+
const findLiveMelodyLoop = (striker, effects) => effects.find((effect) => effect.kind === "field" && effect.characterId === striker.characterId && effect.tickIntervalSeconds === MELODY_LOOP_TICK_INTERVAL_SECONDS && effect.secondsRemaining > 0);
|
|
31
|
+
const checkIsMelodyLoopLive = (striker, effects) => findLiveMelodyLoop(striker, effects) !== void 0;
|
|
32
|
+
const createMelodyLoopTick = (owner, regenerationHeal, loopSeconds) => (context, tickIndex) => {
|
|
33
|
+
const { activeCombatant, kitEffectState, party } = context;
|
|
34
|
+
changeKitMemberHealth(context, owner, activeCombatant.characterId, regenerationHeal);
|
|
35
|
+
if (tickIndex > 0 || owner.constellationCount < VITALITY_BURST_CONSTELLATION) return;
|
|
36
|
+
for (const characterId of getDeployedCharacterIds(party)) if (characterId !== owner.characterId) buffKitMember(kitEffectState, characterId, {
|
|
37
|
+
amount: VITALITY_BURST_HYDRO_DAMAGE_BONUS,
|
|
38
|
+
attribute: "FIGHT_PROP_WATER_ADD_HURT",
|
|
39
|
+
secondsRemaining: loopSeconds
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
const createBarbaraKitBehaviour = ({ readHits, readParameter, readSeconds }) => {
|
|
43
|
+
const regenerationHealthShare = readParameter("regenerationHealthShare");
|
|
44
|
+
const regenerationFlatHeal = readParameter("regenerationFlatHeal");
|
|
45
|
+
const melodyLoopSeconds = readParameter("melodyLoopSeconds") + readSeconds("melodyLoopExtension");
|
|
46
|
+
const melodyLoopStartSeconds = readSeconds("melodyLoopStart");
|
|
47
|
+
const droplets = readHits("droplet");
|
|
48
|
+
const burstHealthShare = readParameter("burstHealthShare");
|
|
49
|
+
const burstFlatHeal = readParameter("burstFlatHeal");
|
|
50
|
+
const shiningMiracleHealSeconds = readSeconds("shiningMiracleHeal");
|
|
51
|
+
const melodyLoopHealBehaviour = { healPartyChance: (striker, effects) => checkIsMelodyLoopLive(striker, effects) ? 1 : 0 };
|
|
52
|
+
const strikeBehaviour = { hits: [melodyLoopHealBehaviour] };
|
|
53
|
+
let attentivenessEnergy = 0;
|
|
54
|
+
return {
|
|
55
|
+
burst: { onStart: ({ activeCombatant: combatant, characterIdCombatantMap, kitEffectState, party }) => {
|
|
56
|
+
const burstHeal = burstFlatHeal + burstHealthShare * getKitMaxHealth(combatant, kitEffectState.effects, party, characterIdCombatantMap);
|
|
57
|
+
scheduleKitTask(kitEffectState, combatant.characterId, shiningMiracleHealSeconds, (tick) => changeKitMemberHealth(tick, combatant, tick.activeCombatant.characterId, burstHeal));
|
|
58
|
+
} },
|
|
59
|
+
chargedAttack: {
|
|
60
|
+
hits: [{
|
|
61
|
+
...melodyLoopHealBehaviour,
|
|
62
|
+
onStrike: ({ party }, { combatant }) => {
|
|
63
|
+
if (combatant.constellationCount < ATTENTIVENESS_CONSTELLATION || attentivenessEnergy >= ATTENTIVENESS_MAX_ENERGY) return;
|
|
64
|
+
gainPartyMemberEnergy(party, combatant, ATTENTIVENESS_ENERGY);
|
|
65
|
+
attentivenessEnergy += ATTENTIVENESS_ENERGY;
|
|
66
|
+
}
|
|
67
|
+
}],
|
|
68
|
+
onStart: () => {
|
|
69
|
+
attentivenessEnergy = 0;
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
getSkillCooldownMultiplier: ({ activeCombatant: combatant }) => combatant.constellationCount >= VITALITY_BURST_CONSTELLATION ? VITALITY_BURST_COOLDOWN_MULTIPLIER : 1,
|
|
73
|
+
normalAttacks: [
|
|
74
|
+
strikeBehaviour,
|
|
75
|
+
strikeBehaviour,
|
|
76
|
+
strikeBehaviour,
|
|
77
|
+
strikeBehaviour
|
|
78
|
+
],
|
|
79
|
+
onKitEvent: (event, { activeCombatant, kitEffectState, party }, combatant) => {
|
|
80
|
+
if (event.kind === "EffectExpired" && event.effect.kind === "status" && event.effect.id === GLEEFUL_SONGS_STATUS_ID && event.effect.characterId === combatant.characterId) gainPartyMemberEnergy(party, combatant, GLEEFUL_SONGS_ENERGY);
|
|
81
|
+
if (event.kind === "EnergyParticleCollected" && combatant.ascension >= ASCENSION_4) {
|
|
82
|
+
const melodyLoop = findLiveMelodyLoop(combatant, kitEffectState.effects);
|
|
83
|
+
const encore = findKitStatus(kitEffectState.effects, combatant.characterId, ENCORE_STATUS_ID);
|
|
84
|
+
if (melodyLoop && encore) {
|
|
85
|
+
const encoreSeconds = encore.stacks ?? 0;
|
|
86
|
+
const extensionSeconds = Math.min(event.count * ENCORE_SECONDS_PER_PARTICLE, ENCORE_MAX_EXTENSION_SECONDS - encoreSeconds);
|
|
87
|
+
melodyLoop.secondsRemaining += extensionSeconds;
|
|
88
|
+
encore.secondsRemaining += extensionSeconds;
|
|
89
|
+
encore.stacks = encoreSeconds + extensionSeconds;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
if (event.kind === "HealthChanged" && combatant.constellationCount >= DEDICATING_EVERYTHING_TO_YOU_CONSTELLATION && activeCombatant.characterId !== combatant.characterId && getDeployedCharacterIds(party).includes(event.characterId) && getPartyMember(party, event.characterId).healthShare === 0 && startKitCooldown(kitEffectState, combatant.characterId, DEDICATING_EVERYTHING_TO_YOU_STATUS_ID, DEDICATING_EVERYTHING_TO_YOU_COOLDOWN_SECONDS)) getPartyMember(party, event.characterId).healthShare = DEDICATING_EVERYTHING_TO_YOU_HEALTH_SHARE;
|
|
93
|
+
},
|
|
94
|
+
onStep: ({ kitEffectState }, combatant) => {
|
|
95
|
+
if (combatant.constellationCount < GLEEFUL_SONGS_CONSTELLATION || findKitStatus(kitEffectState.effects, combatant.characterId, GLEEFUL_SONGS_STATUS_ID)) return;
|
|
96
|
+
addKitStatus(kitEffectState, combatant.characterId, {
|
|
97
|
+
id: GLEEFUL_SONGS_STATUS_ID,
|
|
98
|
+
secondsRemaining: GLEEFUL_SONGS_SECONDS
|
|
99
|
+
});
|
|
100
|
+
},
|
|
101
|
+
skill: { onStart: ({ activeCombatant: combatant, body: { facing, height, position }, characterIdCombatantMap, kitEffectState, party }) => {
|
|
102
|
+
castKitSummon(kitEffectState, {
|
|
103
|
+
facing,
|
|
104
|
+
height,
|
|
105
|
+
position
|
|
106
|
+
}, combatant, droplets, { attackTag: "ElementalSkill" });
|
|
107
|
+
if (combatant.ascension >= ASCENSION_4) addKitStatus(kitEffectState, combatant.characterId, {
|
|
108
|
+
id: ENCORE_STATUS_ID,
|
|
109
|
+
secondsRemaining: melodyLoopStartSeconds + melodyLoopSeconds,
|
|
110
|
+
stacks: 0
|
|
111
|
+
});
|
|
112
|
+
const regenerationHeal = regenerationFlatHeal + regenerationHealthShare * getKitMaxHealth(combatant, kitEffectState.effects, party, characterIdCombatantMap);
|
|
113
|
+
castKitField(kitEffectState, combatant.characterId, position, {
|
|
114
|
+
nextTickSeconds: melodyLoopStartSeconds,
|
|
115
|
+
onTick: createMelodyLoopTick(combatant, regenerationHeal, melodyLoopSeconds),
|
|
116
|
+
secondsRemaining: melodyLoopStartSeconds + melodyLoopSeconds,
|
|
117
|
+
tickIntervalSeconds: MELODY_LOOP_TICK_INTERVAL_SECONDS
|
|
118
|
+
});
|
|
119
|
+
} }
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
export { createBarbaraKitBehaviour };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import "./GameDataset-oS0Tc9KV.js";
|
|
2
|
+
import "./KitEventKind-DinObjiq.js";
|
|
3
|
+
import { t as addKitStatus } from "./addKitStatus-CecgwPmO.js";
|
|
4
|
+
import { castKitShield, castKitSummon, checkIsKitStatusActive, getKitMaxHealth } from "./index.js";
|
|
5
|
+
import { takeOne } from "@esposter/shared";
|
|
6
|
+
// src/services/kit/characters/beidouKit.ts
|
|
7
|
+
const DISCHARGE_INTERVAL_SECONDS = 1;
|
|
8
|
+
const BANE_OF_EVIL_CONSTELLATION = 6;
|
|
9
|
+
const CONSTELLATION_4 = 4;
|
|
10
|
+
const CONSTELLATION_4_STATUS_ID = "beidou-constellation-4";
|
|
11
|
+
const CONSTELLATION_4_SECONDS = 10;
|
|
12
|
+
const CONSTELLATION_4_DAMAGE_MULTIPLIER = .2;
|
|
13
|
+
const CONSTELLATION_4_POISE_DAMAGE = 30;
|
|
14
|
+
const checkIsTargeStanding = (effect, characterId, seconds) => effect.kind === "summon" && effect.isFollowing === true && effect.combatant.characterId === characterId && effect.secondsRemaining >= seconds;
|
|
15
|
+
const createBeidouKitBehaviour = ({ kit, readHitFields, readHits, readParameter, readSeconds }) => {
|
|
16
|
+
const targeSeconds = readParameter("thunderbeastsTargeSeconds");
|
|
17
|
+
const shieldMaxHealthShare = readParameter("tidecallerShieldMaxHealthShare");
|
|
18
|
+
const shieldFlatHealth = readParameter("tidecallerShieldFlatHealth");
|
|
19
|
+
const tidecallerHitmarkSeconds = takeOne(kit.elementalSkill.hits).hitmarkSeconds;
|
|
20
|
+
const baneOfEvilStatus = {
|
|
21
|
+
damageTakenBonus: 0,
|
|
22
|
+
id: "beidou-bane-of-evil",
|
|
23
|
+
resistanceReduction: { ["Electric"]: .15 },
|
|
24
|
+
secondsRemaining: readSeconds("baneOfEvil")
|
|
25
|
+
};
|
|
26
|
+
const baneOfEvilTicks = readHits("baneOfEvilTicks", { enemyStatus: () => baneOfEvilStatus });
|
|
27
|
+
const lightningDischargeFields = readHitFields("lightningDischarge", ["hitArea"]);
|
|
28
|
+
const chargedAttackHits = kit.chargedAttack.hits;
|
|
29
|
+
const hitDischargeMap = new Map([...kit.normalAttacks.flatMap(({ hits }) => hits), ...chargedAttackHits].map((hit) => [hit, {
|
|
30
|
+
...lightningDischargeFields,
|
|
31
|
+
hitArea: hit.hitArea,
|
|
32
|
+
hitmarkSeconds: hit.hitmarkSeconds + lightningDischargeFields.hitmarkSeconds
|
|
33
|
+
}]));
|
|
34
|
+
const dischargeHits = new Set(hitDischargeMap.values());
|
|
35
|
+
const castDischarges = ({ facing, height, position }, combatant, kitEffectState, hits) => {
|
|
36
|
+
for (const hit of hits) {
|
|
37
|
+
const discharge = hitDischargeMap.get(hit);
|
|
38
|
+
const { effects } = kitEffectState;
|
|
39
|
+
if (discharge === void 0 || !effects.some((effect) => checkIsTargeStanding(effect, combatant.characterId, hit.hitmarkSeconds)) || effects.some((effect) => effect.kind === "summon" && effect.secondsRemaining > hit.hitmarkSeconds && effect.hits.some((summonHit) => dischargeHits.has(summonHit)))) continue;
|
|
40
|
+
castKitSummon(kitEffectState, {
|
|
41
|
+
facing,
|
|
42
|
+
height,
|
|
43
|
+
position
|
|
44
|
+
}, combatant, [discharge], {
|
|
45
|
+
attackTag: "ElementalBurst",
|
|
46
|
+
secondsRemaining: hit.hitmarkSeconds + DISCHARGE_INTERVAL_SECONDS
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
return {
|
|
51
|
+
burst: { onStart: ({ activeCombatant: combatant, body: { facing, height, position }, kitEffectState }) => castKitSummon(kitEffectState, {
|
|
52
|
+
facing,
|
|
53
|
+
height,
|
|
54
|
+
position
|
|
55
|
+
}, combatant, combatant.constellationCount >= BANE_OF_EVIL_CONSTELLATION ? baneOfEvilTicks : [], {
|
|
56
|
+
isFollowing: true,
|
|
57
|
+
secondsRemaining: targeSeconds
|
|
58
|
+
}) },
|
|
59
|
+
chargedAttack: { onStart: ({ activeCombatant: combatant, body, kitEffectState }) => castDischarges(body, combatant, kitEffectState, chargedAttackHits) },
|
|
60
|
+
getNormalAttackExtraHit: ({ activeCombatant, kitEffectState }, hit) => activeCombatant.constellationCount >= CONSTELLATION_4 && checkIsKitStatusActive(kitEffectState.effects, activeCombatant.characterId, CONSTELLATION_4_STATUS_ID) ? {
|
|
61
|
+
element: "Electric",
|
|
62
|
+
gauge: 1,
|
|
63
|
+
hitArea: hit.hitArea,
|
|
64
|
+
hitmarkSeconds: hit.hitmarkSeconds,
|
|
65
|
+
internalCooldownTag: "ElementalBurst",
|
|
66
|
+
poiseDamage: CONSTELLATION_4_POISE_DAMAGE,
|
|
67
|
+
talentMultiplier: CONSTELLATION_4_DAMAGE_MULTIPLIER
|
|
68
|
+
} : void 0,
|
|
69
|
+
normalAttacks: kit.normalAttacks.map(({ hits }) => ({ onStart: ({ activeCombatant: combatant, body, kitEffectState }) => castDischarges(body, combatant, kitEffectState, hits) })),
|
|
70
|
+
onKitEvent: (event, { activeCombatant, kitEffectState }, combatant) => {
|
|
71
|
+
if (event.kind !== "HealthChanged" || combatant.constellationCount < CONSTELLATION_4) return;
|
|
72
|
+
const { characterId } = combatant;
|
|
73
|
+
if (event.characterId !== characterId || event.healthShare >= 0 || event.sourceCharacterId !== void 0 || activeCombatant.characterId !== characterId) return;
|
|
74
|
+
addKitStatus(kitEffectState, characterId, {
|
|
75
|
+
id: CONSTELLATION_4_STATUS_ID,
|
|
76
|
+
secondsRemaining: CONSTELLATION_4_SECONDS
|
|
77
|
+
});
|
|
78
|
+
},
|
|
79
|
+
skill: { onStart: (context) => {
|
|
80
|
+
const { activeCombatant: combatant, characterIdCombatantMap, kitEffectState, party } = context;
|
|
81
|
+
castKitShield(context, combatant.characterId, {
|
|
82
|
+
element: "Electric",
|
|
83
|
+
health: shieldMaxHealthShare * getKitMaxHealth(combatant, kitEffectState.effects, party, characterIdCombatantMap) + shieldFlatHealth,
|
|
84
|
+
secondsRemaining: tidecallerHitmarkSeconds
|
|
85
|
+
});
|
|
86
|
+
} }
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
export { createBeidouKitBehaviour };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import "./GameDataset-oS0Tc9KV.js";
|
|
2
|
+
import { t as getPartyMember } from "./getPartyMember-BAb9wUiz.js";
|
|
3
|
+
import { t as addKitEffect } from "./addKitEffect-DEhZUuxo.js";
|
|
4
|
+
import { m as MELEE_WEAPON_TYPES } from "./constants-BIXoNz1x.js";
|
|
5
|
+
import { t as castKitField } from "./castKitField-BhB1fy3l.js";
|
|
6
|
+
import { buffKitMember, changeKitMemberHealth, checkIsInKitField, getKitMaxHealth } from "./index.js";
|
|
7
|
+
// src/services/kit/characters/bennettKit.ts
|
|
8
|
+
const BENNETT_FIELD_TICK_INTERVAL_SECONDS = 1;
|
|
9
|
+
const BENNETT_FIELD_RADIUS = 6;
|
|
10
|
+
const BENNETT_FIELD_HP_THRESHOLD = .7;
|
|
11
|
+
const GRAND_EXPECTATION_CONSTELLATION = 1;
|
|
12
|
+
const GRAND_EXPECTATION_BASE_ATTACK_SHARE = .2;
|
|
13
|
+
const FIRE_VENTURES_WITH_ME_CONSTELLATION = 6;
|
|
14
|
+
const FIRE_VENTURES_PYRO_DAMAGE_BONUS = .15;
|
|
15
|
+
const checkIsFearnaughtActive = ({ activeCombatant: combatant, body, kitEffectState }) => combatant.ascension >= 4 && kitEffectState.effects.some((effect) => effect.kind === "field" && effect.characterId === combatant.characterId && checkIsInKitField(effect, body.position));
|
|
16
|
+
const getSkillCooldownMultiplier = (context) => {
|
|
17
|
+
let multiplier = 1;
|
|
18
|
+
if (context.activeCombatant.ascension >= 1) multiplier *= .8;
|
|
19
|
+
if (checkIsFearnaughtActive(context)) multiplier *= .5;
|
|
20
|
+
return multiplier;
|
|
21
|
+
};
|
|
22
|
+
const IMPASSE_CONQUEROR_CONSTELLATION = 2;
|
|
23
|
+
const IMPASSE_CONQUEROR_ENERGY_RECHARGE = .3;
|
|
24
|
+
const IMPASSE_CONQUEROR_HP_THRESHOLD = .7;
|
|
25
|
+
const getPassiveBonuses = (combatant, healthShare) => combatant.constellationCount >= IMPASSE_CONQUEROR_CONSTELLATION && healthShare < IMPASSE_CONQUEROR_HP_THRESHOLD ? [{
|
|
26
|
+
amount: IMPASSE_CONQUEROR_ENERGY_RECHARGE,
|
|
27
|
+
attribute: "FIGHT_PROP_CHARGE_EFFICIENCY"
|
|
28
|
+
}] : [];
|
|
29
|
+
const createBennettKitBehaviour = ({ readParameter, readSeconds }) => {
|
|
30
|
+
const fieldFlatHeal = readParameter("fantasticVoyageFlatHeal");
|
|
31
|
+
const fieldMaxHealthHealShare = readParameter("fantasticVoyageMaxHealthHealShare");
|
|
32
|
+
const fieldBaseAttackShare = readParameter("fantasticVoyageBaseAttackShare");
|
|
33
|
+
const fieldSeconds = readParameter("fantasticVoyageFieldSeconds");
|
|
34
|
+
const fieldStartSeconds = readSeconds("fantasticVoyageFieldStart");
|
|
35
|
+
const fieldFirstTickSeconds = readSeconds("fantasticVoyageFieldFirstTick");
|
|
36
|
+
const fieldBuffSeconds = readSeconds("fantasticVoyageFieldBuff");
|
|
37
|
+
const createFieldTick = (owner) => (context, tickIndex) => {
|
|
38
|
+
const { activeCombatant, characterIdCombatantMap, kitEffectState, party } = context;
|
|
39
|
+
const { characterId, weaponType } = activeCombatant;
|
|
40
|
+
const { healthShare } = getPartyMember(party, characterId);
|
|
41
|
+
if (tickIndex > 0 && healthShare < BENNETT_FIELD_HP_THRESHOLD) changeKitMemberHealth(context, owner, characterId, fieldFlatHeal + fieldMaxHealthHealShare * getKitMaxHealth(owner, kitEffectState.effects, party, characterIdCombatantMap));
|
|
42
|
+
const hasGrandExpectation = owner.constellationCount >= GRAND_EXPECTATION_CONSTELLATION;
|
|
43
|
+
if (healthShare <= (hasGrandExpectation ? 0 : BENNETT_FIELD_HP_THRESHOLD)) return;
|
|
44
|
+
buffKitMember(kitEffectState, characterId, {
|
|
45
|
+
amount: (fieldBaseAttackShare + (hasGrandExpectation ? GRAND_EXPECTATION_BASE_ATTACK_SHARE : 0)) * owner.attributes.attributeTotalMap["FIGHT_PROP_BASE_ATTACK"],
|
|
46
|
+
attribute: "FIGHT_PROP_ATTACK",
|
|
47
|
+
secondsRemaining: fieldBuffSeconds
|
|
48
|
+
});
|
|
49
|
+
if (owner.constellationCount < FIRE_VENTURES_WITH_ME_CONSTELLATION) return;
|
|
50
|
+
buffKitMember(kitEffectState, characterId, {
|
|
51
|
+
amount: FIRE_VENTURES_PYRO_DAMAGE_BONUS,
|
|
52
|
+
attribute: "FIGHT_PROP_FIRE_ADD_HURT",
|
|
53
|
+
secondsRemaining: fieldBuffSeconds
|
|
54
|
+
});
|
|
55
|
+
if (weaponType !== void 0 && MELEE_WEAPON_TYPES.has(weaponType)) addKitEffect(kitEffectState, {
|
|
56
|
+
characterId,
|
|
57
|
+
element: "Fire",
|
|
58
|
+
kind: "infusion",
|
|
59
|
+
secondsRemaining: fieldBuffSeconds
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
return {
|
|
63
|
+
burst: { onStart: ({ activeCombatant: combatant, body, kitEffectState }) => castKitField(kitEffectState, combatant.characterId, body.position, {
|
|
64
|
+
nextTickSeconds: fieldFirstTickSeconds,
|
|
65
|
+
onTick: createFieldTick(combatant),
|
|
66
|
+
radius: BENNETT_FIELD_RADIUS,
|
|
67
|
+
secondsRemaining: fieldSeconds + fieldStartSeconds,
|
|
68
|
+
tickIntervalSeconds: BENNETT_FIELD_TICK_INTERVAL_SECONDS
|
|
69
|
+
}) },
|
|
70
|
+
getPassiveBonuses,
|
|
71
|
+
getSkillCooldownMultiplier,
|
|
72
|
+
skillHolds: [{}, { variant: { checkIsActive: checkIsFearnaughtActive } }]
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
export { createBennettKitBehaviour };
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import "./GameDataset-oS0Tc9KV.js";
|
|
2
|
+
import "./KitEventKind-DinObjiq.js";
|
|
3
|
+
import { t as addKitEffect } from "./addKitEffect-DEhZUuxo.js";
|
|
4
|
+
import { t as findKitStatus } from "./findKitStatus-Dj_zauGj.js";
|
|
5
|
+
import { m as MELEE_WEAPON_TYPES } from "./constants-BIXoNz1x.js";
|
|
6
|
+
import { t as addKitStatus } from "./addKitStatus-CecgwPmO.js";
|
|
7
|
+
import { t as castKitField } from "./castKitField-BhB1fy3l.js";
|
|
8
|
+
import { castKitShield, castKitSummon, checkIsStrikeOn, completeKitSkillCharge, getKitHitElement, getKitMaxHealth, startKitCooldown } from "./index.js";
|
|
9
|
+
import { takeOne } from "@esposter/shared";
|
|
10
|
+
// src/services/kit/characters/candaceKit.ts
|
|
11
|
+
const INFUSION_SECONDS = 1;
|
|
12
|
+
const PRAYER_FIELD_ID = "candace-prayer";
|
|
13
|
+
const WAVES_STATUS_ID = "candace-waves";
|
|
14
|
+
const CONSTELLATION_1 = 1;
|
|
15
|
+
const CONSTELLATION_1_PRAYER_EXTRA_SECONDS = 3;
|
|
16
|
+
const CONSTELLATION_6 = 6;
|
|
17
|
+
const CONSTELLATION_6_COOLDOWN_SECONDS = 2.3;
|
|
18
|
+
const CONSTELLATION_6_STATUS_ID = "candace-constellation-6";
|
|
19
|
+
const findPrayerField = (effects, characterId) => effects.find((effect) => effect.kind === "field" && effect.characterId === characterId && effect.id === PRAYER_FIELD_ID);
|
|
20
|
+
const infuse = (kitEffectState, { characterId, weaponType }) => {
|
|
21
|
+
if (weaponType === void 0 || !MELEE_WEAPON_TYPES.has(weaponType)) return;
|
|
22
|
+
addKitEffect(kitEffectState, {
|
|
23
|
+
characterId,
|
|
24
|
+
element: "Water",
|
|
25
|
+
kind: "infusion",
|
|
26
|
+
secondsRemaining: INFUSION_SECONDS
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
const ASCENSION_1 = 1;
|
|
30
|
+
const createCandaceKitBehaviour = ({ kit, readHit, readParameter, readSeconds }) => {
|
|
31
|
+
const burstSeconds = readParameter("prayerOfTheCrimsonCrownSeconds");
|
|
32
|
+
const wavesMax = readParameter("maxWaveCount");
|
|
33
|
+
const shieldShare = readParameter("shieldMaxHealthShare");
|
|
34
|
+
const shieldFlat = readParameter("shieldFlatHealth");
|
|
35
|
+
const prayerTickSeconds = readSeconds("prayerTick");
|
|
36
|
+
const tapHitmarkSeconds = takeOne(kit.elementalSkill.hits).hitmarkSeconds;
|
|
37
|
+
const chargedHitmarkSeconds = takeOne(takeOne(kit.elementalSkillHolds ?? []).action.hits).hitmarkSeconds;
|
|
38
|
+
const burstHitmarkSeconds = takeOne(kit.elementalBurst.hits).hitmarkSeconds;
|
|
39
|
+
const wave = readHit("wave");
|
|
40
|
+
const constellation6Wave = readHit("theOverflowWave");
|
|
41
|
+
const castShield = (context, combatant, secondsRemaining) => {
|
|
42
|
+
const { characterIdCombatantMap, kitEffectState, party } = context;
|
|
43
|
+
return castKitShield(context, combatant.characterId, {
|
|
44
|
+
element: "Water",
|
|
45
|
+
health: shieldFlat + shieldShare * getKitMaxHealth(combatant, kitEffectState.effects, party, characterIdCombatantMap),
|
|
46
|
+
secondsRemaining
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
return {
|
|
50
|
+
burst: { onStart: ({ activeCombatant: combatant, body, kitEffectState }) => {
|
|
51
|
+
const { characterId, constellationCount } = combatant;
|
|
52
|
+
const prayerSeconds = burstHitmarkSeconds + burstSeconds + (constellationCount >= CONSTELLATION_1 ? CONSTELLATION_1_PRAYER_EXTRA_SECONDS : 0);
|
|
53
|
+
const standingPrayer = findPrayerField(kitEffectState.effects, characterId);
|
|
54
|
+
if (standingPrayer) standingPrayer.secondsRemaining = 0;
|
|
55
|
+
castKitField(kitEffectState, characterId, body.position, {
|
|
56
|
+
id: PRAYER_FIELD_ID,
|
|
57
|
+
nextTickSeconds: burstHitmarkSeconds,
|
|
58
|
+
onTick: ({ activeCombatant, kitEffectState: tickEffectState }) => infuse(tickEffectState, activeCombatant),
|
|
59
|
+
secondsRemaining: prayerSeconds,
|
|
60
|
+
tickIntervalSeconds: prayerTickSeconds
|
|
61
|
+
});
|
|
62
|
+
addKitStatus(kitEffectState, characterId, {
|
|
63
|
+
id: WAVES_STATUS_ID,
|
|
64
|
+
secondsRemaining: prayerSeconds,
|
|
65
|
+
stacks: 0
|
|
66
|
+
});
|
|
67
|
+
} },
|
|
68
|
+
onKitEvent: (event, { activeCombatant, body, characterIdCombatantMap, kitEffectState }, combatant) => {
|
|
69
|
+
const { ascension, characterId, constellationCount } = combatant;
|
|
70
|
+
const { effects } = kitEffectState;
|
|
71
|
+
if (ascension >= ASCENSION_1 && checkIsStrikeOn(event, characterId)) completeKitSkillCharge(kitEffectState, characterId);
|
|
72
|
+
if (!findPrayerField(effects, characterId)) return;
|
|
73
|
+
if (event.kind === "CharacterSwapped") {
|
|
74
|
+
const incoming = characterIdCombatantMap.get(event.characterId);
|
|
75
|
+
if (incoming) infuse(kitEffectState, incoming);
|
|
76
|
+
const waves = findKitStatus(effects, characterId, WAVES_STATUS_ID);
|
|
77
|
+
if (!waves || (waves.stacks ?? 0) >= wavesMax) return;
|
|
78
|
+
addKitStatus(kitEffectState, characterId, {
|
|
79
|
+
id: WAVES_STATUS_ID,
|
|
80
|
+
secondsRemaining: waves.secondsRemaining,
|
|
81
|
+
stacks: (waves.stacks ?? 0) + 1
|
|
82
|
+
});
|
|
83
|
+
castKitSummon(kitEffectState, body, combatant, [wave], { attackTag: "ElementalBurst" });
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (event.kind === "DamageTaken" && constellationCount >= CONSTELLATION_6 && event.attackTag === "NormalAttack" && event.striker.characterId !== characterId && event.striker.characterId === activeCombatant.characterId && getKitHitElement(event.hit, event.striker) !== void 0 && startKitCooldown(kitEffectState, characterId, CONSTELLATION_6_STATUS_ID, CONSTELLATION_6_COOLDOWN_SECONDS)) castKitSummon(kitEffectState, body, combatant, [constellation6Wave], { attackTag: "ElementalBurst" });
|
|
87
|
+
},
|
|
88
|
+
skill: { onStart: (context) => castShield(context, context.activeCombatant, tapHitmarkSeconds) },
|
|
89
|
+
skillHolds: [{ onStart: (context) => castShield(context, context.activeCombatant, chargedHitmarkSeconds) }]
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
export { createCandaceKitBehaviour };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { t as addKitEffect } from "./addKitEffect-DEhZUuxo.js";
|
|
2
|
+
import { U as UNBOUNDED_FIELD_RADIUS } from "./constants-BIXoNz1x.js";
|
|
3
|
+
// src/services/kit/effects/createKitField.ts
|
|
4
|
+
const createKitField = (characterId, { x, z }, { radius = UNBOUNDED_FIELD_RADIUS, ...fields }) => ({
|
|
5
|
+
centre: {
|
|
6
|
+
x,
|
|
7
|
+
z
|
|
8
|
+
},
|
|
9
|
+
characterId,
|
|
10
|
+
kind: "field",
|
|
11
|
+
radius,
|
|
12
|
+
tickIndex: 0,
|
|
13
|
+
...fields
|
|
14
|
+
});
|
|
15
|
+
// src/services/kit/effects/castKitField.ts
|
|
16
|
+
const castKitField = (kitEffectState, ...field) => {
|
|
17
|
+
const kitField = createKitField(...field);
|
|
18
|
+
addKitEffect(kitEffectState, kitField);
|
|
19
|
+
return kitField;
|
|
20
|
+
};
|
|
21
|
+
export { createKitField as n, castKitField as t };
|