Refine rogue job progression
This commit is contained in:
@@ -11,14 +11,14 @@ self:RenderCharacterSelect()`, [
|
||||
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'className' },
|
||||
]),
|
||||
method('RenderCharacterSelect', `local base = "/ui/SelectUIGroup/CharacterSelectHud"
|
||||
local arts = { { p = "/WarriorButton/Art", c = "warrior" }, { p = "/MageButton/Art", c = "magician" }, { p = "/BanditButton/Art", c = "bandit" } }
|
||||
local arts = { { p = "/WarriorButton/Art", c = "warrior" }, { p = "/MageButton/Art", c = "magician" }, { p = "/BanditButton/Art", c = "rogue" } }
|
||||
for i = 1, #arts do
|
||||
local e = _EntityService:GetEntityByPath(base .. arts[i].p)
|
||||
if e ~= nil and e.SpriteGUIRendererComponent ~= nil and self.ClassPortraits ~= nil and self.ClassPortraits[arts[i].c] ~= nil then
|
||||
e.SpriteGUIRendererComponent.ImageRUID = self.ClassPortraits[arts[i].c]
|
||||
end
|
||||
end
|
||||
local btns = { { p = "/WarriorButton", c = "warrior" }, { p = "/MageButton", c = "magician" }, { p = "/BanditButton", c = "bandit" } }
|
||||
local btns = { { p = "/WarriorButton", c = "warrior" }, { p = "/MageButton", c = "magician" }, { p = "/BanditButton", c = "rogue" } }
|
||||
for i = 1, #btns do
|
||||
local e = _EntityService:GetEntityByPath(base .. btns[i].p)
|
||||
if e ~= nil then
|
||||
@@ -44,9 +44,9 @@ if self.SelectedClass == "warrior" then
|
||||
eng = "Warrior"
|
||||
btnName = "/WarriorButton"
|
||||
desc = "직업군 · 모험가" .. nl .. "방어를 쌓고 버티다 강하게 역공하는 단단한 탱커."
|
||||
elseif self.SelectedClass == "bandit" then
|
||||
elseif self.SelectedClass == "rogue" then
|
||||
name = "도적"
|
||||
eng = "Thief"
|
||||
eng = "Rogue"
|
||||
btnName = "/BanditButton"
|
||||
desc = "직업군 · 모험가" .. nl .. "표창 난사와 독으로 빠르게 몰아치는 민첩한 직업."
|
||||
elseif self.SelectedClass == "magician" then
|
||||
@@ -65,7 +65,7 @@ end
|
||||
self:SetText(base .. "/SelectedClass", name)
|
||||
self:SetText(base .. "/SelectedClass/SelectedClassEng", eng)
|
||||
self:SetText(base .. "/SelectedClassStatus", desc)`),
|
||||
method('StartNewGame', `if self.SelectedClass ~= "warrior" and self.SelectedClass ~= "bandit" and self.SelectedClass ~= "magician" then
|
||||
method('StartNewGame', `if self.SelectedClass ~= "warrior" and self.SelectedClass ~= "rogue" and self.SelectedClass ~= "magician" then
|
||||
self:SetText("/ui/SelectUIGroup/CharacterSelectHud/SelectedClassStatus", "직업을 먼저 선택하세요")
|
||||
return
|
||||
end
|
||||
|
||||
@@ -707,7 +707,7 @@ if anyAlive == false then
|
||||
end
|
||||
end
|
||||
if node ~= nil and node.type == "boss" then
|
||||
if self.PlayerJob == "" and self.Floor < self.RunLength then
|
||||
if self:CanAdvanceJob() == true and self.Floor < self.RunLength then
|
||||
self:ShowJobChoice()
|
||||
else
|
||||
if self.PlayerJob ~= "" then self:AwardSouls(1) end
|
||||
|
||||
@@ -77,7 +77,7 @@ if thiefTab ~= nil and (thiefTab.ButtonComponent ~= nil or thiefTab:AddComponent
|
||||
thiefTab:DisconnectEvent(ButtonClickEvent, self.ThiefDeckTabHandler)
|
||||
self.ThiefDeckTabHandler = nil
|
||||
end
|
||||
self.ThiefDeckTabHandler = thiefTab:ConnectEvent(ButtonClickEvent, function() self:SetClassDeckTab("bandit") end)
|
||||
self.ThiefDeckTabHandler = thiefTab:ConnectEvent(ButtonClickEvent, function() self:SetClassDeckTab("rogue") end)
|
||||
end
|
||||
local mageTab = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud/MageTab")
|
||||
if mageTab ~= nil and (mageTab.ButtonComponent ~= nil or mageTab:AddComponent("ButtonComponent") ~= nil) then
|
||||
@@ -101,8 +101,8 @@ end`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], N
|
||||
return
|
||||
end
|
||||
local className = self.SelectedClass
|
||||
if className ~= "warrior" and className ~= "magician" and className ~= "bandit" then
|
||||
className = "bandit"
|
||||
if className ~= "warrior" and className ~= "magician" and className ~= "rogue" then
|
||||
className = "rogue"
|
||||
end
|
||||
self.CodexMode = false
|
||||
self.ClassDeckMode = true
|
||||
@@ -119,32 +119,30 @@ self:Toast("테스트 카드 추가 모드")`),
|
||||
end
|
||||
self.ClassDeckCards = {}
|
||||
self.ClassDeckTitle = "직업 덱"
|
||||
if className ~= "warrior" and className ~= "magician" and className ~= "bandit" then
|
||||
className = "bandit"
|
||||
if className ~= "warrior" and className ~= "magician" and className ~= "rogue" then
|
||||
className = "rogue"
|
||||
end
|
||||
self.ClassDeckClass = className
|
||||
local allowed = {}
|
||||
local group = nil
|
||||
if self.ClassGroups ~= nil then
|
||||
group = self.ClassGroups[className]
|
||||
end
|
||||
if group == nil then
|
||||
group = { className }
|
||||
end
|
||||
for i = 1, #group do
|
||||
allowed[group[i]] = true
|
||||
end
|
||||
if className == "warrior" then
|
||||
allowed["warrior"] = true
|
||||
allowed["fighter"] = true
|
||||
allowed["page"] = true
|
||||
allowed["spearman"] = true
|
||||
self.ClassDeckTitle = "전사 전체 덱"
|
||||
elseif className == "magician" then
|
||||
allowed["magician"] = true
|
||||
allowed["firepoison"] = true
|
||||
allowed["icelightning"] = true
|
||||
allowed["cleric"] = true
|
||||
self.ClassDeckTitle = "마법사 전체 덱"
|
||||
else
|
||||
allowed["bandit"] = true
|
||||
allowed["shiv"] = true
|
||||
allowed["poisoner"] = true
|
||||
allowed["trickster"] = true
|
||||
self.ClassDeckTitle = "도적 전체 덱"
|
||||
end
|
||||
for id, c in pairs(self.Cards) do
|
||||
if c ~= nil and c.curse ~= true and allowed[c.class] == true then
|
||||
if c ~= nil and c.curse ~= true and c.token ~= true and allowed[c.class] == true then
|
||||
table.insert(self.ClassDeckCards, id)
|
||||
end
|
||||
end
|
||||
@@ -162,7 +160,7 @@ self:RenderAllDeck()
|
||||
self:RenderClassDeckTabs()`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'className' }]),
|
||||
method('RenderClassDeckTabs', `local tabs = {
|
||||
{ path = "/ui/DeckUIGroup/DeckAllHud/WarriorTab", cls = "warrior" },
|
||||
{ path = "/ui/DeckUIGroup/DeckAllHud/ThiefTab", cls = "bandit" },
|
||||
{ path = "/ui/DeckUIGroup/DeckAllHud/ThiefTab", cls = "rogue" },
|
||||
{ path = "/ui/DeckUIGroup/DeckAllHud/MageTab", cls = "magician" },
|
||||
}
|
||||
for i = 1, #tabs do
|
||||
|
||||
@@ -1,9 +1,50 @@
|
||||
import { method, RUN_LENGTH, GOLD_PER_WIN, CARD_PRICE, REST_HEAL, RELIC_PRICE, ACT_COUNT, ACT_MAPS, LOBBY_MAP, LOBBY_SPAWN } from '../lib/codeblock.mjs';
|
||||
import { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, CARDFRAMES, RARITIES, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, POTIONS, luaSoulShopTable, frameRuid, luaFramesTable, luaNodeIconsTable, luaRelicsTable, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../lib/data.mjs';
|
||||
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';
|
||||
import { method } from '../lib/codeblock.mjs';
|
||||
|
||||
export const jobMethods = [
|
||||
method('ShowJobChoice', `self:SetEntityEnabled("/ui/RunUIGroup/CardHand", false)
|
||||
method('BaseClassLabel', `if classId == "warrior" then
|
||||
return "전사"
|
||||
elseif classId == "rogue" then
|
||||
return "Rogue"
|
||||
elseif classId == "magician" then
|
||||
return "마법사"
|
||||
end
|
||||
return "플레이어"`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'classId' }], 0, 'string'),
|
||||
method('CurrentClassId', `if self.PlayerJob ~= nil and self.PlayerJob ~= "" then
|
||||
return self.PlayerJob
|
||||
end
|
||||
return self.SelectedClass or ""`, [], 0, 'string'),
|
||||
method('GetPlayableClasses', `local current = self:CurrentClassId()
|
||||
if current == nil or current == "" then
|
||||
return {}
|
||||
end
|
||||
if self.ClassLineages ~= nil and self.ClassLineages[current] ~= nil then
|
||||
return self.ClassLineages[current]
|
||||
end
|
||||
return { current }`, [], 0, 'any'),
|
||||
method('CanUseClassCard', `if cardClass == nil or cardClass == "" then
|
||||
return false
|
||||
end
|
||||
if cardClass == "curse" then
|
||||
return true
|
||||
end
|
||||
local playable = self:GetPlayableClasses()
|
||||
for i = 1, #playable do
|
||||
if playable[i] == cardClass then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'cardClass' }], 0, 'boolean'),
|
||||
method('CanAdvanceJob', `local current = self:CurrentClassId()
|
||||
if current == nil or current == "" or self.Jobs == nil then
|
||||
return false
|
||||
end
|
||||
local opts = self.Jobs[current]
|
||||
return opts ~= nil and #opts > 0`, [], 0, 'boolean'),
|
||||
method('ShowJobChoice', `if self:CanAdvanceJob() ~= true then
|
||||
self:ContinueAfterBoss()
|
||||
return
|
||||
end
|
||||
self:SetEntityEnabled("/ui/RunUIGroup/CardHand", false)
|
||||
self:SetEntityEnabled("/ui/RunUIGroup/DeckHud", false)
|
||||
self:SetEntityEnabled("/ui/SelectUIGroup/JobChoiceHud", true)`),
|
||||
method('PickJobReward', `self:SetEntityEnabled("/ui/SelectUIGroup/JobChoiceHud", false)
|
||||
@@ -20,9 +61,13 @@ if kind == "relic" then
|
||||
else
|
||||
self:ShowJobSelect()
|
||||
end`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'kind' }]),
|
||||
method('ShowJobSelect', `local opts = self.Jobs[self.SelectedClass]
|
||||
method('ShowJobSelect', `local current = self:CurrentClassId()
|
||||
local opts = nil
|
||||
if self.Jobs ~= nil then
|
||||
opts = self.Jobs[current]
|
||||
end
|
||||
if opts == nil then
|
||||
opts = self.Jobs["warrior"]
|
||||
opts = {}
|
||||
end
|
||||
self.JobOpts = opts
|
||||
for i = 1, 3 do
|
||||
@@ -41,36 +86,30 @@ for i = 1, 3 do
|
||||
end
|
||||
end
|
||||
self:SetEntityEnabled("/ui/SelectUIGroup/JobSelectHud", true)`),
|
||||
method('JobLabel', `if self.PlayerJob ~= "" and self.Jobs ~= nil then
|
||||
for cls, list in pairs(self.Jobs) do
|
||||
for i = 1, #list do
|
||||
if list[i].id == self.PlayerJob then
|
||||
return list[i].name
|
||||
end
|
||||
end
|
||||
end
|
||||
method('JobLabel', `if self.PlayerJob ~= "" and self.JobMeta ~= nil and self.JobMeta[self.PlayerJob] ~= nil then
|
||||
return self.JobMeta[self.PlayerJob].name
|
||||
end
|
||||
if self.SelectedClass == "warrior" then
|
||||
return "전사"
|
||||
elseif self.SelectedClass == "bandit" then
|
||||
return "도적"
|
||||
elseif self.SelectedClass == "magician" then
|
||||
return "마법사"
|
||||
end
|
||||
return "플레이어"`, [], 0, 'string'),
|
||||
method('SetJob', `self.PlayerJob = jobId
|
||||
return self:BaseClassLabel(self.SelectedClass)`, [], 0, 'string'),
|
||||
method('SetJob', `local current = self:CurrentClassId()
|
||||
local starter = ""
|
||||
local opts = self.Jobs[self.SelectedClass] or {}
|
||||
local tier = 2
|
||||
local opts = {}
|
||||
if self.Jobs ~= nil and self.Jobs[current] ~= nil then
|
||||
opts = self.Jobs[current]
|
||||
end
|
||||
for i = 1, #opts do
|
||||
if opts[i].id == jobId then
|
||||
starter = opts[i].starter
|
||||
starter = opts[i].starter or ""
|
||||
tier = opts[i].tier or 2
|
||||
break
|
||||
end
|
||||
end
|
||||
self.PlayerJob = jobId
|
||||
if starter ~= "" then
|
||||
table.insert(self.RunDeck, starter)
|
||||
local sc = self.Cards[starter]
|
||||
if sc ~= nil then
|
||||
self:Toast("2차 전직: " .. self:JobLabel() .. "! 신규 카드 — " .. sc.name)
|
||||
self:Toast(tostring(tier) .. "차 전직: " .. self:JobLabel() .. "! 신규 카드 - " .. sc.name)
|
||||
end
|
||||
end
|
||||
self:SetText("/ui/RunUIGroup/CombatHud/PlayerPanel/Name", self:JobLabel())
|
||||
|
||||
@@ -5,7 +5,7 @@ import { UI_FILE, COMMON_FILE, UI_ROOT, GENERATED_UI_SECTIONS, UI_APPEND_ORDER,
|
||||
export const rewardMethods = [
|
||||
method('CardPool', `local pool = {}
|
||||
for id, c in pairs(self.Cards) do
|
||||
if c.token ~= true and (c.class == self.SelectedClass or (self.PlayerJob ~= "" and c.class == self.PlayerJob)) then
|
||||
if c.token ~= true and self:CanUseClassCard(c.class) == true then
|
||||
table.insert(pool, id)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { method, RUN_LENGTH, GOLD_PER_WIN, CARD_PRICE, REST_HEAL, RELIC_PRICE, ACT_COUNT, ACT_MAPS, LOBBY_MAP, LOBBY_SPAWN } from '../lib/codeblock.mjs';
|
||||
import { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, CARDFRAMES, RARITIES, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, POTIONS, luaSoulShopTable, frameRuid, luaFramesTable, luaNodeIconsTable, luaCharsTable, luaRelicsTable, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../lib/data.mjs';
|
||||
import { CARDS, ENEMIES, CLASSES, JOBS, JOB_META, CLASS_GROUPS, CLASS_LINEAGES, SOUL_UNLOCKS, CARDFRAMES, RARITIES, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, POTIONS, luaSoulShopTable, frameRuid, luaFramesTable, luaNodeIconsTable, luaCharsTable, luaRelicsTable, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaClassGroupsTable, luaClassLineagesTable, luaJobMetaTable, luaCardsTable, luaDeckTable } from '../lib/data.mjs';
|
||||
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 runMethods = [
|
||||
method('StartRun', `if self.SelectedClass == "magician" then
|
||||
self.PlayerMaxHp = ${CLASSES.magician.maxHp}
|
||||
self.RunDeck = { ${CARDS.starterDecks.magician.map(luaStr).join(', ')} }
|
||||
elseif self.SelectedClass == "bandit" then
|
||||
self.PlayerMaxHp = ${CLASSES.bandit.maxHp}
|
||||
self.RunDeck = { ${CARDS.starterDecks.bandit.map(luaStr).join(', ')} }
|
||||
elseif self.SelectedClass == "rogue" then
|
||||
self.PlayerMaxHp = ${CLASSES.rogue.maxHp}
|
||||
self.RunDeck = { ${CARDS.starterDecks.rogue.map(luaStr).join(', ')} }
|
||||
else
|
||||
self.PlayerMaxHp = ${CLASSES.warrior.maxHp}
|
||||
self.RunDeck = { ${CARDS.starterDecks.warrior.map(luaStr).join(', ')} }
|
||||
@@ -30,6 +30,9 @@ self.CurrentNodeId = ""
|
||||
self.CurrentEnemyId = ""
|
||||
self.PlayerJob = ""
|
||||
${luaJobsTable(JOBS)}
|
||||
${luaJobMetaTable(JOB_META)}
|
||||
${luaClassGroupsTable(CLASS_GROUPS)}
|
||||
${luaClassLineagesTable(CLASS_LINEAGES)}
|
||||
${luaFramesTable()}
|
||||
${luaNodeIconsTable()}
|
||||
${luaCharsTable()}
|
||||
|
||||
@@ -75,7 +75,7 @@ if thief ~= nil and (thief.ButtonComponent ~= nil or thief:AddComponent("ButtonC
|
||||
thief:DisconnectEvent(ButtonClickEvent, self.ThiefSelectHandler)
|
||||
self.ThiefSelectHandler = nil
|
||||
end
|
||||
self.ThiefSelectHandler = thief:ConnectEvent(ButtonClickEvent, function() self:SelectClass("bandit") end)
|
||||
self.ThiefSelectHandler = thief:ConnectEvent(ButtonClickEvent, function() self:SelectClass("rogue") end)
|
||||
end
|
||||
local mage = _EntityService:GetEntityByPath("/ui/SelectUIGroup/CharacterSelectHud/MageButton")
|
||||
if mage ~= nil and (mage.ButtonComponent ~= nil or mage:AddComponent("ButtonComponent") ~= nil) then
|
||||
|
||||
@@ -48,6 +48,9 @@ function writeCodeblocks() {
|
||||
prop('any', 'AscPlusHandler'),
|
||||
prop('any', 'JobOpts'),
|
||||
prop('any', 'Jobs'),
|
||||
prop('any', 'JobMeta'),
|
||||
prop('any', 'ClassGroups'),
|
||||
prop('any', 'ClassLineages'),
|
||||
prop('number', 'AscensionLevel', '0'),
|
||||
prop('number', 'AscensionUnlocked', '0'),
|
||||
prop('any', 'StartGameHandler'),
|
||||
|
||||
@@ -6,7 +6,7 @@ const ENEMIES = JSON.parse(readFileSync('data/enemies.json', 'utf8'));
|
||||
// 검증 (fail-fast): 잘못된 데이터면 생성 중단
|
||||
const CLASSES = {
|
||||
warrior: { label: '전사', maxHp: 80 },
|
||||
bandit: { label: '도적', maxHp: 70 },
|
||||
rogue: { label: '도적', maxHp: 70 },
|
||||
magician: { label: '마법사', maxHp: 70 },
|
||||
};
|
||||
for (const cls of Object.keys(CLASSES)) {
|
||||
@@ -15,22 +15,28 @@ for (const cls of Object.keys(CLASSES)) {
|
||||
if (!CARDS.cards[id]) throw new Error(`[gen-slaydeck] starterDecks.${cls}에 없는 카드 id 참조: ${id}`);
|
||||
}
|
||||
}
|
||||
// 전직 옵션 (클래스별 2차 — JobSelectHud 동적 구성·SetJob 대표 카드)
|
||||
|
||||
// 전직 옵션
|
||||
const JOBS = {
|
||||
warrior: [
|
||||
{ id: 'fighter', name: '파이터', desc: '공격 특화\n콤보 어택 · 버서크\n라이징 어택', starter: 'ComboAttack' },
|
||||
{ id: 'page', name: '페이지', desc: '속성 차지 특화\n썬더/블리자드 차지\n파워 가드', starter: 'ThunderCharge' },
|
||||
{ id: 'spearman', name: '스피어맨', desc: '방어·관통 특화\n피어스 · 아이언 월\n하이퍼 바디', starter: 'Pierce' },
|
||||
{ id: 'fighter', name: '파이터', desc: '공격 특화\n콤보 어택 · 버서크\n라이징 어택', starter: 'ComboAttack', tier: 2, parent: 'warrior' },
|
||||
{ id: 'page', name: '페이지', desc: '속성 차지 특화\n썬더/블리자드 차지\n파워 가드', starter: 'ThunderCharge', tier: 2, parent: 'warrior' },
|
||||
{ id: 'spearman', name: '스피어맨', desc: '방어·관통 특화\n피어스 · 아이언 월\n하이퍼 바디', starter: 'Pierce', tier: 2, parent: 'warrior' },
|
||||
],
|
||||
magician: [
|
||||
{ id: 'firepoison', name: '위자드(불·독)', desc: '화염·독 특화\n파이어 애로우\n포이즌 브레스 · 앰플', starter: 'FireArrow' },
|
||||
{ id: 'icelightning', name: '위자드(썬·콜)', desc: '광역·빙결 특화\n썬더 볼트(전체)\n콜드 빔 · 칠링 스텝', starter: 'ThunderBolt' },
|
||||
{ id: 'cleric', name: '클레릭', desc: '회복·축복 특화\n힐 · 블레스\n홀리 애로우', starter: 'Heal' },
|
||||
{ id: 'firepoison', name: '위자드(불·독)', desc: '화염·독 특화\n파이어 애로우\n포이즌 브레스 · 앰플', starter: 'FireArrow', tier: 2, parent: 'magician' },
|
||||
{ id: 'icelightning', name: '위자드(썬·콜)', desc: '광역·빙결 특화\n썬더 볼트(전체)\n콜드 빔 · 칠링 스텝', starter: 'ThunderBolt', tier: 2, parent: 'magician' },
|
||||
{ id: 'cleric', name: '클레릭', desc: '회복·축복 특화\n힐 · 블레스\n홀리 애로우', starter: 'Heal', tier: 2, parent: 'magician' },
|
||||
],
|
||||
bandit: [
|
||||
{ id: 'shiv', name: 'Shiv', desc: 'Many small attacks\nBlade Dance\nAccuracy · After Image', starter: 'BladeDance' },
|
||||
{ id: 'poisoner', name: 'Poison', desc: 'Poison scaling\nDeadly Poison\nCatalyst · Noxious Fumes', starter: 'DeadlyPoison' },
|
||||
{ id: 'trickster', name: 'Trickster', desc: 'Draw and tempo\nAcrobatics\nAdrenaline · Tools', starter: 'Acrobatics' },
|
||||
rogue: [
|
||||
{ id: 'assassin', name: 'Assassin', desc: '표창 중심 전직\n단일 화력과 독 압박\n빠른 마무리', starter: 'DeadlyPoison', tier: 2, parent: 'rogue' },
|
||||
{ id: 'thief', name: 'Thief', desc: '단검 중심 전직\n드로우와 운영 강화\n빠른 연계', starter: 'Acrobatics', tier: 2, parent: 'rogue' },
|
||||
],
|
||||
assassin: [
|
||||
{ id: 'hermit', name: 'Hermit', desc: 'Assassin의 3차 전직\n표창과 독 운영 심화\n누적 압박 강화', starter: 'NoxiousFumes', tier: 3, parent: 'assassin' },
|
||||
],
|
||||
thief: [
|
||||
{ id: 'thiefmaster', name: 'Thief Master', desc: 'Thief의 3차 전직\n단검 운영 심화\n드로우와 템포 강화', starter: 'ToolsOfTheTrade', tier: 3, parent: 'thief' },
|
||||
],
|
||||
};
|
||||
for (const [cls, jobs] of Object.entries(JOBS)) {
|
||||
@@ -38,6 +44,42 @@ for (const [cls, jobs] of Object.entries(JOBS)) {
|
||||
if (!CARDS.cards[j.starter]) throw new Error(`[gen-slaydeck] JOBS.${cls}.${j.id} 대표 카드 없음: ${j.starter}`);
|
||||
}
|
||||
}
|
||||
|
||||
const CLASS_GROUPS = {
|
||||
warrior: ['warrior', 'fighter', 'page', 'spearman'],
|
||||
magician: ['magician', 'firepoison', 'icelightning', 'cleric'],
|
||||
rogue: ['rogue', 'assassin', 'hermit', 'thief', 'thiefmaster'],
|
||||
};
|
||||
|
||||
const CLASS_LINEAGES = {
|
||||
warrior: ['warrior'],
|
||||
fighter: ['warrior', 'fighter'],
|
||||
page: ['warrior', 'page'],
|
||||
spearman: ['warrior', 'spearman'],
|
||||
magician: ['magician'],
|
||||
firepoison: ['magician', 'firepoison'],
|
||||
icelightning: ['magician', 'icelightning'],
|
||||
cleric: ['magician', 'cleric'],
|
||||
rogue: ['rogue'],
|
||||
assassin: ['rogue', 'assassin'],
|
||||
hermit: ['rogue', 'assassin', 'hermit'],
|
||||
thief: ['rogue', 'thief'],
|
||||
thiefmaster: ['rogue', 'thief', 'thiefmaster'],
|
||||
};
|
||||
|
||||
const JOB_META = {};
|
||||
for (const [sourceClass, jobs] of Object.entries(JOBS)) {
|
||||
for (const job of jobs) {
|
||||
JOB_META[job.id] = {
|
||||
name: job.name,
|
||||
starter: job.starter,
|
||||
tier: job.tier ?? 2,
|
||||
parent: job.parent ?? sourceClass,
|
||||
sourceClass,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// 영혼(soul) 메타 해금 — 2차 전직 후 보스 클리어로 영혼 적립, 로비 영혼상점에서 구매 → 다음 런 이점
|
||||
const SOUL_UNLOCKS = [
|
||||
{ key: 'meso', name: '두둑한 지갑', desc: '런 시작 시 메소 +60', cost: 3 },
|
||||
@@ -85,27 +127,23 @@ function luaCharsTable() {
|
||||
}
|
||||
|
||||
// 맵은 런타임 절차 생성(GenerateMap Lua ↔ tools/map/rogue-map.mjs 미러). 정적 data/map.json 제거됨.
|
||||
const MAP_ROWS = 6; // 걷는 행 1..6, 보스 row 7 (depth 최대 7)
|
||||
const MAP_ROWS = 6;
|
||||
const MAP_COLS = 4;
|
||||
|
||||
// 보물 상자 스프라이트 (공식 maplestory 리소스, 메이커 선별)
|
||||
const CHEST_CLOSED_RUID = '43df67920c0d43298e0d93c02c6afa71';
|
||||
const CHEST_OPEN_RUID = '09c5cee56fd640bf8ae3a18ce50f4759';
|
||||
|
||||
// 노드 맵 아이콘/배경 (공식 maplestory RUID, data/nodeicons.json 단일 소스 — 교체 시 이 파일만 수정 후 재생성)
|
||||
const NODEICONS = JSON.parse(readFileSync('data/nodeicons.json', 'utf8'));
|
||||
for (const t of ['combat', 'elite', 'boss', 'shop', 'rest', 'treasure']) {
|
||||
if (!/^[0-9a-f]{32}$/.test((NODEICONS.icons || {})[t] || '')) throw new Error(`[gen-slaydeck] nodeicons.json icons.${t} RUID 누락/형식오류`);
|
||||
}
|
||||
if (!/^[0-9a-f]{32}$/.test(NODEICONS.background || '')) throw new Error('[gen-slaydeck] nodeicons.json background RUID 누락/형식오류');
|
||||
|
||||
// 캐릭터 선택 초상화 (메이커 임포트 RUID, data/characters.json 단일 소스 — 교체 시 이 파일만 수정 후 재생성)
|
||||
const CHARS = JSON.parse(readFileSync('data/characters.json', 'utf8'));
|
||||
for (const c of ['warrior', 'magician', 'bandit']) {
|
||||
for (const c of ['warrior', 'magician', 'rogue']) {
|
||||
if (!/^[0-9a-f]{32}$/.test((CHARS.portraits || {})[c] || '')) throw new Error(`[gen-slaydeck] characters.json portraits.${c} RUID 누락/형식오류`);
|
||||
}
|
||||
|
||||
// 전투 카메라 고정값(StS2: 플레이어 좌·몬스터 우). KickCombatCamera가 StartCombat에서 재confine에 사용.
|
||||
const CAM = JSON.parse(readFileSync('data/camera.json', 'utf8'));
|
||||
|
||||
const RELICS = JSON.parse(readFileSync('data/relics.json', 'utf8'));
|
||||
@@ -143,17 +181,33 @@ function luaEnemiesTable(enemies) {
|
||||
`\t${id} = { name = ${luaStr(e.name)}, maxHp = ${e.maxHp}, intents = ${luaIntentsArray(e.intents)} },`);
|
||||
return `self.Enemies = {\n${lines.join('\n')}\n}`;
|
||||
}
|
||||
// Lua 직렬화 헬퍼
|
||||
|
||||
function luaStr(s) {
|
||||
return '"' + String(s).replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n') + '"';
|
||||
}
|
||||
function luaJobsTable(jobs) {
|
||||
const cls = Object.entries(jobs).map(([clsId, list]) => {
|
||||
const items = list.map((j) => `\t\t{ id = ${luaStr(j.id)}, name = ${luaStr(j.name)}, desc = ${luaStr(j.desc)}, starter = ${luaStr(j.starter)} },`).join('\n');
|
||||
const items = list.map((j) =>
|
||||
`\t\t{ id = ${luaStr(j.id)}, name = ${luaStr(j.name)}, desc = ${luaStr(j.desc)}, starter = ${luaStr(j.starter)}, tier = ${j.tier ?? 2}, parent = ${luaStr(j.parent ?? clsId)} },`).join('\n');
|
||||
return `\t${clsId} = {\n${items}\n\t},`;
|
||||
}).join('\n');
|
||||
return `self.Jobs = {\n${cls}\n}`;
|
||||
}
|
||||
function luaClassGroupsTable(groups) {
|
||||
const rows = Object.entries(groups).map(([clsId, list]) =>
|
||||
`\t${clsId} = { ${list.map(luaStr).join(', ')} },`).join('\n');
|
||||
return `self.ClassGroups = {\n${rows}\n}`;
|
||||
}
|
||||
function luaClassLineagesTable(lineages) {
|
||||
const rows = Object.entries(lineages).map(([clsId, list]) =>
|
||||
`\t${clsId} = { ${list.map(luaStr).join(', ')} },`).join('\n');
|
||||
return `self.ClassLineages = {\n${rows}\n}`;
|
||||
}
|
||||
function luaJobMetaTable(meta) {
|
||||
const rows = Object.entries(meta).map(([jobId, entry]) =>
|
||||
`\t${jobId} = { name = ${luaStr(entry.name)}, starter = ${luaStr(entry.starter)}, tier = ${entry.tier}, parent = ${luaStr(entry.parent)}, sourceClass = ${luaStr(entry.sourceClass)} },`);
|
||||
return `self.JobMeta = {\n${rows.join('\n')}\n}`;
|
||||
}
|
||||
function luaCardsTable(cards) {
|
||||
const lines = Object.entries(cards).map(([id, c]) => {
|
||||
const fields = [`name = ${luaStr(c.name)}`, `cost = ${c.cost}`, `desc = ${luaStr(c.desc)}`, `kind = ${luaStr(c.kind)}`];
|
||||
@@ -262,4 +316,11 @@ function luaDeckTable(deck) {
|
||||
return `self.DrawPile = { ${deck.map(luaStr).join(', ')} }`;
|
||||
}
|
||||
|
||||
export { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, luaCharsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable };
|
||||
export {
|
||||
CARDS, ENEMIES, CLASSES, JOBS, JOB_META, CLASS_GROUPS, CLASS_LINEAGES, SOUL_UNLOCKS,
|
||||
luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable,
|
||||
luaCharsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS,
|
||||
CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable,
|
||||
luaStr, luaJobsTable, luaClassGroupsTable, luaClassLineagesTable, luaJobMetaTable,
|
||||
luaCardsTable, luaDeckTable,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user