Merge pull request 'fix(bandit): 도적 덱을 사일런트 전용으로 정리' (#55) from codex/bandit-silent-only into main
This commit was merged in pull request #55.
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -25,8 +25,6 @@
|
||||
"firepoison": "magician",
|
||||
"icelightning": "magician",
|
||||
"cleric": "magician",
|
||||
"thief": "bandit",
|
||||
"assassin": "bandit",
|
||||
"bandit": "bandit",
|
||||
"curse": "bandit",
|
||||
"shiv": "bandit",
|
||||
|
||||
135
data/cards.json
135
data/cards.json
@@ -349,129 +349,6 @@
|
||||
"rarity": "unique",
|
||||
"fx": "4faa7b78e09643cf86339b8b7cf2abac"
|
||||
},
|
||||
"LuckySeven": {
|
||||
"name": "럭키 세븐",
|
||||
"cost": 1,
|
||||
"kind": "Attack",
|
||||
"class": "thief",
|
||||
"damage": 3,
|
||||
"hits": 2,
|
||||
"desc": "피해 3 × 2회",
|
||||
"rarity": "normal",
|
||||
"image": "0539ba559f8c413dac95c52992b436d9",
|
||||
"fx": "aa499663a278414b914b8fb9b8382879"
|
||||
},
|
||||
"DoubleStab": {
|
||||
"name": "더블 스탭",
|
||||
"cost": 2,
|
||||
"kind": "Attack",
|
||||
"class": "thief",
|
||||
"damage": 5,
|
||||
"hits": 2,
|
||||
"desc": "피해 5 × 2회",
|
||||
"rarity": "normal",
|
||||
"image": "92a5020c978c46bdabab910598118b86",
|
||||
"fx": "a82d0aae7f5e4db6a19078537afbe80c"
|
||||
},
|
||||
"DarkSight": {
|
||||
"name": "다크 사이트",
|
||||
"cost": 1,
|
||||
"kind": "Skill",
|
||||
"class": "thief",
|
||||
"block": 6,
|
||||
"desc": "방어도 6",
|
||||
"rarity": "normal",
|
||||
"image": "0946f69d84464df29b24b94c744c868d"
|
||||
},
|
||||
"Haste": {
|
||||
"name": "헤이스트",
|
||||
"cost": 1,
|
||||
"kind": "Skill",
|
||||
"class": "thief",
|
||||
"block": 3,
|
||||
"draw": 1,
|
||||
"desc": "방어도 3, 드로 1",
|
||||
"rarity": "normal",
|
||||
"image": "e65317856a914b8686f55e3351c3a24c"
|
||||
},
|
||||
"Drain": {
|
||||
"name": "드레인",
|
||||
"cost": 1,
|
||||
"kind": "Attack",
|
||||
"class": "thief",
|
||||
"damage": 5,
|
||||
"heal": 3,
|
||||
"desc": "피해 5, HP 3 회복",
|
||||
"rarity": "unique"
|
||||
},
|
||||
"CriticalThrow": {
|
||||
"name": "크리티컬 스로우",
|
||||
"cost": 2,
|
||||
"kind": "Attack",
|
||||
"class": "assassin",
|
||||
"damage": 8,
|
||||
"hits": 2,
|
||||
"desc": "피해 8 × 2회",
|
||||
"rarity": "unique",
|
||||
"image": "1b0f2dc8abd0434990eee1befefcbe0d",
|
||||
"fx": "23232336918d43f49fab19b888920f0c"
|
||||
},
|
||||
"ShadowStar": {
|
||||
"name": "쉐도우 스타",
|
||||
"cost": 1,
|
||||
"kind": "Attack",
|
||||
"class": "assassin",
|
||||
"damage": 6,
|
||||
"weak": 1,
|
||||
"desc": "피해 6, 약화 1",
|
||||
"rarity": "unique",
|
||||
"image": "2d394e08d95841028d3dc95fca200756",
|
||||
"fx": "ab45ee74d258419096e1e132af68aeca"
|
||||
},
|
||||
"ClawMastery": {
|
||||
"name": "클로 마스터리",
|
||||
"cost": 1,
|
||||
"kind": "Power",
|
||||
"class": "assassin",
|
||||
"powerEffect": "strengthPerTurn",
|
||||
"value": 1,
|
||||
"desc": "매 턴 힘 +1",
|
||||
"rarity": "legend",
|
||||
"image": "aa09741ae1e145a28d1e1c19aeb9e83c"
|
||||
},
|
||||
"SavageBlow": {
|
||||
"name": "새비지 블로우",
|
||||
"cost": 1,
|
||||
"kind": "Attack",
|
||||
"class": "bandit",
|
||||
"damage": 3,
|
||||
"hits": 3,
|
||||
"desc": "피해 3 × 3회",
|
||||
"rarity": "unique",
|
||||
"image": "92a5020c978c46bdabab910598118b86",
|
||||
"fx": "a82d0aae7f5e4db6a19078537afbe80c"
|
||||
},
|
||||
"Steal": {
|
||||
"name": "스틸",
|
||||
"cost": 1,
|
||||
"kind": "Skill",
|
||||
"class": "bandit",
|
||||
"block": 4,
|
||||
"draw": 1,
|
||||
"desc": "방어도 4, 드로 1",
|
||||
"rarity": "unique",
|
||||
"image": "c1e19219745e44c39ae6ac2f77e347d9"
|
||||
},
|
||||
"MesoGuard": {
|
||||
"name": "메소 가드",
|
||||
"cost": 1,
|
||||
"kind": "Power",
|
||||
"class": "bandit",
|
||||
"powerEffect": "blockPerTurn",
|
||||
"value": 3,
|
||||
"desc": "매 턴 방어도 +3",
|
||||
"rarity": "legend"
|
||||
},
|
||||
"Wound": {
|
||||
"name": "상처",
|
||||
"cost": 0,
|
||||
@@ -1243,18 +1120,6 @@
|
||||
"MagicGuard",
|
||||
"MagicClaw"
|
||||
],
|
||||
"thief": [
|
||||
"LuckySeven",
|
||||
"LuckySeven",
|
||||
"LuckySeven",
|
||||
"LuckySeven",
|
||||
"LuckySeven",
|
||||
"DarkSight",
|
||||
"DarkSight",
|
||||
"DarkSight",
|
||||
"DarkSight",
|
||||
"DoubleStab"
|
||||
],
|
||||
"bandit": [
|
||||
"SilentStrike",
|
||||
"SilentStrike",
|
||||
|
||||
@@ -8,7 +8,6 @@ const CLASSES = {
|
||||
warrior: { label: '전사', maxHp: 80 },
|
||||
bandit: { label: '도적', maxHp: 70 },
|
||||
magician: { label: '마법사', maxHp: 70 },
|
||||
thief: { label: '도적', maxHp: 75 },
|
||||
};
|
||||
for (const cls of Object.keys(CLASSES)) {
|
||||
if (!CARDS.starterDecks?.[cls]) throw new Error(`[gen-slaydeck] starterDecks.${cls} 없음`);
|
||||
@@ -33,10 +32,6 @@ const JOBS = {
|
||||
{ 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' },
|
||||
],
|
||||
thief: [
|
||||
{ id: 'assassin', name: '어쌔신', desc: '표창·치명타 특화\n크리티컬 스로우\n쉐도우 스타 · 클로', starter: 'CriticalThrow' },
|
||||
{ id: 'bandit', name: '시프', desc: '단검 연타 특화\n새비지 블로우\n스틸 · 메소 가드', starter: 'SavageBlow' },
|
||||
],
|
||||
};
|
||||
for (const [cls, jobs] of Object.entries(JOBS)) {
|
||||
for (const j of jobs) {
|
||||
@@ -955,6 +950,28 @@ function upsertUi() {
|
||||
text({ value: 'X', fontSize: 26, bold: true, color: GOLD, alignment: 4 }),
|
||||
],
|
||||
}));
|
||||
const deckTabs = [
|
||||
{ key: 'Warrior', label: '전사', x: -210 },
|
||||
{ key: 'Thief', label: '도적', x: 0 },
|
||||
{ key: 'Mage', label: '마법사', x: 210 },
|
||||
];
|
||||
for (let i = 0; i < deckTabs.length; i++) {
|
||||
const tab = deckTabs[i];
|
||||
allDeck.push(entity({
|
||||
id: guid('all', 10 + i),
|
||||
path: `/ui/DefaultGroup/DeckAllHud/${tab.key}Tab`,
|
||||
modelId: 'uibutton',
|
||||
entryId: 'UIButton',
|
||||
componentNames: 'MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.ButtonComponent,MOD.Core.TextComponent',
|
||||
displayOrder: 3 + i,
|
||||
components: [
|
||||
transform({ parentW: 1920, parentH: 1080, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: { x: 170, y: 46 }, pos: { x: tab.x, y: 318 } }),
|
||||
sprite({ color: { r: 0.11, g: 0.13, b: 0.16, a: 1 }, type: 1, raycast: true }),
|
||||
button(),
|
||||
text({ value: tab.label, fontSize: 22, bold: true, color: GOLD, alignment: 4 }),
|
||||
],
|
||||
}));
|
||||
}
|
||||
allDeck.push(entity({
|
||||
id: guid('all', 4),
|
||||
path: '/ui/DefaultGroup/DeckAllHud/Empty',
|
||||
@@ -2319,10 +2336,9 @@ function upsertUi() {
|
||||
],
|
||||
}));
|
||||
const classCards = [
|
||||
{ key: 'Warrior', label: '\uC804\uC0AC', desc: '\uAC15\uD55C \uACF5\uACA9\uACFC \uBC29\uC5B4', x: -540, enabled: true, tint: { r: 0.74, g: 0.32, b: 0.28, a: 1 } },
|
||||
{ key: 'Thief', label: '\uB3C4\uC801', desc: '\uBE60\uB978 \uB2E8\uAC80 \uC5F0\uD0C0', x: -180, enabled: true, tint: { r: 0.5, g: 0.32, b: 0.6, a: 1 } },
|
||||
{ key: 'Bandit', label: '\uC0AC\uC77C\uB7F0\uD2B8', desc: '\uB3C5\u00B7\uB2E8\uAC80\u00B7\uB4DC\uB85C\uC6B0', x: 180, enabled: true, tint: { r: 0.26, g: 0.5, b: 0.34, a: 1 } },
|
||||
{ key: 'Mage', label: '\uB9C8\uBC95\uC0AC', desc: '\uB9C8\uBC95 \uC6D0\uAC70\uB9AC \uB51C\uB7EC', x: 540, enabled: true, tint: { r: 0.3, g: 0.4, b: 0.75, a: 1 } },
|
||||
{ key: 'Warrior', classId: 'warrior', label: '\uC804\uC0AC', desc: '\uAC15\uD55C \uACF5\uACA9\uACFC \uBC29\uC5B4', x: -360, enabled: true, tint: { r: 0.74, g: 0.32, b: 0.28, a: 1 } },
|
||||
{ key: 'Thief', classId: 'bandit', label: '\uB3C4\uC801', desc: '\uB3C5\u00B7\uB2E8\uAC80\u00B7\uB4DC\uB85C\uC6B0', x: 0, enabled: true, tint: { r: 0.26, g: 0.5, b: 0.34, a: 1 } },
|
||||
{ key: 'Mage', classId: 'magician', label: '\uB9C8\uBC95\uC0AC', desc: '\uB9C8\uBC95 \uC6D0\uAC70\uB9AC \uB51C\uB7EC', x: 360, enabled: true, tint: { r: 0.3, g: 0.4, b: 0.75, a: 1 } },
|
||||
];
|
||||
for (let i = 0; i < classCards.length; i++) {
|
||||
const cls = classCards[i];
|
||||
@@ -2404,6 +2420,20 @@ function upsertUi() {
|
||||
],
|
||||
}));
|
||||
}
|
||||
select.push(entity({
|
||||
id: guid('menu', 170 + i),
|
||||
path: `/ui/DefaultGroup/CharacterSelectHud/${cls.key}DeckButton`,
|
||||
modelId: 'uibutton',
|
||||
entryId: 'UIButton',
|
||||
componentNames: 'MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.ButtonComponent,MOD.Core.TextComponent',
|
||||
displayOrder: 18 + i,
|
||||
components: [
|
||||
transform({ parentW: 1920, parentH: 1080, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: { x: 160, y: 46 }, pos: { x: cls.x, y: -160 }, align: ALIGN_CENTER }),
|
||||
sprite({ color: { r: 0.11, g: 0.13, b: 0.16, a: 1 }, type: 1, raycast: true }),
|
||||
button({ enabled: cls.enabled }),
|
||||
text({ value: '\uB371 \uBCF4\uAE30', fontSize: 20, bold: true, color: GOLD, alignment: 0 }),
|
||||
],
|
||||
}));
|
||||
}
|
||||
select.push(entity({
|
||||
id: guid('menu', 180),
|
||||
@@ -2712,8 +2742,13 @@ function writeCodeblocks() {
|
||||
prop('any', 'NewGameHandler'),
|
||||
prop('any', 'WarriorSelectHandler'),
|
||||
prop('any', 'ThiefSelectHandler'),
|
||||
prop('any', 'BanditSelectHandler'),
|
||||
prop('any', 'MageSelectHandler'),
|
||||
prop('any', 'WarriorDeckHandler'),
|
||||
prop('any', 'ThiefDeckHandler'),
|
||||
prop('any', 'MageDeckHandler'),
|
||||
prop('any', 'WarriorDeckTabHandler'),
|
||||
prop('any', 'ThiefDeckTabHandler'),
|
||||
prop('any', 'MageDeckTabHandler'),
|
||||
prop('any', 'AscMinusHandler'),
|
||||
prop('any', 'AscPlusHandler'),
|
||||
prop('any', 'JobOpts'),
|
||||
@@ -2732,6 +2767,10 @@ function writeCodeblocks() {
|
||||
prop('number', 'LobbyTpTries', '0'),
|
||||
prop('boolean', 'CodexMode', 'false'),
|
||||
prop('any', 'CodexCards'),
|
||||
prop('boolean', 'ClassDeckMode', 'false'),
|
||||
prop('any', 'ClassDeckCards'),
|
||||
prop('string', 'ClassDeckTitle', '""'),
|
||||
prop('string', 'ClassDeckClass', '""'),
|
||||
prop('any', 'SoulUnlocks'),
|
||||
prop('any', 'SoulShopDef'),
|
||||
prop('boolean', 'SoulShopBound', 'false'),
|
||||
@@ -2916,15 +2955,7 @@ if thief ~= nil and thief.ButtonComponent ~= nil then
|
||||
thief:DisconnectEvent(ButtonClickEvent, self.ThiefSelectHandler)
|
||||
self.ThiefSelectHandler = nil
|
||||
end
|
||||
self.ThiefSelectHandler = thief:ConnectEvent(ButtonClickEvent, function() self:SelectClass("thief") end)
|
||||
end
|
||||
local bandit = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/BanditButton")
|
||||
if bandit ~= nil and bandit.ButtonComponent ~= nil then
|
||||
if self.BanditSelectHandler ~= nil then
|
||||
bandit:DisconnectEvent(ButtonClickEvent, self.BanditSelectHandler)
|
||||
self.BanditSelectHandler = nil
|
||||
end
|
||||
self.BanditSelectHandler = bandit:ConnectEvent(ButtonClickEvent, function() self:SelectClass("bandit") end)
|
||||
self.ThiefSelectHandler = thief:ConnectEvent(ButtonClickEvent, function() self:SelectClass("bandit") end)
|
||||
end
|
||||
local mage = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/MageButton")
|
||||
if mage ~= nil and mage.ButtonComponent ~= nil then
|
||||
@@ -2934,6 +2965,39 @@ if mage ~= nil and mage.ButtonComponent ~= nil then
|
||||
end
|
||||
self.MageSelectHandler = mage:ConnectEvent(ButtonClickEvent, function() self:SelectClass("magician") end)
|
||||
end
|
||||
local warriorDeck = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/WarriorDeckButton")
|
||||
if warriorDeck ~= nil and warriorDeck.ButtonComponent ~= nil then
|
||||
if self.WarriorDeckHandler ~= nil then
|
||||
warriorDeck:DisconnectEvent(ButtonClickEvent, self.WarriorDeckHandler)
|
||||
self.WarriorDeckHandler = nil
|
||||
end
|
||||
self.WarriorDeckHandler = warriorDeck:ConnectEvent(ButtonClickEvent, function() self:OpenClassDeck("warrior") end)
|
||||
end
|
||||
local thiefDeck = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/ThiefDeckButton")
|
||||
if thiefDeck ~= nil and thiefDeck.ButtonComponent ~= nil then
|
||||
if self.ThiefDeckHandler ~= nil then
|
||||
thiefDeck:DisconnectEvent(ButtonClickEvent, self.ThiefDeckHandler)
|
||||
self.ThiefDeckHandler = nil
|
||||
end
|
||||
self.ThiefDeckHandler = thiefDeck:ConnectEvent(ButtonClickEvent, function() self:OpenClassDeck("bandit") end)
|
||||
end
|
||||
local mageDeck = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/MageDeckButton")
|
||||
if mageDeck ~= nil and mageDeck.ButtonComponent ~= nil then
|
||||
if self.MageDeckHandler ~= nil then
|
||||
mageDeck:DisconnectEvent(ButtonClickEvent, self.MageDeckHandler)
|
||||
self.MageDeckHandler = nil
|
||||
end
|
||||
self.MageDeckHandler = mageDeck:ConnectEvent(ButtonClickEvent, function() self:OpenClassDeck("magician") end)
|
||||
end
|
||||
local allDeckClose = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud/Close")
|
||||
if allDeckClose ~= nil and allDeckClose.ButtonComponent ~= nil then
|
||||
if self.AllDeckCloseHandler ~= nil then
|
||||
allDeckClose:DisconnectEvent(ButtonClickEvent, self.AllDeckCloseHandler)
|
||||
self.AllDeckCloseHandler = nil
|
||||
end
|
||||
self.AllDeckCloseHandler = allDeckClose:ConnectEvent(ButtonClickEvent, function() self:CloseAllDeck() end)
|
||||
end
|
||||
self:BindClassDeckTabs()
|
||||
local start = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/StartButton")
|
||||
if start ~= nil and start.ButtonComponent ~= nil then
|
||||
if self.StartGameHandler ~= nil then
|
||||
@@ -3012,6 +3076,7 @@ bindClick("/ui/DefaultGroup/LobbyHud/AscPlus", function() self:AdjustAscension(1
|
||||
bindClick("/ui/DefaultGroup/BoardHud/Close", function() self:CloseBoard() end)
|
||||
bindClick("/ui/DefaultGroup/SoulShopHud/Close", function() self:CloseSoulShop() end)`),
|
||||
method('ShowCodex', `self.CodexMode = true
|
||||
self.ClassDeckMode = false
|
||||
local list = {}
|
||||
for id, c in pairs(self.Cards) do
|
||||
if c.curse ~= true then
|
||||
@@ -3168,32 +3233,22 @@ if mage ~= nil and mage.SpriteGUIRendererComponent ~= nil then
|
||||
end
|
||||
local thief = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/ThiefButton")
|
||||
if thief ~= nil and thief.SpriteGUIRendererComponent ~= nil then
|
||||
if self.SelectedClass == "thief" then
|
||||
if self.SelectedClass == "bandit" then
|
||||
thief.SpriteGUIRendererComponent.Color = Color(0.28, 0.36, 0.46, 1)
|
||||
else
|
||||
thief.SpriteGUIRendererComponent.Color = Color(0.16, 0.2, 0.26, 1)
|
||||
end
|
||||
end
|
||||
local bandit = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/BanditButton")
|
||||
if bandit ~= nil and bandit.SpriteGUIRendererComponent ~= nil then
|
||||
if self.SelectedClass == "bandit" then
|
||||
bandit.SpriteGUIRendererComponent.Color = Color(0.28, 0.36, 0.46, 1)
|
||||
else
|
||||
bandit.SpriteGUIRendererComponent.Color = Color(0.16, 0.2, 0.26, 1)
|
||||
end
|
||||
end
|
||||
if self.SelectedClass == "warrior" then
|
||||
self:SetText("/ui/DefaultGroup/CharacterSelectHud/Status", "전사 선택됨")
|
||||
elseif self.SelectedClass == "bandit" then
|
||||
self:SetText("/ui/DefaultGroup/CharacterSelectHud/Status", "사일런트 선택됨")
|
||||
self:SetText("/ui/DefaultGroup/CharacterSelectHud/Status", "도적 선택됨")
|
||||
elseif self.SelectedClass == "magician" then
|
||||
self:SetText("/ui/DefaultGroup/CharacterSelectHud/Status", "마법사 선택됨")
|
||||
elseif self.SelectedClass == "thief" then
|
||||
self:SetText("/ui/DefaultGroup/CharacterSelectHud/Status", "도적 선택됨")
|
||||
else
|
||||
self:SetText("/ui/DefaultGroup/CharacterSelectHud/Status", "직업을 선택하고 시작하세요")
|
||||
end`),
|
||||
method('StartNewGame', `if self.SelectedClass ~= "warrior" and self.SelectedClass ~= "bandit" and self.SelectedClass ~= "magician" and self.SelectedClass ~= "thief" then
|
||||
method('StartNewGame', `if self.SelectedClass ~= "warrior" and self.SelectedClass ~= "bandit" and self.SelectedClass ~= "magician" then
|
||||
self:SetText("/ui/DefaultGroup/CharacterSelectHud/Status", "직업을 먼저 선택하세요")
|
||||
return
|
||||
end
|
||||
@@ -3211,9 +3266,6 @@ 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 == "thief" then
|
||||
self.PlayerMaxHp = ${CLASSES.thief.maxHp}
|
||||
self.RunDeck = { ${CARDS.starterDecks.thief.map(luaStr).join(', ')} }
|
||||
else
|
||||
self.PlayerMaxHp = ${CLASSES.warrior.maxHp}
|
||||
self.RunDeck = { ${CARDS.starterDecks.warrior.map(luaStr).join(', ')} }
|
||||
@@ -3436,6 +3488,7 @@ if allDeckClose ~= nil and allDeckClose.ButtonComponent ~= nil then
|
||||
end
|
||||
self.AllDeckCloseHandler = allDeckClose:ConnectEvent(ButtonClickEvent, function() self:CloseAllDeck() end)
|
||||
end
|
||||
self:BindClassDeckTabs()
|
||||
for i = 1, 10 do
|
||||
local cardEntity = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand/Card" .. tostring(i))
|
||||
if cardEntity ~= nil and cardEntity.UITouchReceiveComponent ~= nil then
|
||||
@@ -3735,11 +3788,110 @@ end`, [
|
||||
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' },
|
||||
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'cardId' },
|
||||
]),
|
||||
method('BindClassDeckTabs', `local warriorTab = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud/WarriorTab")
|
||||
if warriorTab ~= nil and warriorTab.ButtonComponent ~= nil then
|
||||
if self.WarriorDeckTabHandler ~= nil then
|
||||
warriorTab:DisconnectEvent(ButtonClickEvent, self.WarriorDeckTabHandler)
|
||||
self.WarriorDeckTabHandler = nil
|
||||
end
|
||||
self.WarriorDeckTabHandler = warriorTab:ConnectEvent(ButtonClickEvent, function() self:SetClassDeckTab("warrior") end)
|
||||
end
|
||||
local thiefTab = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud/ThiefTab")
|
||||
if thiefTab ~= nil and thiefTab.ButtonComponent ~= nil then
|
||||
if self.ThiefDeckTabHandler ~= nil then
|
||||
thiefTab:DisconnectEvent(ButtonClickEvent, self.ThiefDeckTabHandler)
|
||||
self.ThiefDeckTabHandler = nil
|
||||
end
|
||||
self.ThiefDeckTabHandler = thiefTab:ConnectEvent(ButtonClickEvent, function() self:SetClassDeckTab("bandit") end)
|
||||
end
|
||||
local mageTab = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud/MageTab")
|
||||
if mageTab ~= nil and mageTab.ButtonComponent ~= nil then
|
||||
if self.MageDeckTabHandler ~= nil then
|
||||
mageTab:DisconnectEvent(ButtonClickEvent, self.MageDeckTabHandler)
|
||||
self.MageDeckTabHandler = nil
|
||||
end
|
||||
self.MageDeckTabHandler = mageTab:ConnectEvent(ButtonClickEvent, function() self:SetClassDeckTab("magician") end)
|
||||
end`),
|
||||
method('OpenClassDeck', `self.CodexMode = false
|
||||
self.ClassDeckMode = true
|
||||
self.DeckAllOpen = true
|
||||
self:SetClassDeckTab(className)
|
||||
local hud = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud")
|
||||
if hud ~= nil then
|
||||
hud.Enable = true
|
||||
end`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'className' }]),
|
||||
method('SetClassDeckTab', `if self.ClassDeckMode ~= true then
|
||||
return
|
||||
end
|
||||
self.ClassDeckCards = {}
|
||||
self.ClassDeckTitle = "직업 덱"
|
||||
if className ~= "warrior" and className ~= "magician" and className ~= "bandit" then
|
||||
className = "bandit"
|
||||
end
|
||||
self.ClassDeckClass = className
|
||||
local allowed = {}
|
||||
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
|
||||
table.insert(self.ClassDeckCards, id)
|
||||
end
|
||||
end
|
||||
table.sort(self.ClassDeckCards, function(a, b)
|
||||
local ca = self.Cards[a]
|
||||
local cb = self.Cards[b]
|
||||
local na = a
|
||||
local nb = b
|
||||
if ca ~= nil and ca.name ~= nil then na = ca.name end
|
||||
if cb ~= nil and cb.name ~= nil then nb = cb.name end
|
||||
if na == nb then return a < b end
|
||||
return na < nb
|
||||
end)
|
||||
self:RenderAllDeck()
|
||||
self:RenderClassDeckTabs()`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'className' }]),
|
||||
method('RenderClassDeckTabs', `local tabs = {
|
||||
{ path = "/ui/DefaultGroup/DeckAllHud/WarriorTab", cls = "warrior" },
|
||||
{ path = "/ui/DefaultGroup/DeckAllHud/ThiefTab", cls = "bandit" },
|
||||
{ path = "/ui/DefaultGroup/DeckAllHud/MageTab", cls = "magician" },
|
||||
}
|
||||
for i = 1, #tabs do
|
||||
local e = _EntityService:GetEntityByPath(tabs[i].path)
|
||||
if e ~= nil then
|
||||
e.Enable = self.ClassDeckMode == true
|
||||
if e.SpriteGUIRendererComponent ~= nil then
|
||||
if self.ClassDeckClass == tabs[i].cls then
|
||||
e.SpriteGUIRendererComponent.Color = Color(0.22, 0.28, 0.34, 1)
|
||||
else
|
||||
e.SpriteGUIRendererComponent.Color = Color(0.11, 0.13, 0.16, 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
end`),
|
||||
method('OpenAllDeck', `local inspectHud = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckInspectHud")
|
||||
if inspectHud ~= nil then
|
||||
inspectHud.Enable = false
|
||||
end
|
||||
self.DeckInspectKind = ""
|
||||
self.ClassDeckMode = false
|
||||
self.ClassDeckClass = ""
|
||||
self:RenderClassDeckTabs()
|
||||
self.DeckAllOpen = true
|
||||
self:RenderAllDeck()
|
||||
local hud = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud")
|
||||
@@ -3751,18 +3903,29 @@ local hud = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud")
|
||||
if hud ~= nil then
|
||||
hud.Enable = false
|
||||
end
|
||||
if self.ClassDeckMode == true then
|
||||
self.ClassDeckMode = false
|
||||
self.ClassDeckCards = {}
|
||||
self.ClassDeckTitle = ""
|
||||
self.ClassDeckClass = ""
|
||||
end
|
||||
self:RenderClassDeckTabs()
|
||||
if self.CodexMode == true then
|
||||
self.CodexMode = false
|
||||
self:ShowLobby()
|
||||
end`),
|
||||
method('RenderAllDeck', `local pile = self.RunDeck or {}
|
||||
local title = "모든 덱"
|
||||
if self.CodexMode == true then
|
||||
if self.ClassDeckMode == true then
|
||||
pile = self.ClassDeckCards or {}
|
||||
title = self.ClassDeckTitle
|
||||
elseif self.CodexMode == true then
|
||||
pile = self.CodexCards or {}
|
||||
title = "카드 도감"
|
||||
end
|
||||
local count = #pile
|
||||
self:SetText("/ui/DefaultGroup/DeckAllHud/Title", title .. " (" .. tostring(count) .. ")")
|
||||
self:RenderClassDeckTabs()
|
||||
local empty = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud/Empty")
|
||||
if empty ~= nil then
|
||||
empty.Enable = count <= 0
|
||||
@@ -4488,8 +4651,6 @@ elseif self.SelectedClass == "bandit" then
|
||||
return "도적"
|
||||
elseif self.SelectedClass == "magician" then
|
||||
return "마법사"
|
||||
elseif self.SelectedClass == "thief" then
|
||||
return "도적"
|
||||
end
|
||||
return "플레이어"`, [], 0, 'string'),
|
||||
method('SetJob', `self.PlayerJob = jobId
|
||||
|
||||
2169
ui/DefaultGroup.ui
2169
ui/DefaultGroup.ui
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user