Skip to content

Commit

Permalink
Added new enums from 2.108 and new descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
squaresmile committed Feb 28, 2025
1 parent 68f0547 commit 8198ae5
Show file tree
Hide file tree
Showing 14 changed files with 49 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/api-connector/src/Enum/Card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ enum Card {
BLANK = "blank",
WEAK = "weak",
STRENGTH = "strength",
WEAKALT1 = "weakalt1",
WEAKALT2 = "weakalt2",
ADDATTACK2 = "addattack2",
}

Expand Down
2 changes: 2 additions & 0 deletions packages/api-connector/src/Enum/ClassName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ enum ClassName {
BEAST_VI_BOSS = "beastVIBoss",
U_OLGA_MARIE_FLARE = "uOlgaMarieFlare",
U_OLGA_MARIE_AQUA = "uOlgaMarieAqua",
U_OLGA_MARIE_GROUND = "uOlgaMarieGround",
UNKNOWN = "unknown",
AGARTHA_PENTH = "agarthaPenth",
CCC_FINALE_EMIYA_ALTER = "cccFinaleEmiyaAlter",
Expand All @@ -39,6 +40,7 @@ enum ClassName {
EXTRA_II = "EXTRA_II",
U_OLGA_MARIE_FLARE_COLLECTION = "uOlgaMarieFlareCollection",
U_OLGA_MARIE_AQUA_COLLECTION = "uOlgaMarieAquaCollection",
U_OLGA_MARIE_GROUND_COLLECTION = "uOlgaMarieGroundCollection",
BEAST_ERESH = "beastEresh",
}

Expand Down
7 changes: 7 additions & 0 deletions packages/api-connector/src/Enum/Cond.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,13 @@ export enum CondType {
EVENT_SCRIPT_NOT_PLAY = "eventScriptNotPlay",
EVENT_SCRIPT_FLAG = "eventScriptFlag",
IMAGE_PARTS_GROUP = "imagePartsGroup",
USER_LEVEL_ABOVE = "userLevelAbove",
USER_LEVEL_BELOW = "userLevelBelow",
USER_LEVEL_EQUAL = "userLevelEqual",
HIGHEST_WAVE_ABOVE = "highestWaveAbove",
HIGHEST_WAVE_BELOW = "highestWaveBelow",
PRIVILEGE_VALID = "privilegeValid",
PRIVILEGE_INVALID = "privilegeInvalid",
}

export default CondType;
1 change: 1 addition & 0 deletions packages/api-connector/src/Schema/Ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ export enum AiActType {
LOSE_END = "loseEnd",
BATTLE_END_NOT_RELATED_SURVIVAL_STATUS = "battleEndNotRelatedSurvivalStatus",
BATTLE_END_NOT_RELATED_SURVIVAL_STATUS_INSTANTLY = "battleEndNotRelatedSurvivalStatusInstantly",
ALL_BATTLE_END = "allBattleEnd",
CHANGE_THINKING = "changeThinking",
}

Expand Down
2 changes: 2 additions & 0 deletions packages/api-connector/src/Schema/Buff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ export enum BuffAction {
OVERWRITE_SVT_CARD_TYPE = "overwriteSvtCardType",
CRITICAL_DAMAGE_DEF = "criticalDamageDef",
NPDAMAGE_DEF = "npdamageDef",
FUNCTION_WAVESTART_ANIMATION_BEFORE = "functionWavestartAnimationBefore",
}

export enum BuffLimit {
Expand Down Expand Up @@ -374,6 +375,7 @@ export enum BuffType {
UP_DEFENCE_COMMANDSTAR = "upDefenceCommandstar",
DOWN_COMMANDSTAR = "downCommandstar",
DOWN_DEFENCE_COMMANDSTAR = "downDefenceCommandstar",
WAVESTART_ANIMATION_BEFORE_FUNCTION = "wavestartAnimationBeforeFunction",
TO_FIELD_CHANGE_FIELD = "toFieldChangeField",
TO_FIELD_AVOID_BUFF = "toFieldAvoidBuff",
TO_FIELD_SUB_INDIVIDUALITY_FIELD = "toFieldSubIndividualityField",
Expand Down
8 changes: 8 additions & 0 deletions packages/api-connector/src/Schema/DataVal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,13 @@ interface BaseDataVal {
EnemyCountWaitTimeAfterMessage?: number;
WaitMessageEnd?: number;
ContinueDisplayMessage?: number;
MessageStartDelayTime?: number;
StartIntervalTurn?: number;
StartIntervalCount?: number;
CommonReleaseId?: number;
ForceTurnProgressIfTimingIsOverInPartyTurn?: number;
ForceTurnProgressIfTimingIsOverInOpponentTurn?: number;
OverwriteFuncInvalidType?: number;
}

export enum SvtClassGroupType {
Expand Down Expand Up @@ -451,7 +455,11 @@ export enum DataValField {
ENEMY_COUNT_WAIT_TIME_AFTER_MESSAGE = "EnemyCountWaitTimeAfterMessage",
WAIT_MESSAGE_END = "WaitMessageEnd",
CONTINUE_DISPLAY_MESSAGE = "ContinueDisplayMessage",
MESSAGE_START_DELAY_TIME = "MessageStartDelayTime",
START_INTERVAL_TURN = "StartIntervalTurn",
START_INTERVAL_COUNT = "StartIntervalCount",
COMMON_RELEASE_ID = "CommonReleaseId",
FORCE_TURN_PROGRESS_IF_TIMING_IS_OVER_IN_PARTY_TURN = "ForceTurnProgressIfTimingIsOverInPartyTurn",
FORCE_TURN_PROGRESS_IF_TIMING_IS_OVER_IN_OPPONENT_TURN = "ForceTurnProgressIfTimingIsOverInOpponentTurn",
OVERWRITE_FUNC_INVALID_TYPE = "OverwriteFuncInvalidType",
}
1 change: 1 addition & 0 deletions packages/api-connector/src/Schema/Func.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ export enum FuncType {
GAIN_NP_TARGET_SUM = "gainNpTargetSum",
ENEMY_COUNT_CHANGE = "enemyCountChange",
DISPLAY_BATTLE_MESSAGE = "displayBattleMessage",
GENERATE_BATTLE_SKILL_DROP = "generateBattleSkillDrop",
}

export enum GainNpIndividualSumTarget {
Expand Down
1 change: 1 addition & 0 deletions packages/api-connector/src/Schema/Gift.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export enum GiftType {
EVENT_COMMAND_ASSIST = "eventCommandAssist",
EVENT_HEEL_PORTRAIT = "eventHeelPortrait",
BATTLE_ITEM = "battleItem",
PRIVILEGE = "privilege",
}

export interface BaseGift {
Expand Down
11 changes: 11 additions & 0 deletions packages/api-descriptor/src/Buff/BuffTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,16 @@ export const upDownBuffs: UpDownBuffType[] = [
up: Buff.BuffType.MASTER_SKILL_VALUE_UP,
description: "Master Skill Effectiveness",
},
{
up: Buff.BuffType.UP_DEFENCE_NPDAMAGE,
down: Buff.BuffType.DOWN_DEFENCE_NPDAMAGE,
description: "NP Damage Defense",
},
{
up: Buff.BuffType.UP_DEFENCE_CRITICALDAMAGE,
down: Buff.BuffType.DOWN_DEFENCE_CRITICALDAMAGE,
description: "Critical Damage Defense",
},
];

export const buffTraitDescriptions = new Map<number, { name: string; priority: number }>([
Expand Down Expand Up @@ -231,4 +241,5 @@ export const buffTriggerTypes = new Map<Buff.BuffType, BuffTriggerType>([
[Buff.BuffType.SELFTURNSTART_FUNCTION, { after: false, event: "start of own turn" }],
[Buff.BuffType.COMBO_START_FUNCTION, { after: false, event: "function" }],
[Buff.BuffType.COMBO_END_FUNCTION, { after: true, event: "function" }],
[Buff.BuffType.WAVESTART_ANIMATION_BEFORE_FUNCTION, { after: false, event: "wave start" }],
]);
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ const funcDescriptions = new Map<Func.FuncType, string>([
[Func.FuncType.LAST_USE_PLAYER_SKILL_COPY, "Copy Last Used Player Skill"],
[Func.FuncType.DISPLAY_BUFFSTRING, "Display Buff String"],
[Func.FuncType.ADD_BATTLE_POINT, "Add Battle Point"],
[Func.FuncType.GENERATE_BATTLE_SKILL_DROP, "Drop Battle Skill"],
]);

export default function (func: Func.Func): BasePartial[] {
Expand Down
8 changes: 6 additions & 2 deletions packages/api-descriptor/src/Func/getRelatedSkillIds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ export interface relatedSkill {
export default function (func: Func.Func, dataVals?: DataVal.DataVal[]): relatedSkill[] {
const vals = dataVals ?? getValList(func);

if (func.funcType === Func.FuncType.GENERATE_BATTLE_SKILL_DROP) {
return getUniqueDataValField(vals, DataVal.DataValField.VALUE);
}

if (func.funcType !== Func.FuncType.ADD_STATE && func.funcType !== Func.FuncType.ADD_STATE_SHORT) return [];

const buffTriggerType = buffTriggerTypes.get(func.buffs[0].type);
Expand All @@ -28,13 +32,13 @@ export default function (func: Func.Func, dataVals?: DataVal.DataVal[]): related
function getUniqueDataValField(
dataVals: DataVal.DataVal[],
idField: DataVal.DataValField,
lvField: DataVal.DataValField
lvField?: DataVal.DataValField
): relatedSkill[] {
let relatedSkills: Record<number, relatedSkill> = {};

dataVals.forEach((dataVal) => {
const skillId = dataVal[idField];
const skillLv = dataVal[lvField];
const skillLv = lvField ? dataVal[lvField] : 1;
if (typeof skillId === "number" && typeof skillLv === "number") {
if (skillId in relatedSkills) {
relatedSkills[skillId].skillLvs.push(skillLv);
Expand Down
2 changes: 2 additions & 0 deletions packages/db/src/Component/ClassIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ const classIds = new Map<ClassName, number>([
[ClassName.BEAST_VI_BOSS, 35],
[ClassName.U_OLGA_MARIE_FLARE, 31],
[ClassName.U_OLGA_MARIE_AQUA, 31],
[ClassName.U_OLGA_MARIE_GROUND, 31],
[ClassName.CCC_FINALE_EMIYA_ALTER, 124],
[ClassName.U_OLGA_MARIE_FLARE_COLLECTION, 31],
[ClassName.U_OLGA_MARIE_AQUA_COLLECTION, 31],
[ClassName.U_OLGA_MARIE_GROUND_COLLECTION, 31],
[ClassName.BEAST_ERESH, 33],

[ClassName.ALL, 1001],
Expand Down
1 change: 1 addition & 0 deletions packages/db/src/Descriptor/Func/handleActionSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export const funcDescriptions = new Map<Func.FuncType, string>([
[Func.FuncType.LAST_USE_PLAYER_SKILL_COPY, "Copy Last Used Player Skill"],
[Func.FuncType.DISPLAY_BUFFSTRING, "Display Buff String"],
[Func.FuncType.ADD_BATTLE_POINT, "Add Battle Point"],
[Func.FuncType.GENERATE_BATTLE_SKILL_DROP, "Drop Battle Skill"],
]);

function handleBuffActionSection(
Expand Down
4 changes: 4 additions & 0 deletions packages/db/src/Descriptor/Func/handleAmountSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ export default function handleAmountSection(
parts.push("that triggers");
}
parts.push(<SkillReferenceDescriptor region={region} id={buffTriggerSkillId} />);
} else if (func.funcType === Func.FuncType.GENERATE_BATTLE_SKILL_DROP && dataVal.Value !== undefined) {
section.preposition = undefined;
parts.push("that triggers");
parts.push(<SkillReferenceDescriptor region={region} id={dataVal.Value} />);
} else if (func.funcType === Func.FuncType.DISPLAY_BUFFSTRING) {
section.preposition = undefined;
parts.push(<span lang={lang(region)}>[{func.funcPopupText}]</span>);
Expand Down

0 comments on commit 8198ae5

Please sign in to comment.