카드 설명 키워드 하이라이트 추가

This commit is contained in:
2026-06-19 01:51:36 +09:00
parent 71435a2c91
commit b2bf1bf4dd
9 changed files with 144 additions and 14 deletions

View File

@@ -3,6 +3,47 @@ import { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, CARDFRAMES, RARITIES, MAP_
import { UI_FILE, COMMON_FILE, UI_ROOT, GENERATED_UI_SECTIONS, UI_APPEND_ORDER, DISABLED_STOCK_CONTROLS, TRANSPARENT, DARK, GOLD, ATTACK, DEFEND, SKILL, DAMAGE_DIGIT_RUIDS, DAMAGE_POP_MAX_DIGITS, DAMAGE_POP_DIGIT_W, DAMAGE_POP_DIGIT_H, DAMAGE_POP_DIGIT_SPACING, MAX_MONSTERS, HEAD_OFFSET_Y, HP_BAR_W, WHITE, CARD_NAME_TEXT, CARD_DESC_TEXT, cardFaceLayout, CARD_W, CARD_H, CARD_SPACING, CARD_XS, ALIGN_CENTER, ALIGN_BOTTOM_CENTER, guid, transform, sprite, button, text, scrollLayoutGroup, popupLayerFor, uiOrderFor, displayOrderFor, applySortingOverride, entity, uiPath, sectionRoot, isGeneratedUiEntity, appendUiSection } from '../lib/ui-helpers.mjs';
export const tooltipMethods = [
method('FormatCardDescription', `if desc == nil or desc == "" then
return ""
end
local function replacePlain(text, needle, replacement)
local out = ""
local pos = 1
while true do
local s, e = string.find(text, needle, pos, true)
if s == nil then
out = out .. string.sub(text, pos)
break
end
out = out .. string.sub(text, pos, s - 1) .. replacement
pos = e + 1
end
return out
end
local terms = {
"교활",
"보존",
"민첩",
"가시",
"소멸",
"선천성",
"취약",
"약화",
"독",
"광역",
"관통",
"방어도",
"힘",
"스킬",
"공격",
"파워",
}
local out = desc
for i = 1, #terms do
local term = terms[i]
out = replacePlain(out, term, "<color=#70D6FF>" .. term .. "</color>")
end
return out`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'desc' }], 0, 'string'),
method('BuildCardKeywordTooltip', `if c == nil then
return ""
end