Skip to content

Commit

Permalink
Added add battle point description
Browse files Browse the repository at this point in the history
  • Loading branch information
squaresmile committed Aug 4, 2024
1 parent a50bf99 commit 0217d2a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/api-descriptor/src/Buff/describeValue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ function describeDataVal(
partials.push(new ParticlePartial(" /Stack"));
}

if (dataVal.BattlePointValue) {
partials.push(dataVal.BattlePointValue);
}

return partials.length > 0 ? new Descriptor(partials) : undefined;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ const funcDescriptions = new Map<Func.FuncType, string>([
[Func.FuncType.SHORTEN_BUFFTURN, "Shorten Buff Duration"],
[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"],
]);

export default function (func: Func.Func): BasePartial[] {
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 @@ -70,6 +70,7 @@ export const funcDescriptions = new Map<Func.FuncType, string>([
[Func.FuncType.SHORTEN_BUFFTURN, "Shorten Buff Duration"],
[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"],
]);

function handleBuffActionSection(
Expand Down
2 changes: 2 additions & 0 deletions packages/db/src/Descriptor/Func/handleAmountSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ export default function handleAmountSection(
} else if (func.funcType === Func.FuncType.DISPLAY_BUFFSTRING) {
section.preposition = undefined;
parts.push(<span lang={lang(region)}>[{func.funcPopupText}]</span>);
} else if (func.funcType === Func.FuncType.ADD_BATTLE_POINT) {
parts.push(dataVal.BattlePointValue);
} else if (func.funcType === Func.FuncType.CARD_RESET && dataVal.Value) {
section.preposition = undefined;
parts.push(`${dataVal.Value} time${dataVal.Value > 1 ? "s" : ""}`);
Expand Down

0 comments on commit 0217d2a

Please sign in to comment.