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,132 @@
|
|
|
1
|
+
import "./GameDataset-oS0Tc9KV.js";
|
|
2
|
+
import { t as getBuffedCombatant } from "./getBuffedCombatant-CwXmBrc6.js";
|
|
3
|
+
import { t as getPartyMember } from "./getPartyMember-BAb9wUiz.js";
|
|
4
|
+
import "./KitEventKind-DinObjiq.js";
|
|
5
|
+
import { t as findKitStatus } from "./findKitStatus-Dj_zauGj.js";
|
|
6
|
+
import { t as addKitStatus } from "./addKitStatus-CecgwPmO.js";
|
|
7
|
+
import { buffKitMember, buffKitTeam, castKitSummon, checkIsInKitField, checkIsKitStatusActive, createAheadBody, createKitBody, findStandingKitSummon, startKitCooldown } from "./index.js";
|
|
8
|
+
// src/services/kit/characters/albedoKit.ts
|
|
9
|
+
const SOLAR_ISOTOMA_ID = "albedo-solar-isotoma";
|
|
10
|
+
const TRANSIENT_BLOSSOM_COOLDOWN_STATUS_ID = "albedo-transient-blossom-cooldown";
|
|
11
|
+
const CALCITE_MIGHT_ASCENSION = 1;
|
|
12
|
+
const CALCITE_MIGHT_HEALTH_SHARE = .5;
|
|
13
|
+
const CALCITE_MIGHT_DAMAGE_BONUS = .25;
|
|
14
|
+
const TECTONIC_TIDE_ASCENSION = 4;
|
|
15
|
+
const TECTONIC_TIDE_ELEMENTAL_MASTERY = 125;
|
|
16
|
+
const TECTONIC_TIDE_ELEMENTAL_MASTERY_SECONDS = 10;
|
|
17
|
+
const TECTONIC_TIDE_SOURCE = "albedo-tectonic-tide";
|
|
18
|
+
const ALBEDO_CONSTELLATION_1 = 1;
|
|
19
|
+
const ALBEDO_CONSTELLATION_4 = 4;
|
|
20
|
+
const CONSTELLATION_4_PLUNGING_ATTACK_BONUS = .3;
|
|
21
|
+
const CONSTELLATION_4_SECONDS = 1;
|
|
22
|
+
const CONSTELLATION_4_CHECK_SECONDS = .3;
|
|
23
|
+
const CONSTELLATION_4_CHECK_STATUS_ID = "albedo-constellation-4-check";
|
|
24
|
+
const CONSTELLATION_4_SOURCE = "albedo-constellation-4";
|
|
25
|
+
const TRANSIENT_BLOSSOM_ENERGY = 1.2;
|
|
26
|
+
const SOLAR_ISOTOMA_DEFENSE_PERCENT = .5;
|
|
27
|
+
const SOLAR_ISOTOMA_DEFENSE_SECONDS = 20;
|
|
28
|
+
const FLOWER_OF_EDEN_SOURCE = "albedo-flower-of-eden";
|
|
29
|
+
const ALBEDO_CONSTELLATION_2 = 2;
|
|
30
|
+
const FATAL_RECKONING_DEFENSE_SHARE = .3;
|
|
31
|
+
const FATAL_RECKONING_MAX_STACKS = 4;
|
|
32
|
+
const FATAL_RECKONING_SECONDS = 30;
|
|
33
|
+
const FATAL_RECKONING_STATUS_ID = "albedo-fatal-reckoning";
|
|
34
|
+
const ALBEDO_CHARACTER_ID = 10000038;
|
|
35
|
+
const addFatalReckoningStack = (kitEffectState, combatant) => {
|
|
36
|
+
const { characterId } = combatant;
|
|
37
|
+
const stacks = checkIsKitStatusActive(kitEffectState.effects, characterId, FATAL_RECKONING_STATUS_ID) ? findKitStatus(kitEffectState.effects, characterId, FATAL_RECKONING_STATUS_ID)?.stacks ?? 0 : 0;
|
|
38
|
+
addKitStatus(kitEffectState, characterId, {
|
|
39
|
+
id: FATAL_RECKONING_STATUS_ID,
|
|
40
|
+
secondsRemaining: FATAL_RECKONING_SECONDS,
|
|
41
|
+
stacks: Math.min(FATAL_RECKONING_MAX_STACKS, stacks + 1)
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
const withFatalReckoningBonus = (hit, bonus) => ({
|
|
45
|
+
...hit,
|
|
46
|
+
additiveBaseDamageBonus: (combatant) => (hit.additiveBaseDamageBonus?.(combatant) ?? 0) + bonus
|
|
47
|
+
});
|
|
48
|
+
const consumeFatalReckoningBonus = (context) => {
|
|
49
|
+
const { activeCombatant: combatant, characterIdCombatantMap, kitEffectState, party } = context;
|
|
50
|
+
const { characterId } = combatant;
|
|
51
|
+
if (combatant.constellationCount < ALBEDO_CONSTELLATION_2 || !checkIsKitStatusActive(kitEffectState.effects, characterId, FATAL_RECKONING_STATUS_ID)) return 0;
|
|
52
|
+
const status = findKitStatus(kitEffectState.effects, characterId, FATAL_RECKONING_STATUS_ID);
|
|
53
|
+
const stacks = status?.stacks ?? 0;
|
|
54
|
+
if (status) status.stacks = 0;
|
|
55
|
+
const { defense } = getBuffedCombatant(combatant, kitEffectState.effects, party, characterIdCombatantMap).attributes;
|
|
56
|
+
return stacks * FATAL_RECKONING_DEFENSE_SHARE * defense;
|
|
57
|
+
};
|
|
58
|
+
const createAlbedoKitBehaviour = ({ readHit, readHits, readParameter, readSeconds }) => {
|
|
59
|
+
const solarIsotomaAheadMetres = readParameter("solarIsotomaAheadMetres");
|
|
60
|
+
const solarIsotomaRadius = readParameter("solarIsotomaRadius");
|
|
61
|
+
const solarIsotomaSeconds = readSeconds("solarIsotomaDuration");
|
|
62
|
+
const transientBlossomCooldownSeconds = readSeconds("transientBlossomCooldown");
|
|
63
|
+
const solarIsotomaHit = readHit("solarIsotoma");
|
|
64
|
+
const transientBlossom = readHit("transientBlossom");
|
|
65
|
+
const fatalBlossoms = readHits("fatalBlossoms");
|
|
66
|
+
return {
|
|
67
|
+
burst: { onStart: (context) => {
|
|
68
|
+
const { activeCombatant: combatant, kitEffectState, party } = context;
|
|
69
|
+
const fatalReckoningBonus = consumeFatalReckoningBonus(context);
|
|
70
|
+
const blossoms = fatalReckoningBonus === 0 ? fatalBlossoms : fatalBlossoms.map((hit) => withFatalReckoningBonus(hit, fatalReckoningBonus));
|
|
71
|
+
const solarIsotoma = findStandingKitSummon(kitEffectState.effects, SOLAR_ISOTOMA_ID, combatant.characterId);
|
|
72
|
+
if (solarIsotoma && solarIsotoma.secondsRemaining > 0) castKitSummon(kitEffectState, solarIsotoma.body, solarIsotoma.combatant, blossoms, { attackTag: "ElementalBurst" });
|
|
73
|
+
if (combatant.ascension < TECTONIC_TIDE_ASCENSION) return;
|
|
74
|
+
buffKitTeam(kitEffectState, party, {
|
|
75
|
+
amount: TECTONIC_TIDE_ELEMENTAL_MASTERY,
|
|
76
|
+
attribute: "FIGHT_PROP_ELEMENT_MASTERY",
|
|
77
|
+
secondsRemaining: TECTONIC_TIDE_ELEMENTAL_MASTERY_SECONDS,
|
|
78
|
+
source: TECTONIC_TIDE_SOURCE
|
|
79
|
+
});
|
|
80
|
+
} },
|
|
81
|
+
getStrikeDamageBonus: ({ combatant, hit }, enemy) => combatant.ascension >= CALCITE_MIGHT_ASCENSION && hit === transientBlossom && enemy.health / enemy.maxHealth < CALCITE_MIGHT_HEALTH_SHARE ? CALCITE_MIGHT_DAMAGE_BONUS : 0,
|
|
82
|
+
onKitEvent: (event, { kitEffectState, party }, combatant) => {
|
|
83
|
+
if (event.kind !== "DamageTaken") return;
|
|
84
|
+
const { characterId } = combatant;
|
|
85
|
+
const { effects } = kitEffectState;
|
|
86
|
+
const solarIsotoma = findStandingKitSummon(effects, SOLAR_ISOTOMA_ID, characterId);
|
|
87
|
+
if (!solarIsotoma || solarIsotoma.secondsRemaining <= 0) return;
|
|
88
|
+
const { position } = event.enemy;
|
|
89
|
+
if (Math.hypot(position.x - solarIsotoma.body.position.x, position.z - solarIsotoma.body.position.z) > solarIsotomaRadius || !startKitCooldown(kitEffectState, characterId, TRANSIENT_BLOSSOM_COOLDOWN_STATUS_ID, transientBlossomCooldownSeconds)) return;
|
|
90
|
+
castKitSummon(kitEffectState, createKitBody(position), solarIsotoma.combatant, [transientBlossom], { attackTag: "ElementalSkill" });
|
|
91
|
+
if (combatant.constellationCount >= ALBEDO_CONSTELLATION_2) addFatalReckoningStack(kitEffectState, combatant);
|
|
92
|
+
if (combatant.constellationCount < ALBEDO_CONSTELLATION_1) return;
|
|
93
|
+
const member = getPartyMember(party, characterId);
|
|
94
|
+
member.energy = Math.min(combatant.kit.burstEnergyCost, member.energy + TRANSIENT_BLOSSOM_ENERGY);
|
|
95
|
+
},
|
|
96
|
+
onStep: ({ activeCombatant, body, kitEffectState }, combatant) => {
|
|
97
|
+
if (combatant.constellationCount < ALBEDO_CONSTELLATION_4) return;
|
|
98
|
+
if (!startKitCooldown(kitEffectState, combatant.characterId, CONSTELLATION_4_CHECK_STATUS_ID, CONSTELLATION_4_CHECK_SECONDS)) return;
|
|
99
|
+
const solarIsotoma = findStandingKitSummon(kitEffectState.effects, SOLAR_ISOTOMA_ID, combatant.characterId);
|
|
100
|
+
if (!solarIsotoma || solarIsotoma.secondsRemaining <= 0 || !checkIsInKitField({
|
|
101
|
+
centre: solarIsotoma.body.position,
|
|
102
|
+
radius: solarIsotomaRadius
|
|
103
|
+
}, body.position)) return;
|
|
104
|
+
buffKitMember(kitEffectState, activeCombatant.characterId, {
|
|
105
|
+
amount: CONSTELLATION_4_PLUNGING_ATTACK_BONUS,
|
|
106
|
+
attribute: "FIGHT_PROP_PLUNGING_ATTACK_ADD_HURT",
|
|
107
|
+
secondsRemaining: CONSTELLATION_4_SECONDS,
|
|
108
|
+
source: CONSTELLATION_4_SOURCE
|
|
109
|
+
});
|
|
110
|
+
},
|
|
111
|
+
skill: { onStart: ({ activeCombatant: combatant, body, kitEffectState }) => {
|
|
112
|
+
if (combatant.constellationCount >= ALBEDO_CONSTELLATION_1) buffKitMember(kitEffectState, combatant.characterId, {
|
|
113
|
+
amount: SOLAR_ISOTOMA_DEFENSE_PERCENT,
|
|
114
|
+
attribute: "FIGHT_PROP_DEFENSE_PERCENT",
|
|
115
|
+
secondsRemaining: SOLAR_ISOTOMA_DEFENSE_SECONDS,
|
|
116
|
+
source: FLOWER_OF_EDEN_SOURCE
|
|
117
|
+
});
|
|
118
|
+
for (const effect of kitEffectState.effects) if (effect.kind === "summon" && effect.id === SOLAR_ISOTOMA_ID) effect.secondsRemaining = 0;
|
|
119
|
+
if (combatant.constellationCount >= ALBEDO_CONSTELLATION_4) addKitStatus(kitEffectState, combatant.characterId, {
|
|
120
|
+
id: CONSTELLATION_4_CHECK_STATUS_ID,
|
|
121
|
+
secondsRemaining: solarIsotomaHit.hitmarkSeconds + CONSTELLATION_4_CHECK_SECONDS
|
|
122
|
+
});
|
|
123
|
+
castKitSummon(kitEffectState, createAheadBody(body, solarIsotomaAheadMetres), combatant, [solarIsotomaHit], {
|
|
124
|
+
attackTag: "ElementalSkill",
|
|
125
|
+
id: SOLAR_ISOTOMA_ID,
|
|
126
|
+
secondsRemaining: solarIsotomaSeconds,
|
|
127
|
+
spawnSeconds: solarIsotomaHit.hitmarkSeconds
|
|
128
|
+
});
|
|
129
|
+
} }
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
export { ALBEDO_CHARACTER_ID, createAlbedoKitBehaviour };
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import "./GameDataset-oS0Tc9KV.js";
|
|
2
|
+
import { t as getDeployedCharacterIds } from "./getDeployedCharacterIds-TuIRCNKb.js";
|
|
3
|
+
import "./KitEventKind-DinObjiq.js";
|
|
4
|
+
import { t as addKitEffect } from "./addKitEffect-DEhZUuxo.js";
|
|
5
|
+
import { t as findKitStatus } from "./findKitStatus-Dj_zauGj.js";
|
|
6
|
+
import { t as addKitStatus } from "./addKitStatus-CecgwPmO.js";
|
|
7
|
+
import { t as castKitField } from "./castKitField-BhB1fy3l.js";
|
|
8
|
+
import { buffKitMember, castKitSummon, changeKitSkillCooldown, elementalMasteryMultiplier, scheduleKitTask, startKitCooldown } from "./index.js";
|
|
9
|
+
import { takeOne } from "@esposter/shared";
|
|
10
|
+
// src/services/kit/characters/alhaithamKit.ts
|
|
11
|
+
const ASCENSION_1 = 1;
|
|
12
|
+
const ASCENSION_4 = 4;
|
|
13
|
+
const CONSTELLATION_1 = 1;
|
|
14
|
+
const CONSTELLATION_1_ICD_SECONDS = 1;
|
|
15
|
+
const CONSTELLATION_1_ICD_STATUS_ID = "alhaitham-c1-cut-icd";
|
|
16
|
+
const CONSTELLATION_2 = 2;
|
|
17
|
+
const CONSTELLATION_4 = 4;
|
|
18
|
+
const CONSTELLATION_6 = 6;
|
|
19
|
+
const HELD_UNTIL_SWAP_SECONDS = Number.POSITIVE_INFINITY;
|
|
20
|
+
const MIRROR_STATUS_ID = "alhaitham-mirrors";
|
|
21
|
+
const MIRROR_DECAY_FIELD_ID = "alhaitham-mirror-decay";
|
|
22
|
+
const MIRROR_REGEN_TASK_ID = "alhaitham-mirror-regen";
|
|
23
|
+
const PROJECTION_ICD_STATUS_ID = "alhaitham-projection-icd";
|
|
24
|
+
const ASCENSION_1_ICD_STATUS_ID = "alhaitham-a1-icd";
|
|
25
|
+
const CONSTELLATION_2_CURSOR_STATUS_ID = "alhaitham-c2-cursor";
|
|
26
|
+
const CONSTELLATION_2_SOURCE_PREFIX = "alhaitham-c2-";
|
|
27
|
+
const CONSTELLATION_4_LOSS_SOURCE = "alhaitham-c4-loss";
|
|
28
|
+
const CONSTELLATION_4_GAIN_SOURCE = "alhaitham-c4-gain";
|
|
29
|
+
const CONSTELLATION_6_SOURCE = "alhaitham-c6";
|
|
30
|
+
const findKitField = (effects, id) => effects.find((effect) => effect.kind === "field" && effect.id === id);
|
|
31
|
+
const findKitBuff = (effects, characterId, attribute, source) => effects.find((effect) => effect.kind === "buff" && effect.characterId === characterId && effect.attribute === attribute && effect.source === source);
|
|
32
|
+
const getMirrorCount = (effects, characterId) => findKitStatus(effects, characterId, MIRROR_STATUS_ID)?.stacks ?? 0;
|
|
33
|
+
const setMirrorCount = (kitEffectState, characterId, mirrors) => {
|
|
34
|
+
if (mirrors <= 0) {
|
|
35
|
+
const status = findKitStatus(kitEffectState.effects, characterId, MIRROR_STATUS_ID);
|
|
36
|
+
if (status) {
|
|
37
|
+
status.stacks = 0;
|
|
38
|
+
status.secondsRemaining = 0;
|
|
39
|
+
}
|
|
40
|
+
for (const effect of kitEffectState.effects) {
|
|
41
|
+
if (effect.kind === "infusion" && effect.characterId === characterId && effect.element === "Grass") effect.secondsRemaining = 0;
|
|
42
|
+
if (effect.kind === "field" && effect.id === MIRROR_DECAY_FIELD_ID) effect.secondsRemaining = 0;
|
|
43
|
+
}
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
addKitStatus(kitEffectState, characterId, {
|
|
47
|
+
id: MIRROR_STATUS_ID,
|
|
48
|
+
secondsRemaining: HELD_UNTIL_SWAP_SECONDS,
|
|
49
|
+
stacks: mirrors
|
|
50
|
+
});
|
|
51
|
+
addKitEffect(kitEffectState, {
|
|
52
|
+
characterId,
|
|
53
|
+
element: "Grass",
|
|
54
|
+
kind: "infusion",
|
|
55
|
+
secondsRemaining: HELD_UNTIL_SWAP_SECONDS
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
const addConstellation2Buff = (kitEffectState, characterId, buffs) => {
|
|
59
|
+
const cursor = findKitStatus(kitEffectState.effects, characterId, CONSTELLATION_2_CURSOR_STATUS_ID)?.stacks ?? 0;
|
|
60
|
+
addKitStatus(kitEffectState, characterId, {
|
|
61
|
+
id: CONSTELLATION_2_CURSOR_STATUS_ID,
|
|
62
|
+
secondsRemaining: HELD_UNTIL_SWAP_SECONDS,
|
|
63
|
+
stacks: (cursor + 1) % buffs.constellation2StacksMax
|
|
64
|
+
});
|
|
65
|
+
buffKitMember(kitEffectState, characterId, {
|
|
66
|
+
amount: buffs.constellation2ElementalMastery,
|
|
67
|
+
attribute: "FIGHT_PROP_ELEMENT_MASTERY",
|
|
68
|
+
secondsRemaining: buffs.constellation2Seconds,
|
|
69
|
+
source: `${CONSTELLATION_2_SOURCE_PREFIX}${cursor + 1}`
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
const addConstellation6Buffs = (kitEffectState, characterId, overflow, buffs) => {
|
|
73
|
+
for (let index = 0; index < overflow; index++) {
|
|
74
|
+
const critical = findKitBuff(kitEffectState.effects, characterId, "FIGHT_PROP_CRITICAL", CONSTELLATION_6_SOURCE);
|
|
75
|
+
if (critical) {
|
|
76
|
+
critical.secondsRemaining += buffs.constellation6Seconds;
|
|
77
|
+
const criticalDamage = findKitBuff(kitEffectState.effects, characterId, "FIGHT_PROP_CRITICAL_HURT", CONSTELLATION_6_SOURCE);
|
|
78
|
+
if (criticalDamage) criticalDamage.secondsRemaining += buffs.constellation6Seconds;
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
buffKitMember(kitEffectState, characterId, {
|
|
82
|
+
amount: buffs.constellation6CriticalRate,
|
|
83
|
+
attribute: "FIGHT_PROP_CRITICAL",
|
|
84
|
+
secondsRemaining: buffs.constellation6Seconds,
|
|
85
|
+
source: CONSTELLATION_6_SOURCE
|
|
86
|
+
});
|
|
87
|
+
buffKitMember(kitEffectState, characterId, {
|
|
88
|
+
amount: buffs.constellation6CriticalDamage,
|
|
89
|
+
attribute: "FIGHT_PROP_CRITICAL_HURT",
|
|
90
|
+
secondsRemaining: buffs.constellation6Seconds,
|
|
91
|
+
source: CONSTELLATION_6_SOURCE
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
const getSkillMirrorGain = (effects, characterId) => getMirrorCount(effects, characterId) === 0 ? 2 : 1;
|
|
96
|
+
const createAlhaithamKitBehaviour = ({ kit, readHits, readParameter, readSeconds, readSecondsList }) => {
|
|
97
|
+
const mirrorSecondsList = readSecondsList("universalityMirrorDelays");
|
|
98
|
+
const mirrorDecaySeconds = readSeconds("mirrorDecay");
|
|
99
|
+
const projectionCooldownSeconds = readSeconds("projectionAttackCooldown");
|
|
100
|
+
const burstMirrorRegenSeconds = readSeconds("particularFieldMirrorDelay");
|
|
101
|
+
const projectionElementalMasteryShare = readParameter("projectionAttackElementalMasteryShare");
|
|
102
|
+
const burstElementalMasteryShare = readParameter("particularFieldElementalMasteryShare");
|
|
103
|
+
const skillElementalMasteryShare = readParameter("universalityElementalMasteryShare");
|
|
104
|
+
const mirrorsMax = readParameter("mirrorsMax");
|
|
105
|
+
const burstBaseHitCount = readParameter("burstBaseHitCount");
|
|
106
|
+
const burstHitCountPerMirror = readParameter("burstHitCountPerMirror");
|
|
107
|
+
const ascension1IcdSeconds = readSeconds("ascension1IcdDuration");
|
|
108
|
+
const ascension4DamagePerElementalMastery = readParameter("ascension4DamagePerElementalMastery");
|
|
109
|
+
const ascension4DamageMax = readParameter("ascension4DamageMax");
|
|
110
|
+
const constellation2ElementalMastery = readParameter("constellation2ElementalMastery");
|
|
111
|
+
const constellation2Seconds = readSeconds("constellation2Duration");
|
|
112
|
+
const constellation2StacksMax = readParameter("constellation2StacksMax");
|
|
113
|
+
const constellation4ElementalMasteryPerMirror = readParameter("constellation4ElementalMasteryPerMirror");
|
|
114
|
+
const constellation4DendroDamageBonusPerMirror = readParameter("constellation4DendroDamageBonusPerMirror");
|
|
115
|
+
const constellation4Seconds = readSeconds("constellation4Duration");
|
|
116
|
+
const constellation6CriticalRate = readParameter("constellation6CriticalRate");
|
|
117
|
+
const constellationBuffs = {
|
|
118
|
+
constellation2ElementalMastery,
|
|
119
|
+
constellation2Seconds,
|
|
120
|
+
constellation2StacksMax,
|
|
121
|
+
constellation6CriticalDamage: readParameter("constellation6CriticalDamage"),
|
|
122
|
+
constellation6CriticalRate,
|
|
123
|
+
constellation6Seconds: readSeconds("constellation6Duration")
|
|
124
|
+
};
|
|
125
|
+
const projectionHitBehaviour = {
|
|
126
|
+
additiveBaseDamageBonus: (striker) => elementalMasteryMultiplier(striker, projectionElementalMasteryShare),
|
|
127
|
+
onStrike: ({ kitEffectState, party }, { combatant }) => {
|
|
128
|
+
if (combatant.constellationCount < CONSTELLATION_1) return;
|
|
129
|
+
if (!startKitCooldown(kitEffectState, combatant.characterId, CONSTELLATION_1_ICD_STATUS_ID, CONSTELLATION_1_ICD_SECONDS)) return;
|
|
130
|
+
changeKitSkillCooldown(party, combatant.characterId, -1.2);
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
const projectionAttacks = [
|
|
134
|
+
readHits("projectionAttackOneMirror", projectionHitBehaviour),
|
|
135
|
+
readHits("projectionAttackTwoMirrors", projectionHitBehaviour),
|
|
136
|
+
readHits("projectionAttackThreeMirrors", projectionHitBehaviour)
|
|
137
|
+
];
|
|
138
|
+
const particularFieldHits = readHits("particularFieldHits", { additiveBaseDamageBonus: (striker) => elementalMasteryMultiplier(striker, burstElementalMasteryShare) });
|
|
139
|
+
const startMirrorDecay = (kitEffectState, body, combatant) => {
|
|
140
|
+
const { characterId } = combatant;
|
|
141
|
+
const field = findKitField(kitEffectState.effects, MIRROR_DECAY_FIELD_ID);
|
|
142
|
+
if (field) {
|
|
143
|
+
field.nextTickSeconds = mirrorDecaySeconds;
|
|
144
|
+
field.secondsRemaining = HELD_UNTIL_SWAP_SECONDS;
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
castKitField(kitEffectState, characterId, body.position, {
|
|
148
|
+
id: MIRROR_DECAY_FIELD_ID,
|
|
149
|
+
nextTickSeconds: mirrorDecaySeconds,
|
|
150
|
+
onTick: ({ kitEffectState: effectState }) => {
|
|
151
|
+
const count = getMirrorCount(effectState.effects, characterId);
|
|
152
|
+
setMirrorCount(effectState, characterId, count > 1 ? count - 1 : 0);
|
|
153
|
+
},
|
|
154
|
+
secondsRemaining: HELD_UNTIL_SWAP_SECONDS,
|
|
155
|
+
tickIntervalSeconds: mirrorDecaySeconds
|
|
156
|
+
});
|
|
157
|
+
};
|
|
158
|
+
const gainMirrors = (kitEffectState, body, combatant, generated) => {
|
|
159
|
+
if (generated <= 0) return;
|
|
160
|
+
const { characterId, constellationCount } = combatant;
|
|
161
|
+
const count = getMirrorCount(kitEffectState.effects, characterId);
|
|
162
|
+
const total = count + generated;
|
|
163
|
+
if (count === 0 || total > mirrorsMax) startMirrorDecay(kitEffectState, body, combatant);
|
|
164
|
+
setMirrorCount(kitEffectState, characterId, Math.min(total, mirrorsMax));
|
|
165
|
+
if (constellationCount >= CONSTELLATION_2) for (let made = 0; made < generated; made++) addConstellation2Buff(kitEffectState, characterId, constellationBuffs);
|
|
166
|
+
if (constellationCount >= CONSTELLATION_6 && total > mirrorsMax) addConstellation6Buffs(kitEffectState, characterId, total - mirrorsMax, constellationBuffs);
|
|
167
|
+
};
|
|
168
|
+
const triggerProjection = ({ kitEffectState }, { body, combatant }, isMirrorSource) => {
|
|
169
|
+
const { ascension, characterId } = combatant;
|
|
170
|
+
if (isMirrorSource && ascension >= ASCENSION_1 && startKitCooldown(kitEffectState, characterId, ASCENSION_1_ICD_STATUS_ID, ascension1IcdSeconds)) gainMirrors(kitEffectState, body, combatant, 1);
|
|
171
|
+
const count = getMirrorCount(kitEffectState.effects, characterId);
|
|
172
|
+
if (count === 0 || !startKitCooldown(kitEffectState, characterId, PROJECTION_ICD_STATUS_ID, projectionCooldownSeconds)) return;
|
|
173
|
+
castKitSummon(kitEffectState, body, combatant, takeOne(projectionAttacks, count - 1), { attackTag: "ElementalSkill" });
|
|
174
|
+
};
|
|
175
|
+
const strikeHitBehaviour = { onStrike: (context, strike) => triggerProjection(context, strike, false) };
|
|
176
|
+
const mirrorSourceHitBehaviour = { onStrike: (context, strike) => triggerProjection(context, strike, true) };
|
|
177
|
+
const createSkillBehaviour = (mirrorSeconds) => ({
|
|
178
|
+
hits: [{ additiveBaseDamageBonus: (striker) => elementalMasteryMultiplier(striker, skillElementalMasteryShare) }],
|
|
179
|
+
onStart: ({ activeCombatant: combatant, body, kitEffectState }) => scheduleKitTask(kitEffectState, combatant.characterId, mirrorSeconds, (tick) => gainMirrors(tick.kitEffectState, body, combatant, getSkillMirrorGain(tick.kitEffectState.effects, combatant.characterId)))
|
|
180
|
+
});
|
|
181
|
+
return {
|
|
182
|
+
burst: { onStart: ({ activeCombatant: combatant, body, kitEffectState, party }) => {
|
|
183
|
+
const { characterId, constellationCount } = combatant;
|
|
184
|
+
const consumed = getMirrorCount(kitEffectState.effects, characterId);
|
|
185
|
+
castKitSummon(kitEffectState, body, combatant, particularFieldHits.slice(0, burstBaseHitCount + burstHitCountPerMirror * consumed), { attackTag: "ElementalBurst" });
|
|
186
|
+
setMirrorCount(kitEffectState, characterId, 0);
|
|
187
|
+
if (constellationCount >= CONSTELLATION_4 && consumed > 0) for (const memberId of getDeployedCharacterIds(party)) {
|
|
188
|
+
if (memberId === characterId) continue;
|
|
189
|
+
buffKitMember(kitEffectState, memberId, {
|
|
190
|
+
amount: constellation4ElementalMasteryPerMirror * consumed,
|
|
191
|
+
attribute: "FIGHT_PROP_ELEMENT_MASTERY",
|
|
192
|
+
secondsRemaining: constellation4Seconds,
|
|
193
|
+
source: CONSTELLATION_4_LOSS_SOURCE
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
const generated = constellationCount >= CONSTELLATION_6 ? mirrorsMax : mirrorsMax - consumed;
|
|
197
|
+
if (generated <= 0) return;
|
|
198
|
+
scheduleKitTask(kitEffectState, characterId, burstMirrorRegenSeconds, (tick) => {
|
|
199
|
+
gainMirrors(tick.kitEffectState, body, combatant, generated);
|
|
200
|
+
if (constellationCount >= CONSTELLATION_4) buffKitMember(tick.kitEffectState, characterId, {
|
|
201
|
+
amount: constellation4DendroDamageBonusPerMirror * generated,
|
|
202
|
+
attribute: "FIGHT_PROP_GRASS_ADD_HURT",
|
|
203
|
+
secondsRemaining: constellation4Seconds,
|
|
204
|
+
source: CONSTELLATION_4_GAIN_SOURCE
|
|
205
|
+
});
|
|
206
|
+
}, { id: MIRROR_REGEN_TASK_ID });
|
|
207
|
+
} },
|
|
208
|
+
chargedAttack: { hits: kit.chargedAttack.hits.map(() => mirrorSourceHitBehaviour) },
|
|
209
|
+
getStrikeDamageBonus: ({ combatant, hit }) => combatant.ascension >= ASCENSION_4 && (hit.internalCooldownTag === "ElementalBurst" || hit.internalCooldownTag === "ElementalSkill") ? Math.min(elementalMasteryMultiplier(combatant, ascension4DamagePerElementalMastery), ascension4DamageMax) : 0,
|
|
210
|
+
normalAttacks: kit.normalAttacks.map(({ hits }) => ({ hits: hits.map(() => strikeHitBehaviour) })),
|
|
211
|
+
onKitEvent: (event, { kitEffectState }, combatant) => {
|
|
212
|
+
if (event.kind !== "CharacterSwapped" || event.previousCharacterId !== combatant.characterId) return;
|
|
213
|
+
setMirrorCount(kitEffectState, combatant.characterId, 0);
|
|
214
|
+
for (const effect of kitEffectState.effects) if (effect.kind === "field" && effect.id === MIRROR_REGEN_TASK_ID) effect.secondsRemaining = 0;
|
|
215
|
+
},
|
|
216
|
+
plungeCollision: mirrorSourceHitBehaviour,
|
|
217
|
+
plunges: {
|
|
218
|
+
["high"]: { hits: [mirrorSourceHitBehaviour] },
|
|
219
|
+
["low"]: { hits: [mirrorSourceHitBehaviour] }
|
|
220
|
+
},
|
|
221
|
+
skill: createSkillBehaviour(takeOne(mirrorSecondsList, 0)),
|
|
222
|
+
skillHolds: [createSkillBehaviour(takeOne(mirrorSecondsList, 1))]
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
export { createAlhaithamKitBehaviour };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import "./GameDataset-oS0Tc9KV.js";
|
|
2
|
+
import { t as addKitEffect } from "./addKitEffect-DEhZUuxo.js";
|
|
3
|
+
import { t as addKitStatus } from "./addKitStatus-CecgwPmO.js";
|
|
4
|
+
import { t as spendKitResource } from "./spendKitResource-CC5kZDgu.js";
|
|
5
|
+
import { t as gainKitResource } from "./gainKitResource-3F1z8Aco.js";
|
|
6
|
+
import { buffKitMember, buffKitTeam, checkHasKitStatus, scheduleKitTask } from "./index.js";
|
|
7
|
+
// src/services/kit/characters/aloyKit.ts
|
|
8
|
+
const COIL_RUSHING_ICE_STACKS = 4;
|
|
9
|
+
const COIL_RESOURCE_ID = "aloy-coil";
|
|
10
|
+
const RUSHING_ICE_STATUS_ID = "aloy-rushing-ice";
|
|
11
|
+
const ASCENSION_1 = 1;
|
|
12
|
+
const ASCENSION_1_ATTACK_SHARE = .08;
|
|
13
|
+
const ASCENSION_1_SELF_ATTACK_SHARE = .08;
|
|
14
|
+
const ASCENSION_1_SOURCE = "aloy-ascension-1";
|
|
15
|
+
const ASCENSION_1_SELF_SOURCE = "aloy-ascension-1-self";
|
|
16
|
+
const ASCENSION_4 = 4;
|
|
17
|
+
const ASCENSION_4_CRYO_SHARE_PER_STACK = .035;
|
|
18
|
+
const ASCENSION_4_MAX_STACKS = 10;
|
|
19
|
+
const ASCENSION_4_SOURCE = "aloy-ascension-4";
|
|
20
|
+
const addCryoStacks = (kitEffectState, characterId, stacks, secondsRemaining) => buffKitMember(kitEffectState, characterId, {
|
|
21
|
+
amount: Math.min(stacks, ASCENSION_4_MAX_STACKS) * ASCENSION_4_CRYO_SHARE_PER_STACK,
|
|
22
|
+
attribute: "FIGHT_PROP_ICE_ADD_HURT",
|
|
23
|
+
secondsRemaining,
|
|
24
|
+
source: ASCENSION_4_SOURCE
|
|
25
|
+
});
|
|
26
|
+
const createAloyKitBehaviour = ({ readSeconds }) => {
|
|
27
|
+
const rushingIceSeconds = readSeconds("rushingIceDuration");
|
|
28
|
+
const addCoilStack = ({ kitEffectState, party }, { combatant }) => {
|
|
29
|
+
if (checkHasKitStatus(kitEffectState.effects, combatant.characterId, RUSHING_ICE_STATUS_ID)) return;
|
|
30
|
+
if (gainKitResource(kitEffectState, combatant.characterId, COIL_RESOURCE_ID, 1, COIL_RUSHING_ICE_STACKS) < COIL_RUSHING_ICE_STACKS) return;
|
|
31
|
+
spendKitResource(kitEffectState, combatant.characterId, COIL_RESOURCE_ID);
|
|
32
|
+
addKitEffect(kitEffectState, {
|
|
33
|
+
characterId: combatant.characterId,
|
|
34
|
+
element: "Ice",
|
|
35
|
+
kind: "infusion",
|
|
36
|
+
secondsRemaining: rushingIceSeconds
|
|
37
|
+
});
|
|
38
|
+
addKitStatus(kitEffectState, combatant.characterId, {
|
|
39
|
+
id: RUSHING_ICE_STATUS_ID,
|
|
40
|
+
secondsRemaining: rushingIceSeconds
|
|
41
|
+
});
|
|
42
|
+
if (combatant.ascension >= ASCENSION_1) {
|
|
43
|
+
buffKitTeam(kitEffectState, party, {
|
|
44
|
+
amount: ASCENSION_1_ATTACK_SHARE,
|
|
45
|
+
attribute: "FIGHT_PROP_ATTACK_PERCENT",
|
|
46
|
+
secondsRemaining: rushingIceSeconds,
|
|
47
|
+
source: ASCENSION_1_SOURCE
|
|
48
|
+
});
|
|
49
|
+
buffKitMember(kitEffectState, combatant.characterId, {
|
|
50
|
+
amount: ASCENSION_1_SELF_ATTACK_SHARE,
|
|
51
|
+
attribute: "FIGHT_PROP_ATTACK_PERCENT",
|
|
52
|
+
secondsRemaining: rushingIceSeconds,
|
|
53
|
+
source: ASCENSION_1_SELF_SOURCE
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
if (combatant.ascension < ASCENSION_4) return;
|
|
57
|
+
addCryoStacks(kitEffectState, combatant.characterId, 1, rushingIceSeconds);
|
|
58
|
+
for (let second = 1; second < ASCENSION_4_MAX_STACKS; second++) scheduleKitTask(kitEffectState, combatant.characterId, second, ({ kitEffectState: tickKitEffectState }) => addCryoStacks(tickKitEffectState, combatant.characterId, second + 1, rushingIceSeconds - second));
|
|
59
|
+
};
|
|
60
|
+
return { skill: { hits: [
|
|
61
|
+
{},
|
|
62
|
+
{ onStrike: addCoilStack },
|
|
63
|
+
{ onStrike: addCoilStack }
|
|
64
|
+
] } };
|
|
65
|
+
};
|
|
66
|
+
export { createAloyKitBehaviour };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import "./GameDataset-oS0Tc9KV.js";
|
|
2
|
+
import { buffKitTeam, castKitSummon, castKitTaunt, createConstellationSkillChargeBonus, getKitMaxHealth, queueKitPassiveHit } from "./index.js";
|
|
3
|
+
// src/services/kit/characters/amberKit.ts
|
|
4
|
+
const EVERY_ARROW_FINDS_ITS_TARGET_ASCENSION = 1;
|
|
5
|
+
const EVERY_ARROW_FINDS_ITS_TARGET_CRITICAL_RATE = .1;
|
|
6
|
+
const CONSTELLATION_4 = 4;
|
|
7
|
+
const CONSTELLATION_4_SKILL_COOLDOWN_MULTIPLIER = .8;
|
|
8
|
+
const CONSTELLATION_1 = 1;
|
|
9
|
+
const CONSTELLATION_1_SECOND_ARROW_SHARE = .2;
|
|
10
|
+
const CONSTELLATION_6 = 6;
|
|
11
|
+
const CONSTELLATION_6_SHARE = .15;
|
|
12
|
+
const CONSTELLATION_6_SECONDS = 10;
|
|
13
|
+
const FIERY_RAIN_SOURCE = "amber-fiery-rain";
|
|
14
|
+
const addEveryArrowCriticalRate = (combatant) => {
|
|
15
|
+
const { attributeTotalMap } = combatant.attributes;
|
|
16
|
+
return {
|
|
17
|
+
...combatant,
|
|
18
|
+
attributes: {
|
|
19
|
+
...combatant.attributes,
|
|
20
|
+
attributeTotalMap: {
|
|
21
|
+
...attributeTotalMap,
|
|
22
|
+
["FIGHT_PROP_CRITICAL"]: attributeTotalMap["FIGHT_PROP_CRITICAL"] + EVERY_ARROW_FINDS_ITS_TARGET_CRITICAL_RATE
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
const widenFieryRainArrows = (arrows) => arrows.map((arrow) => ({
|
|
28
|
+
...arrow,
|
|
29
|
+
hitArea: {
|
|
30
|
+
...arrow.hitArea,
|
|
31
|
+
radius: arrow.hitArea.radius * 1.3
|
|
32
|
+
}
|
|
33
|
+
}));
|
|
34
|
+
const createAmberKitBehaviour = ({ readHit, readHits, readParameter, readSeconds }) => {
|
|
35
|
+
const bunnyExplosion = readHit("baronBunnyExplosion");
|
|
36
|
+
const bunnyMaxHealthShare = readParameter("baronBunnyMaxHealthShare");
|
|
37
|
+
const bunnySeconds = readSeconds("baronBunnySeconds");
|
|
38
|
+
const fieryRainArrows = readHits("fieryRainArrows");
|
|
39
|
+
const everyArrowFindsItsTargetFieryRainArrows = widenFieryRainArrows(fieryRainArrows);
|
|
40
|
+
let secondArrowFired = false;
|
|
41
|
+
return {
|
|
42
|
+
burst: { onStart: ({ activeCombatant: combatant, body, kitEffectState, party }) => {
|
|
43
|
+
const hasEveryArrowFindsItsTarget = combatant.ascension >= EVERY_ARROW_FINDS_ITS_TARGET_ASCENSION;
|
|
44
|
+
castKitSummon(kitEffectState, body, hasEveryArrowFindsItsTarget ? addEveryArrowCriticalRate(combatant) : combatant, hasEveryArrowFindsItsTarget ? everyArrowFindsItsTargetFieryRainArrows : fieryRainArrows, { attackTag: "ElementalBurst" });
|
|
45
|
+
if (combatant.constellationCount >= CONSTELLATION_6) {
|
|
46
|
+
const buff = {
|
|
47
|
+
amount: CONSTELLATION_6_SHARE,
|
|
48
|
+
secondsRemaining: CONSTELLATION_6_SECONDS,
|
|
49
|
+
source: FIERY_RAIN_SOURCE
|
|
50
|
+
};
|
|
51
|
+
buffKitTeam(kitEffectState, party, {
|
|
52
|
+
...buff,
|
|
53
|
+
attribute: "FIGHT_PROP_MOVE_SPEED"
|
|
54
|
+
});
|
|
55
|
+
buffKitTeam(kitEffectState, party, {
|
|
56
|
+
...buff,
|
|
57
|
+
attribute: "FIGHT_PROP_ATTACK_PERCENT"
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
} },
|
|
61
|
+
chargedAttack: {
|
|
62
|
+
hits: [{ onStrike: (context, { combatant, hit }) => {
|
|
63
|
+
if (combatant.constellationCount < CONSTELLATION_1 || secondArrowFired) return;
|
|
64
|
+
secondArrowFired = true;
|
|
65
|
+
queueKitPassiveHit(context, combatant, {
|
|
66
|
+
...hit,
|
|
67
|
+
attackTag: void 0,
|
|
68
|
+
onStrike: void 0,
|
|
69
|
+
talentMultiplier: hit.talentMultiplier * CONSTELLATION_1_SECOND_ARROW_SHARE
|
|
70
|
+
});
|
|
71
|
+
} }],
|
|
72
|
+
onStart: () => {
|
|
73
|
+
secondArrowFired = false;
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
getSkillChargeBonus: createConstellationSkillChargeBonus(CONSTELLATION_4),
|
|
77
|
+
getSkillCooldownMultiplier: ({ activeCombatant }) => activeCombatant.constellationCount >= CONSTELLATION_4 ? CONSTELLATION_4_SKILL_COOLDOWN_MULTIPLIER : 1,
|
|
78
|
+
skill: { onStart: ({ activeCombatant: combatant, body, characterIdCombatantMap, kitEffectState, party }) => castKitTaunt(kitEffectState, body, combatant, {
|
|
79
|
+
explosion: bunnyExplosion,
|
|
80
|
+
health: bunnyMaxHealthShare * getKitMaxHealth(combatant, kitEffectState.effects, party, characterIdCombatantMap),
|
|
81
|
+
secondsRemaining: bunnySeconds
|
|
82
|
+
}) }
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
export { createAmberKitBehaviour };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "./GameDataset-oS0Tc9KV.js";
|
|
2
|
+
import { t as getPartyMember } from "./getPartyMember-BAb9wUiz.js";
|
|
3
|
+
import { scheduleKitTask, toKitSeconds } from "./index.js";
|
|
4
|
+
// src/services/kit/characters/arlecchinoKit.ts
|
|
5
|
+
const PYRO_DAMAGE_BONUS = .4;
|
|
6
|
+
const BURST_SKILL_RESET_FRAMES = 107;
|
|
7
|
+
const createArlecchinoKitBehaviour = () => ({
|
|
8
|
+
burst: { onStart: ({ activeCombatant: combatant, kitEffectState }) => scheduleKitTask(kitEffectState, combatant.characterId, toKitSeconds(BURST_SKILL_RESET_FRAMES), ({ party }) => {
|
|
9
|
+
getPartyMember(party, combatant.characterId).skillCooldownSeconds = 0;
|
|
10
|
+
}) },
|
|
11
|
+
getPassiveBonuses: () => [{
|
|
12
|
+
amount: PYRO_DAMAGE_BONUS,
|
|
13
|
+
attribute: "FIGHT_PROP_FIRE_ADD_HURT"
|
|
14
|
+
}]
|
|
15
|
+
});
|
|
16
|
+
export { createArlecchinoKitBehaviour };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import "./GameDataset-oS0Tc9KV.js";
|
|
2
|
+
import { t as addKitEffect } from "./addKitEffect-DEhZUuxo.js";
|
|
3
|
+
import { t as findKitStatus } from "./findKitStatus-Dj_zauGj.js";
|
|
4
|
+
import { t as addKitStatus } from "./addKitStatus-CecgwPmO.js";
|
|
5
|
+
import { castKitSummon, changeKitSkillCooldown, startKitCooldown } from "./index.js";
|
|
6
|
+
// src/services/kit/characters/ayakaKit.ts
|
|
7
|
+
const BLIZZARD_BLADE_SEKI_NO_TO_CONSTELLATION = 2;
|
|
8
|
+
const SENHO_INFUSION_SECONDS = 5;
|
|
9
|
+
const CONSTELLATION_1 = 1;
|
|
10
|
+
const CONSTELLATION_1_CHANCE = .5;
|
|
11
|
+
const CONSTELLATION_1_ICD_SECONDS = .1;
|
|
12
|
+
const CONSTELLATION_1_ICD_STATUS_ID = "ayaka-snowswept-sakura-icd";
|
|
13
|
+
const ASCENSION_1 = 1;
|
|
14
|
+
const AMATSUMI_KUNITSUMI_SANCTIFICATION_DAMAGE_BONUS = .3;
|
|
15
|
+
const AMATSUMI_KUNITSUMI_SANCTIFICATION_SECONDS = 6;
|
|
16
|
+
const AMATSUMI_KUNITSUMI_SANCTIFICATION_STATUS_ID = "ayaka-amatsumi-kunitsumi-sanctification";
|
|
17
|
+
const CONSTELLATION_4 = 4;
|
|
18
|
+
const CONSTELLATION_4_DEFENCE_REDUCTION = .3;
|
|
19
|
+
const CONSTELLATION_4_SECONDS = 6;
|
|
20
|
+
const CONSTELLATION_4_STATUS_ID = "ayaka-frostflake-defence-reduction";
|
|
21
|
+
const CONSTELLATION_6 = 6;
|
|
22
|
+
const USURAHI_BUTOU_DAMAGE_BONUS = 2.98;
|
|
23
|
+
const USURAHI_BUTOU_RECHARGE_SECONDS = 10;
|
|
24
|
+
const USURAHI_BUTOU_STATUS_ID = "ayaka-usurahi-butou-recharge";
|
|
25
|
+
const getFrostflakeDefenceReduction = ({ constellationCount }) => constellationCount >= CONSTELLATION_4 ? {
|
|
26
|
+
damageTakenBonus: 0,
|
|
27
|
+
defenseReduction: CONSTELLATION_4_DEFENCE_REDUCTION,
|
|
28
|
+
id: CONSTELLATION_4_STATUS_ID,
|
|
29
|
+
secondsRemaining: CONSTELLATION_4_SECONDS
|
|
30
|
+
} : void 0;
|
|
31
|
+
const withFrostflakeDefenceReduction = (hits) => hits.map((hit) => ({
|
|
32
|
+
...hit,
|
|
33
|
+
enemyStatusAfterDamage: getFrostflakeDefenceReduction
|
|
34
|
+
}));
|
|
35
|
+
const checkIsUsurahiButouOn = (effects, characterId) => {
|
|
36
|
+
const status = findKitStatus(effects, characterId, USURAHI_BUTOU_STATUS_ID);
|
|
37
|
+
return !status || status.secondsRemaining > USURAHI_BUTOU_RECHARGE_SECONDS;
|
|
38
|
+
};
|
|
39
|
+
const snowsweptSakuraHit = { onStrike: ({ kitEffectState, party, random }, { combatant }) => {
|
|
40
|
+
if (combatant.constellationCount < CONSTELLATION_1) return;
|
|
41
|
+
if (!startKitCooldown(kitEffectState, combatant.characterId, CONSTELLATION_1_ICD_STATUS_ID, CONSTELLATION_1_ICD_SECONDS)) return;
|
|
42
|
+
if (random() < CONSTELLATION_1_CHANCE) changeKitSkillCooldown(party, combatant.characterId, -.3);
|
|
43
|
+
} };
|
|
44
|
+
const chargedAttackHit = { onStrike: (context, strike, enemy) => {
|
|
45
|
+
snowsweptSakuraHit.onStrike?.(context, strike, enemy);
|
|
46
|
+
const { combatant } = strike;
|
|
47
|
+
if (combatant.constellationCount < CONSTELLATION_6) return;
|
|
48
|
+
if (findKitStatus(context.kitEffectState.effects, combatant.characterId, USURAHI_BUTOU_STATUS_ID)) return;
|
|
49
|
+
addKitStatus(context.kitEffectState, combatant.characterId, {
|
|
50
|
+
id: USURAHI_BUTOU_STATUS_ID,
|
|
51
|
+
secondsRemaining: 10.5
|
|
52
|
+
});
|
|
53
|
+
} };
|
|
54
|
+
const createAyakaKitBehaviour = ({ kit, readHits }) => {
|
|
55
|
+
const frostflakeHits = withFrostflakeDefenceReduction(readHits("frostflake"));
|
|
56
|
+
const smallFrostflakeHits = withFrostflakeDefenceReduction(readHits("smallFrostflake"));
|
|
57
|
+
return {
|
|
58
|
+
burst: { onStart: ({ activeCombatant: combatant, body, kitEffectState }) => {
|
|
59
|
+
castKitSummon(kitEffectState, body, combatant, frostflakeHits, { attackTag: "ElementalBurst" });
|
|
60
|
+
if (combatant.constellationCount < BLIZZARD_BLADE_SEKI_NO_TO_CONSTELLATION) return;
|
|
61
|
+
castKitSummon(kitEffectState, body, combatant, smallFrostflakeHits, { attackTag: "ElementalBurst" });
|
|
62
|
+
castKitSummon(kitEffectState, body, combatant, smallFrostflakeHits, { attackTag: "ElementalBurst" });
|
|
63
|
+
} },
|
|
64
|
+
chargedAttack: { hits: kit.chargedAttack.hits.map(() => chargedAttackHit) },
|
|
65
|
+
getStrikeDamageBonus: ({ attackTag, combatant }, _enemy, _party, effects) => {
|
|
66
|
+
return ((attackTag === "NormalAttack" || attackTag === "ChargedAttack") && findKitStatus(effects, combatant.characterId, AMATSUMI_KUNITSUMI_SANCTIFICATION_STATUS_ID) ? AMATSUMI_KUNITSUMI_SANCTIFICATION_DAMAGE_BONUS : 0) + (attackTag === "ChargedAttack" && combatant.constellationCount >= CONSTELLATION_6 && checkIsUsurahiButouOn(effects, combatant.characterId) ? USURAHI_BUTOU_DAMAGE_BONUS : 0);
|
|
67
|
+
},
|
|
68
|
+
normalAttacks: kit.normalAttacks.map(({ hits }) => ({ hits: hits.map(() => snowsweptSakuraHit) })),
|
|
69
|
+
onSprint: ({ activeCombatant: combatant, kitEffectState }) => addKitEffect(kitEffectState, {
|
|
70
|
+
characterId: combatant.characterId,
|
|
71
|
+
element: "Ice",
|
|
72
|
+
kind: "infusion",
|
|
73
|
+
secondsRemaining: SENHO_INFUSION_SECONDS
|
|
74
|
+
}),
|
|
75
|
+
skill: { onStart: ({ activeCombatant: combatant, kitEffectState }) => {
|
|
76
|
+
if (combatant.ascension < ASCENSION_1) return;
|
|
77
|
+
addKitStatus(kitEffectState, combatant.characterId, {
|
|
78
|
+
id: AMATSUMI_KUNITSUMI_SANCTIFICATION_STATUS_ID,
|
|
79
|
+
secondsRemaining: AMATSUMI_KUNITSUMI_SANCTIFICATION_SECONDS
|
|
80
|
+
});
|
|
81
|
+
} }
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
export { createAyakaKitBehaviour };
|