Compare commits
61 Commits
feature/ch
...
4ce87bec5d
| Author | SHA1 | Date | |
|---|---|---|---|
| 4ce87bec5d | |||
| 0cf714dca6 | |||
| fd00ed12d9 | |||
| 74a2106021 | |||
| a2044e20af | |||
| a3d5174b34 | |||
| 4f9be00ff2 | |||
| 24a79a309f | |||
| ba450f16b0 | |||
| 278007f908 | |||
| 16ebf304a5 | |||
| 5b7f7bb69f | |||
| 34531b184f | |||
| f6650a6c70 | |||
| acf295d56c | |||
| 9278c47901 | |||
| b2bf1bf4dd | |||
| 5da6e8f3aa | |||
| 71435a2c91 | |||
| f64e35668d | |||
| ba1651e52c | |||
| f8414a9c33 | |||
| 6344685052 | |||
| b0f1a0840c | |||
| c703bd9b4d | |||
| 96102dc41f | |||
| 8702d5209e | |||
| 74d4824a1c | |||
| bdea6a8c28 | |||
| 4fa0bc85c0 | |||
| db76870d4e | |||
| 491833b025 | |||
| 83de73c2c1 | |||
| b06ad8e8ee | |||
| 578f4416b2 | |||
| bc80b96875 | |||
| f2828deb19 | |||
| b549abc3b3 | |||
| 5b21e7f436 | |||
| b42d5fcf51 | |||
| 43530bee60 | |||
| 9b8884da81 | |||
| 2b3d77c588 | |||
| 3efb6993c7 | |||
| 5f8475d018 | |||
| afac34d7b5 | |||
| a917a6d82b | |||
| 9fba9b5aaa | |||
| 54d9632534 | |||
| c274322887 | |||
| 5900af087e | |||
| b0d3da2f39 | |||
| 6ef0ba48f6 | |||
| 1b1fce3d6e | |||
| c34a1126fb | |||
| 964cf7cc3d | |||
| 098571e9aa | |||
| ea832ad846 | |||
| 4288c4101b | |||
| 2bb7360a47 | |||
| 2f9c325c96 |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -7,6 +7,8 @@
|
|||||||
# Claude Code 로컬 설정 — 단, 팀 공유 하네스 설정(settings.json)은 커밋 (RULES.md 참조)
|
# Claude Code 로컬 설정 — 단, 팀 공유 하네스 설정(settings.json)은 커밋 (RULES.md 참조)
|
||||||
.claude/*
|
.claude/*
|
||||||
!.claude/settings.json
|
!.claude/settings.json
|
||||||
|
# 개인 스킬(superpowers) 브레인스토밍/계획 산출물 — 로컬 전용, 협업 공유 X (프로젝트 설계 문서 docs/*.md 는 추적 유지)
|
||||||
|
docs/superpowers/
|
||||||
|
|
||||||
# === OS / 에디터 잡파일 ===
|
# === OS / 에디터 잡파일 ===
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
@@ -23,3 +25,5 @@ AGENTS.md
|
|||||||
Environment/
|
Environment/
|
||||||
McpScreenshots/
|
McpScreenshots/
|
||||||
*.log
|
*.log
|
||||||
|
# 메이커가 재편(reorg) 중 부모를 잃은 엔티티를 모아두는 임시 폴더 (잡파일)
|
||||||
|
Mislocated/
|
||||||
|
|||||||
142
Global/UIButton.model
Normal file
142
Global/UIButton.model
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
{
|
||||||
|
"Id": "",
|
||||||
|
"GameId": "",
|
||||||
|
"EntryKey": "model://uibutton",
|
||||||
|
"ContentType": "x-mod/model",
|
||||||
|
"Content": "",
|
||||||
|
"Usage": 0,
|
||||||
|
"UsePublish": 1,
|
||||||
|
"UseService": 0,
|
||||||
|
"CoreVersion": "26.5.0.0",
|
||||||
|
"StudioVersion": "0.1.0.0",
|
||||||
|
"DynamicLoading": 0,
|
||||||
|
"ContentProto": {
|
||||||
|
"Use": "Json",
|
||||||
|
"Json": {
|
||||||
|
"Version": 1,
|
||||||
|
"Name": "UIButton",
|
||||||
|
"BaseModelId": null,
|
||||||
|
"Id": "uibutton",
|
||||||
|
"Components": [
|
||||||
|
"MOD.Core.UITransformComponent",
|
||||||
|
"MOD.Core.SpriteGUIRendererComponent"
|
||||||
|
],
|
||||||
|
"Properties": [
|
||||||
|
{
|
||||||
|
"Type": {
|
||||||
|
"$type": "MODNativeType",
|
||||||
|
"type": "MOD.Core.MODVector2, MOD.Core, Version=26.5.0.0, Culture=neutral, PublicKeyToken=null"
|
||||||
|
},
|
||||||
|
"Name": "RectSize",
|
||||||
|
"DisplayName": "RectSize",
|
||||||
|
"ShowInInspector": true,
|
||||||
|
"Link": {
|
||||||
|
"Target": {
|
||||||
|
"$type": "MODNativeType",
|
||||||
|
"type": "MOD.Core.UITransformComponent, MOD.Core, Version=26.5.0.0, Culture=neutral, PublicKeyToken=null"
|
||||||
|
},
|
||||||
|
"Property": "RectSize"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Type": {
|
||||||
|
"$type": "MODNativeType",
|
||||||
|
"type": "MOD.Core.MODDataRef, MOD.Core, Version=26.5.0.0, Culture=neutral, PublicKeyToken=null"
|
||||||
|
},
|
||||||
|
"Name": "ImageRUID",
|
||||||
|
"DisplayName": "ImageRUID",
|
||||||
|
"ShowInInspector": true,
|
||||||
|
"Link": {
|
||||||
|
"Target": {
|
||||||
|
"$type": "MODNativeType",
|
||||||
|
"type": "MOD.Core.SpriteGUIRendererComponent, MOD.Core, Version=26.5.0.0, Culture=neutral, PublicKeyToken=null"
|
||||||
|
},
|
||||||
|
"Property": "ImageRUID"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Type": {
|
||||||
|
"$type": "MODNativeType",
|
||||||
|
"type": "MOD.Core.MODColor, MOD.Core, Version=26.5.0.0, Culture=neutral, PublicKeyToken=null"
|
||||||
|
},
|
||||||
|
"Name": "Color",
|
||||||
|
"DisplayName": "Color",
|
||||||
|
"ShowInInspector": true,
|
||||||
|
"Link": {
|
||||||
|
"Target": {
|
||||||
|
"$type": "MODNativeType",
|
||||||
|
"type": "MOD.Core.SpriteGUIRendererComponent, MOD.Core, Version=26.5.0.0, Culture=neutral, PublicKeyToken=null"
|
||||||
|
},
|
||||||
|
"Property": "Color"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Values": [
|
||||||
|
{
|
||||||
|
"TargetType": "MOD.Core.UITransformComponent",
|
||||||
|
"Name": "anchoredPosition",
|
||||||
|
"ValueType": {
|
||||||
|
"$type": "MODNativeType",
|
||||||
|
"type": "MOD.Core.MODVector2, MOD.Core, Version=26.5.0.0, Culture=neutral, PublicKeyToken=null"
|
||||||
|
},
|
||||||
|
"Value": {
|
||||||
|
"$type": "MOD.Core.MODVector2, MOD.Core",
|
||||||
|
"x": 0.0,
|
||||||
|
"y": 0.0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TargetType": "MOD.Core.UITransformComponent",
|
||||||
|
"Name": "RectSize",
|
||||||
|
"ValueType": {
|
||||||
|
"$type": "MODNativeType",
|
||||||
|
"type": "MOD.Core.MODVector2, MOD.Core, Version=26.5.0.0, Culture=neutral, PublicKeyToken=null"
|
||||||
|
},
|
||||||
|
"Value": {
|
||||||
|
"$type": "MOD.Core.MODVector2, MOD.Core",
|
||||||
|
"x": 200.0,
|
||||||
|
"y": 75.0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TargetType": "MOD.Core.UITransformComponent",
|
||||||
|
"Name": "AlignmentOption",
|
||||||
|
"ValueType": {
|
||||||
|
"$type": "MODNativeType",
|
||||||
|
"type": "MOD.Core.AlignmentType, MOD.Core, Version=26.5.0.0, Culture=neutral, PublicKeyToken=null"
|
||||||
|
},
|
||||||
|
"Value": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TargetType": "MOD.Core.SpriteGUIRendererComponent",
|
||||||
|
"Name": "ImageRUID",
|
||||||
|
"ValueType": {
|
||||||
|
"$type": "MODNativeType",
|
||||||
|
"type": "MOD.Core.MODDataRef, MOD.Core, Version=26.5.0.0, Culture=neutral, PublicKeyToken=null"
|
||||||
|
},
|
||||||
|
"Value": {
|
||||||
|
"$type": "MOD.Core.MODDataRef, MOD.Core",
|
||||||
|
"DataId": "cc3457b8e97b3e14f9d5c39ccdd640bf"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TargetType": "MOD.Core.SpriteGUIRendererComponent",
|
||||||
|
"Name": "Color",
|
||||||
|
"ValueType": {
|
||||||
|
"$type": "MODNativeType",
|
||||||
|
"type": "MOD.Core.MODColor, MOD.Core, Version=26.5.0.0, Culture=neutral, PublicKeyToken=null"
|
||||||
|
},
|
||||||
|
"Value": {
|
||||||
|
"$type": "MOD.Core.MODColor, MOD.Core",
|
||||||
|
"r": 1.0,
|
||||||
|
"g": 1.0,
|
||||||
|
"b": 1.0,
|
||||||
|
"a": 1.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"EventLinks": [],
|
||||||
|
"Children": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -32,10 +32,10 @@
|
|||||||
{
|
{
|
||||||
"@type": "script.SlayDeckController",
|
"@type": "script.SlayDeckController",
|
||||||
"Enable": true,
|
"Enable": true,
|
||||||
"Energy": 0.0,
|
"Energy": 0,
|
||||||
"MaxEnergy": 3.0,
|
"MaxEnergy": 3,
|
||||||
"Turn": 0.0,
|
"Turn": 0,
|
||||||
"TweenEventId": 0.0
|
"TweenEventId": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"@version": 1
|
"@version": 1
|
||||||
|
|||||||
52
README.md
52
README.md
@@ -44,8 +44,8 @@ git pull
|
|||||||
```
|
```
|
||||||
slaymaple/
|
slaymaple/
|
||||||
├── data/ # 게임 데이터 단일 소스 (생성기가 읽어 주입). 맵은 정적 데이터 없음(절차 생성)
|
├── data/ # 게임 데이터 단일 소스 (생성기가 읽어 주입). 맵은 정적 데이터 없음(절차 생성)
|
||||||
│ ├── cards.json # 카드 122장(클래스·2차전직별 + 저주) + 클래스별 시작 덱
|
│ ├── cards.json # 카드 121장(클래스·2차전직별 + 저주) + 클래스별 시작 덱
|
||||||
│ ├── enemies.json # 적 12종(일반/정예/보스, 디버프 인텐트 포함)
|
│ ├── enemies.json # 적 18종(일반/정예/보스, 디버프 인텐트 포함)
|
||||||
│ ├── potions.json # 물약 6종 + 드랍률·슬롯·상점가
|
│ ├── potions.json # 물약 6종 + 드랍률·슬롯·상점가
|
||||||
│ ├── relics.json # 유물 19종(StS 효과 × 메이플 장비) + 시작 유물 + 풀
|
│ ├── relics.json # 유물 19종(StS 효과 × 메이플 장비) + 시작 유물 + 풀
|
||||||
│ ├── cardframes.json # 커스텀 카드 프레임 3종(전사/마법사/도적 × normal/unique/legend) + 보상 등급 가중치
|
│ ├── cardframes.json # 커스텀 카드 프레임 3종(전사/마법사/도적 × normal/unique/legend) + 보상 등급 가중치
|
||||||
@@ -77,9 +77,9 @@ slaymaple/
|
|||||||
│ ├── player/ # gen-player-lock.mjs(전투맵 입력 잠금) · freeze-turn-player.mjs(모델 이동 정지) · gen-lobby-npc.mjs(LobbyNpc·LobbyMobility codeblock)
|
│ ├── player/ # gen-player-lock.mjs(전투맵 입력 잠금) · freeze-turn-player.mjs(모델 이동 정지) · gen-lobby-npc.mjs(LobbyNpc·LobbyMobility codeblock)
|
||||||
│ ├── monster/ # gen-combat-monster.mjs(EnemyId 마커) · freeze-turn-monsters.mjs(필드 AI 정지)
|
│ ├── monster/ # gen-combat-monster.mjs(EnemyId 마커) · freeze-turn-monsters.mjs(필드 AI 정지)
|
||||||
│ ├── balance/ # sim-balance.mjs(전투 밸런스 몬테카를로 시뮬) · sim-balance.test.mjs
|
│ ├── balance/ # sim-balance.mjs(전투 밸런스 몬테카를로 시뮬) · sim-balance.test.mjs
|
||||||
│ ├── verify/ # count.mjs(산출물 카운트 검증 헬퍼 — 경로 내장)
|
│ ├── verify/ # count.mjs·uimap.mjs·cbgap.mjs(산출물 카운트/UIGroup 매핑/재연결 GAP 검증 — 경로 내장)
|
||||||
│ └── git/ # gitea-pr.mjs(UTF-8 안전 PR 생성/수정/머지 — RULES.md 참조)
|
│ └── git/ # gitea-pr.mjs(UTF-8 안전 PR 생성/수정/머지 — RULES.md 참조)
|
||||||
├── ui/ # UI 그룹 (DefaultGroup 8.3MB 산출물 / PopupGroup / ToastGroup)
|
├── ui/ # UIGroup 7종 — 메이커 저작(Default/Select/Lobby/Run/Deck/Popup/Toast)
|
||||||
├── docs/
|
├── docs/
|
||||||
│ ├── slaymaple_basic_framework.md # 전투 프레임워크 설계 문서
|
│ ├── slaymaple_basic_framework.md # 전투 프레임워크 설계 문서
|
||||||
│ ├── ui-generation-structure.md # UI 생성 구조 문서
|
│ ├── ui-generation-structure.md # UI 생성 구조 문서
|
||||||
@@ -89,14 +89,22 @@ slaymaple/
|
|||||||
└── README.md
|
└── README.md
|
||||||
```
|
```
|
||||||
|
|
||||||
> ⚠️ **`map/*.map` · `ui/DefaultGroup.ui` · `*.codeblock` · `Global/*.gamelogic`는 생성 산출물**입니다 — 직접 편집하면 다음 재생성 때 사라집니다. 게임 변경은 `data/*.json` 또는 `tools/`의 생성기를 고친 뒤 재생성하세요(자세한 규칙은 [`RULES.md`](RULES.md)).
|
> ⚠️ **`map/*.map` · `SlayDeckController.codeblock` · `Global/common.gamelogic`는 생성 산출물**입니다 — 직접 편집하면 재생성 때 사라집니다. 게임 로직 변경은 `data/*.json`·`tools/`의 생성기를 고쳐 재생성하세요. **`ui/*.ui`는 메이커 저작**(생성기 미생성)이라 메이커에서만 편집합니다(자세한 규칙은 [`RULES.md`](RULES.md)).
|
||||||
> `.mcp.json`, `.codex/` 는 **Authorization 토큰이 포함**되어 있어 git에서 제외됩니다(`.gitignore`). 각자 로컬에서 직접 구성하세요.
|
> `.mcp.json`, `.codex/` 는 **Authorization 토큰이 포함**되어 있어 git에서 제외됩니다(`.gitignore`). 각자 로컬에서 직접 구성하세요.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## 직업 컨셉
|
||||||
|
|
||||||
|
3직업 모두 Slay the Spire 2 차용 + 메이플 IP 재해석. 카드 덱 상세 설계는 [`docs/deck-concept.md`](docs/deck-concept.md) 참조.
|
||||||
|
|
||||||
|
- **⚔️ 전사 (탱커, Ironclad 차용)** — **파이터**: 공격을 *연속*으로 내면 콤보가 쌓이고(방어·파워 등 비공격 카드를 쓰면 콤보 리셋) 콤보로 데미지 증가 버프 = 브루저. **페이지**: 위협 디버프로 버티며 방어도 축적 → **바디 슬램(방어 비례 피해)** 카운터. **스피어맨**: 하이퍼바디·아이언월 유지/리치형.
|
||||||
|
- **🗡️ 도적 (단검·독, Silent 차용)** — 표창 난사 / 독 / 교활·버림. **어쌔신**(표창·크리·흡혈) / **시프**(단검 난타·독). *형 구현 완료(Silent 86장)*.
|
||||||
|
- **🔮 법사 (약체·게이지, Defect 차용)** — **위자드(불/독)**: 독을 묻히고 *독 걸린 적에 불 카드 → 추가 데미지*(독뎀 시너지). **위자드(썬/콜)**: 오브로 썬더(다중 공격)·콜드(빙결=취약+피해), 오브 획득·다중 소모 운용. **클레릭**: 오브 없이 회복·버프 + 언데드엔 힐로 공격하는 보조 힐러.
|
||||||
|
|
||||||
## 게임 프레임워크 현황
|
## 게임 프레임워크 현황
|
||||||
|
|
||||||
**StS2풍 덱빌더 로그라이크가 end-to-end로 완성**됐고, 이제 **로비 마을을 기점으로 반복 런**이 돕니다:
|
**StS2풍 덱빌더 로그라이크가 end-to-end로 완성**됐고, 이제 **로비 마을을 기점으로 반복 런**이 돕니다 (게임 시작 시 MainMenu 없이 바로 로비로 진입):
|
||||||
|
|
||||||
```
|
```
|
||||||
로비 맵(NPC 4종) → 모험가 NPC → 캐릭터 선택(전사/도적/마법사) → 절차 생성 맵(5막)
|
로비 맵(NPC 4종) → 모험가 NPC → 캐릭터 선택(전사/도적/마법사) → 절차 생성 맵(5막)
|
||||||
@@ -104,15 +112,16 @@ slaymaple/
|
|||||||
→ 런 클리어(승천 해금) → 로비 복귀(영혼 정산) → 다음 런 …
|
→ 런 클리어(승천 해금) → 로비 복귀(영혼 정산) → 다음 런 …
|
||||||
```
|
```
|
||||||
|
|
||||||
게임 전체는 `/common` 엔티티에 부착된 **`SlayDeckController` 단일 컴포넌트**로 동작하며, 모든 산출물(`ui/DefaultGroup.ui` · `SlayDeckController.codeblock` · `common.gamelogic`)은 **`tools/deck/gen-slaydeck.mjs` 단일 소스에서 생성**됩니다(결정적 출력, 직접 편집 금지 — `RULES.md` 참조). 게임 데이터는 **`data/*.json`** 가 단일 소스, 맵 구조는 **런타임 절차 생성**(`GenerateMap` Lua ↔ `tools/map/rogue-map.mjs` JS 미러).
|
게임 전체는 `/common` 엔티티에 부착된 **`SlayDeckController` 단일 컴포넌트**로 동작합니다. **UI는 메이커 저작**(7개 UIGroup: Default/Select/Lobby/Run/Deck/Popup/Toast)이고, 컨트롤러가 엔티티 경로(`/ui/<UIGroup>/<Hud>/...`)로 내용을 런타임 주입합니다. 생성기 `tools/deck/gen-slaydeck.mjs`는 **`SlayDeckController.codeblock` + `common.gamelogic`만 생성**(`.ui` 미접근, 결정적 출력 — `RULES.md` 참조). 게임 데이터는 **`data/*.json`**, 맵 구조는 **런타임 절차 생성**(`GenerateMap` Lua ↔ `tools/map/rogue-map.mjs` JS 미러).
|
||||||
|
|
||||||
### 구현된 기능 (배포 퀄리티 P1~P15, PR #34~#57)
|
### 구현된 기능 (배포 퀄리티 P1~P15+, PR #34~#79)
|
||||||
|
|
||||||
| 영역 | 내용 |
|
| 영역 | 내용 |
|
||||||
|---|---|
|
|---|---|
|
||||||
| **로비 마을** | 전용 물리 맵 `lobby.map`(마을 배경). **NPC 4종 월드 엔티티** — 모험가(런 시작)·사서(카드 도감)·상인(영혼 상점)·안내원(게시판). 근접 시 머리 위 마크 + `↑`키 **또는 직접 클릭**으로 상호작용. **이동·공격 모션은 로비 맵에서만** 풀림(전투맵은 잠금), 카메라는 로비에서 **플레이어 추종**(전투맵은 고정) |
|
| **로비 마을** | 전용 물리 맵 `lobby.map`(마을 배경). **NPC 4종 월드 엔티티** — 모험가(런 시작)·사서(카드 도감)·상인(영혼 상점)·안내원(게시판). 근접 시 머리 위 마크 + `↑`키 **또는 직접 클릭**으로 상호작용. **이동·공격 모션은 로비 맵에서만** 풀림(전투맵은 잠금), 카메라는 로비에서 **플레이어 추종**(전투맵은 고정) |
|
||||||
| **캐릭터·전직** | 시작 시 **전사(HP80)/도적(HP70)/마법사(HP70)** 3종 선택, 클래스별 시작 덱. 보스 클리어 시 [유물] vs [**2차 전직**] — 각 클래스 3종(전사→파이터/페이지/스피어맨, 법사→위자드불독/위자드썬콜/클레릭, 도적→Shiv/Poison/Trickster). 전용 카드는 해당 클래스 풀만 획득 |
|
| **캐릭터·전직** | 시작 시 **전사(HP80)/도적(HP70)/마법사(HP70)** 3종 선택(**초상화·직업 설명·선택 테두리 강조** 캐릭터 선택 UI), 클래스별 시작 덱. 보스 클리어 시 [유물] vs [**2차 전직**] — 각 클래스 3종(전사→파이터/페이지/스피어맨, 법사→위자드불독/위자드썬콜/클레릭, 도적→Shiv/Poison/Trickster). 전용 카드는 해당 클래스 풀만 획득 |
|
||||||
| **카드 전투** | 에너지 3·드로우·**드래그 사용**(공격=적에 드롭, 스킬=위로 스윕). 카드 **122장** — kind **Attack/Skill/Power/Status**. 메커니즘: 다단히트·방어 무시·자가 디버프·드로·회복·**전체 공격(AoE)**·**독(DoT)**·**retain**(턴 종료 손패 유지)·**sly discard**(버림 트리거) |
|
| **카드 전투** | 에너지 3·드로우·**드래그 사용**(공격=적에 드롭, 스킬=위로 스윕). 카드 **121장** — kind **Attack/Skill/Power/Status**. 메커니즘: 다단히트·방어 무시·자가 디버프·드로·회복·**전체 공격(AoE)**·**독(DoT)**·**retain**(턴 종료 손패 유지)·**sly discard**(버림 트리거) |
|
||||||
|
| **도적 카드 공용 효과** | 카드 효과를 **카드명 하드코딩 대신 `data/cards.json` 공용 필드**로 표현(재사용). **불가침**·**x-cost**(에너지 비례 피해/약화)·드로우 수 비례 데미지·**다음 스킬 반복**·**처치 보상/반복**·카드 설명 **키워드 하이라이트**·드로우 연동(`drawSkillBlock`·`drawPoison`)·독 버스트·랜덤 타깃 등. **Lua + JS 미러 양쪽 구현**. 필드 사전 [`docs/card-effect-fields.md`](docs/card-effect-fields.md) |
|
||||||
| **버프/디버프** | StS 표준 — **힘**(+N 영구)·**약화**(주는 피해 −25%)·**취약**(받는 피해 +50%)·**독**(매 행동 틱). 양방향(적 디버프 인텐트 포함), 인텐트는 최종 예상치 표시 |
|
| **버프/디버프** | StS 표준 — **힘**(+N 영구)·**약화**(주는 피해 −25%)·**취약**(받는 피해 +50%)·**독**(매 행동 틱). 양방향(적 디버프 인텐트 포함), 인텐트는 최종 예상치 표시 |
|
||||||
| **전투 연출** | 공격 이펙트·**몬스터 데미지 팝업(자릿수 스킨)**·드래그 타깃 마커·적 개별 차례·**공격/피격/독뎀 모션**(아바타 상태 전이·몬스터 hit 클립·런지/넉백) |
|
| **전투 연출** | 공격 이펙트·**몬스터 데미지 팝업(자릿수 스킨)**·드래그 타깃 마커·적 개별 차례·**공격/피격/독뎀 모션**(아바타 상태 전이·몬스터 hit 클립·런지/넉백) |
|
||||||
| **절차 생성 맵** | 막 시작마다 **경로 생성**(런마다 다름, **가로 진행**). 층 규칙: 1~2층 전투만 → 3층~ 상점/휴식 → 4층~ 엘리트/**유물 방** → 보스 수렴. 점선 경로·상태 4단·층 카운터. 노드 타입별 **몬스터 랜덤 구성**(일반 1~3 / 엘리트 / 보스) + intent 랜덤 행동 |
|
| **절차 생성 맵** | 막 시작마다 **경로 생성**(런마다 다름, **가로 진행**). 층 규칙: 1~2층 전투만 → 3층~ 상점/휴식 → 4층~ 엘리트/**유물 방** → 보스 수렴. 점선 경로·상태 4단·층 카운터. 노드 타입별 **몬스터 랜덤 구성**(일반 1~3 / 엘리트 / 보스) + intent 랜덤 행동 |
|
||||||
@@ -122,10 +131,10 @@ slaymaple/
|
|||||||
| **승천(Ascension)** | A1~A10 누적 모디파이어(적 강화·시작 HP 감소·보상 감소). UserDataStorage 유저별 영구 저장, 런 클리어 시 다음 단계 해금 |
|
| **승천(Ascension)** | A1~A10 누적 모디파이어(적 강화·시작 HP 감소·보상 감소). UserDataStorage 유저별 영구 저장, 런 클리어 시 다음 단계 해금 |
|
||||||
| **멀티 act** | **5막** 진행(보스 클리어→다음 막 텔레포트, 맵·인카운터 변경, 적 스케일 `1+(막-1)*0.45`), 5막 클리어 시 런 종료 |
|
| **멀티 act** | **5막** 진행(보스 클리어→다음 막 텔레포트, 맵·인카운터 변경, 적 스케일 `1+(막-1)*0.45`), 5막 클리어 시 런 종료 |
|
||||||
| **경제** | 화폐 표기 **메소**(코인 아이콘), 카드/유물/물약 메소 가격. 내부 식별자는 Gold 유지 |
|
| **경제** | 화폐 표기 **메소**(코인 아이콘), 카드/유물/물약 메소 가격. 내부 식별자는 Gold 유지 |
|
||||||
| **밸런스 시뮬** | `tools/balance/sim-balance.mjs` — 전투 규칙 JS 미러(몬테카를로) + `tools/map/rogue-map.mjs`(맵 생성 미러) + node 단위테스트 |
|
| **밸런스 시뮬** | `tools/balance/sim-balance.mjs` — 전투 규칙 JS 미러(몬테카를로) + `tools/map/rogue-map.mjs`(맵 생성 미러) + node 단위테스트(현 84종) |
|
||||||
|
|
||||||
> ⚠️ 수치(적 스탯·경제·승천 배율)는 1차 조정 상태입니다. 정밀 밸런싱은 `sim-balance.mjs`로 검증하며 진행합니다.
|
> ⚠️ 수치(적 스탯·경제·승천 배율)는 1차 조정 상태입니다. 정밀 밸런싱은 `sim-balance.mjs`로 검증하며 진행합니다.
|
||||||
> ℹ️ 도적(Silent) 카드 88장은 효과·프레임은 적용됐으나 **카드 아이콘(image/fx) 미할당** 상태입니다(전사·마법사 카드는 실 스킬 아이콘 적용 완료).
|
> ℹ️ 도적(Silent) 카드 86장은 STS Silent 완역 포트 + **공식 스킬 아이콘 적용 완료**. 남은 작업은 카드명 메이플 재서사(어쌔신/시프)·멀티플레이어 전제 카드 싱글 정리 — [`docs/deck-concept.md`](docs/deck-concept.md) 참조.
|
||||||
|
|
||||||
### 유용한 스크립트 호출
|
### 유용한 스크립트 호출
|
||||||
`/common` 엔티티(또는 Play Test 컨텍스트)에서:
|
`/common` 엔티티(또는 Play Test 컨텍스트)에서:
|
||||||
@@ -149,9 +158,20 @@ c:AdjustAscension(1) -- 메뉴에서 승천 단계 +1
|
|||||||
밸런스 검증: `node tools/balance/sim-balance.mjs [N] [--seed S]` · 테스트: `node --test tools/balance/sim-balance.test.mjs tools/map/rogue-map.test.mjs`.
|
밸런스 검증: `node tools/balance/sim-balance.mjs [N] [--seed S]` · 테스트: `node --test tools/balance/sim-balance.test.mjs tools/map/rogue-map.test.mjs`.
|
||||||
상세 설계는 [`docs/slaymaple_basic_framework.md`](docs/slaymaple_basic_framework.md) 및 `docs/superpowers/specs/` 참조.
|
상세 설계는 [`docs/slaymaple_basic_framework.md`](docs/slaymaple_basic_framework.md) 및 `docs/superpowers/specs/` 참조.
|
||||||
|
|
||||||
|
### 디버그 단축키
|
||||||
|
|
||||||
|
개발·QA용 키보드 단축키. **전투 중**(런 활성 + 전투 진행 중)에만 동작합니다.
|
||||||
|
|
||||||
|
| 단축키 | 기능 |
|
||||||
|
|---|---|
|
||||||
|
| **Ctrl + Shift + C** | **카드 picker** — 직업 전체 카드 패널을 띄우고, 카드를 클릭하면 **즉시 손패에 추가**. 상단 탭(전사/도적/마법사)으로 직업별 카드 풀 전환. 카드 효과·메커니즘 즉석 테스트용 |
|
||||||
|
| **Ctrl + Shift + E** | **전체 회복 치트** — 체력·에너지를 최대치로 회복 |
|
||||||
|
|
||||||
|
> 카드 picker는 메이커 저작 UI `DeckUIGroup/DeckAllHud`(120 슬롯 그리드 + 직업 탭 3종)를 사용하고, 컨트롤러가 런타임에 카드 비주얼·버튼을 바인딩합니다. 구현: 키 바인딩 `tools/deck/cb/boot.mjs`, picker 로직 `tools/deck/cb/deckview.mjs`(`OpenDebugCardPicker`/`OnAllDeckCardButton`), 버튼 바인딩 `tools/deck/cb/deckturn.mjs`(`BindButtons`). 옛 picker UI 생성기 `tools/deck/legacy/hud/deckall.mjs`는 UI 메이커-저작 전환 후 **휴면**(Maker UI가 대체).
|
||||||
|
|
||||||
### 산출물 재생성
|
### 산출물 재생성
|
||||||
```bash
|
```bash
|
||||||
node tools/deck/gen-slaydeck.mjs # 게임 전체(UI·컨트롤러·common·맵 인카운터)
|
node tools/deck/gen-slaydeck.mjs # 컨트롤러+common (UI는 메이커 저작 — 미생성)
|
||||||
node tools/map/gen-maps.mjs # map01~05 배경/타일
|
node tools/map/gen-maps.mjs # map01~05 배경/타일
|
||||||
node tools/map/gen-lobby-map.mjs # 로비 맵 + NPC 배치
|
node tools/map/gen-lobby-map.mjs # 로비 맵 + NPC 배치
|
||||||
node tools/player/gen-lobby-npc.mjs # 로비 codeblock(LobbyNpc·LobbyMobility)
|
node tools/player/gen-lobby-npc.mjs # 로비 codeblock(LobbyNpc·LobbyMobility)
|
||||||
@@ -165,7 +185,7 @@ node tools/monster/gen-combat-monster.mjs # 몬스터 EnemyId 마커
|
|||||||
|
|
||||||
## 아키텍처 메모
|
## 아키텍처 메모
|
||||||
|
|
||||||
현재 게임 전체 로직이 `SlayDeckController` 단일 codeblock에 모여 있습니다. 초기 설계의 3분할(`SlayCardCatalog`/`SlayRunState`/`SlayCombatManager`)은 **기능적으로 모두 구현**됐으나 아직 한 컴포넌트 안에 있습니다. 맵 NPC·카메라·입력 잠금 등 **맵 단위 동작은 별도 codeblock**(LobbyNpc/LobbyMobility/MapCamera/PlayerLock/CombatMonster)으로 분리해 각 맵 루트/엔티티에 부착합니다. 카드/적/맵/유물/프레임/카메라 데이터는 `data/*.json`로 외부화돼 있습니다.
|
현재 게임 전체 로직이 `SlayDeckController` 단일 codeblock에 모여 있습니다. 초기 설계의 3분할(`SlayCardCatalog`/`SlayRunState`/`SlayCombatManager`)은 **기능적으로 모두 구현**됐으나 아직 한 컴포넌트 안에 있습니다. 맵 NPC·카메라·입력 잠금 등 **맵 단위 동작은 별도 codeblock**(LobbyNpc/LobbyMobility/MapCamera/PlayerLock/CombatMonster)으로 분리해 각 맵 루트/엔티티에 부착합니다. 카드/적/맵/유물/프레임/카메라 데이터는 `data/*.json`로 외부화돼 있습니다. **2026-06-17**: UI를 단일 `DefaultGroup`에서 7개 UIGroup(Select/Lobby/Run/Deck 등)으로 분리해 **메이커 저작으로 전환** — 생성기는 더 이상 `.ui`를 만들지 않고, 컨트롤러가 새 UIGroup 경로로 재연결됨(옛 UI emit `hud/*`·`gen-cardhand`는 `tools/deck/legacy/` 휴면). 재연결 무결성은 `tools/verify/cbgap.mjs`(GAP 0)로 검증.
|
||||||
|
|
||||||
> ⚠️ **전투 규칙과 맵 생성은 Lua(gen-slaydeck 내장)와 JS 미러(sim-balance/rogue-map)로 이중 구현**입니다. 한쪽을 고치면 반드시 다른 쪽도 동기화하고 테스트하세요(`RULES.md` §6).
|
> ⚠️ **전투 규칙과 맵 생성은 Lua(gen-slaydeck 내장)와 JS 미러(sim-balance/rogue-map)로 이중 구현**입니다. 한쪽을 고치면 반드시 다른 쪽도 동기화하고 테스트하세요(`RULES.md` §6).
|
||||||
|
|
||||||
@@ -173,7 +193,9 @@ node tools/monster/gen-combat-monster.mjs # 몬스터 EnemyId 마커
|
|||||||
|
|
||||||
## 향후 개선 계획 (후속 후보)
|
## 향후 개선 계획 (후속 후보)
|
||||||
- [x] 전투 루프 · 런 루프 · 절차 생성 맵 · 상점/휴식/유물 방 · 유물 19종 · 물약 · 버프/디버프 · Power · 전직(전사/법사/도적 2차) · 승천+개인 저장 · 전투 모션 · 커스텀 프레임 · **반복 런·로비 맵·NPC·영혼·메소·카메라 추종 (P1~P15 완료)**
|
- [x] 전투 루프 · 런 루프 · 절차 생성 맵 · 상점/휴식/유물 방 · 유물 19종 · 물약 · 버프/디버프 · Power · 전직(전사/법사/도적 2차) · 승천+개인 저장 · 전투 모션 · 커스텀 프레임 · **반복 런·로비 맵·NPC·영혼·메소·카메라 추종 (P1~P15 완료)**
|
||||||
- [ ] **도적 카드 아이콘** — Silent 88장에 실 스킬 아이콘(image/fx) 할당, 2차 전직 설명 한글화
|
- [x] **UI 메이커-저작 전환** — 단일 DefaultGroup → 7개 UIGroup 분리, 생성기 UI 저작 폐기(`tools/deck/legacy/`), 컨트롤러 경로 재연결(cbgap GAP 0) (2026-06-17)
|
||||||
|
- [x] **시작 로비 직행 · 캐릭터 선택 UI · 디버그 치트 · map01 로스터 (2026-06-18)** — 게임 시작 시 MainMenu 없이 곧장 로비 진입(MainMenu는 추후 싱글/멀티/종료 메뉴로 재지정); 캐릭터 선택 화면 초상화·직업 설명·선택 테두리·Art 클리핑(MaskComponent) 배선; 디버그 단축키 Ctrl+Shift+C(카드 picker)·Ctrl+Shift+E(체력+에너지 전체 회복); map01 몬스터 18종 로스터(랜덤 행동)
|
||||||
|
- [ ] **도적 카드명 재서사·설명 한글화** — Silent 직역 카드명을 어쌔신/시프 메이플 스킬명으로 재서사(아이콘은 적용 완료), 2차 전직 설명 한글화
|
||||||
- [ ] **런 이어하기** — 진행 중 런 직렬화 저장(UserDataStorage 확장, 메뉴 "이어하기" 활성화)
|
- [ ] **런 이어하기** — 진행 중 런 직렬화 저장(UserDataStorage 확장, 메뉴 "이어하기" 활성화)
|
||||||
- [ ] **카드 제거/업그레이드** — 상점 카드 제거 슬롯, 휴식 노드에서 카드 강화
|
- [ ] **카드 제거/업그레이드** — 상점 카드 제거 슬롯, 휴식 노드에서 카드 강화
|
||||||
- [ ] **이벤트 노드(?)** — 랜덤 텍스트 이벤트(선택지·리스크/리워드)
|
- [ ] **이벤트 노드(?)** — 랜덤 텍스트 이벤트(선택지·리스크/리워드)
|
||||||
|
|||||||
14
RULES.md
14
RULES.md
@@ -11,8 +11,8 @@ Claude Code는 `CLAUDE.md`가 이 파일을 임포트하므로 자동 적용된
|
|||||||
|
|
||||||
| 산출물 (절대 Read/Edit 금지) | 크기 | 단일 소스 (여기만 편집) | 재생성 명령 |
|
| 산출물 (절대 Read/Edit 금지) | 크기 | 단일 소스 (여기만 편집) | 재생성 명령 |
|
||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
| `ui/DefaultGroup.ui` | **~7.1MB** | `data/*.json` + `tools/deck/`(`gen-slaydeck.mjs`+`lib/`+`hud/`) | `node tools/deck/gen-slaydeck.mjs` |
|
| `ui/*.ui` (Default·Select·Lobby·Run·Deck·Popup·Toast UIGroup 7종) | 9KB~4.5MB | **메이커 저작 (생성기 미생성, 2026-06-17~)** — 메이커에서 시각 편집 | (없음) |
|
||||||
| `RootDesk/MyDesk/SlayDeckController.codeblock` | ~270KB | 〃 | 〃 |
|
| `RootDesk/MyDesk/SlayDeckController.codeblock` | ~270KB | `data/*.json` + `tools/deck/`(`gen-slaydeck.mjs`+`lib/`+`cb/`) | `node tools/deck/gen-slaydeck.mjs` |
|
||||||
| `Global/common.gamelogic` | ~1KB | 〃 | 〃 |
|
| `Global/common.gamelogic` | ~1KB | 〃 | 〃 |
|
||||||
| `map/map01.map`~`map05.map`, `map/lobby.map` | 각 ~210KB | `tools/map/`·`tools/monster/`·`tools/camera/`·`tools/player/` (↓ 보조 생성기) | 해당 생성기 |
|
| `map/map01.map`~`map05.map`, `map/lobby.map` | 각 ~210KB | `tools/map/`·`tools/monster/`·`tools/camera/`·`tools/player/` (↓ 보조 생성기) | 해당 생성기 |
|
||||||
| `RootDesk/MyDesk/CombatMonster.codeblock` | ~2KB | `tools/monster/gen-combat-monster.mjs` | `node tools/monster/gen-combat-monster.mjs` |
|
| `RootDesk/MyDesk/CombatMonster.codeblock` | ~2KB | `tools/monster/gen-combat-monster.mjs` | `node tools/monster/gen-combat-monster.mjs` |
|
||||||
@@ -21,11 +21,11 @@ Claude Code는 `CLAUDE.md`가 이 파일을 임포트하므로 자동 적용된
|
|||||||
| `RootDesk/MyDesk/LobbyNpc.codeblock`·`LobbyMobility.codeblock` | 각 ~2-3KB | `tools/player/gen-lobby-npc.mjs` | `node tools/player/gen-lobby-npc.mjs` |
|
| `RootDesk/MyDesk/LobbyNpc.codeblock`·`LobbyMobility.codeblock` | 각 ~2-3KB | `tools/player/gen-lobby-npc.mjs` | `node tools/player/gen-lobby-npc.mjs` |
|
||||||
| `Global/SectorConfig.config` | ~1KB | `tools/map/gen-maps.mjs`·`gen-lobby-map.mjs` (패치) | 해당 생성기 |
|
| `Global/SectorConfig.config` | ~1KB | `tools/map/gen-maps.mjs`·`gen-lobby-map.mjs` (패치) | 해당 생성기 |
|
||||||
|
|
||||||
- `.claude/settings.json`의 permissions.deny가 위 파일의 Read/Edit/Write 도구 사용을 차단한다 (이 저장소를 열면 자동 적용). deny는 **glob** — `ui/*.ui`·`map/*.map`·`RootDesk/MyDesk/*.codeblock`·`Global/common.gamelogic`·`Global/SectorConfig.config`. 따라서 **메이커 저작 codeblock/UI**(`Monster`·`MonsterAttack`·`PlayerAttack`·`PlayerHit`·`UIPopup`·`UIToast`.codeblock, `ui/PopupGroup.ui`·`ui/ToastGroup.ui`)**도** Read/Edit 금지 — 이들은 생성기가 없으니 **메이커에서** 편집한다(텍스트 도구로 X). codeblock은 한 줄짜리 JSON이라 Read 시 토큰 폭발.
|
- `.claude/settings.json`의 permissions.deny가 위 파일의 Read/Edit/Write 도구 사용을 차단한다 (이 저장소를 열면 자동 적용). deny는 **glob** — `ui/*.ui`·`map/*.map`·`RootDesk/MyDesk/*.codeblock`·`Global/common.gamelogic`·`Global/SectorConfig.config`. 따라서 **메이커 저작 codeblock/UI**(`Monster`·`MonsterAttack`·`PlayerAttack`·`PlayerHit`·`UIPopup`·`UIToast`.codeblock, **그리고 모든 `ui/*.ui`** — UI는 6개 UIGroup으로 메이커 저작)**도** Read/Edit 금지 — 이들은 생성기가 없으니 **메이커에서** 편집한다(텍스트 도구로 X). codeblock은 한 줄짜리 JSON이라 Read 시 토큰 폭발.
|
||||||
- 게임 로직·UI 수정 = **`tools/deck/gen-slaydeck.mjs`(오케스트레이터 + codeblock Lua) 또는 `data/*.json`(데이터)을 수정** → 재생성 → 산출물은 통째로 커밋.
|
- **게임 로직 수정** = `tools/deck/gen-slaydeck.mjs`(오케스트레이터) + `tools/deck/cb/*.mjs`(codeblock Lua) 또는 `data/*.json`(데이터) 수정 → 재생성(`SlayDeckController.codeblock`+`common.gamelogic`만, **`.ui` 미접근**) → 통째로 커밋. **UI 수정 = 메이커에서**(생성기는 UI를 안 만든다).
|
||||||
- **UI emit은 HUD별 모듈** `tools/deck/hud/*.mjs`(shop·combat·map·deckall·soulshop 등 15종 — **charselect는 제외: Phase 2에서 메이커 저작 stock으로 이관**, 아래), **codeblock 메서드(Lua)는 기능별 모듈** `tools/deck/cb/*.mjs`(boot·state·combat·hand·deckview·items·map·shop 등 17종, 메서드 161개를 연속런으로). **공유분**: UI 헬퍼·상수·데이터·lua 테이블 = `tools/deck/lib/ui-helpers.mjs`·`tools/deck/lib/data.mjs`, method/prop/codeblock 헬퍼·writeCodeblocks 상수 = `tools/deck/lib/codeblock.mjs`. 특정 화면 UI 수정은 `hud/<name>.mjs`, 특정 메서드 수정은 `cb/<name>.mjs`만(의존: orchestrator→{hud,cb}→lib 단방향). prop 103개는 오케스트레이터 writeCodeblocks에 유지. **cb 모듈은 원본 메서드 순서 보존이 바이트동일 조건** — 새 메서드는 해당 기능 모듈의 알맞은 위치에 추가하고 writeCodeblocks의 spread 순서 유지.
|
- **codeblock 메서드(Lua)는 기능별 모듈** `tools/deck/cb/*.mjs`(boot·state·combat·hand·deckview·items·map·shop 등 17종). **공유분**: 상수·데이터·lua 테이블 = `tools/deck/lib/{ui-helpers,data,codeblock}.mjs`(cb가 import — `MAX_MONSTERS`=4 등). prop 103개는 오케스트레이터 `writeCodeblocks`에 유지. 특정 메서드 수정은 `cb/<name>.mjs`만(의존: orchestrator→cb→lib 단방향). **cb 모듈은 원본 메서드 순서 보존이 바이트동일 조건**. **UI emit(옛 `hud/*.mjs` 15종·`gen-cardhand.mjs`)은 `tools/deck/legacy/`로 이관 — 휴면(생성기 미사용)**: UI가 메이커 저작이라 생성기가 안 만든다. (롤백용 `legacy/upsert-ui.mjs`는 직접 실행 시에만 옛 `DefaultGroup.ui`를 재생성.)
|
||||||
- 리팩터 시 **출력 바이트-동일 검증**: `node tools/deck/gen-slaydeck.mjs` 후 `node tools/verify/diffcheck.mjs [ref]`(워킹트리 vs ref(기본 HEAD) 줄바꿈 정규화 비교 — 산출물 경로를 명령줄에 노출 안 해 deny 회피). 산출물 ` M`은 보통 autocrlf churn이니 `git checkout --`로 복원.
|
- 리팩터 시 **출력 바이트-동일 검증**: `node tools/deck/gen-slaydeck.mjs` 후 `node tools/verify/diffcheck.mjs [ref]`(워킹트리 vs ref(기본 HEAD) 줄바꿈 정규화 비교 — 산출물 경로를 명령줄에 노출 안 해 deny 회피). 산출물 ` M`은 보통 autocrlf churn이니 `git checkout --`로 복원.
|
||||||
- **하이브리드(메이커 저작) 화면 — charselect 파일럿(Phase 2)**: `CharacterSelectHud`는 `GENERATED_UI_SECTIONS`에서 빠져 **생성기가 안 만들고 안 덮음** = `ui/DefaultGroup.ui`의 charselect 엔티티는 **메이커에서 시각 편집하는 stock**. 컨트롤러(`cb/charselect.mjs`)가 경로(`CharacterSelectHud/{Warrior,Thief,Mage}Button/Art` 등 — 메이커가 이 경로 유지 필수)로 이미지(`self.ClassPortraits`, `data/characters.json` 시드)·선택테두리·상태를 **런타임 주입**. 즉 레이아웃=메이커, 내용=컨트롤러. charselect 레이아웃 수정은 `hud/`가 아니라 **메이커에서**.
|
- **UI 전면 메이커 저작 (2026-06-17~)**: 단일 `DefaultGroup`을 7개 UIGroup으로 분리 — `DefaultGroup`(MainMenu+월드조작), `SelectUIGroup`(charselect/job), `LobbyUIGroup`(lobby/board/soulshop), `RunUIGroup`(combat/map/shop/rest/treasure/reward/cardhand/deck), `DeckUIGroup`(덱 도감), `PopupGroup`·`ToastGroup`. 컨트롤러(`cb/*.mjs`)는 엔티티 **경로**(`/ui/<UIGroup>/<Hud>/...`)로 텍스트·이미지·표시숨김·상태기반 위치/크기/색을 **런타임 주입**(레이아웃=메이커, 내용=컨트롤러 — 메이커가 이 경로 유지 필수). 몬스터 슬롯 = `RunUIGroup/CombatHud/MonsterStatus{1..4}`(자식 Name·Hp·Intent·HpBarFill·Buffs·BlockBadge·TargetMarker; TargetFrame 없음). **부트 흐름**: `OnBeginPlay`→MainMenu→(`MainMenu/NewGameButton`)→로비→run NPC(`OnLobbyNpcInteract` id=="run")→charselect→런. **재연결 검증**: `node tools/verify/cbgap.mjs`(cb 참조 경로↔.ui GAP 0이어야) + 재생성 후 `git status -- ui/` 변경 0(생성기 .ui 미접근 증명). 섹션→UIGroup 일괄 remap 마이그레이션은 `tools/deck/reconnect-ui-paths.mjs`(멱등). UIGroup별 .ui 분포 확인은 `tools/verify/uimap.mjs`.
|
||||||
- **머지 충돌(gen-slaydeck.mjs)**: 다른 브랜치가 단일체를 수정해 충돌나면, 그쪽 버전(`git checkout --theirs tools/deck/gen-slaydeck.mjs`)을 취해 **콘텐츠 마커 기반으로 재모듈화**(라인인덱스 X — 줄 추가에 안전·export 이름 자동 파생·`const x=[]` 직전 전문 상수 walk-back 포함) 후 `node tools/verify/diffcheck.mjs origin/main`으로 ui·codeblock 바이트-동일 확인(손실 0 증명). codeblock 메서드·patchCommon은 오케스트레이터 잔류라 그쪽 변경은 자동 보존됨.
|
- **머지 충돌(gen-slaydeck.mjs)**: 다른 브랜치가 단일체를 수정해 충돌나면, 그쪽 버전(`git checkout --theirs tools/deck/gen-slaydeck.mjs`)을 취해 **콘텐츠 마커 기반으로 재모듈화**(라인인덱스 X — 줄 추가에 안전·export 이름 자동 파생·`const x=[]` 직전 전문 상수 walk-back 포함) 후 `node tools/verify/diffcheck.mjs origin/main`으로 ui·codeblock 바이트-동일 확인(손실 0 증명). codeblock 메서드·patchCommon은 오케스트레이터 잔류라 그쪽 변경은 자동 보존됨.
|
||||||
- **보조 생성기**(각자 자기 산출물의 단일 소스 — 위 표의 메인 `gen-slaydeck.mjs` 외):
|
- **보조 생성기**(각자 자기 산출물의 단일 소스 — 위 표의 메인 `gen-slaydeck.mjs` 외):
|
||||||
- `tools/camera/gen-camera.mjs` → `MapCamera.codeblock` + map01~05 카메라 부착 (값 `data/camera.json`)
|
- `tools/camera/gen-camera.mjs` → `MapCamera.codeblock` + map01~05 카메라 부착 (값 `data/camera.json`)
|
||||||
@@ -37,7 +37,7 @@ Claude Code는 `CLAUDE.md`가 이 파일을 임포트하므로 자동 적용된
|
|||||||
- `tools/player/gen-player-lock.mjs` → `PlayerLock.codeblock` + map01~05 부착
|
- `tools/player/gen-player-lock.mjs` → `PlayerLock.codeblock` + map01~05 부착
|
||||||
- `tools/player/gen-lobby-npc.mjs` → `LobbyNpc.codeblock`·`LobbyMobility.codeblock`
|
- `tools/player/gen-lobby-npc.mjs` → `LobbyNpc.codeblock`·`LobbyMobility.codeblock`
|
||||||
- `tools/player/freeze-turn-player.mjs` → `Global/DefaultPlayer.model` 이동 0 고정
|
- `tools/player/freeze-turn-player.mjs` → `Global/DefaultPlayer.model` 이동 0 고정
|
||||||
- `tools/deck/gen-cardhand.mjs` → `DefaultGroup.ui` 카드핸드 보조 패처
|
- (옛 `tools/deck/gen-cardhand.mjs`·`hud/*.mjs`는 `tools/deck/legacy/`로 이관 — 휴면, UI 메이커 저작 전환)
|
||||||
|
|
||||||
## 2. 산출물 검증은 카운트로, 내용 출력 금지
|
## 2. 산출물 검증은 카운트로, 내용 출력 금지
|
||||||
|
|
||||||
|
|||||||
23
RootDesk/MyDesk/01_blue_background_clean_1920x1080.sprite
Normal file
23
RootDesk/MyDesk/01_blue_background_clean_1920x1080.sprite
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"Id": "",
|
||||||
|
"GameId": "",
|
||||||
|
"EntryKey": "sprite://ac448e909f89464898708ce232ab8b51",
|
||||||
|
"ContentType": "x-mod/sprite",
|
||||||
|
"Content": "",
|
||||||
|
"Usage": 0,
|
||||||
|
"UsePublish": 1,
|
||||||
|
"UseService": 0,
|
||||||
|
"CoreVersion": "26.5.0.0",
|
||||||
|
"StudioVersion": "0.1.0.0",
|
||||||
|
"DynamicLoading": 0,
|
||||||
|
"ContentProto": {
|
||||||
|
"Use": "Json",
|
||||||
|
"Json": {
|
||||||
|
"upload_keyname": "30/54/30542a379cb74d2d807104635740a8ea/sprite/ac448e909f89464898708ce232ab8b51/639173152021849887",
|
||||||
|
"upload_hash": "CCC4771B9353971748EF9BEE32D57F15090CE62C4BA6446B11E7842FC7AFDF1F",
|
||||||
|
"name": "01_blue_background_clean_1920x1080",
|
||||||
|
"resource_guid": "ac448e909f89464898708ce232ab8b51",
|
||||||
|
"resource_version": "6a32dd82c325482f6e2bb455"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
23
RootDesk/MyDesk/Character select bg.sprite
Normal file
23
RootDesk/MyDesk/Character select bg.sprite
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"Id": "",
|
||||||
|
"GameId": "",
|
||||||
|
"EntryKey": "sprite://7629b520ced54d508b040681d06741fb",
|
||||||
|
"ContentType": "x-mod/sprite",
|
||||||
|
"Content": "",
|
||||||
|
"Usage": 0,
|
||||||
|
"UsePublish": 1,
|
||||||
|
"UseService": 0,
|
||||||
|
"CoreVersion": "26.5.0.0",
|
||||||
|
"StudioVersion": "0.1.0.0",
|
||||||
|
"DynamicLoading": 0,
|
||||||
|
"ContentProto": {
|
||||||
|
"Use": "Json",
|
||||||
|
"Json": {
|
||||||
|
"upload_keyname": "30/54/30542a379cb74d2d807104635740a8ea/sprite/7629b520ced54d508b040681d06741fb/639172208899179951",
|
||||||
|
"upload_hash": "C84DCE36101CF3F05E74F93F9B416E7D08D8B78B699E22CF8A6784994115DDAE",
|
||||||
|
"name": "Character select bg",
|
||||||
|
"resource_guid": "7629b520ced54d508b040681d06741fb",
|
||||||
|
"resource_version": "6a316d1a3d5de2eb0c7d345b"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
36
RootDesk/MyDesk/MapleTree.codeblock
Normal file
36
RootDesk/MyDesk/MapleTree.codeblock
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
"Id": "",
|
||||||
|
"GameId": "",
|
||||||
|
"EntryKey": "codeblock://4a220aa8-e014-4c7b-8234-fff8c5c66686",
|
||||||
|
"ContentType": "x-mod/codeblock",
|
||||||
|
"Content": "",
|
||||||
|
"Usage": 0,
|
||||||
|
"UsePublish": 1,
|
||||||
|
"UseService": 0,
|
||||||
|
"CoreVersion": "26.5.0.0",
|
||||||
|
"StudioVersion": "0.1.0.0",
|
||||||
|
"DynamicLoading": 0,
|
||||||
|
"ContentProto": {
|
||||||
|
"Use": "Json",
|
||||||
|
"Json": {
|
||||||
|
"CoreVersion": {
|
||||||
|
"Major": 0,
|
||||||
|
"Minor": 2
|
||||||
|
},
|
||||||
|
"ScriptVersion": {
|
||||||
|
"Major": 1,
|
||||||
|
"Minor": 1
|
||||||
|
},
|
||||||
|
"Description": "",
|
||||||
|
"Id": "4a220aa8-e014-4c7b-8234-fff8c5c66686",
|
||||||
|
"Language": 1,
|
||||||
|
"Name": "MapleTree",
|
||||||
|
"Type": 1,
|
||||||
|
"Source": 0,
|
||||||
|
"Target": null,
|
||||||
|
"Properties": [],
|
||||||
|
"Methods": [],
|
||||||
|
"EntityEventHandlers": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
23
RootDesk/MyDesk/Thumnail.sprite
Normal file
23
RootDesk/MyDesk/Thumnail.sprite
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"Id": "",
|
||||||
|
"GameId": "",
|
||||||
|
"EntryKey": "sprite://41ad73da083d41b0ae30bf7b86794376",
|
||||||
|
"ContentType": "x-mod/sprite",
|
||||||
|
"Content": "",
|
||||||
|
"Usage": 0,
|
||||||
|
"UsePublish": 1,
|
||||||
|
"UseService": 0,
|
||||||
|
"CoreVersion": "26.5.0.0",
|
||||||
|
"StudioVersion": "0.1.0.0",
|
||||||
|
"DynamicLoading": 0,
|
||||||
|
"ContentProto": {
|
||||||
|
"Use": "Json",
|
||||||
|
"Json": {
|
||||||
|
"upload_keyname": "30/54/30542a379cb74d2d807104635740a8ea/sprite/41ad73da083d41b0ae30bf7b86794376/639172145413258274",
|
||||||
|
"upload_hash": "CFC620F96E1621FEE5594456FC8A4157BC6EF0D3E7661C5543293200FD364A85",
|
||||||
|
"name": "Thumnail",
|
||||||
|
"resource_guid": "41ad73da083d41b0ae30bf7b86794376",
|
||||||
|
"resource_version": "6a31544d335c959bb11f45eb"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
23
RootDesk/MyDesk/restBgImage.sprite
Normal file
23
RootDesk/MyDesk/restBgImage.sprite
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"Id": "",
|
||||||
|
"GameId": "",
|
||||||
|
"EntryKey": "sprite://477679b832b44e099a30e4905078dbcb",
|
||||||
|
"ContentType": "x-mod/sprite",
|
||||||
|
"Content": "",
|
||||||
|
"Usage": 0,
|
||||||
|
"UsePublish": 1,
|
||||||
|
"UseService": 0,
|
||||||
|
"CoreVersion": "26.5.0.0",
|
||||||
|
"StudioVersion": "0.1.0.0",
|
||||||
|
"DynamicLoading": 0,
|
||||||
|
"ContentProto": {
|
||||||
|
"Use": "Json",
|
||||||
|
"Json": {
|
||||||
|
"upload_keyname": "30/54/30542a379cb74d2d807104635740a8ea/sprite/477679b832b44e099a30e4905078dbcb/639172226341792721",
|
||||||
|
"upload_hash": "3E30B07C24C4BC4E373CDEA653035146D2F50ACC6484F6E9DA34E6179BB38F15",
|
||||||
|
"name": "restBgImage",
|
||||||
|
"resource_guid": "477679b832b44e099a30e4905078dbcb",
|
||||||
|
"resource_version": "6a3173ea002bbe95706406b6"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
23
RootDesk/MyDesk/shopBgImage.sprite
Normal file
23
RootDesk/MyDesk/shopBgImage.sprite
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"Id": "",
|
||||||
|
"GameId": "",
|
||||||
|
"EntryKey": "sprite://28f3b10ac0334fbfbf29677bf963c57a",
|
||||||
|
"ContentType": "x-mod/sprite",
|
||||||
|
"Content": "",
|
||||||
|
"Usage": 0,
|
||||||
|
"UsePublish": 1,
|
||||||
|
"UseService": 0,
|
||||||
|
"CoreVersion": "26.5.0.0",
|
||||||
|
"StudioVersion": "0.1.0.0",
|
||||||
|
"DynamicLoading": 0,
|
||||||
|
"ContentProto": {
|
||||||
|
"Use": "Json",
|
||||||
|
"Json": {
|
||||||
|
"upload_keyname": "30/54/30542a379cb74d2d807104635740a8ea/sprite/28f3b10ac0334fbfbf29677bf963c57a/639172222414073214",
|
||||||
|
"upload_hash": "01BE0B58F480BA86DA1D18BFE25C01E1B27219A14FE2DCD73456A7A48553CF15",
|
||||||
|
"name": "shopBgImage",
|
||||||
|
"resource_guid": "28f3b10ac0334fbfbf29677bf963c57a",
|
||||||
|
"resource_version": "6a3172612c6a274be88a130e"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
23
RootDesk/MyDesk/treasureBgImage.sprite
Normal file
23
RootDesk/MyDesk/treasureBgImage.sprite
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"Id": "",
|
||||||
|
"GameId": "",
|
||||||
|
"EntryKey": "sprite://dd6193fd37da4b12bcdbcdcf2fbe8e40",
|
||||||
|
"ContentType": "x-mod/sprite",
|
||||||
|
"Content": "",
|
||||||
|
"Usage": 0,
|
||||||
|
"UsePublish": 1,
|
||||||
|
"UseService": 0,
|
||||||
|
"CoreVersion": "26.5.0.0",
|
||||||
|
"StudioVersion": "0.1.0.0",
|
||||||
|
"DynamicLoading": 0,
|
||||||
|
"ContentProto": {
|
||||||
|
"Use": "Json",
|
||||||
|
"Json": {
|
||||||
|
"upload_keyname": "30/54/30542a379cb74d2d807104635740a8ea/sprite/dd6193fd37da4b12bcdbcdcf2fbe8e40/639172228832890845",
|
||||||
|
"upload_hash": "3EDD046B291806637ADD12A77BF94CF00BDD9F4F9912C132B14323D9DE5F297C",
|
||||||
|
"name": "treasureBgImage",
|
||||||
|
"resource_guid": "dd6193fd37da4b12bcdbcdcf2fbe8e40",
|
||||||
|
"resource_version": "6a3174e32a2802c06419f288"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
379
data/cards.json
379
data/cards.json
@@ -14,7 +14,7 @@
|
|||||||
"Defend": {
|
"Defend": {
|
||||||
"name": "아이언 바디",
|
"name": "아이언 바디",
|
||||||
"cost": 1,
|
"cost": 1,
|
||||||
"kind": "Skill",
|
"kind": "Attack",
|
||||||
"block": 5,
|
"block": 5,
|
||||||
"desc": "방어도 5",
|
"desc": "방어도 5",
|
||||||
"image": "7648c3b8e1ca44fc8ec353561207a670",
|
"image": "7648c3b8e1ca44fc8ec353561207a670",
|
||||||
@@ -59,6 +59,7 @@
|
|||||||
"cost": 2,
|
"cost": 2,
|
||||||
"kind": "Attack",
|
"kind": "Attack",
|
||||||
"damage": 8,
|
"damage": 8,
|
||||||
|
"firstCardDamageBonus": 2,
|
||||||
"vuln": 2,
|
"vuln": 2,
|
||||||
"desc": "피해 8, 취약 2",
|
"desc": "피해 8, 취약 2",
|
||||||
"image": "fe83c7635b0e49ed83d75a2833adb53e",
|
"image": "fe83c7635b0e49ed83d75a2833adb53e",
|
||||||
@@ -89,8 +90,8 @@
|
|||||||
"name": "분노",
|
"name": "분노",
|
||||||
"cost": 1,
|
"cost": 1,
|
||||||
"kind": "Power",
|
"kind": "Power",
|
||||||
"powerEffect": "strengthPerTurn",
|
"aoe": true,
|
||||||
"value": 1,
|
"damage": 4,
|
||||||
"desc": "매 턴 시작 시 힘 +1",
|
"desc": "매 턴 시작 시 힘 +1",
|
||||||
"image": "379d86e3de064959aa4612f71e84ccfb",
|
"image": "379d86e3de064959aa4612f71e84ccfb",
|
||||||
"class": "warrior",
|
"class": "warrior",
|
||||||
@@ -237,7 +238,8 @@
|
|||||||
"kind": "Skill",
|
"kind": "Skill",
|
||||||
"class": "magician",
|
"class": "magician",
|
||||||
"block": 3,
|
"block": 3,
|
||||||
"draw": 1,
|
"discardAll": true,
|
||||||
|
"drawPerDiscarded": 1,
|
||||||
"desc": "방어도 3, 드로 1",
|
"desc": "방어도 3, 드로 1",
|
||||||
"image": "7f70a9dc7e304433bb8121dd9c4df98b",
|
"image": "7f70a9dc7e304433bb8121dd9c4df98b",
|
||||||
"rarity": "normal"
|
"rarity": "normal"
|
||||||
@@ -378,7 +380,8 @@
|
|||||||
"rarity": "normal",
|
"rarity": "normal",
|
||||||
"desc": "피해를 3 줍니다. 약화를 1 부여합니다.",
|
"desc": "피해를 3 줍니다. 약화를 1 부여합니다.",
|
||||||
"weak": 1,
|
"weak": 1,
|
||||||
"damage": 3
|
"damage": 3,
|
||||||
|
"image": "1b0f2dc8abd0434990eee1befefcbe0d"
|
||||||
},
|
},
|
||||||
"SilentStrike": {
|
"SilentStrike": {
|
||||||
"name": "타격",
|
"name": "타격",
|
||||||
@@ -387,7 +390,8 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "normal",
|
"rarity": "normal",
|
||||||
"desc": "피해를 6 줍니다.",
|
"desc": "피해를 6 줍니다.",
|
||||||
"damage": 6
|
"damage": 6,
|
||||||
|
"image": "92a5020c978c46bdabab910598118b86"
|
||||||
},
|
},
|
||||||
"Survivor": {
|
"Survivor": {
|
||||||
"name": "생존자",
|
"name": "생존자",
|
||||||
@@ -397,7 +401,8 @@
|
|||||||
"rarity": "normal",
|
"rarity": "normal",
|
||||||
"desc": "방어도를 8 얻습니다. 카드를 1장 버립니다.",
|
"desc": "방어도를 8 얻습니다. 카드를 1장 버립니다.",
|
||||||
"block": 8,
|
"block": 8,
|
||||||
"discard": 1
|
"discard": 1,
|
||||||
|
"image": "49c8f279bfa64bf3954037f17da0052d"
|
||||||
},
|
},
|
||||||
"SilentDefend": {
|
"SilentDefend": {
|
||||||
"name": "수비",
|
"name": "수비",
|
||||||
@@ -406,7 +411,8 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "normal",
|
"rarity": "normal",
|
||||||
"desc": "방어도를 5 얻습니다.",
|
"desc": "방어도를 5 얻습니다.",
|
||||||
"block": 5
|
"block": 5,
|
||||||
|
"image": "0946f69d84464df29b24b94c744c868d"
|
||||||
},
|
},
|
||||||
"Slice": {
|
"Slice": {
|
||||||
"name": "칼질",
|
"name": "칼질",
|
||||||
@@ -415,7 +421,8 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "normal",
|
"rarity": "normal",
|
||||||
"desc": "피해를 6 줍니다.",
|
"desc": "피해를 6 줍니다.",
|
||||||
"damage": 6
|
"damage": 6,
|
||||||
|
"image": "92a5020c978c46bdabab910598118b86"
|
||||||
},
|
},
|
||||||
"Shiv": {
|
"Shiv": {
|
||||||
"name": "표창",
|
"name": "표창",
|
||||||
@@ -426,7 +433,8 @@
|
|||||||
"desc": "피해를 4 줍니다. 소멸.",
|
"desc": "피해를 4 줍니다. 소멸.",
|
||||||
"damage": 4,
|
"damage": 4,
|
||||||
"exhaust": true,
|
"exhaust": true,
|
||||||
"token": true
|
"token": true,
|
||||||
|
"image": "1b0f2dc8abd0434990eee1befefcbe0d"
|
||||||
},
|
},
|
||||||
"DaggerSpray": {
|
"DaggerSpray": {
|
||||||
"name": "단검 분사",
|
"name": "단검 분사",
|
||||||
@@ -437,7 +445,8 @@
|
|||||||
"desc": "모든 적에게 피해를 4만큼 2번 줍니다.",
|
"desc": "모든 적에게 피해를 4만큼 2번 줍니다.",
|
||||||
"aoe": true,
|
"aoe": true,
|
||||||
"damage": 4,
|
"damage": 4,
|
||||||
"hits": 2
|
"hits": 2,
|
||||||
|
"image": "1b0f2dc8abd0434990eee1befefcbe0d"
|
||||||
},
|
},
|
||||||
"DaggerThrow": {
|
"DaggerThrow": {
|
||||||
"name": "단검 투척",
|
"name": "단검 투척",
|
||||||
@@ -446,9 +455,10 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "normal",
|
"rarity": "normal",
|
||||||
"desc": "피해를 9 줍니다. 카드를 1장 뽑습니다. 카드를 1장 버립니다.",
|
"desc": "피해를 9 줍니다. 카드를 1장 뽑습니다. 카드를 1장 버립니다.",
|
||||||
"draw": 1,
|
"drawUntilHandSize": 6,
|
||||||
"damage": 9,
|
"damage": 9,
|
||||||
"discard": 1
|
"discard": 1,
|
||||||
|
"image": "1b0f2dc8abd0434990eee1befefcbe0d"
|
||||||
},
|
},
|
||||||
"PoisonedStab": {
|
"PoisonedStab": {
|
||||||
"name": "독 찌르기",
|
"name": "독 찌르기",
|
||||||
@@ -458,7 +468,8 @@
|
|||||||
"rarity": "normal",
|
"rarity": "normal",
|
||||||
"desc": "피해를 6 줍니다. 중독을 3 부여합니다.",
|
"desc": "피해를 6 줍니다. 중독을 3 부여합니다.",
|
||||||
"poison": 3,
|
"poison": 3,
|
||||||
"damage": 6
|
"damage": 6,
|
||||||
|
"image": "19361e72087946b1888684185b40d935"
|
||||||
},
|
},
|
||||||
"SuckerPunch": {
|
"SuckerPunch": {
|
||||||
"name": "불의의 일격",
|
"name": "불의의 일격",
|
||||||
@@ -468,7 +479,9 @@
|
|||||||
"rarity": "normal",
|
"rarity": "normal",
|
||||||
"desc": "피해를 8 줍니다. 약화를 1 부여합니다.",
|
"desc": "피해를 8 줍니다. 약화를 1 부여합니다.",
|
||||||
"weak": 1,
|
"weak": 1,
|
||||||
"damage": 8
|
"damage": 8,
|
||||||
|
"cardPlayedDamage": 2,
|
||||||
|
"image": "92a5020c978c46bdabab910598118b86"
|
||||||
},
|
},
|
||||||
"LeadingStrike": {
|
"LeadingStrike": {
|
||||||
"name": "선제 타격",
|
"name": "선제 타격",
|
||||||
@@ -478,7 +491,8 @@
|
|||||||
"rarity": "normal",
|
"rarity": "normal",
|
||||||
"desc": "피해를 3 줍니다. 표창을 2장 손으로 가져옵니다.",
|
"desc": "피해를 3 줍니다. 표창을 2장 손으로 가져옵니다.",
|
||||||
"damage": 3,
|
"damage": 3,
|
||||||
"addShiv": 2
|
"addShiv": 2,
|
||||||
|
"image": "1b0f2dc8abd0434990eee1befefcbe0d"
|
||||||
},
|
},
|
||||||
"FollowThrough": {
|
"FollowThrough": {
|
||||||
"name": "완수",
|
"name": "완수",
|
||||||
@@ -487,7 +501,10 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "normal",
|
"rarity": "normal",
|
||||||
"desc": "피해를 7 줍니다. 손에 다른 카드가 5장 이상 있다면, 1번 추가로 적중합니다.",
|
"desc": "피해를 7 줍니다. 손에 다른 카드가 5장 이상 있다면, 1번 추가로 적중합니다.",
|
||||||
"damage": 7
|
"damage": 7,
|
||||||
|
"otherHandAtLeast": 5,
|
||||||
|
"bonusHitsWhenOtherHandAtLeast": 1,
|
||||||
|
"image": "92a5020c978c46bdabab910598118b86"
|
||||||
},
|
},
|
||||||
"FlickFlack": {
|
"FlickFlack": {
|
||||||
"name": "재주넘기",
|
"name": "재주넘기",
|
||||||
@@ -498,7 +515,8 @@
|
|||||||
"desc": "교활. 모든 적에게 피해를 6 줍니다.",
|
"desc": "교활. 모든 적에게 피해를 6 줍니다.",
|
||||||
"aoe": true,
|
"aoe": true,
|
||||||
"damage": 6,
|
"damage": 6,
|
||||||
"sly": true
|
"sly": true,
|
||||||
|
"image": "91a2d1c16cb041549adbf1a0d7b1f37f"
|
||||||
},
|
},
|
||||||
"Ricochet": {
|
"Ricochet": {
|
||||||
"name": "도탄",
|
"name": "도탄",
|
||||||
@@ -509,7 +527,9 @@
|
|||||||
"desc": "교활. 무작위 적에게 피해를 3만큼 4번 줍니다.",
|
"desc": "교활. 무작위 적에게 피해를 3만큼 4번 줍니다.",
|
||||||
"damage": 3,
|
"damage": 3,
|
||||||
"hits": 4,
|
"hits": 4,
|
||||||
"sly": true
|
"sly": true,
|
||||||
|
"image": "1b0f2dc8abd0434990eee1befefcbe0d",
|
||||||
|
"randomTargetEachHit": true
|
||||||
},
|
},
|
||||||
"Prepared": {
|
"Prepared": {
|
||||||
"name": "예비",
|
"name": "예비",
|
||||||
@@ -518,8 +538,9 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "normal",
|
"rarity": "normal",
|
||||||
"desc": "카드를 1장 뽑습니다. 카드를 1장 버립니다.",
|
"desc": "카드를 1장 뽑습니다. 카드를 1장 버립니다.",
|
||||||
"draw": 1,
|
"blockPerDamageDealtThisTurn": 1,
|
||||||
"discard": 1
|
"discard": 1,
|
||||||
|
"image": "c1e19219745e44c39ae6ac2f77e347d9"
|
||||||
},
|
},
|
||||||
"Anticipate": {
|
"Anticipate": {
|
||||||
"name": "예측",
|
"name": "예측",
|
||||||
@@ -528,7 +549,8 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "normal",
|
"rarity": "normal",
|
||||||
"desc": "이번 턴 동안 민첩을 2 얻습니다.",
|
"desc": "이번 턴 동안 민첩을 2 얻습니다.",
|
||||||
"dex": 2
|
"dex": 2,
|
||||||
|
"image": "49c8f279bfa64bf3954037f17da0052d"
|
||||||
},
|
},
|
||||||
"Deflect": {
|
"Deflect": {
|
||||||
"name": "튕겨내기",
|
"name": "튕겨내기",
|
||||||
@@ -537,7 +559,8 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "normal",
|
"rarity": "normal",
|
||||||
"desc": "방어도를 4 얻습니다.",
|
"desc": "방어도를 4 얻습니다.",
|
||||||
"block": 4
|
"block": 4,
|
||||||
|
"image": "0946f69d84464df29b24b94c744c868d"
|
||||||
},
|
},
|
||||||
"BladeDance": {
|
"BladeDance": {
|
||||||
"name": "검무",
|
"name": "검무",
|
||||||
@@ -547,7 +570,8 @@
|
|||||||
"rarity": "normal",
|
"rarity": "normal",
|
||||||
"desc": "표창을 3장 손으로 가져옵니다. 소멸.",
|
"desc": "표창을 3장 손으로 가져옵니다. 소멸.",
|
||||||
"addShiv": 3,
|
"addShiv": 3,
|
||||||
"exhaust": true
|
"exhaust": true,
|
||||||
|
"image": "1b0f2dc8abd0434990eee1befefcbe0d"
|
||||||
},
|
},
|
||||||
"Backflip": {
|
"Backflip": {
|
||||||
"name": "공중제비",
|
"name": "공중제비",
|
||||||
@@ -557,7 +581,8 @@
|
|||||||
"rarity": "normal",
|
"rarity": "normal",
|
||||||
"desc": "방어도를 5 얻습니다. 카드를 2장 뽑습니다.",
|
"desc": "방어도를 5 얻습니다. 카드를 2장 뽑습니다.",
|
||||||
"block": 5,
|
"block": 5,
|
||||||
"draw": 2
|
"draw": 2,
|
||||||
|
"image": "91a2d1c16cb041549adbf1a0d7b1f37f"
|
||||||
},
|
},
|
||||||
"DodgeAndRoll": {
|
"DodgeAndRoll": {
|
||||||
"name": "구르기",
|
"name": "구르기",
|
||||||
@@ -566,7 +591,9 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "normal",
|
"rarity": "normal",
|
||||||
"desc": "방어도를 4 얻습니다. 다음 턴에, 방어도를 4 얻습니다",
|
"desc": "방어도를 4 얻습니다. 다음 턴에, 방어도를 4 얻습니다",
|
||||||
"block": 4
|
"block": 4,
|
||||||
|
"nextTurnBlock": 4,
|
||||||
|
"image": "91a2d1c16cb041549adbf1a0d7b1f37f"
|
||||||
},
|
},
|
||||||
"PiercingWail": {
|
"PiercingWail": {
|
||||||
"name": "귀를 찢는 비명",
|
"name": "귀를 찢는 비명",
|
||||||
@@ -575,7 +602,10 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "normal",
|
"rarity": "normal",
|
||||||
"desc": "이번 턴 동안 모든 적이 힘을 6 잃습니다. 소멸.",
|
"desc": "이번 턴 동안 모든 적이 힘을 6 잃습니다. 소멸.",
|
||||||
"draw": 1
|
"draw": 1,
|
||||||
|
"image": "0946f69d84464df29b24b94c744c868d",
|
||||||
|
"affectsAllEnemies": true,
|
||||||
|
"enemyStrengthLossThisTurn": 6
|
||||||
},
|
},
|
||||||
"CloakAndDagger": {
|
"CloakAndDagger": {
|
||||||
"name": "망토와 단검",
|
"name": "망토와 단검",
|
||||||
@@ -585,7 +615,8 @@
|
|||||||
"rarity": "normal",
|
"rarity": "normal",
|
||||||
"desc": "방어도를 6 얻습니다. 표창을 1장 손으로 가져옵니다.",
|
"desc": "방어도를 6 얻습니다. 표창을 1장 손으로 가져옵니다.",
|
||||||
"block": 6,
|
"block": 6,
|
||||||
"addShiv": 1
|
"addShiv": 1,
|
||||||
|
"image": "0946f69d84464df29b24b94c744c868d"
|
||||||
},
|
},
|
||||||
"DeadlyPoison": {
|
"DeadlyPoison": {
|
||||||
"name": "맹독",
|
"name": "맹독",
|
||||||
@@ -594,7 +625,8 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "normal",
|
"rarity": "normal",
|
||||||
"desc": "중독을 5 부여합니다.",
|
"desc": "중독을 5 부여합니다.",
|
||||||
"poison": 5
|
"poison": 5,
|
||||||
|
"image": "19361e72087946b1888684185b40d935"
|
||||||
},
|
},
|
||||||
"Snakebite": {
|
"Snakebite": {
|
||||||
"name": "뱀 물기",
|
"name": "뱀 물기",
|
||||||
@@ -604,7 +636,8 @@
|
|||||||
"rarity": "normal",
|
"rarity": "normal",
|
||||||
"desc": "보존. 중독을 7 부여합니다.",
|
"desc": "보존. 중독을 7 부여합니다.",
|
||||||
"poison": 7,
|
"poison": 7,
|
||||||
"retain": true
|
"retain": true,
|
||||||
|
"image": "19361e72087946b1888684185b40d935"
|
||||||
},
|
},
|
||||||
"Untouchable": {
|
"Untouchable": {
|
||||||
"name": "범접 불가",
|
"name": "범접 불가",
|
||||||
@@ -614,7 +647,8 @@
|
|||||||
"rarity": "normal",
|
"rarity": "normal",
|
||||||
"desc": "교활. 방어도를 6 얻습니다.",
|
"desc": "교활. 방어도를 6 얻습니다.",
|
||||||
"block": 6,
|
"block": 6,
|
||||||
"sly": true
|
"sly": true,
|
||||||
|
"image": "0946f69d84464df29b24b94c744c868d"
|
||||||
},
|
},
|
||||||
"Skewer": {
|
"Skewer": {
|
||||||
"name": "꼬챙이",
|
"name": "꼬챙이",
|
||||||
@@ -623,7 +657,10 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "피해를 8만큼 X번 줍니다.",
|
"desc": "피해를 8만큼 X번 줍니다.",
|
||||||
"draw": 1
|
"useAllEnergy": true,
|
||||||
|
"xDamagePerEnergy": 8,
|
||||||
|
"draw": 1,
|
||||||
|
"image": "92a5020c978c46bdabab910598118b86"
|
||||||
},
|
},
|
||||||
"Backstab": {
|
"Backstab": {
|
||||||
"name": "배신",
|
"name": "배신",
|
||||||
@@ -632,7 +669,9 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "선천성. 피해를 11 줍니다. 소멸.",
|
"desc": "선천성. 피해를 11 줍니다. 소멸.",
|
||||||
"damage": 11
|
"innate": true,
|
||||||
|
"damage": 11,
|
||||||
|
"image": "b1360ed0c4b942309d240634b8f36872"
|
||||||
},
|
},
|
||||||
"PreciseCut": {
|
"PreciseCut": {
|
||||||
"name": "정밀한 베기",
|
"name": "정밀한 베기",
|
||||||
@@ -641,7 +680,9 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "피해를 13 줍니다. 손에 있는 다른 카드 1장당 피해량이 2 감소합니다.",
|
"desc": "피해를 13 줍니다. 손에 있는 다른 카드 1장당 피해량이 2 감소합니다.",
|
||||||
"damage": 13
|
"damage": 13,
|
||||||
|
"damagePerOtherHandCard": -2,
|
||||||
|
"image": "92a5020c978c46bdabab910598118b86"
|
||||||
},
|
},
|
||||||
"Finisher": {
|
"Finisher": {
|
||||||
"name": "마무리",
|
"name": "마무리",
|
||||||
@@ -650,7 +691,9 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "이번 턴에 사용한 공격 카드 1장당 피해를 6 줍니다.",
|
"desc": "이번 턴에 사용한 공격 카드 1장당 피해를 6 줍니다.",
|
||||||
"damage": 6
|
"damage": 0,
|
||||||
|
"damagePerAttackPlayedThisTurn": 6,
|
||||||
|
"image": "b1360ed0c4b942309d240634b8f36872"
|
||||||
},
|
},
|
||||||
"MementoMori": {
|
"MementoMori": {
|
||||||
"name": "메멘토 모리",
|
"name": "메멘토 모리",
|
||||||
@@ -659,7 +702,9 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "피해를 9 줍니다. 이번 턴에 버린 카드 1장당 피해량이 4 증가합니다.",
|
"desc": "피해를 9 줍니다. 이번 턴에 버린 카드 1장당 피해량이 4 증가합니다.",
|
||||||
"damage": 9
|
"damage": 9,
|
||||||
|
"damagePerDiscardedThisTurn": 4,
|
||||||
|
"image": "0946f69d84464df29b24b94c744c868d"
|
||||||
},
|
},
|
||||||
"Strangle": {
|
"Strangle": {
|
||||||
"name": "목 조르기",
|
"name": "목 조르기",
|
||||||
@@ -668,7 +713,8 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "피해를 8 줍니다. 이번 턴에 카드를 사용할 때마다, 대상 적이 체력을 2 잃습니다.",
|
"desc": "피해를 8 줍니다. 이번 턴에 카드를 사용할 때마다, 대상 적이 체력을 2 잃습니다.",
|
||||||
"damage": 8
|
"damage": 8,
|
||||||
|
"image": "92a5020c978c46bdabab910598118b86"
|
||||||
},
|
},
|
||||||
"Flechettes": {
|
"Flechettes": {
|
||||||
"name": "프레췌",
|
"name": "프레췌",
|
||||||
@@ -677,7 +723,9 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "손에 있는 스킬 카드 1장당 피해를 5 줍니다.",
|
"desc": "손에 있는 스킬 카드 1장당 피해를 5 줍니다.",
|
||||||
"damage": 5
|
"damage": 0,
|
||||||
|
"damagePerSkillInHand": 5,
|
||||||
|
"image": "1b0f2dc8abd0434990eee1befefcbe0d"
|
||||||
},
|
},
|
||||||
"Pounce": {
|
"Pounce": {
|
||||||
"name": "덮치기",
|
"name": "덮치기",
|
||||||
@@ -686,7 +734,9 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "피해를 12 줍니다. 다음에 사용하는 스킬 카드의 비용이 0 이 됩니다.",
|
"desc": "피해를 12 줍니다. 다음에 사용하는 스킬 카드의 비용이 0 이 됩니다.",
|
||||||
"damage": 12
|
"damage": 12,
|
||||||
|
"nextSkillCostZero": true,
|
||||||
|
"image": "91a2d1c16cb041549adbf1a0d7b1f37f"
|
||||||
},
|
},
|
||||||
"Dash": {
|
"Dash": {
|
||||||
"name": "돌진",
|
"name": "돌진",
|
||||||
@@ -696,7 +746,8 @@
|
|||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "방어도를 10 얻습니다. 피해를 10 줍니다.",
|
"desc": "방어도를 10 얻습니다. 피해를 10 줍니다.",
|
||||||
"block": 10,
|
"block": 10,
|
||||||
"damage": 10
|
"damage": 10,
|
||||||
|
"image": "91a2d1c16cb041549adbf1a0d7b1f37f"
|
||||||
},
|
},
|
||||||
"Predator": {
|
"Predator": {
|
||||||
"name": "천적",
|
"name": "천적",
|
||||||
@@ -705,8 +756,9 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "피해를 15 줍니다. 다음 턴에, 카드를 2장 뽑습니다.",
|
"desc": "피해를 15 줍니다. 다음 턴에, 카드를 2장 뽑습니다.",
|
||||||
"draw": 2,
|
"nextTurnDraw": 2,
|
||||||
"damage": 15
|
"damage": 15,
|
||||||
|
"image": "b1360ed0c4b942309d240634b8f36872"
|
||||||
},
|
},
|
||||||
"Pinpoint": {
|
"Pinpoint": {
|
||||||
"name": "정밀 사격",
|
"name": "정밀 사격",
|
||||||
@@ -715,7 +767,9 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "피해를 15 줍니다. 이번 턴에 스킬을 사용할 때마다 비용이 1 감소합니다.",
|
"desc": "피해를 15 줍니다. 이번 턴에 스킬을 사용할 때마다 비용이 1 감소합니다.",
|
||||||
"damage": 15
|
"damage": 15,
|
||||||
|
"skillCostReductionThisTurn": 1,
|
||||||
|
"image": "1b0f2dc8abd0434990eee1befefcbe0d"
|
||||||
},
|
},
|
||||||
"CalculatedGamble": {
|
"CalculatedGamble": {
|
||||||
"name": "계산된 도박",
|
"name": "계산된 도박",
|
||||||
@@ -724,7 +778,9 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "손에 있는 모든 카드를 버린 뒤, 버린 카드의 수만큼 카드를 뽑습니다. 소멸.",
|
"desc": "손에 있는 모든 카드를 버린 뒤, 버린 카드의 수만큼 카드를 뽑습니다. 소멸.",
|
||||||
"draw": 1
|
"image": "c1e19219745e44c39ae6ac2f77e347d9",
|
||||||
|
"discardAll": true,
|
||||||
|
"drawPerDiscarded": 1
|
||||||
},
|
},
|
||||||
"Expose": {
|
"Expose": {
|
||||||
"name": "들춰내기",
|
"name": "들춰내기",
|
||||||
@@ -733,7 +789,11 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "대상 적의 모든 인공물과 방어도를 제거합니다. 취약을 2 부여합니다. 소멸.",
|
"desc": "대상 적의 모든 인공물과 방어도를 제거합니다. 취약을 2 부여합니다. 소멸.",
|
||||||
"vuln": 2
|
"vuln": 2,
|
||||||
|
"image": "0946f69d84464df29b24b94c744c868d",
|
||||||
|
"affectsAllEnemies": true,
|
||||||
|
"removeEnemyBlock": true,
|
||||||
|
"removeEnemyArtifact": true
|
||||||
},
|
},
|
||||||
"HiddenDaggers": {
|
"HiddenDaggers": {
|
||||||
"name": "숨겨진 단검",
|
"name": "숨겨진 단검",
|
||||||
@@ -743,7 +803,8 @@
|
|||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "카드를 2장 버립니다. 표창을 2장 손으로 가져옵니다.",
|
"desc": "카드를 2장 버립니다. 표창을 2장 손으로 가져옵니다.",
|
||||||
"discard": 2,
|
"discard": 2,
|
||||||
"addShiv": 2
|
"addShiv": 2,
|
||||||
|
"image": "1b0f2dc8abd0434990eee1befefcbe0d"
|
||||||
},
|
},
|
||||||
"EscapePlan": {
|
"EscapePlan": {
|
||||||
"name": "탈출구",
|
"name": "탈출구",
|
||||||
@@ -752,8 +813,9 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "카드를 1장 뽑습니다. 뽑은 카드가 스킬 카드라면, 방어도를 3 얻습니다.",
|
"desc": "카드를 1장 뽑습니다. 뽑은 카드가 스킬 카드라면, 방어도를 3 얻습니다.",
|
||||||
"block": 3,
|
"draw": 1,
|
||||||
"draw": 1
|
"drawSkillBlock": 3,
|
||||||
|
"image": "91a2d1c16cb041549adbf1a0d7b1f37f"
|
||||||
},
|
},
|
||||||
"Acrobatics": {
|
"Acrobatics": {
|
||||||
"name": "곡예",
|
"name": "곡예",
|
||||||
@@ -763,7 +825,8 @@
|
|||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "카드를 3장 뽑습니다. 카드를 1장 버립니다.",
|
"desc": "카드를 3장 뽑습니다. 카드를 1장 버립니다.",
|
||||||
"draw": 3,
|
"draw": 3,
|
||||||
"discard": 1
|
"discard": 1,
|
||||||
|
"image": "91a2d1c16cb041549adbf1a0d7b1f37f"
|
||||||
},
|
},
|
||||||
"HandTrick": {
|
"HandTrick": {
|
||||||
"name": "손기술",
|
"name": "손기술",
|
||||||
@@ -772,7 +835,9 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "방어도를 7 얻습니다. 이번 턴 동안 손에 있는 스킬 카드 1장에 교활을 추가합니다.",
|
"desc": "방어도를 7 얻습니다. 이번 턴 동안 손에 있는 스킬 카드 1장에 교활을 추가합니다.",
|
||||||
"block": 7
|
"block": 7,
|
||||||
|
"image": "c1e19219745e44c39ae6ac2f77e347d9",
|
||||||
|
"turnHandSlyCount": 1
|
||||||
},
|
},
|
||||||
"Mirage": {
|
"Mirage": {
|
||||||
"name": "신기루",
|
"name": "신기루",
|
||||||
@@ -781,7 +846,8 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "모든 적에게 부여된 중독과 동일한 만큼의 방어도를 얻습니다. 소멸.",
|
"desc": "모든 적에게 부여된 중독과 동일한 만큼의 방어도를 얻습니다. 소멸.",
|
||||||
"draw": 1
|
"draw": 1,
|
||||||
|
"image": "0946f69d84464df29b24b94c744c868d"
|
||||||
},
|
},
|
||||||
"Expertise": {
|
"Expertise": {
|
||||||
"name": "전문성",
|
"name": "전문성",
|
||||||
@@ -790,7 +856,8 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "손에 있는 카드가 6장이 될 때까지 카드를 뽑습니다.",
|
"desc": "손에 있는 카드가 6장이 될 때까지 카드를 뽑습니다.",
|
||||||
"draw": 1
|
"image": "c1e19219745e44c39ae6ac2f77e347d9",
|
||||||
|
"drawUntilHandSize": 6
|
||||||
},
|
},
|
||||||
"BubbleBubble": {
|
"BubbleBubble": {
|
||||||
"name": "차오르는 독",
|
"name": "차오르는 독",
|
||||||
@@ -799,7 +866,9 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "적이 중독을 보유하고 있다면, 중독을 9 부여합니다.",
|
"desc": "적이 중독을 보유하고 있다면, 중독을 9 부여합니다.",
|
||||||
"poison": 9
|
"poison": 9,
|
||||||
|
"image": "19361e72087946b1888684185b40d935",
|
||||||
|
"poisonIfTargetPoisoned": true
|
||||||
},
|
},
|
||||||
"Blur": {
|
"Blur": {
|
||||||
"name": "흐릿함",
|
"name": "흐릿함",
|
||||||
@@ -808,7 +877,9 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "방어도를 5 얻습니다. 다음 턴 시작 시 방어도가 사라지지 않습니다.",
|
"desc": "방어도를 5 얻습니다. 다음 턴 시작 시 방어도가 사라지지 않습니다.",
|
||||||
"block": 5
|
"block": 5,
|
||||||
|
"nextTurnKeepBlock": true,
|
||||||
|
"image": "0946f69d84464df29b24b94c744c868d"
|
||||||
},
|
},
|
||||||
"LegSweep": {
|
"LegSweep": {
|
||||||
"name": "다리 걸기",
|
"name": "다리 걸기",
|
||||||
@@ -818,7 +889,8 @@
|
|||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "약화를 2 부여합니다. 방어도를 11 얻습니다.",
|
"desc": "약화를 2 부여합니다. 방어도를 11 얻습니다.",
|
||||||
"block": 11,
|
"block": 11,
|
||||||
"weak": 2
|
"weak": 2,
|
||||||
|
"image": "91a2d1c16cb041549adbf1a0d7b1f37f"
|
||||||
},
|
},
|
||||||
"UpMySleeve": {
|
"UpMySleeve": {
|
||||||
"name": "비책",
|
"name": "비책",
|
||||||
@@ -827,7 +899,9 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "표창을 3장 손으로 가져옵니다. 이 카드의 비용이 1 감소합니다.",
|
"desc": "표창을 3장 손으로 가져옵니다. 이 카드의 비용이 1 감소합니다.",
|
||||||
"addShiv": 3
|
"addShiv": 3,
|
||||||
|
"image": "1b0f2dc8abd0434990eee1befefcbe0d",
|
||||||
|
"combatCostReductionOnPlay": 1
|
||||||
},
|
},
|
||||||
"BouncingFlask": {
|
"BouncingFlask": {
|
||||||
"name": "탄성 플라스크",
|
"name": "탄성 플라스크",
|
||||||
@@ -836,7 +910,10 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "무작위 적에게 중독을 3만큼 3번 부여합니다.",
|
"desc": "무작위 적에게 중독을 3만큼 3번 부여합니다.",
|
||||||
"poison": 9
|
"poison": 3,
|
||||||
|
"poisonHits": 3,
|
||||||
|
"poisonRandomTargets": true,
|
||||||
|
"image": "19361e72087946b1888684185b40d935"
|
||||||
},
|
},
|
||||||
"Reflex": {
|
"Reflex": {
|
||||||
"name": "반사신경",
|
"name": "반사신경",
|
||||||
@@ -846,7 +923,8 @@
|
|||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "교활. 카드를 2장 뽑습니다.",
|
"desc": "교활. 카드를 2장 뽑습니다.",
|
||||||
"draw": 2,
|
"draw": 2,
|
||||||
"sly": true
|
"sly": true,
|
||||||
|
"image": "49c8f279bfa64bf3954037f17da0052d"
|
||||||
},
|
},
|
||||||
"Haze": {
|
"Haze": {
|
||||||
"name": "아지랑이",
|
"name": "아지랑이",
|
||||||
@@ -856,7 +934,8 @@
|
|||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "교활. 모든 적에게 중독을 4 부여합니다.",
|
"desc": "교활. 모든 적에게 중독을 4 부여합니다.",
|
||||||
"poison": 4,
|
"poison": 4,
|
||||||
"sly": true
|
"sly": true,
|
||||||
|
"image": "19361e72087946b1888684185b40d935"
|
||||||
},
|
},
|
||||||
"Tactician": {
|
"Tactician": {
|
||||||
"name": "전략가",
|
"name": "전략가",
|
||||||
@@ -865,9 +944,9 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "교활. 을 얻습니다.",
|
"desc": "교활. 을 얻습니다.",
|
||||||
"powerEffect": "energyPerTurn",
|
"gainEnergy": 1,
|
||||||
"value": 1,
|
"sly": true,
|
||||||
"sly": true
|
"image": "c1e19219745e44c39ae6ac2f77e347d9"
|
||||||
},
|
},
|
||||||
"WellLaidPlans": {
|
"WellLaidPlans": {
|
||||||
"name": "괜찮은 전략",
|
"name": "괜찮은 전략",
|
||||||
@@ -876,8 +955,9 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "내 턴 종료 시, 카드를 최대 1장까지 보존합니다.",
|
"desc": "내 턴 종료 시, 카드를 최대 1장까지 보존합니다.",
|
||||||
"powerEffect": "blockPerTurn",
|
"powerEffect": "retainOne",
|
||||||
"value": 2
|
"value": 1,
|
||||||
|
"image": "c1e19219745e44c39ae6ac2f77e347d9"
|
||||||
},
|
},
|
||||||
"InfiniteBlades": {
|
"InfiniteBlades": {
|
||||||
"name": "무한의 검날",
|
"name": "무한의 검날",
|
||||||
@@ -886,7 +966,8 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "내 턴 시작 시, 표창을 1장 손으로 가져옵니다.",
|
"desc": "내 턴 시작 시, 표창을 1장 손으로 가져옵니다.",
|
||||||
"turnStartShiv": 1
|
"turnStartShiv": 1,
|
||||||
|
"image": "1b0f2dc8abd0434990eee1befefcbe0d"
|
||||||
},
|
},
|
||||||
"Footwork": {
|
"Footwork": {
|
||||||
"name": "발놀림",
|
"name": "발놀림",
|
||||||
@@ -895,7 +976,8 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "민첩을 2 얻습니다.",
|
"desc": "민첩을 2 얻습니다.",
|
||||||
"dex": 2
|
"dex": 2,
|
||||||
|
"image": "49c8f279bfa64bf3954037f17da0052d"
|
||||||
},
|
},
|
||||||
"Outbreak": {
|
"Outbreak": {
|
||||||
"name": "발병",
|
"name": "발병",
|
||||||
@@ -903,11 +985,10 @@
|
|||||||
"kind": "Power",
|
"kind": "Power",
|
||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "중독을 3번 부여할 때마다, 모든 적에게 피해를 11 줍니다.",
|
"desc": "독이 3번 부여될 때마다 모든 적에게 11 피해를 줍니다.",
|
||||||
"aoe": true,
|
"image": "19361e72087946b1888684185b40d935",
|
||||||
"powerEffect": "strengthPerTurn",
|
"poisonApplicationBurstEvery": 3,
|
||||||
"value": 1,
|
"poisonApplicationBurstDamage": 11
|
||||||
"damage": 11
|
|
||||||
},
|
},
|
||||||
"NoxiousFumes": {
|
"NoxiousFumes": {
|
||||||
"name": "유독 가스",
|
"name": "유독 가스",
|
||||||
@@ -917,8 +998,9 @@
|
|||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "내 턴 시작 시, 모든 적에게 중독을 2 부여합니다.",
|
"desc": "내 턴 시작 시, 모든 적에게 중독을 2 부여합니다.",
|
||||||
"poison": 2,
|
"poison": 2,
|
||||||
"powerEffect": "strengthPerTurn",
|
"powerEffect": "poisonPerTurn",
|
||||||
"value": 1
|
"value": 2,
|
||||||
|
"image": "19361e72087946b1888684185b40d935"
|
||||||
},
|
},
|
||||||
"Accuracy": {
|
"Accuracy": {
|
||||||
"name": "정밀",
|
"name": "정밀",
|
||||||
@@ -927,8 +1009,8 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "표창의 피해량이 4 증가합니다.",
|
"desc": "표창의 피해량이 4 증가합니다.",
|
||||||
"powerEffect": "strengthPerTurn",
|
"shivDamageBonus": 4,
|
||||||
"value": 1
|
"image": "1b0f2dc8abd0434990eee1befefcbe0d"
|
||||||
},
|
},
|
||||||
"PhantomBlades": {
|
"PhantomBlades": {
|
||||||
"name": "환영검",
|
"name": "환영검",
|
||||||
@@ -937,8 +1019,9 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "표창이 보존을 얻습니다. 매 턴마다 처음으로 사용하는 표창의 피해량이 9 증가합니다.",
|
"desc": "표창이 보존을 얻습니다. 매 턴마다 처음으로 사용하는 표창의 피해량이 9 증가합니다.",
|
||||||
"powerEffect": "strengthPerTurn",
|
"shivRetain": true,
|
||||||
"value": 1
|
"firstShivDamageBonus": 9,
|
||||||
|
"image": "0946f69d84464df29b24b94c744c868d"
|
||||||
},
|
},
|
||||||
"Speedster": {
|
"Speedster": {
|
||||||
"name": "스피드스터",
|
"name": "스피드스터",
|
||||||
@@ -948,9 +1031,8 @@
|
|||||||
"rarity": "unique",
|
"rarity": "unique",
|
||||||
"desc": "내 턴 동안 카드를 뽑을 때마다, 모든 적에게 피해를 2 줍니다.",
|
"desc": "내 턴 동안 카드를 뽑을 때마다, 모든 적에게 피해를 2 줍니다.",
|
||||||
"aoe": true,
|
"aoe": true,
|
||||||
"powerEffect": "strengthPerTurn",
|
"drawDamage": 2,
|
||||||
"value": 1,
|
"image": "91a2d1c16cb041549adbf1a0d7b1f37f"
|
||||||
"damage": 2
|
|
||||||
},
|
},
|
||||||
"GrandFinale": {
|
"GrandFinale": {
|
||||||
"name": "대단원의 막",
|
"name": "대단원의 막",
|
||||||
@@ -959,8 +1041,10 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "legend",
|
"rarity": "legend",
|
||||||
"desc": "뽑을 카드 더미에 카드가 없을 때만 사용할 수 있습니다. 모든 적에게 피해를 60 줍니다.",
|
"desc": "뽑을 카드 더미에 카드가 없을 때만 사용할 수 있습니다. 모든 적에게 피해를 60 줍니다.",
|
||||||
|
"playableWhenDrawPileEmpty": true,
|
||||||
"aoe": true,
|
"aoe": true,
|
||||||
"damage": 60
|
"damage": 60,
|
||||||
|
"image": "dbdbb1b56ae54672ae68ac6882fff6a2"
|
||||||
},
|
},
|
||||||
"Assassinate": {
|
"Assassinate": {
|
||||||
"name": "암살",
|
"name": "암살",
|
||||||
@@ -969,8 +1053,10 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "legend",
|
"rarity": "legend",
|
||||||
"desc": "선천성. 피해를 10 줍니다. 취약을 1 부여합니다. 소멸.",
|
"desc": "선천성. 피해를 10 줍니다. 취약을 1 부여합니다. 소멸.",
|
||||||
|
"innate": true,
|
||||||
"vuln": 1,
|
"vuln": 1,
|
||||||
"damage": 10
|
"damage": 10,
|
||||||
|
"image": "b1360ed0c4b942309d240634b8f36872"
|
||||||
},
|
},
|
||||||
"EchoingSlash": {
|
"EchoingSlash": {
|
||||||
"name": "메아리 참격",
|
"name": "메아리 참격",
|
||||||
@@ -980,7 +1066,9 @@
|
|||||||
"rarity": "legend",
|
"rarity": "legend",
|
||||||
"desc": "모든 적에게 피해를 10 줍니다. 적을 처치할 때마다 이 효과를 반복합니다.",
|
"desc": "모든 적에게 피해를 10 줍니다. 적을 처치할 때마다 이 효과를 반복합니다.",
|
||||||
"aoe": true,
|
"aoe": true,
|
||||||
"damage": 10
|
"damage": 10,
|
||||||
|
"image": "dbdbb1b56ae54672ae68ac6882fff6a2",
|
||||||
|
"repeatOnKill": true
|
||||||
},
|
},
|
||||||
"TheHunt": {
|
"TheHunt": {
|
||||||
"name": "사냥",
|
"name": "사냥",
|
||||||
@@ -989,7 +1077,9 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "legend",
|
"rarity": "legend",
|
||||||
"desc": "피해를 10 줍니다. 치명타라면, 카드 보상을 추가로 얻습니다. 소멸.",
|
"desc": "피해를 10 줍니다. 치명타라면, 카드 보상을 추가로 얻습니다. 소멸.",
|
||||||
"damage": 10
|
"damage": 10,
|
||||||
|
"rewardOnKill": 1,
|
||||||
|
"image": "b1360ed0c4b942309d240634b8f36872"
|
||||||
},
|
},
|
||||||
"Murder": {
|
"Murder": {
|
||||||
"name": "살해",
|
"name": "살해",
|
||||||
@@ -998,7 +1088,9 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "legend",
|
"rarity": "legend",
|
||||||
"desc": "피해를 1 줍니다. 이번 전투 동안 뽑은 카드 1장당 피해량이 1 증가합니다.",
|
"desc": "피해를 1 줍니다. 이번 전투 동안 뽑은 카드 1장당 피해량이 1 증가합니다.",
|
||||||
"damage": 1
|
"damage": 1,
|
||||||
|
"damagePerCardDrawnThisCombat": 1,
|
||||||
|
"image": "b1360ed0c4b942309d240634b8f36872"
|
||||||
},
|
},
|
||||||
"Malaise": {
|
"Malaise": {
|
||||||
"name": "불쾌",
|
"name": "불쾌",
|
||||||
@@ -1007,7 +1099,9 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "legend",
|
"rarity": "legend",
|
||||||
"desc": "적이 힘을 X 잃습니다. 약화를 X 부여합니다. 소멸.",
|
"desc": "적이 힘을 X 잃습니다. 약화를 X 부여합니다. 소멸.",
|
||||||
"weak": 3
|
"useAllEnergy": true,
|
||||||
|
"xWeakPerEnergy": 1,
|
||||||
|
"image": "0946f69d84464df29b24b94c744c868d"
|
||||||
},
|
},
|
||||||
"Adrenaline": {
|
"Adrenaline": {
|
||||||
"name": "아드레날린",
|
"name": "아드레날린",
|
||||||
@@ -1017,8 +1111,8 @@
|
|||||||
"rarity": "legend",
|
"rarity": "legend",
|
||||||
"desc": "를 얻습니다. 카드를 2장 뽑습니다. 소멸.",
|
"desc": "를 얻습니다. 카드를 2장 뽑습니다. 소멸.",
|
||||||
"draw": 2,
|
"draw": 2,
|
||||||
"powerEffect": "energyPerTurn",
|
"gainEnergy": 1,
|
||||||
"value": 1
|
"image": "91a2d1c16cb041549adbf1a0d7b1f37f"
|
||||||
},
|
},
|
||||||
"StormOfSteel": {
|
"StormOfSteel": {
|
||||||
"name": "강철의 폭풍",
|
"name": "강철의 폭풍",
|
||||||
@@ -1028,7 +1122,8 @@
|
|||||||
"rarity": "legend",
|
"rarity": "legend",
|
||||||
"desc": "손에 있는 모든 카드를 버립니다. 버린 카드의 수만큼 표창을 손으로 가져옵니다.",
|
"desc": "손에 있는 모든 카드를 버립니다. 버린 카드의 수만큼 표창을 손으로 가져옵니다.",
|
||||||
"discardAll": true,
|
"discardAll": true,
|
||||||
"addShivPerDiscard": true
|
"addShivPerDiscard": true,
|
||||||
|
"image": "1b0f2dc8abd0434990eee1befefcbe0d"
|
||||||
},
|
},
|
||||||
"ShadowStep": {
|
"ShadowStep": {
|
||||||
"name": "그림자 걸음",
|
"name": "그림자 걸음",
|
||||||
@@ -1037,8 +1132,9 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "legend",
|
"rarity": "legend",
|
||||||
"desc": "손에 있는 모든 카드를 버립니다. 다음 턴에, 공격 카드의 피해량이 2배가 됩니다.",
|
"desc": "손에 있는 모든 카드를 버립니다. 다음 턴에, 공격 카드의 피해량이 2배가 됩니다.",
|
||||||
"draw": 1,
|
"nextTurnAttackMultiplier": 2,
|
||||||
"discardAll": true
|
"discardAll": true,
|
||||||
|
"image": "0946f69d84464df29b24b94c744c868d"
|
||||||
},
|
},
|
||||||
"Shadowmeld": {
|
"Shadowmeld": {
|
||||||
"name": "그림자 은신",
|
"name": "그림자 은신",
|
||||||
@@ -1047,7 +1143,8 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "legend",
|
"rarity": "legend",
|
||||||
"desc": "이번 턴 동안 얻는 방어도가 2배가 됩니다.",
|
"desc": "이번 턴 동안 얻는 방어도가 2배가 됩니다.",
|
||||||
"draw": 1
|
"blockGainMultiplier": 2,
|
||||||
|
"image": "0946f69d84464df29b24b94c744c868d"
|
||||||
},
|
},
|
||||||
"CorrosiveWave": {
|
"CorrosiveWave": {
|
||||||
"name": "부식성 파도",
|
"name": "부식성 파도",
|
||||||
@@ -1056,7 +1153,8 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "legend",
|
"rarity": "legend",
|
||||||
"desc": "이번 턴에 카드를 뽑을 때마다, 모든 적에게 중독을 2 부여합니다.",
|
"desc": "이번 턴에 카드를 뽑을 때마다, 모든 적에게 중독을 2 부여합니다.",
|
||||||
"poison": 2
|
"drawPoison": 2,
|
||||||
|
"image": "19361e72087946b1888684185b40d935"
|
||||||
},
|
},
|
||||||
"BladeOfInk": {
|
"BladeOfInk": {
|
||||||
"name": "잉크 칼날",
|
"name": "잉크 칼날",
|
||||||
@@ -1065,7 +1163,8 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "legend",
|
"rarity": "legend",
|
||||||
"desc": "잉크투성이 표창을 2장 손으로 가져옵니다.",
|
"desc": "잉크투성이 표창을 2장 손으로 가져옵니다.",
|
||||||
"addShiv": 2
|
"addShiv": 2,
|
||||||
|
"image": "1b0f2dc8abd0434990eee1befefcbe0d"
|
||||||
},
|
},
|
||||||
"Burst": {
|
"Burst": {
|
||||||
"name": "폭주",
|
"name": "폭주",
|
||||||
@@ -1074,7 +1173,9 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "legend",
|
"rarity": "legend",
|
||||||
"desc": "이번 턴에 다음에 사용하는 스킬 카드가 1번 추가로 사용됩니다.",
|
"desc": "이번 턴에 다음에 사용하는 스킬 카드가 1번 추가로 사용됩니다.",
|
||||||
"draw": 1
|
"draw": 1,
|
||||||
|
"nextSkillRepeatCount": 1,
|
||||||
|
"image": "91a2d1c16cb041549adbf1a0d7b1f37f"
|
||||||
},
|
},
|
||||||
"KnifeTrap": {
|
"KnifeTrap": {
|
||||||
"name": "칼날 함정",
|
"name": "칼날 함정",
|
||||||
@@ -1083,7 +1184,8 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "legend",
|
"rarity": "legend",
|
||||||
"desc": "대상 적에게 소멸된 카드 더미에 있는 모든 표창을 사용합니다.",
|
"desc": "대상 적에게 소멸된 카드 더미에 있는 모든 표창을 사용합니다.",
|
||||||
"draw": 1
|
"draw": 1,
|
||||||
|
"image": "1b0f2dc8abd0434990eee1befefcbe0d"
|
||||||
},
|
},
|
||||||
"BulletTime": {
|
"BulletTime": {
|
||||||
"name": "불릿 타임",
|
"name": "불릿 타임",
|
||||||
@@ -1092,8 +1194,9 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "legend",
|
"rarity": "legend",
|
||||||
"desc": "이번 턴 동안 더 이상 카드를 뽑을 수 없습니다. 이번 턴 동안 손에 있는 모든 카드를 비용 없이 사용할 수 있습니다.",
|
"desc": "이번 턴 동안 더 이상 카드를 뽑을 수 없습니다. 이번 턴 동안 손에 있는 모든 카드를 비용 없이 사용할 수 있습니다.",
|
||||||
"powerEffect": "energyPerTurn",
|
"handCostZeroThisTurn": true,
|
||||||
"value": 1
|
"drawDisabledThisTurn": true,
|
||||||
|
"image": "91a2d1c16cb041549adbf1a0d7b1f37f"
|
||||||
},
|
},
|
||||||
"Nightmare": {
|
"Nightmare": {
|
||||||
"name": "악몽",
|
"name": "악몽",
|
||||||
@@ -1102,7 +1205,10 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "legend",
|
"rarity": "legend",
|
||||||
"desc": "카드를 1장 선택합니다. 다음 턴에, 그 카드의 복사본을 3장 손으로 가져옵니다. 소멸.",
|
"desc": "카드를 1장 선택합니다. 다음 턴에, 그 카드의 복사본을 3장 손으로 가져옵니다. 소멸.",
|
||||||
"draw": 1
|
"nextTurnCopies": 3,
|
||||||
|
"nextTurnSelectHandCard": true,
|
||||||
|
"nextTurnSelectPrompt": "복사할 카드를 선택하세요",
|
||||||
|
"image": "0946f69d84464df29b24b94c744c868d"
|
||||||
},
|
},
|
||||||
"ToolsOfTheTrade": {
|
"ToolsOfTheTrade": {
|
||||||
"name": "작업 도구",
|
"name": "작업 도구",
|
||||||
@@ -1111,10 +1217,9 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "legend",
|
"rarity": "legend",
|
||||||
"desc": "내 턴 시작 시, 카드를 1장 뽑고 카드를 1장 버립니다.",
|
"desc": "내 턴 시작 시, 카드를 1장 뽑고 카드를 1장 버립니다.",
|
||||||
"draw": 1,
|
"turnStartDraw": 1,
|
||||||
"powerEffect": "energyPerTurn",
|
"turnStartDiscard": 1,
|
||||||
"value": 1,
|
"image": "c1e19219745e44c39ae6ac2f77e347d9"
|
||||||
"discard": 1
|
|
||||||
},
|
},
|
||||||
"Afterimage": {
|
"Afterimage": {
|
||||||
"name": "잔상",
|
"name": "잔상",
|
||||||
@@ -1123,9 +1228,8 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "legend",
|
"rarity": "legend",
|
||||||
"desc": "카드를 사용할 때마다, 방어도를 1 얻습니다.",
|
"desc": "카드를 사용할 때마다, 방어도를 1 얻습니다.",
|
||||||
"block": 1,
|
"image": "0946f69d84464df29b24b94c744c868d",
|
||||||
"powerEffect": "blockPerTurn",
|
"cardPlayedBlock": 1
|
||||||
"value": 2
|
|
||||||
},
|
},
|
||||||
"Accelerant": {
|
"Accelerant": {
|
||||||
"name": "촉진제",
|
"name": "촉진제",
|
||||||
@@ -1133,9 +1237,9 @@
|
|||||||
"kind": "Power",
|
"kind": "Power",
|
||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "legend",
|
"rarity": "legend",
|
||||||
"desc": "중독이 1번 추가로 발동합니다.",
|
"desc": "적 턴 시작 시 독이 한 번 더 틱합니다.",
|
||||||
"powerEffect": "strengthPerTurn",
|
"image": "19361e72087946b1888684185b40d935",
|
||||||
"value": 1
|
"extraPoisonTicks": 1
|
||||||
},
|
},
|
||||||
"Envenom": {
|
"Envenom": {
|
||||||
"name": "독 바르기",
|
"name": "독 바르기",
|
||||||
@@ -1144,9 +1248,8 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "legend",
|
"rarity": "legend",
|
||||||
"desc": "공격 카드가 막히지 않은 피해를 줄 때마다, 중독을 1 부여합니다.",
|
"desc": "공격 카드가 막히지 않은 피해를 줄 때마다, 중독을 1 부여합니다.",
|
||||||
"poison": 1,
|
"attackPoison": 1,
|
||||||
"powerEffect": "strengthPerTurn",
|
"image": "19361e72087946b1888684185b40d935"
|
||||||
"value": 1
|
|
||||||
},
|
},
|
||||||
"MasterPlanner": {
|
"MasterPlanner": {
|
||||||
"name": "설계의 대가",
|
"name": "설계의 대가",
|
||||||
@@ -1154,9 +1257,9 @@
|
|||||||
"kind": "Power",
|
"kind": "Power",
|
||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "legend",
|
"rarity": "legend",
|
||||||
"desc": "스킬 카드를 사용 시, 그 카드가 교활을 얻습니다.",
|
"desc": "사용한 스킬 카드는 교활해집니다.",
|
||||||
"powerEffect": "strengthPerTurn",
|
"image": "c1e19219745e44c39ae6ac2f77e347d9",
|
||||||
"value": 1
|
"skillSlyOnPlay": true
|
||||||
},
|
},
|
||||||
"Tracking": {
|
"Tracking": {
|
||||||
"name": "추적",
|
"name": "추적",
|
||||||
@@ -1165,8 +1268,8 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "legend",
|
"rarity": "legend",
|
||||||
"desc": "약화 상태의 적이 공격 카드로 받는 피해가 2배가 됩니다.",
|
"desc": "약화 상태의 적이 공격 카드로 받는 피해가 2배가 됩니다.",
|
||||||
"powerEffect": "strengthPerTurn",
|
"attackDamageVsWeakMultiplier": 2,
|
||||||
"value": 1
|
"image": "b1360ed0c4b942309d240634b8f36872"
|
||||||
},
|
},
|
||||||
"FanOfKnives": {
|
"FanOfKnives": {
|
||||||
"name": "칼날 부채",
|
"name": "칼날 부채",
|
||||||
@@ -1175,9 +1278,9 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "legend",
|
"rarity": "legend",
|
||||||
"desc": "표창이 이제 모든 적을 대상으로 합니다. 표창을 4장 손으로 가져옵니다.",
|
"desc": "표창이 이제 모든 적을 대상으로 합니다. 표창을 4장 손으로 가져옵니다.",
|
||||||
"powerEffect": "strengthPerTurn",
|
"addShiv": 4,
|
||||||
"value": 1,
|
"shivAoe": true,
|
||||||
"addShiv": 4
|
"image": "1b0f2dc8abd0434990eee1befefcbe0d"
|
||||||
},
|
},
|
||||||
"SerpentForm": {
|
"SerpentForm": {
|
||||||
"name": "구렁이의 형상",
|
"name": "구렁이의 형상",
|
||||||
@@ -1186,9 +1289,8 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "legend",
|
"rarity": "legend",
|
||||||
"desc": "카드를 사용할 때마다, 무작위 적에게 피해를 4 줍니다.",
|
"desc": "카드를 사용할 때마다, 무작위 적에게 피해를 4 줍니다.",
|
||||||
"powerEffect": "strengthPerTurn",
|
"cardPlayedRandomDamage": 4,
|
||||||
"value": 1,
|
"image": "19361e72087946b1888684185b40d935"
|
||||||
"damage": 4
|
|
||||||
},
|
},
|
||||||
"Abrasive": {
|
"Abrasive": {
|
||||||
"name": "연마",
|
"name": "연마",
|
||||||
@@ -1199,7 +1301,8 @@
|
|||||||
"desc": "교활. 민첩을 1 얻습니다. 가시를 4 얻습니다.",
|
"desc": "교활. 민첩을 1 얻습니다. 가시를 4 얻습니다.",
|
||||||
"dex": 1,
|
"dex": 1,
|
||||||
"thorns": 4,
|
"thorns": 4,
|
||||||
"sly": true
|
"sly": true,
|
||||||
|
"image": "49c8f279bfa64bf3954037f17da0052d"
|
||||||
},
|
},
|
||||||
"Suppress": {
|
"Suppress": {
|
||||||
"name": "진압",
|
"name": "진압",
|
||||||
@@ -1208,8 +1311,10 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "legend",
|
"rarity": "legend",
|
||||||
"desc": "선천성. 피해를 11 줍니다. 약화를 3 부여합니다.",
|
"desc": "선천성. 피해를 11 줍니다. 약화를 3 부여합니다.",
|
||||||
|
"innate": true,
|
||||||
"weak": 3,
|
"weak": 3,
|
||||||
"damage": 11
|
"damage": 11,
|
||||||
|
"image": "b1360ed0c4b942309d240634b8f36872"
|
||||||
},
|
},
|
||||||
"WraithForm": {
|
"WraithForm": {
|
||||||
"name": "유령의 형상",
|
"name": "유령의 형상",
|
||||||
@@ -1218,27 +1323,9 @@
|
|||||||
"class": "bandit",
|
"class": "bandit",
|
||||||
"rarity": "legend",
|
"rarity": "legend",
|
||||||
"desc": "불가침을 2 얻습니다. 내 턴 종료 시 민첩을 1 잃습니다.",
|
"desc": "불가침을 2 얻습니다. 내 턴 종료 시 민첩을 1 잃습니다.",
|
||||||
"powerEffect": "blockPerTurn",
|
"intangible": 2,
|
||||||
"value": 8
|
"endTurnDexLoss": 1,
|
||||||
},
|
"image": "0946f69d84464df29b24b94c744c868d"
|
||||||
"Flanking": {
|
|
||||||
"name": "측면 공격",
|
|
||||||
"cost": 2,
|
|
||||||
"kind": "Skill",
|
|
||||||
"class": "bandit",
|
|
||||||
"rarity": "legend",
|
|
||||||
"desc": "이번 턴에 대상 적이 다른 플레이어에게 받는 피해량이 2배가 됩니다.",
|
|
||||||
"draw": 1
|
|
||||||
},
|
|
||||||
"Sneaky": {
|
|
||||||
"name": "비열함",
|
|
||||||
"cost": 2,
|
|
||||||
"kind": "Skill",
|
|
||||||
"class": "bandit",
|
|
||||||
"rarity": "legend",
|
|
||||||
"desc": "교활. 다른 플레이어가 적을 공격할 때마다, 방어도를 1 얻습니다.",
|
|
||||||
"block": 1,
|
|
||||||
"sly": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"starterDecks": {
|
"starterDecks": {
|
||||||
|
|||||||
@@ -119,6 +119,65 @@
|
|||||||
{ "kind": "Attack", "value": 12 },
|
{ "kind": "Attack", "value": 12 },
|
||||||
{ "kind": "Attack", "value": 24 }
|
{ "kind": "Attack", "value": 24 }
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"octopus": {
|
||||||
|
"name": "문어",
|
||||||
|
"maxHp": 15,
|
||||||
|
"intents": [
|
||||||
|
{ "kind": "Attack", "value": 5 },
|
||||||
|
{ "kind": "Attack", "value": 6 },
|
||||||
|
{ "kind": "Defend", "value": 4 }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"kapa_drake": {
|
||||||
|
"name": "카파 드레이크",
|
||||||
|
"maxHp": 24,
|
||||||
|
"intents": [
|
||||||
|
{ "kind": "Attack", "value": 9 },
|
||||||
|
{ "kind": "Attack", "value": 6 },
|
||||||
|
{ "kind": "Defend", "value": 6 },
|
||||||
|
{ "kind": "Attack", "value": 11 }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"junior_neki": {
|
||||||
|
"name": "주니어 네키",
|
||||||
|
"maxHp": 18,
|
||||||
|
"intents": [
|
||||||
|
{ "kind": "Attack", "value": 6 },
|
||||||
|
{ "kind": "Attack", "value": 8 },
|
||||||
|
{ "kind": "Debuff", "effect": "weak", "value": 1 }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"junior_bugi": {
|
||||||
|
"name": "주니어 부기",
|
||||||
|
"maxHp": 20,
|
||||||
|
"intents": [
|
||||||
|
{ "kind": "Attack", "value": 7 },
|
||||||
|
{ "kind": "Defend", "value": 5 },
|
||||||
|
{ "kind": "Attack", "value": 9 }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"dile": {
|
||||||
|
"name": "다일",
|
||||||
|
"maxHp": 65,
|
||||||
|
"intents": [
|
||||||
|
{ "kind": "Attack", "value": 13 },
|
||||||
|
{ "kind": "Defend", "value": 9 },
|
||||||
|
{ "kind": "Attack", "value": 8 },
|
||||||
|
{ "kind": "Attack", "value": 16 },
|
||||||
|
{ "kind": "Debuff", "effect": "weak", "value": 1 }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"mano": {
|
||||||
|
"name": "마노",
|
||||||
|
"maxHp": 80,
|
||||||
|
"intents": [
|
||||||
|
{ "kind": "Defend", "value": 12 },
|
||||||
|
{ "kind": "Attack", "value": 14 },
|
||||||
|
{ "kind": "Debuff", "effect": "vuln", "value": 1 },
|
||||||
|
{ "kind": "Attack", "value": 10 },
|
||||||
|
{ "kind": "AddCard", "card": "Wound", "count": 1 }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"activeEnemy": "slime",
|
"activeEnemy": "slime",
|
||||||
|
|||||||
10
docs/attack-poison.md
Normal file
10
docs/attack-poison.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# 공격 적중 독
|
||||||
|
|
||||||
|
`attackPoison`은 전투 중 파워가 들고 있는 공용 필드입니다.
|
||||||
|
|
||||||
|
동작:
|
||||||
|
|
||||||
|
- 공격 카드가 실제 피해를 주면 독을 부여합니다.
|
||||||
|
- `aoe` 공격이면 모든 적에게 같은 양의 독을 붙입니다.
|
||||||
|
- `Envenom` 같은 카드가 이 필드를 사용합니다.
|
||||||
|
|
||||||
22
docs/bandit-card-audit.md
Normal file
22
docs/bandit-card-audit.md
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# Bandit Card Audit
|
||||||
|
|
||||||
|
Current status of bandit cards and shared effect hooks.
|
||||||
|
|
||||||
|
## Implemented
|
||||||
|
|
||||||
|
`Neutralize`, `SilentStrike`, `Survivor`, `SilentDefend`, `Slice`, `DaggerSpray`, `DaggerThrow`, `PoisonedStab`, `SuckerPunch`, `LeadingStrike`, `FollowThrough`, `FlickFlack`, `Prepared`, `Deflect`, `BladeDance`, `Backflip`, `DodgeAndRoll`, `CloakAndDagger`, `DeadlyPoison`, `Snakebite`, `Untouchable`, `Backstab`, `PreciseCut`, `Finisher`, `MementoMori`, `Flechettes`, `Dash`, `Predator`, `CalculatedGamble`, `HiddenDaggers`, `Acrobatics`, `Blur`, `LegSweep`, `Reflex`, `Haze`, `Tactician`, `WellLaidPlans`, `InfiniteBlades`, `Footwork`, `GrandFinale`, `Adrenaline`, `ShadowStep`, `Assassinate`, `Nightmare`, `ToolsOfTheTrade`, `Afterimage`, `Burst`, `StormOfSteel`, `Abrasive`, `Suppress`, `Expertise`, `Shadowmeld`, `Pounce`, `BouncingFlask`, `Accuracy`, `PhantomBlades`, `Speedster`, `CorrosiveWave`, `Tracking`, `FanOfKnives`, `Strangle`, `Mirage`, `Accelerant`, `MasterPlanner`, `Outbreak`, `EscapePlan`, `HandTrick`, `NoxiousFumes`, `Pinpoint`, `TheHunt`, `Murder`, `Malaise`, `BladeOfInk`, `KnifeTrap`, `BulletTime`, `Envenom`, `SerpentForm`, `WraithForm`, `Skewer`, `Ricochet`, `Anticipate`, `PiercingWail`, `Expose`, `UpMySleeve`, `EchoingSlash`, `BubbleBubble`
|
||||||
|
|
||||||
|
Shared hooks already in use:
|
||||||
|
|
||||||
|
- `poison`, `innate`, `playableWhenDrawPileEmpty`
|
||||||
|
- `retain`, `sly`, `discard`, `discardAll`, `addShiv`, `addShivPerDiscard`, `turnStartShiv`, `retainOne`
|
||||||
|
- `turnStartDraw`, `turnStartDiscard`
|
||||||
|
- `nextTurnBlock`, `nextTurnDraw`, `nextTurnKeepBlock`, `nextTurnAttackMultiplier`, `nextTurnCopies`, `nextTurnSelectHandCard`
|
||||||
|
- `damagePerOtherHandCard`, `damagePerAttackPlayedThisTurn`, `damagePerDiscardedThisTurn`, `damagePerSkillInHand`, `otherHandAtLeast`, `bonusHitsWhenOtherHandAtLeast`
|
||||||
|
- `gainEnergy`, `drawUntilHandSize`, `drawPerDiscarded`, `cardPlayedBlock`, `blockGainMultiplier`, `blockPerDamageDealtThisTurn`, `nextSkillCostZero`, `skillCostReductionThisTurn`
|
||||||
|
- `firstCardDamageBonus`
|
||||||
|
- `drawDamage`, `drawPoison`, `shivDamageBonus`, `firstShivDamageBonus`, `shivRetain`, `shivAoe`, `attackDamageVsWeakMultiplier`, `poisonHits`, `poisonRandomTargets`, `skillSlyOnPlay`, `extraPoisonTicks`, `poisonApplicationBurstEvery`, `poisonApplicationBurstDamage`
|
||||||
|
|
||||||
|
## Open questions
|
||||||
|
|
||||||
|
None at the moment.
|
||||||
126
docs/card-effect-fields.md
Normal file
126
docs/card-effect-fields.md
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
# Card Effect Fields
|
||||||
|
|
||||||
|
This file tracks the shared data fields used by `data/cards.json`.
|
||||||
|
The goal is to keep card behavior reusable instead of hardcoding one-off card names.
|
||||||
|
|
||||||
|
## Damage
|
||||||
|
|
||||||
|
- `damage`: base attack damage
|
||||||
|
- `damagePerOtherHandCard`: bonus damage per other card in hand
|
||||||
|
- `damagePerAttackPlayedThisTurn`: bonus damage per attack played this turn
|
||||||
|
- `damagePerDiscardedThisTurn`: bonus damage per card discarded this turn
|
||||||
|
- `damagePerSkillInHand`: bonus damage per skill card in hand
|
||||||
|
- `damagePerCardDrawnThisCombat`: bonus damage per card drawn this combat
|
||||||
|
- `damagePerTurn`: damage applied at turn start
|
||||||
|
- `cardPlayedDamage`: damage when the card is played
|
||||||
|
- `cardPlayedRandomDamage`: random damage when the card is played
|
||||||
|
- `rewardOnKill`: gain bonus reward screens when the card kills
|
||||||
|
- `randomTargetEachHit`: choose a random alive enemy for each hit
|
||||||
|
- `repeatOnKill`: repeat the attack when it kills at least one enemy
|
||||||
|
- `firstCardDamageBonus`: bonus damage for the first card played this turn
|
||||||
|
- `drawDamage`: damage dealt when a card is drawn
|
||||||
|
- `blockPerDamageDealtThisTurn`: gain block equal to damage dealt this turn
|
||||||
|
- `shivDamageBonus`: bonus damage for all Shivs
|
||||||
|
- `firstShivDamageBonus`: bonus damage for the first Shiv each turn
|
||||||
|
- `attackDamageVsWeakMultiplier`: multiplier when the attack hits Weak targets
|
||||||
|
- `useAllEnergy`: treat the card as spending all available energy
|
||||||
|
- `xDamagePerEnergy`: scale attack damage by energy spent
|
||||||
|
- `xWeakPerEnergy`: scale Weak applied by energy spent
|
||||||
|
|
||||||
|
## Block and utility
|
||||||
|
|
||||||
|
- `block`: gain block
|
||||||
|
- `cardPlayedBlock`: gain block whenever a card is played
|
||||||
|
- `blockGainMultiplier`: multiplier for block gained this turn
|
||||||
|
- `hits`: multi-hit count
|
||||||
|
- `aoe`: hit all enemies
|
||||||
|
- `pierce`: ignore block
|
||||||
|
- `draw`: draw cards immediately
|
||||||
|
- `drawUntilHandSize`: draw until hand reaches a target size
|
||||||
|
- `drawSkillBlock`: gain block for each Skill drawn
|
||||||
|
- `drawPoison`: apply poison when a card is drawn
|
||||||
|
- `handCostZeroThisTurn`: make hand cards cost 0 this turn
|
||||||
|
- `drawDisabledThisTurn`: disable draw for the rest of the turn
|
||||||
|
- `heal`: heal immediately
|
||||||
|
- `gainEnergy`: gain energy immediately
|
||||||
|
- `strength`: gain Strength
|
||||||
|
- `dex`: gain Dexterity
|
||||||
|
- `thorns`: gain Thorns
|
||||||
|
- `selfVuln`: apply Vulnerable to self
|
||||||
|
- `extraPoisonTicks`: add extra poison ticks at enemy turn start
|
||||||
|
|
||||||
|
## Status
|
||||||
|
|
||||||
|
- `weak`: apply Weak
|
||||||
|
- `vuln`: apply Vulnerable
|
||||||
|
- `poison`: apply Poison
|
||||||
|
- `poisonHits`: apply poison multiple times
|
||||||
|
- `poisonRandomTargets`: spread poison applications across random alive enemies
|
||||||
|
- `poisonIfTargetPoisoned`: apply poison only if the target is already poisoned
|
||||||
|
- `poisonApplicationBurstEvery`: trigger a burst every N poison applications
|
||||||
|
- `poisonApplicationBurstDamage`: burst damage when the poison application threshold is reached
|
||||||
|
- `skillSlyOnPlay`: make a played Skill card count as sly when it is later discarded
|
||||||
|
- `turnHandSlyCount`: mark up to N other Skill cards in hand as sly for this turn
|
||||||
|
- `attackPoison`: apply poison when attack damage is dealt
|
||||||
|
- `intangible`: reduce incoming damage to 1 for the duration
|
||||||
|
- `endTurnDexLoss`: lose Dexterity at end of turn
|
||||||
|
- `combatCostReductionOnPlay`: reduce this card's cost each time it is played this combat
|
||||||
|
- `enemyStrengthLossThisTurn`: reduce enemy Strength for the rest of the turn
|
||||||
|
- `affectsAllEnemies`: apply the card's debuffs to every alive enemy
|
||||||
|
- `removeEnemyBlock`: clear enemy block when the card resolves
|
||||||
|
- `removeEnemyArtifact`: consume enemy Artifact when the card resolves
|
||||||
|
|
||||||
|
`poison` deals damage at enemy turn start and then decreases by 1.
|
||||||
|
|
||||||
|
## Shivs and discard
|
||||||
|
|
||||||
|
- `discard`: discard a chosen number of cards from hand
|
||||||
|
- `discardAll`: discard the whole hand
|
||||||
|
- `drawPerDiscarded`: draw one extra card per discarded card
|
||||||
|
- `addShiv`: create Shiv cards
|
||||||
|
- `addShivPerDiscard`: create one Shiv per discarded card
|
||||||
|
- `shivRetain`: Shiv cards are retained at end of turn
|
||||||
|
- `shivAoe`: Shiv cards hit all enemies for the turn
|
||||||
|
- `sly`: trigger on discard
|
||||||
|
- `retain`: keep the card at end of turn
|
||||||
|
|
||||||
|
## Powers and turn effects
|
||||||
|
|
||||||
|
- `powerEffect: "strengthPerTurn"`
|
||||||
|
- `powerEffect: "energyPerTurn"`
|
||||||
|
- `powerEffect: "blockPerTurn"`
|
||||||
|
- `powerEffect: "poisonPerTurn"`
|
||||||
|
- `powerEffect: "damagePerTurn"`
|
||||||
|
- `powerEffect: "retainOne"`
|
||||||
|
- `turnStartShiv`: create Shivs at turn start
|
||||||
|
- `turnStartDraw`: draw cards at turn start
|
||||||
|
- `turnStartDiscard`: discard cards at turn start
|
||||||
|
|
||||||
|
## Next turn planning
|
||||||
|
|
||||||
|
- `nextTurnBlock`: gain block next turn
|
||||||
|
- `nextTurnDraw`: draw extra cards next turn
|
||||||
|
- `nextTurnKeepBlock`: keep block next turn
|
||||||
|
- `nextTurnAttackMultiplier`: attack multiplier next turn
|
||||||
|
- `nextTurnCopies`: copy a chosen card next turn
|
||||||
|
- `nextTurnSelectHandCard`: choose a card from the current hand for next turn copies
|
||||||
|
- `nextTurnSelectPrompt`: prompt text for selection UI
|
||||||
|
- `nextSkillRepeatCount`: repeat the next Skill's effect
|
||||||
|
- `nextSkillCostZero`: make the next Skill cost 0
|
||||||
|
- `skillCostReductionThisTurn`: reduce Skill costs this turn
|
||||||
|
|
||||||
|
## Misc
|
||||||
|
|
||||||
|
- `innate`: place the card in the opening hand
|
||||||
|
- `playableWhenDrawPileEmpty`: only playable when the draw pile is empty
|
||||||
|
- `exhaust`: exhaust after use
|
||||||
|
- `unplayable`: cannot be played
|
||||||
|
- `curse`: curse card
|
||||||
|
- `token`: token card
|
||||||
|
- `endTurnDamage`: damage if the card remains in hand at end of turn
|
||||||
|
|
||||||
|
## Rules
|
||||||
|
|
||||||
|
- Prefer shared fields over card-specific branches.
|
||||||
|
- Reuse the same field name for the same behavior.
|
||||||
|
- Add a new shared field before adding more special-case card logic.
|
||||||
5
docs/card-play-damage.md
Normal file
5
docs/card-play-damage.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# 카드 사용 시 피해
|
||||||
|
|
||||||
|
`cardPlayedDamage`는 카드를 사용할 때마다 현재 대상에게 체력을 직접 깎는 공용 효과입니다. 방어도는 무시하고, 같은 필드를 다른 카드에도 그대로 붙여 재사용할 수 있습니다.
|
||||||
|
|
||||||
|
`cardPlayedRandomDamage`는 같은 시점에 살아 있는 적 하나를 랜덤으로 골라 체력을 직접 깎습니다. `Strangle`과 `SerpentForm` 같은 카드가 이 계열을 씁니다.
|
||||||
31
docs/codex-workflow.md
Normal file
31
docs/codex-workflow.md
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# Codex Workflow
|
||||||
|
|
||||||
|
이 저장소에서 작업할 때는 토큰과 변경량을 아끼는 쪽을 기본으로 둔다.
|
||||||
|
|
||||||
|
## 작업 원칙
|
||||||
|
|
||||||
|
- 이미 확인한 사실은 다시 읽지 않는다.
|
||||||
|
- 같은 내용을 통째로 지우고 새로 쓰지 않는다.
|
||||||
|
- 수정은 가능한 한 `apply_patch`로 섹션 단위만 한다.
|
||||||
|
- 문서는 전체 재작성보다 부분 수정으로 유지한다.
|
||||||
|
- 카드 구현은 한 번에 하나씩, 공용 필드 우선으로 넣는다.
|
||||||
|
- 새 기능은 `데이터 1곳 + 런타임 1곳 + 테스트 1곳` 순서로 맞춘다.
|
||||||
|
|
||||||
|
## 읽기 원칙
|
||||||
|
|
||||||
|
- 파일은 필요한 것만 읽는다.
|
||||||
|
- 비슷한 파일은 병렬로 한 번에 확인한다.
|
||||||
|
- 같은 정보를 여러 번 요약하지 않는다.
|
||||||
|
|
||||||
|
## 쓰기 원칙
|
||||||
|
|
||||||
|
- 공용으로 표현 가능한 효과는 카드 전용 분기로 만들지 않는다.
|
||||||
|
- 같은 의미의 효과는 같은 필드 이름을 쓴다.
|
||||||
|
- 문서는 카드별 상태표와 공용 필드 사전을 분리해서 유지한다.
|
||||||
|
|
||||||
|
## 응답 원칙
|
||||||
|
|
||||||
|
- 중간 보고는 짧게 한다.
|
||||||
|
- 바뀐 점과 남은 점만 말한다.
|
||||||
|
- 불필요한 재설명은 줄인다.
|
||||||
|
|
||||||
86
docs/deck-concept.md
Normal file
86
docs/deck-concept.md
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
# SlayMaple 덱 컨셉 & 직업 스킬셋
|
||||||
|
|
||||||
|
> SlayMaple 카드 덱의 **직업별 컨셉 · 메이플 스킬셋 · Slay the Spire 2 차용 매칭** 설계 문서.
|
||||||
|
> 원칙: 카드 한 장 = **STS2 메커니즘(뼈대) + 메이플 스킬(외형)**. STS 고유 *표현*(카드명·아트·UI)은 모방 금지, *메커니즘*만 차용(IP 해석 심사 대비).
|
||||||
|
> 수치(데미지·코스트·등급)는 `tools/balance/sim-balance.mjs`로 검증. 본 문서는 *어떤 스킬을 어떤 카드로* 만들지의 설계도.
|
||||||
|
|
||||||
|
기준: 메이플 = **클래식(빅뱅 이전)** 스킬 외형, STS = **Slay the Spire 2**.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 직업 ↔ STS2 매칭 요약
|
||||||
|
|
||||||
|
| 직업 | 컨셉 | STS2 차용 |
|
||||||
|
|---|---|---|
|
||||||
|
| ⚔️ 전사 | 단단한 탱커/브루저 | The Ironclad (힘·방어·소멸) |
|
||||||
|
| 🗡️ 도적 | 단검 난사 / 독 | The Silent (표창·독·교활) |
|
||||||
|
| 🔮 법사 | 약체 + 게이지 운용 | The Defect (오브·집중) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## ⚔️ 전사 (Warrior) — HP80 · 탱커
|
||||||
|
|
||||||
|
방어를 쌓고 버티다 역공하는 브루저. Ironclad의 두 축을 2차 전직으로 분화.
|
||||||
|
|
||||||
|
### 파이터 — 콤보 브루저형 탱커
|
||||||
|
- **콤보 규칙**: 공격 카드를 **연속으로** 사용하면 콤보가 쌓인다. **방어·파워 등 비공격(Skill/Power) 카드를 사용하면 콤보가 리셋(0)** 된다.
|
||||||
|
- 콤보가 쌓일수록 **데미지 증가 버프(힘 계열)** 를 받는다 → 방어를 포기하고 공격을 몰아칠수록 강해지는 리스크/리워드.
|
||||||
|
- 차용: Ironclad 힘 스택/Demon Form + 콤보. 메이플 외형: 콤보 어택·분노·브랜디시.
|
||||||
|
|
||||||
|
### 페이지 — 방어 축적 → 바디 슬램 카운터
|
||||||
|
- **위협**(전체 적 약화+취약 디버프)로 버티며 **방어도를 축적**(아이언 월 등 + 방어 유지 retain).
|
||||||
|
- **바디 슬램**: 현재 방어도에 비례한 피해로 카운터. 파워 가드(반사) 보조.
|
||||||
|
- 차용: Ironclad 방어 빌드(Barricade+Entrench→Body Slam). 메이플 외형: 위협·아이언 월·파워 가드.
|
||||||
|
|
||||||
|
### 스피어맨 — 유지/리치형
|
||||||
|
- 하이퍼 바디(최대 HP↑)·아이언 월(방어 유지)·창 리치 광역. 공격 스케일(파이터)·방어 카운터(페이지)와 구분되는 지속 탱.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🗡️ 도적 (Thief) — HP70 · 단검/독
|
||||||
|
|
||||||
|
Slay the Spire *Silent* 차용. **형(codex)이 Silent 88장 완역 포트 + 스킬 아이콘 적용 완료.** 3대 아키타입:
|
||||||
|
|
||||||
|
- **표창(Shiv) 난사**: 0코스트 표창 토큰 대량 생성 → 공격마다 연계. (정밀=표창 피해↑, 칼날 부채=표창 전체화)
|
||||||
|
- **독(Poison)**: 중독 중첩 → 매턴 틱뎀. (유독 가스·발병·촉진제·독 바르기)
|
||||||
|
- **교활(Sly)·버림(discard)**: 버려질 때 무료 발동, 얇은 덱 빠른 순환.
|
||||||
|
|
||||||
|
### 2차 갈래
|
||||||
|
- **어쌔신** — 표창 난사 + 크리 / 흡혈(드레인) 중심.
|
||||||
|
- **시프** — 단검 난타(새비지 블로우 = 다단히트) + 독 / 버림 중심.
|
||||||
|
|
||||||
|
> 남은 작업: 카드명이 STS 직역(무력화·배신·아드레날린 등) → **어쌔신/시프 메이플 스킬명으로 재서사** + 멀티플레이어 전제 카드(측면 공격·비열함·추적) 싱글 출품용 정리.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🔮 법사 (Magician) — HP70 · 약체/게이지
|
||||||
|
|
||||||
|
몸은 약하나 **게이지(오브) 운용**으로 다중 공격·화력 집중. **오브 메커니즘은 위자드(불/독·썬/콜)에만 적용**, 클레릭은 별도 보조 컨셉.
|
||||||
|
|
||||||
|
### 위자드(불/독) — 독 + 불 시너지
|
||||||
|
- **독을 묻히는 스킬**(포이즌 브레스 등)으로 대상에 독을 부여(독뎀 = DoT).
|
||||||
|
- **독이 묻은 적에게 불 카드(파이어 애로우 등)를 쓰면 추가 데미지** — *독뎀 상수* 보너스(독 스택/상수 비례).
|
||||||
|
- 즉 "독 깔기 → 불로 폭발"의 2단 콤보. 불·독 오브로 운용.
|
||||||
|
|
||||||
|
### 위자드(썬/콜) — 오브 운용(썬더 다중 / 콜드 빙결)
|
||||||
|
- **오브로 썬더·콜드를 보유**. **썬더 = 다중 공격 특화**(AoE·다단). **콜드 = 빙결 부여**(빙결 = *취약과 동일 효과* 를 데미지와 함께).
|
||||||
|
- **오브를 사용하는 만큼 오브를 획득하거나 다중 소모**하는 방식 — 오브 수급/소비 운용이 핵심.
|
||||||
|
|
||||||
|
### 클레릭 — 보조(회복·버프) · 오브 없음
|
||||||
|
- **회복 스킬**(힐)과 **각종 버프**(블레스 등) 중심의 서포트.
|
||||||
|
- **언데드 계열 몬스터에게는 힐로 공격** 가능 — 보조 힐러 정체성.
|
||||||
|
|
||||||
|
> ⚠️ 위자드 오브/게이지·전사 콤보 스택·바디 슬램·독뎀 시너지는 **신규 메커니즘** — `tools/deck/gen-slaydeck.mjs`(전투 규칙) + `tools/balance/sim-balance.mjs`(JS 미러) 양쪽 구현·동기화 필요.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 차용 경계 (IP 심사 대비)
|
||||||
|
|
||||||
|
- 차용 OK = **메커니즘**(콤보 스택·방어→피해 전환·독+불 시너지·오브 게이지·빙결=취약 등 시스템).
|
||||||
|
- 모방 금지 = STS 고유 **표현**(카드명·아트·UI 직접 사용).
|
||||||
|
- 만점 루트 = STS2 메커니즘을 **메이플 스킬·외형으로 완전 재서사화**.
|
||||||
|
|
||||||
|
## 참고
|
||||||
|
|
||||||
|
- 카드 데이터 단일 소스: `data/cards.json` (현 122장: 전사 18·마법사 14·도적 88 + Shiv·저주)
|
||||||
|
- 메이플 스킬 외형 매핑·STS2 캐릭터 상세는 박재오 개인 위키 `프로젝트-메이플-덱빌딩-스킬구성` / `프로젝트-메이플-STS2-차용-덱컨셉` 참조.
|
||||||
8
docs/draw-count.md
Normal file
8
docs/draw-count.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# 전투 드로우 누적
|
||||||
|
|
||||||
|
`damagePerCardDrawnThisCombat`은 이번 전투 동안 실제로 뽑힌 카드 수를 기준으로 공격력을 올리는 공용 필드입니다.
|
||||||
|
|
||||||
|
적용 예시:
|
||||||
|
|
||||||
|
- `Murder`: 이번 전투 동안 뽑은 카드 1장당 피해량이 1 증가
|
||||||
|
|
||||||
22
docs/draw-skill-block.md
Normal file
22
docs/draw-skill-block.md
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# 드로우 연동 효과
|
||||||
|
|
||||||
|
드로우 결과를 받아 후속 효과를 처리하는 공용 패턴을 정리합니다.
|
||||||
|
|
||||||
|
## 현재 구현
|
||||||
|
|
||||||
|
- `draw`: 카드를 뽑음
|
||||||
|
- `drawUntilHandSize`: 손패가 지정 수치가 될 때까지 뽑음
|
||||||
|
- `drawSkillBlock`: 이번 카드로 뽑힌 카드 중 스킬 카드마다 방어도를 얻음
|
||||||
|
|
||||||
|
## 동작 방식
|
||||||
|
|
||||||
|
- 드로우 함수는 이번에 뽑힌 카드 ID 목록을 반환합니다.
|
||||||
|
- 카드 효과는 그 목록을 보고 조건을 판정합니다.
|
||||||
|
- 그래서 `EscapePlan` 같은 카드뿐 아니라, 나중에 같은 규칙이 필요한 카드에도 같은 필드를 붙이면 됩니다.
|
||||||
|
|
||||||
|
## 예시
|
||||||
|
|
||||||
|
- `EscapePlan`
|
||||||
|
- `draw = 1`
|
||||||
|
- `drawSkillBlock = 3`
|
||||||
|
|
||||||
5
docs/intangible.md
Normal file
5
docs/intangible.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# 불가침
|
||||||
|
|
||||||
|
`intangible`는 카드를 사용할 때 플레이어에게 불가침 수치를 부여하는 공용 필드입니다. 불가침이 남아 있는 동안 받는 피해는 1로 줄어들고, 턴이 끝날 때 1씩 감소합니다.
|
||||||
|
|
||||||
|
`endTurnDexLoss`는 그 카드가 활성화된 동안 매 턴 종료 시 민첩을 잃게 만드는 공용 필드입니다. `WraithForm` 같은 카드가 이 조합을 사용합니다.
|
||||||
12
docs/next-skill-repeat.md
Normal file
12
docs/next-skill-repeat.md
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# Next Skill Repeat
|
||||||
|
|
||||||
|
`nextSkillRepeatCount`는 다음에 사용하는 스킬 카드의 효과를 추가 횟수만큼 다시 적용하는 공용 필드입니다.
|
||||||
|
|
||||||
|
현재 구현은 카드가 발동할 때 이 수치를 전역 상태에 누적해 두고, 다음 스킬 카드가 실제로 사용되면 그 효과를 같은 카드에 대해 다시 한 번 이상 적용합니다. 카드 종류는 고정하지 않았기 때문에, 같은 필드를 다른 카드에도 그대로 붙일 수 있습니다.
|
||||||
|
|
||||||
|
예시:
|
||||||
|
|
||||||
|
- `Burst`
|
||||||
|
- `nextSkillRepeatCount = 1`
|
||||||
|
- 다음 스킬을 한 번 더 적용
|
||||||
|
|
||||||
5
docs/reward-on-kill.md
Normal file
5
docs/reward-on-kill.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# 처치 보상
|
||||||
|
|
||||||
|
`rewardOnKill`은 해당 카드가 적을 처치했을 때 전투 보상 화면을 한 번 더 이어서 보여주는 공용 필드입니다. 현재 보상 UI는 3장 선택을 유지하고, 보상 화면만 추가로 한 번 더 열립니다.
|
||||||
|
|
||||||
|
`TheHunt`는 이 규칙을 사용합니다. 같은 패턴이 필요한 다른 카드에도 그대로 붙일 수 있습니다.
|
||||||
14
docs/x-cost.md
Normal file
14
docs/x-cost.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# X 코스트 카드
|
||||||
|
|
||||||
|
`useAllEnergy`는 카드가 사용될 때 남은 에너지를 전부 쓰는 공용 필드입니다.
|
||||||
|
|
||||||
|
연동 필드:
|
||||||
|
|
||||||
|
- `xDamagePerEnergy`: 에너지 1당 피해량
|
||||||
|
- `xWeakPerEnergy`: 에너지 1당 약화량
|
||||||
|
|
||||||
|
적용 예시:
|
||||||
|
|
||||||
|
- `Skewer`: 남은 에너지 전부를 써서 `8 * energy` 피해
|
||||||
|
- `Malaise`: 남은 에너지 전부를 써서 약화 부여
|
||||||
|
|
||||||
12477
map/lobby.map
12477
map/lobby.map
File diff suppressed because it is too large
Load Diff
1712
map/map01.map
1712
map/map01.map
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
|||||||
// AI 전투 밸런스 시뮬레이터 — 오프라인 몬테카를로.
|
// AI 전투 밸런스 시뮬레이터 — 오프라인 몬테카를로.
|
||||||
// ⚠️ 전투 규칙은 tools/deck/gen-slaydeck.mjs 의 Lua(SlayDeckController)와 동기화 유지할 것.
|
// ⚠️ 전투 규칙은 tools/deck/gen-slaydeck.mjs 의 Lua(SlayDeckController)와 동기화 유지할 것.
|
||||||
// (데이터는 data/*.json 공유, 규칙 로직은 JS로 중복 재현)
|
// (데이터는 data/*.json 공유, 규칙 로직은 JS로 중복 재현)
|
||||||
import { readFileSync } from 'node:fs';
|
import { readFileSync } from 'node:fs';
|
||||||
@@ -27,6 +27,16 @@ export function shuffle(arr, rng) {
|
|||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function prepareCombatDrawPile(deck, cards) {
|
||||||
|
const rest = [];
|
||||||
|
const innate = [];
|
||||||
|
for (const id of deck) {
|
||||||
|
if (cards[id]?.innate === true) innate.push(id);
|
||||||
|
else rest.push(id);
|
||||||
|
}
|
||||||
|
return rest.concat(innate);
|
||||||
|
}
|
||||||
|
|
||||||
// 공격 피해 공식 — Lua CalcPlayerAttack(힘·약화) + DealDamageToTarget(취약)과 동기화.
|
// 공격 피해 공식 — Lua CalcPlayerAttack(힘·약화) + DealDamageToTarget(취약)과 동기화.
|
||||||
// floor((base + str) * (weak>0 ? 0.75 : 1)) → floor(... * (vulnOnTarget>0 ? 1.5 : 1))
|
// floor((base + str) * (weak>0 ? 0.75 : 1)) → floor(... * (vulnOnTarget>0 ? 1.5 : 1))
|
||||||
// 보상 카드 등급 추첨 (Lua OfferReward 미러) — roll ∈ 1..100, normal 70 / unique 25 / legend 5
|
// 보상 카드 등급 추첨 (Lua OfferReward 미러) — roll ∈ 1..100, normal 70 / unique 25 / legend 5
|
||||||
@@ -44,6 +54,10 @@ export function calcAttack(base, str, weak, vulnOnTarget) {
|
|||||||
return dmg;
|
return dmg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function calcEnemyAttack(base, str, weak, vulnOnTarget, strengthLoss = 0) {
|
||||||
|
return calcAttack(base, Math.max(0, str - strengthLoss), weak, vulnOnTarget);
|
||||||
|
}
|
||||||
|
|
||||||
// 방어 우선 차감 후 hp 적용 → { hp, block }
|
// 방어 우선 차감 후 hp 적용 → { hp, block }
|
||||||
export function applyDamage(hp, block, amount) {
|
export function applyDamage(hp, block, amount) {
|
||||||
let dmg = amount;
|
let dmg = amount;
|
||||||
@@ -70,16 +84,50 @@ export function loadData() {
|
|||||||
return { cards: cardsData.cards, starterDeck: cardsData.starterDecks.warrior, monsters };
|
return { cards: cardsData.cards, starterDeck: cardsData.starterDecks.warrior, monsters };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function canPlayCardNow(card, ctx = {}) {
|
||||||
|
if (!card) return false;
|
||||||
|
if (card.playableWhenDrawPileEmpty === true && (ctx.drawPileCount || 0) > 0) return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// 주의: 인게임은 플레이어가 카드를 직접 선택한다. 이 chooseAction은 밸런스 추정용 자동 플레이 휴리스틱일 뿐
|
// 주의: 인게임은 플레이어가 카드를 직접 선택한다. 이 chooseAction은 밸런스 추정용 자동 플레이 휴리스틱일 뿐
|
||||||
// 이며, Lua에 대응 AI가 없다(동기화 대상은 데미지/방어/의도/승패 규칙이지 플레이어 선택이 아님).
|
// 이며, Lua에 대응 AI가 없다(동기화 대상은 데미지/방어/의도/승패 규칙이지 플레이어 선택이 아님).
|
||||||
// 손패에서 낼 카드 인덱스(-1=종료). 파워 우선(지속 가치) → 공격 → 스킬.
|
// 손패에서 낼 카드 인덱스(-1=종료). 파워 우선(지속 가치) → 공격 → 스킬.
|
||||||
export function chooseAction(hand, cards, energy) {
|
export function chooseAction(hand, cards, energy, ctx = {}) {
|
||||||
const entries = hand.map((id, i) => ({ id, i })).filter((x) => cards[x.id] && cards[x.id].cost <= energy && !cards[x.id].unplayable);
|
const entries = hand.map((id, i) => ({ id, i })).filter((x) => {
|
||||||
|
const card = cards[x.id];
|
||||||
|
if (!card || card.unplayable || !canPlayCardNow(card, ctx)) return false;
|
||||||
|
let effectiveCost = card.cost || 0;
|
||||||
|
if (ctx.handCostZeroThisTurn === true) effectiveCost = 0;
|
||||||
|
else if (card.useAllEnergy === true) effectiveCost = 1;
|
||||||
|
else if (card.kind === 'Skill') {
|
||||||
|
if (ctx.nextSkillCostZero === true) effectiveCost = 0;
|
||||||
|
else effectiveCost = Math.max(0, effectiveCost - (ctx.skillCostReductionThisTurn || 0));
|
||||||
|
}
|
||||||
|
if (ctx.combatCardCostReduction && ctx.combatCardCostReduction[x.id] != null) {
|
||||||
|
effectiveCost = Math.max(0, effectiveCost - ctx.combatCardCostReduction[x.id]);
|
||||||
|
}
|
||||||
|
return card.useAllEnergy === true ? true : effectiveCost <= energy;
|
||||||
|
});
|
||||||
const powers = entries.filter((x) => cards[x.id].kind === 'Power');
|
const powers = entries.filter((x) => cards[x.id].kind === 'Power');
|
||||||
const attacks = entries.filter((x) => cards[x.id].kind === 'Attack');
|
const attacks = entries.filter((x) => cards[x.id].kind === 'Attack');
|
||||||
const skills = entries.filter((x) => cards[x.id].kind === 'Skill');
|
const skills = entries.filter((x) => cards[x.id].kind === 'Skill');
|
||||||
const dmgEff = (x) => (cards[x.id].damage || 0) / Math.max(cards[x.id].cost, 1);
|
const effectiveCost = (x) => {
|
||||||
const blkEff = (x) => (cards[x.id].block || 0) / Math.max(cards[x.id].cost, 1);
|
const card = cards[x.id];
|
||||||
|
let cost = card.cost || 0;
|
||||||
|
if (ctx.handCostZeroThisTurn === true) cost = 0;
|
||||||
|
else if (card.useAllEnergy === true) cost = 1;
|
||||||
|
else if (card.kind === 'Skill') {
|
||||||
|
if (ctx.nextSkillCostZero === true) cost = 0;
|
||||||
|
else cost = Math.max(0, cost - (ctx.skillCostReductionThisTurn || 0));
|
||||||
|
}
|
||||||
|
if (ctx.combatCardCostReduction && ctx.combatCardCostReduction[x.id] != null) {
|
||||||
|
cost = Math.max(0, cost - ctx.combatCardCostReduction[x.id]);
|
||||||
|
}
|
||||||
|
return cost;
|
||||||
|
};
|
||||||
|
const dmgEff = (x) => (cards[x.id].damage || 0) / Math.max(effectiveCost(x), 1);
|
||||||
|
const blkEff = (x) => (cards[x.id].block || 0) / Math.max(effectiveCost(x), 1);
|
||||||
const bestBy = (list, fn) => list.slice().sort((a, b) => fn(b) - fn(a))[0];
|
const bestBy = (list, fn) => list.slice().sort((a, b) => fn(b) - fn(a))[0];
|
||||||
if (powers.length) return powers[0].i;
|
if (powers.length) return powers[0].i;
|
||||||
if (attacks.length) return bestBy(attacks, dmgEff).i;
|
if (attacks.length) return bestBy(attacks, dmgEff).i;
|
||||||
@@ -106,30 +154,144 @@ function bump(s, cost, dmg, blk) {
|
|||||||
export function simulateCombat(data, rng, stats) {
|
export function simulateCombat(data, rng, stats) {
|
||||||
const { cards, starterDeck, monsters } = data;
|
const { cards, starterDeck, monsters } = data;
|
||||||
if (monsters.length === 0) return { win: true, turns: 0, playerHpRemaining: PLAYER_HP };
|
if (monsters.length === 0) return { win: true, turns: 0, playerHpRemaining: PLAYER_HP };
|
||||||
let drawPile = shuffle(starterDeck, rng);
|
let drawPile = prepareCombatDrawPile(shuffle(starterDeck, rng), cards);
|
||||||
let discard = [];
|
let discard = [];
|
||||||
const exhaust = [];
|
const exhaust = [];
|
||||||
let hand = [];
|
let hand = [];
|
||||||
let pHp = PLAYER_HP, pBlock = 0;
|
let pHp = PLAYER_HP, pBlock = 0;
|
||||||
let pStr = 0, pDex = 0, pThorns = 0, pWeak = 0, pVuln = 0;
|
let pStr = 0, pDex = 0, pThorns = 0, pWeak = 0, pVuln = 0, pIntangible = 0;
|
||||||
|
let blockGainMultiplier = 1;
|
||||||
|
let handCostZeroThisTurn = false;
|
||||||
|
let drawDisabledThisTurn = false;
|
||||||
|
let nextSkillCostZero = false;
|
||||||
|
let nextSkillRepeatCount = 0;
|
||||||
|
let skillCostReductionThisTurn = 0;
|
||||||
|
const combatCardCostReduction = {};
|
||||||
|
let nextTurnBlock = 0, nextTurnDraw = 0, nextTurnKeepBlock = false;
|
||||||
|
let nextTurnAttackMultiplier = 1, turnAttackMultiplier = 1;
|
||||||
|
let nextTurnAddCards = [];
|
||||||
|
let turnAttackCardsPlayed = 0, turnDiscardedCards = 0;
|
||||||
|
let turnCardsPlayedThisTurn = 0;
|
||||||
|
let damageDealtThisTurn = 0;
|
||||||
|
let shivFirstDamageBonusUsed = false;
|
||||||
|
let drawDamageThisTurn = 0;
|
||||||
|
let drawPoisonThisTurn = 0;
|
||||||
|
let shivAoeThisCombat = false;
|
||||||
|
const skillSlyOnPlayCards = new Set();
|
||||||
|
const turnSkillSlyCards = new Set();
|
||||||
|
let poisonApplicationsThisCombat = 0;
|
||||||
|
let enemyStrengthLossThisTurn = 0;
|
||||||
|
let cardsDrawnThisCombat = 0;
|
||||||
|
let bonusRewardScreens = 0;
|
||||||
|
let activeKillReward = 0;
|
||||||
|
let energy = 0;
|
||||||
const powers = [];
|
const powers = [];
|
||||||
const mob = monsters.map((m) => ({
|
const mob = monsters.map((m) => ({
|
||||||
name: m.name, hp: m.maxHp, maxHp: m.maxHp, block: 0, str: 0, weak: 0, vuln: 0, poison: 0,
|
name: m.name, hp: m.maxHp, maxHp: m.maxHp, block: 0, str: m.str || 0, weak: 0, vuln: 0, poison: 0, artifact: m.artifact || 0,
|
||||||
intents: m.intents, intentIdx: 0, alive: true,
|
intents: m.intents, intentIdx: 0, alive: true,
|
||||||
}));
|
}));
|
||||||
let turns = 0;
|
let turns = 0;
|
||||||
|
|
||||||
|
const aliveMonsters = () => mob.filter((m) => m.alive);
|
||||||
|
const countAliveMonsters = () => aliveMonsters().length;
|
||||||
|
const randomAliveMonster = () => {
|
||||||
|
const alive = aliveMonsters();
|
||||||
|
if (!alive.length) return null;
|
||||||
|
return alive[Math.floor(rng() * alive.length)];
|
||||||
|
};
|
||||||
|
const removeEnemyBlock = (target) => {
|
||||||
|
if (target) target.block = 0;
|
||||||
|
};
|
||||||
|
const removeEnemyArtifact = (target) => {
|
||||||
|
if (target) target.artifact = 0;
|
||||||
|
};
|
||||||
|
const applyMonsterWeak = (target, amount) => {
|
||||||
|
if (!target || !amount || amount <= 0) return;
|
||||||
|
if (target.artifact > 0) { target.artifact--; return; }
|
||||||
|
target.weak += amount;
|
||||||
|
};
|
||||||
|
const applyMonsterVuln = (target, amount) => {
|
||||||
|
if (!target || !amount || amount <= 0) return;
|
||||||
|
if (target.artifact > 0) { target.artifact--; return; }
|
||||||
|
target.vuln += amount;
|
||||||
|
};
|
||||||
|
const applyPoisonToMonster = (target, amount) => {
|
||||||
|
if (!target || !target.alive || !amount || amount <= 0) return;
|
||||||
|
if (target.artifact > 0) { target.artifact--; return; }
|
||||||
|
target.poison += amount;
|
||||||
|
poisonApplicationsThisCombat += 1;
|
||||||
|
const burstEvery = powerFieldTotal('poisonApplicationBurstEvery');
|
||||||
|
const burstDamage = powerFieldTotal('poisonApplicationBurstDamage');
|
||||||
|
if (burstEvery > 0 && burstDamage > 0 && poisonApplicationsThisCombat % burstEvery === 0) {
|
||||||
|
for (const m of mob) {
|
||||||
|
if (!m.alive) continue;
|
||||||
|
const r = applyDamage(m.hp, m.block, burstDamage);
|
||||||
|
m.hp = r.hp; m.block = r.block;
|
||||||
|
if (burstDamage > 0) damageDealtThisTurn += burstDamage;
|
||||||
|
if (m.hp <= 0) m.alive = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const dealDamageToMonster = (target, amount, pierce = false) => {
|
||||||
|
if (!target || !target.alive) return false;
|
||||||
|
let dmg = amount;
|
||||||
|
const effectiveStr = Math.max(0, target.str - enemyStrengthLossThisTurn);
|
||||||
|
dmg = calcAttack(dmg, effectiveStr, target.weak, 0);
|
||||||
|
if (target.vuln > 0) dmg = Math.floor(dmg * 1.5);
|
||||||
|
if (target.block > 0 && !pierce) {
|
||||||
|
const absorbed = Math.min(target.block, dmg);
|
||||||
|
target.block -= absorbed;
|
||||||
|
dmg -= absorbed;
|
||||||
|
}
|
||||||
|
target.hp -= dmg;
|
||||||
|
if (dmg > 0) {
|
||||||
|
const attackPoison = powerFieldTotal('attackPoison');
|
||||||
|
if (attackPoison > 0) applyPoisonToMonster(target, attackPoison);
|
||||||
|
}
|
||||||
|
if (target.hp <= 0) {
|
||||||
|
target.hp = 0;
|
||||||
|
target.alive = false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
function draw(n) {
|
function draw(n) {
|
||||||
|
const drawn = [];
|
||||||
|
if (drawDisabledThisTurn === true) return drawn;
|
||||||
for (let k = 0; k < n; k++) {
|
for (let k = 0; k < n; k++) {
|
||||||
if (drawPile.length === 0) { drawPile = shuffle(discard, rng); discard = []; }
|
if (drawPile.length === 0) { drawPile = shuffle(discard, rng); discard = []; }
|
||||||
if (drawPile.length === 0) break;
|
if (drawPile.length === 0) break;
|
||||||
const card = drawPile.pop();
|
const card = drawPile.pop();
|
||||||
|
drawn.push(card);
|
||||||
|
cardsDrawnThisCombat++;
|
||||||
|
const drawDamage = powerFieldTotal('drawDamage') + drawDamageThisTurn;
|
||||||
|
const drawPoison = powerFieldTotal('drawPoison') + drawPoisonThisTurn;
|
||||||
|
if ((drawDamage > 0 || drawPoison > 0) && mob.some((m) => m.alive)) {
|
||||||
|
for (const m of mob) {
|
||||||
|
if (!m.alive) continue;
|
||||||
|
let dmg = drawDamage;
|
||||||
|
if (m.vuln > 0) dmg = Math.floor(dmg * 1.5);
|
||||||
|
if (m.block > 0) {
|
||||||
|
const absorbed = Math.min(m.block, dmg);
|
||||||
|
m.block -= absorbed;
|
||||||
|
dmg -= absorbed;
|
||||||
|
}
|
||||||
|
if (drawPoison > 0) applyPoisonToMonster(m, drawPoison);
|
||||||
|
if (dmg > 0) {
|
||||||
|
m.hp -= dmg;
|
||||||
|
damageDealtThisTurn += dmg;
|
||||||
|
}
|
||||||
|
if (m.hp <= 0) { m.hp = 0; m.alive = false; }
|
||||||
|
}
|
||||||
|
}
|
||||||
// 손패 10장 상한 — 초과 드로는 자동 버림 (Lua DrawCards 동기화)
|
// 손패 10장 상한 — 초과 드로는 자동 버림 (Lua DrawCards 동기화)
|
||||||
if (hand.length >= 10) {
|
if (hand.length >= 10) {
|
||||||
discard.push(card);
|
discard.push(card);
|
||||||
triggerSly(card);
|
triggerSly(card);
|
||||||
} else hand.push(card);
|
} else hand.push(card);
|
||||||
}
|
}
|
||||||
|
return drawn;
|
||||||
}
|
}
|
||||||
function addCardsToHand(id, n) {
|
function addCardsToHand(id, n) {
|
||||||
for (let k = 0; k < n; k++) {
|
for (let k = 0; k < n; k++) {
|
||||||
@@ -137,49 +299,225 @@ export function simulateCombat(data, rng, stats) {
|
|||||||
else hand.push(id);
|
else hand.push(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function addBlock(base) {
|
||||||
|
let amount = base || 0;
|
||||||
|
if (amount > 0) amount += pDex;
|
||||||
|
if (blockGainMultiplier > 1) amount *= blockGainMultiplier;
|
||||||
|
if (amount < 0) amount = 0;
|
||||||
|
pBlock += amount;
|
||||||
|
return amount;
|
||||||
|
}
|
||||||
|
function discardForTurnStart(n) {
|
||||||
|
const cnt = Math.min(n, hand.length);
|
||||||
|
for (let i = 0; i < cnt; i++) {
|
||||||
|
const idx = hand
|
||||||
|
.map((id, k) => ({ id, k, card: cards[id] }))
|
||||||
|
.sort((a, b) => {
|
||||||
|
const ac = a.card?.cost || 0;
|
||||||
|
const bc = b.card?.cost || 0;
|
||||||
|
if (ac !== bc) return ac - bc;
|
||||||
|
const ad = a.card?.damage || 0;
|
||||||
|
const bd = b.card?.damage || 0;
|
||||||
|
if (ad !== bd) return ad - bd;
|
||||||
|
return a.k - b.k;
|
||||||
|
})[0]?.k;
|
||||||
|
if (idx == null) break;
|
||||||
|
discardHandCard(idx, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function countOtherHandSkills(currentId) {
|
||||||
|
let n = 0;
|
||||||
|
let skippedSelf = false;
|
||||||
|
for (const id of hand) {
|
||||||
|
if (!skippedSelf && id === currentId) { skippedSelf = true; continue; }
|
||||||
|
if (cards[id]?.kind === 'Skill') n++;
|
||||||
|
}
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
function attackBaseForCard(id, c) {
|
||||||
|
let base = c.damage || 0;
|
||||||
|
const otherHand = Math.max(0, hand.length - 1);
|
||||||
|
if (c.damagePerOtherHandCard) base += otherHand * c.damagePerOtherHandCard;
|
||||||
|
if (c.damagePerAttackPlayedThisTurn) base += turnAttackCardsPlayed * c.damagePerAttackPlayedThisTurn;
|
||||||
|
if (c.damagePerDiscardedThisTurn) base += turnDiscardedCards * c.damagePerDiscardedThisTurn;
|
||||||
|
if (c.damagePerSkillInHand) base += countOtherHandSkills(id) * c.damagePerSkillInHand;
|
||||||
|
if (c.damagePerCardDrawnThisCombat) base += cardsDrawnThisCombat * c.damagePerCardDrawnThisCombat;
|
||||||
|
if (c.class === 'Attack' && turnCardsPlayedThisTurn === 0 && c.firstCardDamageBonus) base += c.firstCardDamageBonus;
|
||||||
|
if (c.class === 'shiv') {
|
||||||
|
if (powerFieldTotal('shivDamageBonus') > 0) base += powerFieldTotal('shivDamageBonus');
|
||||||
|
if (!shivFirstDamageBonusUsed && powerFieldTotal('firstShivDamageBonus') > 0) base += powerFieldTotal('firstShivDamageBonus');
|
||||||
|
}
|
||||||
|
if (base < 0) base = 0;
|
||||||
|
return base;
|
||||||
|
}
|
||||||
|
function queueNextTurnAddCard(id, n) {
|
||||||
|
if (!id || !n || n <= 0) return;
|
||||||
|
const entry = nextTurnAddCards.find((x) => x.cardId === id);
|
||||||
|
if (entry) entry.amount += n;
|
||||||
|
else nextTurnAddCards.push({ cardId: id, amount: n });
|
||||||
|
}
|
||||||
|
function queueNextTurnEffects(c) {
|
||||||
|
if (!c) return;
|
||||||
|
if (c.nextTurnBlock) nextTurnBlock += c.nextTurnBlock;
|
||||||
|
if (c.nextTurnDraw) nextTurnDraw += c.nextTurnDraw;
|
||||||
|
if (c.nextTurnKeepBlock === true) nextTurnKeepBlock = true;
|
||||||
|
if (c.nextTurnAttackMultiplier && c.nextTurnAttackMultiplier > 0) nextTurnAttackMultiplier *= c.nextTurnAttackMultiplier;
|
||||||
|
}
|
||||||
|
function queueSelectedReserve(c) {
|
||||||
|
if (!c?.nextTurnSelectHandCard || !c.nextTurnCopies || hand.length === 0) return;
|
||||||
|
const choice = hand
|
||||||
|
.map((id, i) => ({ id, i, card: cards[id] }))
|
||||||
|
.sort((a, b) => {
|
||||||
|
const ak = a.card?.kind === 'Attack' ? 3 : a.card?.kind === 'Skill' ? 2 : 1;
|
||||||
|
const bk = b.card?.kind === 'Attack' ? 3 : b.card?.kind === 'Skill' ? 2 : 1;
|
||||||
|
if (bk !== ak) return bk - ak;
|
||||||
|
const ad = a.card?.damage || 0;
|
||||||
|
const bd = b.card?.damage || 0;
|
||||||
|
if (bd !== ad) return bd - ad;
|
||||||
|
return a.i - b.i;
|
||||||
|
})[0];
|
||||||
|
if (choice?.id) queueNextTurnAddCard(choice.id, c.nextTurnCopies);
|
||||||
|
}
|
||||||
const aliveList = () => mob.filter((m) => m.alive);
|
const aliveList = () => mob.filter((m) => m.alive);
|
||||||
|
function powerFieldTotal(field) {
|
||||||
|
let total = 0;
|
||||||
|
for (const pid of powers) {
|
||||||
|
const pc = cards[pid];
|
||||||
|
if (pc?.[field] != null) total += pc[field];
|
||||||
|
}
|
||||||
|
return total;
|
||||||
|
}
|
||||||
function resolveCardEffects(id, c, costSpent, recordStats = true) {
|
function resolveCardEffects(id, c, costSpent, recordStats = true) {
|
||||||
const alive = aliveList();
|
const alive = aliveList();
|
||||||
let dmg = 0;
|
let dmg = 0;
|
||||||
let blockGained = 0;
|
let blockGained = 0;
|
||||||
if (c.kind === 'Attack') {
|
if (c.blockGainMultiplier && c.blockGainMultiplier > 0) blockGainMultiplier *= c.blockGainMultiplier;
|
||||||
if (alive.length && c.damage) {
|
if (c.nextSkillCostZero === true) nextSkillCostZero = true;
|
||||||
const target = chooseTarget(alive, calcAttack(c.damage || 0, pStr, pWeak, 0));
|
if (c.nextSkillRepeatCount && c.nextSkillRepeatCount > 0) nextSkillRepeatCount += c.nextSkillRepeatCount;
|
||||||
if (c.weak) target.weak += c.weak;
|
if (c.skillCostReductionThisTurn && c.skillCostReductionThisTurn > 0) skillCostReductionThisTurn += c.skillCostReductionThisTurn;
|
||||||
if (c.vuln) target.vuln += c.vuln;
|
if (c.handCostZeroThisTurn === true) handCostZeroThisTurn = true;
|
||||||
const hitN = c.hits || 1;
|
if (c.drawDisabledThisTurn === true) drawDisabledThisTurn = true;
|
||||||
let totalNv = 0;
|
if (c.drawDamage && c.kind !== 'Power') drawDamageThisTurn += c.drawDamage;
|
||||||
for (let h = 0; h < hitN; h++) totalNv += calcAttack(c.damage || 0, pStr, pWeak, 0);
|
if (c.drawPoison && c.kind !== 'Power') drawPoisonThisTurn += c.drawPoison;
|
||||||
dmg = totalNv;
|
if (c.shivAoe === true && c.kind !== 'Power') shivAoeThisCombat = true;
|
||||||
if (c.aoe === true) {
|
if (c.skillSlyOnPlay === true && c.kind === 'Skill') skillSlyOnPlayCards.add(id);
|
||||||
for (const m2 of aliveList()) {
|
if (c.turnHandSlyCount && c.turnHandSlyCount > 0) {
|
||||||
const d2 = m2.vuln > 0 ? Math.floor(totalNv * 1.5) : totalNv;
|
let picked = 0;
|
||||||
const r2 = applyDamage(m2.hp, m2.block, d2);
|
for (const hid of hand) {
|
||||||
m2.hp = r2.hp; m2.block = r2.block;
|
if (hid === id) continue;
|
||||||
if (m2.hp <= 0) m2.alive = false;
|
const hc = cards[hid];
|
||||||
}
|
if (hc?.kind === 'Skill' && !turnSkillSlyCards.has(hid) && !skillSlyOnPlayCards.has(hid) && hc.sly !== true) {
|
||||||
} else {
|
turnSkillSlyCards.add(hid);
|
||||||
dmg = target.vuln > 0 ? Math.floor(totalNv * 1.5) : totalNv;
|
picked++;
|
||||||
if (c.pierce === true) {
|
if (picked >= c.turnHandSlyCount) break;
|
||||||
target.hp -= dmg;
|
|
||||||
if (target.hp < 0) target.hp = 0;
|
|
||||||
} else {
|
|
||||||
const r = applyDamage(target.hp, target.block, dmg);
|
|
||||||
target.hp = r.hp; target.block = r.block;
|
|
||||||
}
|
|
||||||
if (target.hp <= 0) target.alive = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (c.block) { blockGained = Math.max(0, c.block + pDex); pBlock += blockGained; }
|
}
|
||||||
|
const xEnergy = costSpent || 0;
|
||||||
|
if (c.kind === 'Attack') {
|
||||||
|
if (alive.length && (c.damage || c.xDamagePerEnergy)) {
|
||||||
|
const baseDamage = c.xDamagePerEnergy ? xEnergy * c.xDamagePerEnergy : attackBaseForCard(id, c);
|
||||||
|
const bonusHits = (c.otherHandAtLeast && c.bonusHitsWhenOtherHandAtLeast && Math.max(0, hand.length - 1) >= c.otherHandAtLeast)
|
||||||
|
? c.bonusHitsWhenOtherHandAtLeast : 0;
|
||||||
|
const hitN = (c.hits || 1) + bonusHits;
|
||||||
|
let useAoe = c.aoe === true;
|
||||||
|
if (c.class === 'shiv' && shivAoeThisCombat === true) useAoe = true;
|
||||||
|
const perHit = calcAttack(baseDamage || 0, pStr, pWeak, 0) * turnAttackMultiplier;
|
||||||
|
const dealToTarget = (target, amount) => {
|
||||||
|
if (!target || !target.alive) return { killed: false, dealt: 0 };
|
||||||
|
let dealt = amount;
|
||||||
|
if (target.vuln > 0) dealt = Math.floor(dealt * 1.5);
|
||||||
|
if (target.weak > 0 && c.attackDamageVsWeakMultiplier && c.attackDamageVsWeakMultiplier > 1) {
|
||||||
|
dealt = Math.floor(dealt * c.attackDamageVsWeakMultiplier);
|
||||||
|
}
|
||||||
|
if (c.pierce === true) {
|
||||||
|
target.hp -= dealt;
|
||||||
|
if (target.hp < 0) target.hp = 0;
|
||||||
|
} else {
|
||||||
|
const r = applyDamage(target.hp, target.block, dealt);
|
||||||
|
target.hp = r.hp; target.block = r.block;
|
||||||
|
}
|
||||||
|
const attackPoison = powerFieldTotal('attackPoison');
|
||||||
|
if (dealt > 0 && attackPoison > 0) applyPoisonToMonster(target, attackPoison);
|
||||||
|
let killed = false;
|
||||||
|
if (target.hp <= 0) {
|
||||||
|
target.alive = false;
|
||||||
|
killed = true;
|
||||||
|
if (c.rewardOnKill) bonusRewardScreens += c.rewardOnKill;
|
||||||
|
}
|
||||||
|
return { killed, dealt };
|
||||||
|
};
|
||||||
|
const resolveAttackRound = () => {
|
||||||
|
let roundKilled = false;
|
||||||
|
let roundDamage = 0;
|
||||||
|
if (useAoe === true) {
|
||||||
|
for (const m2 of aliveList()) {
|
||||||
|
const r2 = dealToTarget(m2, perHit);
|
||||||
|
roundDamage += r2.dealt;
|
||||||
|
if (r2.killed) roundKilled = true;
|
||||||
|
}
|
||||||
|
} else if (c.randomTargetEachHit === true) {
|
||||||
|
for (let h = 0; h < hitN; h++) {
|
||||||
|
const target = randomAliveMonster();
|
||||||
|
if (!target) break;
|
||||||
|
const r = dealToTarget(target, perHit);
|
||||||
|
roundDamage += r.dealt;
|
||||||
|
if (r.killed) roundKilled = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const preview = perHit;
|
||||||
|
const target = chooseTarget(aliveList(), preview);
|
||||||
|
if (target) {
|
||||||
|
if (c.weak) applyMonsterWeak(target, c.weak);
|
||||||
|
if (c.vuln) applyMonsterVuln(target, c.vuln);
|
||||||
|
const totalNv = perHit * hitN;
|
||||||
|
const r = dealToTarget(target, totalNv);
|
||||||
|
roundDamage += r.dealt;
|
||||||
|
if (r.killed) roundKilled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dmg += roundDamage;
|
||||||
|
damageDealtThisTurn += roundDamage;
|
||||||
|
return roundKilled;
|
||||||
|
};
|
||||||
|
let roundKilled = false;
|
||||||
|
do {
|
||||||
|
roundKilled = resolveAttackRound();
|
||||||
|
} while (c.repeatOnKill === true && roundKilled === true && countAliveMonsters() > 0);
|
||||||
|
}
|
||||||
|
if (c.block) blockGained = addBlock(c.block);
|
||||||
} else if (c.kind === 'Power') {
|
} else if (c.kind === 'Power') {
|
||||||
if (recordStats) powers.push(id);
|
if (recordStats) powers.push(id);
|
||||||
} else {
|
} else {
|
||||||
if (c.block) { blockGained = Math.max(0, c.block + pDex); pBlock += blockGained; }
|
if (c.block) blockGained = addBlock(c.block);
|
||||||
if ((c.weak || c.vuln || c.poison) && alive.length) {
|
const weakAmount = (c.weak || 0) + (c.xWeakPerEnergy || 0) * xEnergy;
|
||||||
const target = chooseTarget(alive, 0);
|
const vulnAmount = c.vuln || 0;
|
||||||
if (c.weak) target.weak += c.weak;
|
if ((weakAmount || vulnAmount || c.poison || c.removeEnemyBlock || c.removeEnemyArtifact || c.enemyStrengthLossThisTurn) && alive.length) {
|
||||||
if (c.vuln) target.vuln += c.vuln;
|
const targets = c.affectsAllEnemies === true ? aliveList() : [chooseTarget(alive, 0)];
|
||||||
if (c.poison) target.poison += c.poison;
|
if (c.enemyStrengthLossThisTurn && c.enemyStrengthLossThisTurn > 0) {
|
||||||
|
enemyStrengthLossThisTurn += c.enemyStrengthLossThisTurn;
|
||||||
|
}
|
||||||
|
for (const target of targets) {
|
||||||
|
if (!target || !target.alive) continue;
|
||||||
|
if (c.removeEnemyBlock === true) removeEnemyBlock(target);
|
||||||
|
if (c.removeEnemyArtifact === true) removeEnemyArtifact(target);
|
||||||
|
if (weakAmount) applyMonsterWeak(target, weakAmount);
|
||||||
|
if (vulnAmount) applyMonsterVuln(target, vulnAmount);
|
||||||
|
if (c.poison) {
|
||||||
|
if (c.poisonIfTargetPoisoned !== true || target.poison > 0) {
|
||||||
|
const poisonHits = c.poisonHits || 1;
|
||||||
|
for (let i = 0; i < poisonHits; i++) {
|
||||||
|
const target2 = c.poisonRandomTargets === true
|
||||||
|
? alive[Math.floor(rng() * alive.length)]
|
||||||
|
: target;
|
||||||
|
if (target2) applyPoisonToMonster(target2, c.poison);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (c.class === 'shiv' && !shivFirstDamageBonusUsed && powerFieldTotal('firstShivDamageBonus') > 0) {
|
||||||
|
shivFirstDamageBonusUsed = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (c.strength) pStr += c.strength;
|
if (c.strength) pStr += c.strength;
|
||||||
@@ -187,19 +525,60 @@ export function simulateCombat(data, rng, stats) {
|
|||||||
if (c.thorns) pThorns += c.thorns;
|
if (c.thorns) pThorns += c.thorns;
|
||||||
if (c.selfVuln) pVuln += c.selfVuln;
|
if (c.selfVuln) pVuln += c.selfVuln;
|
||||||
if (c.heal) pHp = Math.min(pHp + c.heal, PLAYER_HP);
|
if (c.heal) pHp = Math.min(pHp + c.heal, PLAYER_HP);
|
||||||
if (c.draw) draw(c.draw);
|
if (c.gainEnergy) energy += c.gainEnergy;
|
||||||
|
activeKillReward = c.rewardOnKill || 0;
|
||||||
|
if (c.intangible) pIntangible += c.intangible;
|
||||||
|
queueNextTurnEffects(c);
|
||||||
|
turnCardsPlayedThisTurn++;
|
||||||
|
let drawnCards = [];
|
||||||
|
if (c.draw) drawnCards = drawnCards.concat(draw(c.draw));
|
||||||
|
if (c.drawUntilHandSize) {
|
||||||
|
const need = c.drawUntilHandSize - Math.max(0, hand.length - 1);
|
||||||
|
if (need > 0) drawnCards = drawnCards.concat(draw(need));
|
||||||
|
}
|
||||||
|
if (c.drawSkillBlock && c.drawSkillBlock > 0) {
|
||||||
|
for (const drawnId of drawnCards) {
|
||||||
|
if (cards[drawnId]?.kind === 'Skill') blockGained += addBlock(c.drawSkillBlock);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (c.addShiv && !c.discard && c.discardAll !== true) addCardsToHand('Shiv', c.addShiv);
|
if (c.addShiv && !c.discard && c.discardAll !== true) addCardsToHand('Shiv', c.addShiv);
|
||||||
|
if (c.cardPlayedDamage && alive.length) {
|
||||||
|
const target = chooseTarget(aliveList(), 0);
|
||||||
|
if (target && target.alive) {
|
||||||
|
target.hp -= c.cardPlayedDamage;
|
||||||
|
dmg += c.cardPlayedDamage;
|
||||||
|
damageDealtThisTurn += c.cardPlayedDamage;
|
||||||
|
if (target.hp <= 0) target.alive = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (c.cardPlayedRandomDamage && alive.length) {
|
||||||
|
const pool = aliveList();
|
||||||
|
if (pool.length) {
|
||||||
|
const target = pool[Math.floor(rng() * pool.length)];
|
||||||
|
if (target) {
|
||||||
|
target.hp -= c.cardPlayedRandomDamage;
|
||||||
|
dmg += c.cardPlayedRandomDamage;
|
||||||
|
damageDealtThisTurn += c.cardPlayedRandomDamage;
|
||||||
|
if (target.hp <= 0) target.alive = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (c.blockPerDamageDealtThisTurn && c.blockPerDamageDealtThisTurn > 0 && c.kind !== 'Power') {
|
||||||
|
blockGained += Math.max(0, damageDealtThisTurn * c.blockPerDamageDealtThisTurn);
|
||||||
|
}
|
||||||
if (recordStats && stats) stats[id] = bump(stats[id], costSpent, dmg, blockGained);
|
if (recordStats && stats) stats[id] = bump(stats[id], costSpent, dmg, blockGained);
|
||||||
}
|
}
|
||||||
function triggerSly(id) {
|
function triggerSly(id) {
|
||||||
const c = cards[id];
|
const c = cards[id];
|
||||||
if (!c?.sly) return;
|
if (!c) return;
|
||||||
|
if (!c.sly && !skillSlyOnPlayCards.has(id) && !turnSkillSlyCards.has(id)) return;
|
||||||
resolveCardEffects(id, c, 0, false);
|
resolveCardEffects(id, c, 0, false);
|
||||||
}
|
}
|
||||||
function discardHandCard(idx, trigger = true) {
|
function discardHandCard(idx, trigger = true) {
|
||||||
const [id] = hand.splice(idx, 1);
|
const [id] = hand.splice(idx, 1);
|
||||||
if (!id) return;
|
if (!id) return;
|
||||||
discard.push(id);
|
discard.push(id);
|
||||||
|
turnDiscardedCards++;
|
||||||
if (trigger) triggerSly(id);
|
if (trigger) triggerSly(id);
|
||||||
}
|
}
|
||||||
function applyDiscardEffects(c) {
|
function applyDiscardEffects(c) {
|
||||||
@@ -212,35 +591,96 @@ export function simulateCombat(data, rng, stats) {
|
|||||||
}
|
}
|
||||||
if (c.addShiv && (c.discard || c.discardAll === true)) addCardsToHand('Shiv', c.addShiv);
|
if (c.addShiv && (c.discard || c.discardAll === true)) addCardsToHand('Shiv', c.addShiv);
|
||||||
if (c.addShivPerDiscard === true) addCardsToHand('Shiv', discarded);
|
if (c.addShivPerDiscard === true) addCardsToHand('Shiv', discarded);
|
||||||
|
if (c.drawPerDiscarded) draw(discarded * c.drawPerDiscarded);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (turns < MAX_TURNS) {
|
while (turns < MAX_TURNS) {
|
||||||
turns++;
|
turns++;
|
||||||
|
turnAttackCardsPlayed = 0;
|
||||||
|
turnDiscardedCards = 0;
|
||||||
|
shivFirstDamageBonusUsed = false;
|
||||||
|
drawDamageThisTurn = 0;
|
||||||
|
drawPoisonThisTurn = 0;
|
||||||
|
shivAoeThisCombat = false;
|
||||||
|
turnSkillSlyCards.clear();
|
||||||
|
enemyStrengthLossThisTurn = 0;
|
||||||
|
blockGainMultiplier = 1;
|
||||||
|
handCostZeroThisTurn = false;
|
||||||
|
drawDisabledThisTurn = false;
|
||||||
|
skillCostReductionThisTurn = 0;
|
||||||
// 파워 발동 — Lua StartPlayerTurn 동기화 (블록 리셋 후 strength/energy/block 파워)
|
// 파워 발동 — Lua StartPlayerTurn 동기화 (블록 리셋 후 strength/energy/block 파워)
|
||||||
pBlock = 0;
|
if (nextTurnKeepBlock === true) nextTurnKeepBlock = false;
|
||||||
|
else pBlock = 0;
|
||||||
|
turnAttackMultiplier = nextTurnAttackMultiplier;
|
||||||
|
nextTurnAttackMultiplier = 1;
|
||||||
let energyBonus = 0;
|
let energyBonus = 0;
|
||||||
|
let powerTurnDraw = 0;
|
||||||
|
let powerTurnDiscard = 0;
|
||||||
for (const pid of powers) {
|
for (const pid of powers) {
|
||||||
const pc = cards[pid];
|
const pc = cards[pid];
|
||||||
if (!pc) continue;
|
if (!pc) continue;
|
||||||
if (pc.powerEffect === 'strengthPerTurn') pStr += pc.value;
|
if (pc.powerEffect === 'strengthPerTurn') pStr += pc.value;
|
||||||
else if (pc.powerEffect === 'energyPerTurn') energyBonus += pc.value;
|
else if (pc.powerEffect === 'energyPerTurn') energyBonus += pc.value;
|
||||||
else if (pc.powerEffect === 'blockPerTurn') pBlock += pc.value;
|
else if (pc.powerEffect === 'blockPerTurn') pBlock += pc.value;
|
||||||
|
else if (pc.powerEffect === 'poisonPerTurn') {
|
||||||
|
for (const m of mob) if (m.alive) applyPoisonToMonster(m, pc.value);
|
||||||
|
} else if (pc.powerEffect === 'damagePerTurn') {
|
||||||
|
for (const m of mob) {
|
||||||
|
if (!m.alive) continue;
|
||||||
|
const r = applyDamage(m.hp, m.block, pc.value || 0);
|
||||||
|
m.hp = r.hp; m.block = r.block;
|
||||||
|
if (m.hp <= 0) m.alive = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (pc.turnStartShiv) addCardsToHand('Shiv', pc.turnStartShiv);
|
if (pc.turnStartShiv) addCardsToHand('Shiv', pc.turnStartShiv);
|
||||||
|
if (pc.turnStartDraw) powerTurnDraw += pc.turnStartDraw;
|
||||||
|
if (pc.turnStartDiscard) powerTurnDiscard += pc.turnStartDiscard;
|
||||||
}
|
}
|
||||||
let energy = ENERGY + energyBonus; draw(HAND_SIZE);
|
if (nextTurnBlock > 0) { addBlock(nextTurnBlock); nextTurnBlock = 0; }
|
||||||
|
if (nextTurnAddCards.length) {
|
||||||
|
for (const entry of nextTurnAddCards) addCardsToHand(entry.cardId, entry.amount);
|
||||||
|
nextTurnAddCards = [];
|
||||||
|
}
|
||||||
|
energy = ENERGY + energyBonus;
|
||||||
|
const drawBonus = nextTurnDraw + powerTurnDraw;
|
||||||
|
nextTurnDraw = 0;
|
||||||
|
draw(HAND_SIZE + drawBonus);
|
||||||
|
if (powerTurnDiscard > 0) discardForTurnStart(powerTurnDiscard);
|
||||||
while (true) {
|
while (true) {
|
||||||
const alive = aliveList();
|
const alive = aliveList();
|
||||||
if (alive.length === 0) break;
|
if (alive.length === 0) break;
|
||||||
const idx = chooseAction(hand, cards, energy);
|
const idx = chooseAction(hand, cards, energy, { drawPileCount: drawPile.length, nextSkillCostZero, skillCostReductionThisTurn, handCostZeroThisTurn, combatCardCostReduction });
|
||||||
if (idx < 0) break;
|
if (idx < 0) break;
|
||||||
const id = hand[idx], c = cards[id];
|
const id = hand[idx], c = cards[id];
|
||||||
energy -= c.cost;
|
let dmg = 0;
|
||||||
resolveCardEffects(id, c, c.cost);
|
const skillFree = c.kind === 'Skill' && nextSkillCostZero === true;
|
||||||
|
const skillRepeat = c.kind === 'Skill' ? nextSkillRepeatCount : 0;
|
||||||
|
const baseCost = c.cost || 0;
|
||||||
|
const combatReduction = combatCardCostReduction[id] || 0;
|
||||||
|
const cost = handCostZeroThisTurn === true ? 0 : (c.useAllEnergy === true ? energy : (skillFree ? 0 : (c.kind === 'Skill' ? Math.max(0, baseCost - skillCostReductionThisTurn) : baseCost)));
|
||||||
|
const finalCost = Math.max(0, cost - combatReduction);
|
||||||
|
energy -= finalCost;
|
||||||
|
resolveCardEffects(id, c, finalCost);
|
||||||
|
const playedBlock = powerFieldTotal('cardPlayedBlock');
|
||||||
|
if (playedBlock > 0) addBlock(playedBlock);
|
||||||
|
if (skillRepeat > 0) {
|
||||||
|
nextSkillRepeatCount = Math.max(0, nextSkillRepeatCount - skillRepeat);
|
||||||
|
for (let r = 0; r < skillRepeat; r++) {
|
||||||
|
resolveCardEffects(id, c, finalCost);
|
||||||
|
if (playedBlock > 0) addBlock(playedBlock);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (c.kind === 'Attack') turnAttackCardsPlayed++;
|
||||||
|
if (skillFree === true && c.nextSkillCostZero !== true) nextSkillCostZero = false;
|
||||||
hand.splice(idx, 1);
|
hand.splice(idx, 1);
|
||||||
|
queueSelectedReserve(c);
|
||||||
if (c.exhaust === true || String(c.desc || '').includes('소멸.')) exhaust.push(id);
|
if (c.exhaust === true || String(c.desc || '').includes('소멸.')) exhaust.push(id);
|
||||||
else if (c.kind !== 'Power') discard.push(id);
|
else if (c.kind !== 'Power') discard.push(id);
|
||||||
|
if (c.combatCostReductionOnPlay && c.combatCostReductionOnPlay > 0) {
|
||||||
|
combatCardCostReduction[id] = (combatCardCostReduction[id] || 0) + c.combatCostReductionOnPlay;
|
||||||
|
}
|
||||||
applyDiscardEffects(c);
|
applyDiscardEffects(c);
|
||||||
if (aliveList().length === 0) return { win: true, turns, playerHpRemaining: pHp };
|
if (aliveList().length === 0) return { win: true, turns, playerHpRemaining: pHp, bonusRewardScreens };
|
||||||
}
|
}
|
||||||
// 화상(endTurnDamage) — 손패에 있으면 턴 종료 시 피해 (Lua EndPlayerTurn 동기화)
|
// 화상(endTurnDamage) — 손패에 있으면 턴 종료 시 피해 (Lua EndPlayerTurn 동기화)
|
||||||
let burn = 0;
|
let burn = 0;
|
||||||
@@ -249,10 +689,18 @@ export function simulateCombat(data, rng, stats) {
|
|||||||
const kept = [];
|
const kept = [];
|
||||||
for (const hid of hand) {
|
for (const hid of hand) {
|
||||||
const hc = cards[hid];
|
const hc = cards[hid];
|
||||||
if (hc?.retain === true) kept.push(hid);
|
if (hc?.retain === true || (hc?.class === 'shiv' && powerFieldTotal('shivRetain') > 0)) kept.push(hid);
|
||||||
else discard.push(hid);
|
else discard.push(hid);
|
||||||
}
|
}
|
||||||
hand = kept;
|
hand = kept;
|
||||||
|
for (const pid of powers) {
|
||||||
|
const pc = cards[pid];
|
||||||
|
if (pc?.endTurnDexLoss) {
|
||||||
|
pDex -= pc.endTurnDexLoss;
|
||||||
|
if (pDex < 0) pDex = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (pIntangible > 0) pIntangible--;
|
||||||
if (pHp <= 0) return { win: false, turns, playerHpRemaining: 0 };
|
if (pHp <= 0) return { win: false, turns, playerHpRemaining: 0 };
|
||||||
// 플레이어 디버프 감소 — Lua EndPlayerTurn 동기화 (적 행동 전)
|
// 플레이어 디버프 감소 — Lua EndPlayerTurn 동기화 (적 행동 전)
|
||||||
if (pWeak > 0) pWeak--;
|
if (pWeak > 0) pWeak--;
|
||||||
@@ -260,19 +708,24 @@ export function simulateCombat(data, rng, stats) {
|
|||||||
for (const m of mob) {
|
for (const m of mob) {
|
||||||
if (!m.alive) continue;
|
if (!m.alive) continue;
|
||||||
// 독 틱 — 행동 시작 시 (Lua EnemyActStep 동기화). 사망 시 행동 생략
|
// 독 틱 — 행동 시작 시 (Lua EnemyActStep 동기화). 사망 시 행동 생략
|
||||||
if (m.poison > 0) {
|
const poisonTicks = 1 + Math.max(0, powerFieldTotal('extraPoisonTicks'));
|
||||||
|
for (let tick = 0; tick < poisonTicks; tick++) {
|
||||||
|
if (m.poison <= 0) break;
|
||||||
m.hp -= m.poison;
|
m.hp -= m.poison;
|
||||||
m.poison--;
|
m.poison--;
|
||||||
if (m.hp <= 0) { m.hp = 0; m.alive = false; continue; }
|
if (m.hp <= 0) { m.hp = 0; m.alive = false; break; }
|
||||||
}
|
}
|
||||||
|
if (!m.alive) continue;
|
||||||
m.block = 0; // 매 턴 초기화 (이전 턴 블록 미이월)
|
m.block = 0; // 매 턴 초기화 (이전 턴 블록 미이월)
|
||||||
// 정의된 intent 중 랜덤 선택 (Lua EnemyActStep 동기화 — 순차→랜덤)
|
// 정의된 intent 중 랜덤 선택 (Lua EnemyActStep 동기화 — 순차→랜덤)
|
||||||
const it = m.intents.length ? m.intents[Math.floor(rng() * m.intents.length)] : null;
|
const it = m.intents.length ? m.intents[Math.floor(rng() * m.intents.length)] : null;
|
||||||
if (it) {
|
if (it) {
|
||||||
if (it.kind === 'Attack') {
|
if (it.kind === 'Attack') {
|
||||||
const atk = calcAttack(it.value, m.str, m.weak, pVuln);
|
const atk = calcAttack(it.value, Math.max(0, m.str - enemyStrengthLossThisTurn), m.weak, pVuln);
|
||||||
const beforeHp = pHp;
|
const beforeHp = pHp;
|
||||||
const r = applyDamage(pHp, pBlock, atk); pHp = r.hp; pBlock = r.block;
|
let incoming = atk;
|
||||||
|
if (pIntangible > 0 && incoming > 1) incoming = 1;
|
||||||
|
const r = applyDamage(pHp, pBlock, incoming); pHp = r.hp; pBlock = r.block;
|
||||||
if (beforeHp > pHp && pThorns > 0) {
|
if (beforeHp > pHp && pThorns > 0) {
|
||||||
m.hp -= pThorns;
|
m.hp -= pThorns;
|
||||||
if (m.hp <= 0) m.alive = false;
|
if (m.hp <= 0) m.alive = false;
|
||||||
@@ -293,9 +746,9 @@ export function simulateCombat(data, rng, stats) {
|
|||||||
if (pHp <= 0) return { win: false, turns, playerHpRemaining: 0 };
|
if (pHp <= 0) return { win: false, turns, playerHpRemaining: 0 };
|
||||||
}
|
}
|
||||||
// 독 사망 등 적 페이즈 중 전멸 처리 (Lua FinishEnemyTurn→CheckCombatEnd 동기화)
|
// 독 사망 등 적 페이즈 중 전멸 처리 (Lua FinishEnemyTurn→CheckCombatEnd 동기화)
|
||||||
if (!mob.some((m) => m.alive)) return { win: true, turns, playerHpRemaining: pHp };
|
if (!mob.some((m) => m.alive)) return { win: true, turns, playerHpRemaining: pHp, bonusRewardScreens };
|
||||||
}
|
}
|
||||||
return { win: false, turns, playerHpRemaining: pHp, draw: true };
|
return { win: false, turns, playerHpRemaining: pHp, draw: true, bonusRewardScreens };
|
||||||
}
|
}
|
||||||
|
|
||||||
function mean(a) { return a.length ? a.reduce((s, x) => s + x, 0) / a.length : 0; }
|
function mean(a) { return a.length ? a.reduce((s, x) => s + x, 0) / a.length : 0; }
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { test } from 'node:test';
|
import { test } from 'node:test';
|
||||||
import assert from 'node:assert/strict';
|
import assert from 'node:assert/strict';
|
||||||
import {
|
import {
|
||||||
mulberry32, applyDamage, chooseAction, chooseTarget, simulateCombat, runBatch, calcAttack, rarityForRoll,
|
mulberry32, applyDamage, chooseAction, chooseTarget, simulateCombat, runBatch, calcAttack, calcEnemyAttack, rarityForRoll,
|
||||||
} from './sim-balance.mjs';
|
} from './sim-balance.mjs';
|
||||||
|
|
||||||
test('rarityForRoll: 70/25/5 경계 (Lua OfferReward 미러)', () => {
|
test('rarityForRoll: 70/25/5 경계 (Lua OfferReward 미러)', () => {
|
||||||
@@ -13,6 +13,85 @@ test('rarityForRoll: 70/25/5 경계 (Lua OfferReward 미러)', () => {
|
|||||||
assert.equal(rarityForRoll(100), 'legend');
|
assert.equal(rarityForRoll(100), 'legend');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: nextTurnBlock grants block on the following turn", () => {
|
||||||
|
const data = {
|
||||||
|
cards: {
|
||||||
|
GuardLater: { name: "예약 방어", cost: 0, kind: "Skill", nextTurnBlock: 4 },
|
||||||
|
Pass: { name: "대기", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
},
|
||||||
|
starterDeck: ["GuardLater", "Pass"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 99, intents: [{ kind: "Attack", value: 3 }, { kind: "Attack", value: 3 }] }],
|
||||||
|
};
|
||||||
|
const r = simulateCombat(data, () => 0.999999);
|
||||||
|
assert.equal(r.win, false);
|
||||||
|
assert.equal(r.draw, true);
|
||||||
|
assert.equal(r.playerHpRemaining, 77);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: nextTurnDraw draws extra cards next turn", () => {
|
||||||
|
const data = {
|
||||||
|
cards: {
|
||||||
|
Setup: { name: "설치", cost: 0, kind: "Skill", nextTurnDraw: 2 },
|
||||||
|
Hit1: { name: "타격1", cost: 0, kind: "Attack", damage: 3 },
|
||||||
|
Hit2: { name: "타격2", cost: 0, kind: "Attack", damage: 3 },
|
||||||
|
Pass1: { name: "대기1", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
Pass2: { name: "대기2", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
Pass3: { name: "대기3", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
Pass4: { name: "대기4", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
},
|
||||||
|
starterDeck: ["Hit1", "Hit2", "Pass1", "Pass2", "Pass3", "Pass4", "Setup"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 6, intents: [{ kind: "Attack", value: 0 }] }],
|
||||||
|
};
|
||||||
|
const r = simulateCombat(data, () => 0.999999);
|
||||||
|
assert.equal(r.win, true);
|
||||||
|
assert.equal(r.turns, 2);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: nextTurnKeepBlock preserves current block", () => {
|
||||||
|
const data = {
|
||||||
|
cards: {
|
||||||
|
BlurLater: { name: "흐릿함", cost: 0, kind: "Skill", block: 5, nextTurnKeepBlock: true },
|
||||||
|
Pass: { name: "대기", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
},
|
||||||
|
starterDeck: ["BlurLater", "Pass"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 99, intents: [{ kind: "Attack", value: 3 }, { kind: "Attack", value: 3 }] }],
|
||||||
|
};
|
||||||
|
const r = simulateCombat(data, () => 0.999999);
|
||||||
|
assert.equal(r.win, false);
|
||||||
|
assert.equal(r.draw, true);
|
||||||
|
assert.equal(r.playerHpRemaining, 80);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: nextTurnAttackMultiplier boosts attacks next turn", () => {
|
||||||
|
const data = {
|
||||||
|
cards: {
|
||||||
|
Prep: { name: "그림자 걸음", cost: 0, kind: "Skill", nextTurnAttackMultiplier: 2 },
|
||||||
|
Hit: { name: "타격", cost: 0, kind: "Attack", damage: 3 },
|
||||||
|
Pass: { name: "대기", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
},
|
||||||
|
starterDeck: ["Prep", "Pass", "Hit"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 6, intents: [{ kind: "Attack", value: 0 }] }],
|
||||||
|
};
|
||||||
|
const r = simulateCombat(data, () => 0.999999);
|
||||||
|
assert.equal(r.win, true);
|
||||||
|
assert.equal(r.turns, 2);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: nextTurnSelectHandCard queues selected copies for next turn", () => {
|
||||||
|
const data = {
|
||||||
|
cards: {
|
||||||
|
Nightmare: { name: "악몽", cost: 0, kind: "Skill", nextTurnCopies: 3, nextTurnSelectHandCard: true },
|
||||||
|
Hit: { name: "타격", cost: 0, kind: "Attack", damage: 2 },
|
||||||
|
Pass: { name: "대기", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
},
|
||||||
|
starterDeck: ["Pass", "Nightmare", "Hit"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 6, intents: [{ kind: "Attack", value: 0 }] }],
|
||||||
|
};
|
||||||
|
const r = simulateCombat(data, () => 0.999999);
|
||||||
|
assert.equal(r.win, true);
|
||||||
|
assert.equal(r.turns, 4);
|
||||||
|
});
|
||||||
|
|
||||||
test('applyDamage: 방어 우선 차감 후 hp', () => {
|
test('applyDamage: 방어 우선 차감 후 hp', () => {
|
||||||
assert.deepEqual(applyDamage(80, 0, 10), { hp: 70, block: 0 });
|
assert.deepEqual(applyDamage(80, 0, 10), { hp: 70, block: 0 });
|
||||||
assert.deepEqual(applyDamage(80, 5, 10), { hp: 75, block: 0 });
|
assert.deepEqual(applyDamage(80, 5, 10), { hp: 75, block: 0 });
|
||||||
@@ -461,3 +540,604 @@ test("simulateCombat: addShiv creates shuriken cards in hand", () => {
|
|||||||
assert.equal(r.win, true);
|
assert.equal(r.win, true);
|
||||||
assert.equal(r.turns, 1);
|
assert.equal(r.turns, 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: innate cards are drawn into the opening hand first", () => {
|
||||||
|
const data = {
|
||||||
|
cards: {
|
||||||
|
Backstab: { name: "배신", cost: 0, kind: "Attack", damage: 11, innate: true, exhaust: true },
|
||||||
|
Pass1: { name: "대기1", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
Pass2: { name: "대기2", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
Pass3: { name: "대기3", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
Pass4: { name: "대기4", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
Pass5: { name: "대기5", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
},
|
||||||
|
starterDeck: ["Pass1", "Pass2", "Pass3", "Pass4", "Pass5", "Backstab"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 11, intents: [{ kind: "Attack", value: 0 }] }],
|
||||||
|
};
|
||||||
|
const r = simulateCombat(data, () => 0);
|
||||||
|
assert.equal(r.win, true);
|
||||||
|
assert.equal(r.turns, 1);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: GrandFinale waits until draw pile is empty", () => {
|
||||||
|
const data = {
|
||||||
|
cards: {
|
||||||
|
Finale: { name: "피날레", cost: 0, kind: "Attack", damage: 60, aoe: true, playableWhenDrawPileEmpty: true },
|
||||||
|
Pass1: { name: "대기1", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
Pass2: { name: "대기2", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
Pass3: { name: "대기3", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
Pass4: { name: "대기4", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
Pass5: { name: "대기5", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
},
|
||||||
|
starterDeck: ["Pass1", "Pass2", "Pass3", "Pass4", "Pass5", "Finale"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 60, intents: [{ kind: "Attack", value: 0 }] }],
|
||||||
|
};
|
||||||
|
const r = simulateCombat(data, () => 0);
|
||||||
|
assert.equal(r.win, false);
|
||||||
|
assert.equal(r.draw, true);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: turnStartDraw and turnStartDiscard powers resolve at turn start", () => {
|
||||||
|
const data = {
|
||||||
|
cards: {
|
||||||
|
Tool: { name: "작업 도구", cost: 0, kind: "Power", turnStartDraw: 1, turnStartDiscard: 1 },
|
||||||
|
Hit1: { name: "타격1", cost: 0, kind: "Attack", damage: 3 },
|
||||||
|
Hit2: { name: "타격2", cost: 0, kind: "Attack", damage: 3 },
|
||||||
|
Pass1: { name: "대기1", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
Pass2: { name: "대기2", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
Pass3: { name: "대기3", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
},
|
||||||
|
starterDeck: ["Tool", "Pass1", "Pass2", "Pass3", "Hit1", "Hit2"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 6, intents: [{ kind: "Attack", value: 0 }] }],
|
||||||
|
};
|
||||||
|
const r = simulateCombat(data, () => 0);
|
||||||
|
assert.equal(r.win, true);
|
||||||
|
assert.equal(r.turns, 1);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("chooseAction: GrandFinale is blocked until draw pile is empty", () => {
|
||||||
|
const cards = {
|
||||||
|
Finale: { name: "피날레", cost: 0, kind: "Attack", damage: 60, playableWhenDrawPileEmpty: true },
|
||||||
|
Defend: { name: "방어", cost: 1, kind: "Skill", block: 5 },
|
||||||
|
};
|
||||||
|
assert.equal(chooseAction(["Finale", "Defend"], cards, 3, { drawPileCount: 1 }), 1);
|
||||||
|
assert.equal(chooseAction(["Finale"], cards, 3, { drawPileCount: 0 }), 0);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: damagePerAttackPlayedThisTurn scales Finisher", () => {
|
||||||
|
const data = {
|
||||||
|
cards: {
|
||||||
|
Hit: { name: "타격", cost: 0, kind: "Attack", damage: 6 },
|
||||||
|
Finisher: { name: "마무리", cost: 0, kind: "Attack", damage: 0, damagePerAttackPlayedThisTurn: 6 },
|
||||||
|
},
|
||||||
|
starterDeck: ["Hit", "Finisher"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 12, intents: [{ kind: "Attack", value: 0 }] }],
|
||||||
|
};
|
||||||
|
const r = simulateCombat(data, () => 0);
|
||||||
|
assert.equal(r.win, true);
|
||||||
|
assert.equal(r.turns, 2);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: damagePerOtherHandCard and damagePerSkillInHand are applied", () => {
|
||||||
|
const data = {
|
||||||
|
cards: {
|
||||||
|
Precise: { name: "정밀", cost: 0, kind: "Attack", damage: 13, damagePerOtherHandCard: -2 },
|
||||||
|
Flechettes: { name: "프레췌", cost: 0, kind: "Attack", damage: 0, damagePerSkillInHand: 5 },
|
||||||
|
Skill1: { name: "스킬1", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
Skill2: { name: "스킬2", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
Blank: { name: "공백", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
},
|
||||||
|
starterDeck: ["Skill1", "Skill2", "Blank", "Precise", "Flechettes"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 21, intents: [{ kind: "Attack", value: 0 }] }],
|
||||||
|
};
|
||||||
|
const r = simulateCombat(data, () => 0);
|
||||||
|
assert.equal(r.win, true);
|
||||||
|
assert.equal(r.turns, 5);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: damagePerDiscardedThisTurn and bonusHitsWhenOtherHandAtLeast work", () => {
|
||||||
|
const data = {
|
||||||
|
cards: {
|
||||||
|
Toss: { name: "버리기", cost: 0, kind: "Skill", discard: 1 },
|
||||||
|
Memento: { name: "메멘토", cost: 0, kind: "Attack", damage: 9, damagePerDiscardedThisTurn: 4 },
|
||||||
|
Follow: { name: "완수", cost: 0, kind: "Attack", damage: 7, otherHandAtLeast: 2, bonusHitsWhenOtherHandAtLeast: 1 },
|
||||||
|
Blank1: { name: "공백1", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
Blank2: { name: "공백2", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
},
|
||||||
|
starterDeck: ["Toss", "Memento", "Follow", "Blank1", "Blank2"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 27, intents: [{ kind: "Attack", value: 0 }] }],
|
||||||
|
};
|
||||||
|
const r = simulateCombat(data, () => 0.999999);
|
||||||
|
assert.equal(r.win, true);
|
||||||
|
assert.equal(r.turns, 2);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: gainEnergy, drawUntilHandSize, and drawPerDiscarded are applied", () => {
|
||||||
|
const data = {
|
||||||
|
cards: {
|
||||||
|
Adrenaline: { name: "Adrenaline", cost: 0, kind: "Skill", gainEnergy: 1, draw: 2, exhaust: true },
|
||||||
|
Expertise: { name: "Expertise", cost: 1, kind: "Skill", drawUntilHandSize: 6 },
|
||||||
|
Gamble: { name: "Gamble", cost: 0, kind: "Skill", discardAll: true, drawPerDiscarded: 1, exhaust: true },
|
||||||
|
Tactician: { name: "Tactician", cost: 99, kind: "Skill", gainEnergy: 1, sly: true },
|
||||||
|
Hit1: { name: "Hit1", cost: 1, kind: "Attack", damage: 6 },
|
||||||
|
Hit2: { name: "Hit2", cost: 1, kind: "Attack", damage: 6 },
|
||||||
|
Hit3: { name: "Hit3", cost: 1, kind: "Attack", damage: 6 },
|
||||||
|
},
|
||||||
|
starterDeck: ["Adrenaline", "Expertise", "Gamble", "Tactician", "Hit1", "Hit2", "Hit3"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 18, intents: [{ kind: "Attack", value: 0 }] }],
|
||||||
|
};
|
||||||
|
const r = simulateCombat(data, () => 0);
|
||||||
|
assert.equal(r.win, true);
|
||||||
|
assert.equal(r.turns, 1);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: cardPlayedBlock grants block whenever a card is played", () => {
|
||||||
|
const data = {
|
||||||
|
cards: {
|
||||||
|
After: { name: "Afterimage", cost: 1, kind: "Power", cardPlayedBlock: 1 },
|
||||||
|
Hit: { name: "Hit", cost: 1, kind: "Attack", damage: 1 },
|
||||||
|
},
|
||||||
|
starterDeck: ["After", "Hit", "Hit", "Hit", "Hit"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 9999, intents: [{ kind: "Attack", value: 1 }] }],
|
||||||
|
};
|
||||||
|
const r = simulateCombat(data, () => 0.999999);
|
||||||
|
assert.equal(r.draw, true);
|
||||||
|
assert.equal(r.playerHpRemaining, 80);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: blockGainMultiplier doubles block gain for the turn", () => {
|
||||||
|
const data = {
|
||||||
|
cards: {
|
||||||
|
Shadow: { name: "Shadowmeld", cost: 1, kind: "Skill", block: 5, blockGainMultiplier: 2 },
|
||||||
|
Shield: { name: "Shield", cost: 1, kind: "Skill", block: 2 },
|
||||||
|
},
|
||||||
|
starterDeck: ["Shadow", "Shield"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 9999, intents: [{ kind: "Attack", value: 8 }] }],
|
||||||
|
};
|
||||||
|
const r = simulateCombat(data, () => 0.999999);
|
||||||
|
assert.equal(r.draw, true);
|
||||||
|
assert.equal(r.playerHpRemaining, 80);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: nextSkillCostZero makes the next skill free", () => {
|
||||||
|
const data = {
|
||||||
|
cards: {
|
||||||
|
Pounce: { name: "Pounce", cost: 2, kind: "Attack", damage: 12, nextSkillCostZero: true },
|
||||||
|
Guard: { name: "Guard", cost: 2, kind: "Skill", block: 8 },
|
||||||
|
},
|
||||||
|
starterDeck: ["Pounce", "Guard"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 9999, intents: [{ kind: "Attack", value: 8 }] }],
|
||||||
|
};
|
||||||
|
const r = simulateCombat(data, () => 0.999999);
|
||||||
|
assert.equal(r.draw, true);
|
||||||
|
assert.equal(r.playerHpRemaining, 80);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: nextSkillRepeatCount repeats the next skill effect", () => {
|
||||||
|
const shared = {
|
||||||
|
cards: {
|
||||||
|
Burst: { name: "Burst", cost: 1, kind: "Skill", draw: 1, block: 5, nextSkillRepeatCount: 1 },
|
||||||
|
Guard: { name: "Guard", cost: 2, kind: "Skill", block: 8 },
|
||||||
|
},
|
||||||
|
starterDeck: ["Burst", "Guard"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 9999, intents: [{ kind: "Attack", value: 15 }] }],
|
||||||
|
};
|
||||||
|
const withBurst = simulateCombat(shared, () => 0.999999);
|
||||||
|
const withoutBurst = simulateCombat({
|
||||||
|
...shared,
|
||||||
|
cards: {
|
||||||
|
Burst: { name: "Burst", cost: 1, kind: "Skill", draw: 1, block: 5 },
|
||||||
|
Guard: shared.cards.Guard,
|
||||||
|
},
|
||||||
|
}, () => 0.999999);
|
||||||
|
assert.equal(withBurst.draw, true);
|
||||||
|
assert.equal(withBurst.playerHpRemaining, 80);
|
||||||
|
assert.ok(withBurst.playerHpRemaining > withoutBurst.playerHpRemaining);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("chooseAction: skillCostReductionThisTurn allows discounted skills", () => {
|
||||||
|
const cards = {
|
||||||
|
Guard: { name: "Guard", cost: 2, kind: "Skill", block: 8 },
|
||||||
|
};
|
||||||
|
assert.equal(chooseAction(["Guard"], cards, 1, { skillCostReductionThisTurn: 1 }), 0);
|
||||||
|
assert.equal(chooseAction(["Guard"], cards, 1, {}), -1);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("chooseAction: handCostZeroThisTurn lets expensive cards be played", () => {
|
||||||
|
const cards = {
|
||||||
|
Burst: { name: "Burst", cost: 3, kind: "Skill", block: 8 },
|
||||||
|
};
|
||||||
|
assert.equal(chooseAction(["Burst"], cards, 0, { handCostZeroThisTurn: true }), 0);
|
||||||
|
assert.equal(chooseAction(["Burst"], cards, 0, {}), -1);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("chooseAction: useAllEnergy cards remain playable at zero energy", () => {
|
||||||
|
const cards = {
|
||||||
|
Skewer: { name: "Skewer", cost: 2, kind: "Attack", useAllEnergy: true, xDamagePerEnergy: 8 },
|
||||||
|
};
|
||||||
|
assert.equal(chooseAction(["Skewer"], cards, 0, {}), 0);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("chooseAction: combatCardCostReduction discounts the same card across combat", () => {
|
||||||
|
const cards = {
|
||||||
|
Sleeve: { name: "UpMySleeve", cost: 2, kind: "Skill" },
|
||||||
|
};
|
||||||
|
assert.equal(chooseAction(["Sleeve"], cards, 1, { combatCardCostReduction: { Sleeve: 1 } }), 0);
|
||||||
|
assert.equal(chooseAction(["Sleeve"], cards, 1, {}), -1);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: drawSkillBlock grants block for each drawn skill", () => {
|
||||||
|
const data = {
|
||||||
|
cards: {
|
||||||
|
Escape: { name: "EscapePlan", cost: 0, kind: "Skill", draw: 1, drawSkillBlock: 3, innate: true, exhaust: true },
|
||||||
|
Filler1: { name: "Filler1", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
Filler2: { name: "Filler2", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
Filler3: { name: "Filler3", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
Filler4: { name: "Filler4", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
Filler5: { name: "Filler5", cost: 99, kind: "Skill", block: 0 },
|
||||||
|
},
|
||||||
|
starterDeck: ["Escape", "Filler1", "Filler2", "Filler3", "Filler4", "Filler5"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 9999, intents: [{ kind: "Attack", value: 0 }] }],
|
||||||
|
};
|
||||||
|
const stats = {};
|
||||||
|
const r = simulateCombat(data, () => 0.999999, stats);
|
||||||
|
assert.equal(r.draw, true);
|
||||||
|
assert.equal(stats.Escape.block, 3);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: poisonPerTurn powers poison all enemies at turn start", () => {
|
||||||
|
const data = {
|
||||||
|
cards: {
|
||||||
|
Fumes: { name: "NoxiousFumes", cost: 1, kind: "Power", powerEffect: "poisonPerTurn", value: 2 },
|
||||||
|
},
|
||||||
|
starterDeck: ["Fumes"],
|
||||||
|
monsters: [
|
||||||
|
{ name: "DummyA", maxHp: 2, intents: [{ kind: "Attack", value: 0 }] },
|
||||||
|
{ name: "DummyB", maxHp: 2, intents: [{ kind: "Attack", value: 0 }] },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
const r = simulateCombat(data, () => 0.999999);
|
||||||
|
assert.equal(r.win, true);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: damagePerTurn powers damage all enemies at turn start", () => {
|
||||||
|
const data = {
|
||||||
|
cards: {
|
||||||
|
Speed: { name: "Speedster", cost: 2, kind: "Power", powerEffect: "damagePerTurn", value: 2 },
|
||||||
|
},
|
||||||
|
starterDeck: ["Speed"],
|
||||||
|
monsters: [
|
||||||
|
{ name: "DummyA", maxHp: 2, intents: [{ kind: "Attack", value: 0 }] },
|
||||||
|
{ name: "DummyB", maxHp: 2, intents: [{ kind: "Attack", value: 0 }] },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
const r = simulateCombat(data, () => 0.999999);
|
||||||
|
assert.equal(r.win, true);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: attackPoison power applies poison on attack damage", () => {
|
||||||
|
const data = {
|
||||||
|
cards: {
|
||||||
|
Venom: { name: "Envenom", cost: 2, kind: "Power", attackPoison: 2 },
|
||||||
|
Strike: { name: "Strike", cost: 1, kind: "Attack", damage: 1 },
|
||||||
|
},
|
||||||
|
starterDeck: ["Venom", "Strike"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 3, intents: [{ kind: "Attack", value: 0 }] }],
|
||||||
|
};
|
||||||
|
const r = simulateCombat(data, () => 0.999999);
|
||||||
|
assert.equal(r.win, true);
|
||||||
|
assert.equal(r.turns, 1);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: skillSlyOnPlay makes later discards of the same skill trigger sly effects", () => {
|
||||||
|
const shared = {
|
||||||
|
cards: {
|
||||||
|
MasterPlanner: { name: "MasterPlanner", cost: 1, kind: "Skill", poison: 1, discardAll: true },
|
||||||
|
},
|
||||||
|
starterDeck: ["MasterPlanner", "MasterPlanner"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 2, intents: [{ kind: "Attack", value: 0 }] }],
|
||||||
|
};
|
||||||
|
const withSly = simulateCombat({
|
||||||
|
...shared,
|
||||||
|
cards: {
|
||||||
|
MasterPlanner: { name: "MasterPlanner", cost: 1, kind: "Skill", poison: 1, discardAll: true, skillSlyOnPlay: true },
|
||||||
|
},
|
||||||
|
}, () => 0.999999);
|
||||||
|
const withoutSly = simulateCombat(shared, () => 0.999999);
|
||||||
|
assert.equal(withSly.win, true);
|
||||||
|
assert.equal(withSly.turns, 1);
|
||||||
|
assert.ok(withoutSly.turns > withSly.turns);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: randomTargetEachHit can spread hits across alive enemies", () => {
|
||||||
|
const shared = {
|
||||||
|
cards: {
|
||||||
|
Ricochet: { name: "Ricochet", cost: 2, kind: "Attack", damage: 3, hits: 4, randomTargetEachHit: true },
|
||||||
|
},
|
||||||
|
starterDeck: ["Ricochet"],
|
||||||
|
monsters: [
|
||||||
|
{ name: "DummyA", maxHp: 6, intents: [{ kind: "Attack", value: 0 }] },
|
||||||
|
{ name: "DummyB", maxHp: 6, intents: [{ kind: "Attack", value: 0 }] },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
const makeRng = () => {
|
||||||
|
const seq = [0, 0.999999, 0, 0.999999];
|
||||||
|
let i = 0;
|
||||||
|
return () => seq[i++ % seq.length];
|
||||||
|
};
|
||||||
|
const withRicochet = simulateCombat(shared, makeRng());
|
||||||
|
const withoutRicochet = simulateCombat({
|
||||||
|
...shared,
|
||||||
|
cards: {
|
||||||
|
Ricochet: { name: "Ricochet", cost: 2, kind: "Attack", damage: 3, hits: 4 },
|
||||||
|
},
|
||||||
|
}, makeRng());
|
||||||
|
assert.equal(withRicochet.win, true);
|
||||||
|
assert.equal(withRicochet.turns, 1);
|
||||||
|
assert.equal(withoutRicochet.turns, 2);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("calcEnemyAttack: enemyStrengthLossThisTurn reduces enemy attack damage", () => {
|
||||||
|
assert.equal(calcEnemyAttack(10, 6, 0, 0, 6), 10);
|
||||||
|
assert.equal(calcEnemyAttack(10, 6, 0, 0, 0), 16);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: repeatOnKill repeats an attack until no kill occurs", () => {
|
||||||
|
const shared = {
|
||||||
|
cards: {
|
||||||
|
EchoingSlash: { name: "EchoingSlash", cost: 1, kind: "Attack", aoe: true, damage: 10, repeatOnKill: true },
|
||||||
|
},
|
||||||
|
starterDeck: ["EchoingSlash"],
|
||||||
|
monsters: [
|
||||||
|
{ name: "DummyA", maxHp: 10, intents: [{ kind: "Attack", value: 0 }] },
|
||||||
|
{ name: "DummyB", maxHp: 20, intents: [{ kind: "Attack", value: 0 }] },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
const withRepeat = simulateCombat(shared, () => 0.999999);
|
||||||
|
const withoutRepeat = simulateCombat({
|
||||||
|
...shared,
|
||||||
|
cards: {
|
||||||
|
EchoingSlash: { name: "EchoingSlash", cost: 1, kind: "Attack", aoe: true, damage: 10 },
|
||||||
|
},
|
||||||
|
}, () => 0.999999);
|
||||||
|
assert.equal(withRepeat.win, true);
|
||||||
|
assert.equal(withRepeat.turns, 1);
|
||||||
|
assert.equal(withoutRepeat.turns, 2);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: poisonIfTargetPoisoned only applies poison to already poisoned enemies", () => {
|
||||||
|
const shared = {
|
||||||
|
cards: {
|
||||||
|
Bubble: { name: "BubbleBubble", cost: 1, kind: "Skill", poison: 9, poisonIfTargetPoisoned: true },
|
||||||
|
},
|
||||||
|
starterDeck: ["Bubble"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 2, intents: [{ kind: "Attack", value: 0 }] }],
|
||||||
|
};
|
||||||
|
const withBubble = simulateCombat(shared, () => 0.999999);
|
||||||
|
const withoutBubble = simulateCombat({
|
||||||
|
...shared,
|
||||||
|
cards: {
|
||||||
|
Bubble: { name: "BubbleBubble", cost: 1, kind: "Skill", poison: 9 },
|
||||||
|
},
|
||||||
|
}, () => 0.999999);
|
||||||
|
assert.equal(withBubble.draw, true);
|
||||||
|
assert.equal(withBubble.turns, 100);
|
||||||
|
assert.equal(withoutBubble.win, true);
|
||||||
|
assert.equal(withoutBubble.turns, 1);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: turnHandSlyCount marks a skill in hand as sly for the turn", () => {
|
||||||
|
const shared = {
|
||||||
|
cards: {
|
||||||
|
HandTrick: { name: "HandTrick", cost: 0, kind: "Skill", block: 7, turnHandSlyCount: 1 },
|
||||||
|
Shield: { name: "Shield", cost: 0, kind: "Skill", unplayable: true, block: 7 },
|
||||||
|
Gamble: { name: "Gamble", cost: 0, kind: "Skill", discardAll: true },
|
||||||
|
},
|
||||||
|
starterDeck: ["Gamble", "Shield", "HandTrick"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 9999, intents: [{ kind: "Attack", value: 10 }] }],
|
||||||
|
};
|
||||||
|
const withHandTrick = simulateCombat(shared, () => 0.999999);
|
||||||
|
const withoutHandTrick = simulateCombat({
|
||||||
|
...shared,
|
||||||
|
cards: {
|
||||||
|
HandTrick: { name: "HandTrick", cost: 0, kind: "Skill", block: 7 },
|
||||||
|
Shield: shared.cards.Shield,
|
||||||
|
Gamble: shared.cards.Gamble,
|
||||||
|
},
|
||||||
|
}, () => 0.999999);
|
||||||
|
assert.equal(withHandTrick.playerHpRemaining, 80);
|
||||||
|
assert.equal(withoutHandTrick.playerHpRemaining, 0);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: extraPoisonTicks adds an extra poison tick at enemy turn start", () => {
|
||||||
|
const shared = {
|
||||||
|
cards: {
|
||||||
|
Accelerant: { name: "Accelerant", cost: 1, kind: "Power", extraPoisonTicks: 1 },
|
||||||
|
Poison: { name: "Poison", cost: 1, kind: "Skill", poison: 2 },
|
||||||
|
},
|
||||||
|
starterDeck: ["Accelerant", "Poison"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 3, intents: [{ kind: "Attack", value: 0 }] }],
|
||||||
|
};
|
||||||
|
const withTick = simulateCombat(shared, () => 0.999999);
|
||||||
|
const withoutTick = simulateCombat({
|
||||||
|
...shared,
|
||||||
|
cards: {
|
||||||
|
Accelerant: { name: "Accelerant", cost: 1, kind: "Power" },
|
||||||
|
Poison: shared.cards.Poison,
|
||||||
|
},
|
||||||
|
}, () => 0.999999);
|
||||||
|
assert.equal(withTick.win, true);
|
||||||
|
assert.equal(withTick.turns, 1);
|
||||||
|
assert.equal(withoutTick.turns, 2);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: poisonApplicationBurstEvery bursts after every third poison application", () => {
|
||||||
|
const shared = {
|
||||||
|
cards: {
|
||||||
|
Outbreak: { name: "Outbreak", cost: 1, kind: "Power", poisonApplicationBurstEvery: 3, poisonApplicationBurstDamage: 11 },
|
||||||
|
Poison1: { name: "Poison1", cost: 0, kind: "Skill", poison: 1 },
|
||||||
|
Poison2: { name: "Poison2", cost: 0, kind: "Skill", poison: 1 },
|
||||||
|
Poison3: { name: "Poison3", cost: 0, kind: "Skill", poison: 1 },
|
||||||
|
},
|
||||||
|
starterDeck: ["Outbreak", "Poison1", "Poison2", "Poison3"],
|
||||||
|
monsters: [
|
||||||
|
{ name: "DummyA", maxHp: 11, intents: [{ kind: "Attack", value: 0 }] },
|
||||||
|
{ name: "DummyB", maxHp: 11, intents: [{ kind: "Attack", value: 0 }] },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
const withBurst = simulateCombat(shared, () => 0.999999);
|
||||||
|
const withoutBurst = simulateCombat({
|
||||||
|
...shared,
|
||||||
|
cards: {
|
||||||
|
Outbreak: { name: "Outbreak", cost: 1, kind: "Power" },
|
||||||
|
Poison1: shared.cards.Poison1,
|
||||||
|
Poison2: shared.cards.Poison2,
|
||||||
|
Poison3: shared.cards.Poison3,
|
||||||
|
},
|
||||||
|
}, () => 0.999999);
|
||||||
|
assert.equal(withBurst.win, true);
|
||||||
|
assert.equal(withBurst.turns, 1);
|
||||||
|
assert.ok(withoutBurst.turns > withBurst.turns);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: firstCardDamageBonus applies on the first card played this turn", () => {
|
||||||
|
const data = {
|
||||||
|
cards: {
|
||||||
|
Strangle: { name: "Strangle", cost: 1, kind: "Attack", damage: 8, firstCardDamageBonus: 2 },
|
||||||
|
},
|
||||||
|
starterDeck: ["Strangle"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 10, intents: [{ kind: "Attack", value: 0 }] }],
|
||||||
|
};
|
||||||
|
const r = simulateCombat(data, () => 0.999999);
|
||||||
|
assert.equal(r.win, true);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: blockPerDamageDealtThisTurn grants block from damage dealt this turn", () => {
|
||||||
|
const data = {
|
||||||
|
cards: {
|
||||||
|
Mirage: { name: "Mirage", cost: 1, kind: "Skill", blockPerDamageDealtThisTurn: 1, block: 0 },
|
||||||
|
Strike: { name: "Strike", cost: 1, kind: "Attack", damage: 4 },
|
||||||
|
},
|
||||||
|
starterDeck: ["Strike", "Mirage"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 4, intents: [{ kind: "Attack", value: 0 }] }],
|
||||||
|
};
|
||||||
|
const r = simulateCombat(data, () => 0.999999);
|
||||||
|
assert.equal(r.win, true);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: cardPlayedRandomDamage hits a random enemy on card play", () => {
|
||||||
|
const data = {
|
||||||
|
cards: {
|
||||||
|
SerpentForm: { name: "SerpentForm", cost: 3, kind: "Power", cardPlayedRandomDamage: 4 },
|
||||||
|
},
|
||||||
|
starterDeck: ["SerpentForm"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 4, intents: [{ kind: "Attack", value: 0 }] }],
|
||||||
|
};
|
||||||
|
const r = simulateCombat(data, () => 0.999999);
|
||||||
|
assert.equal(r.win, true);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: rewardOnKill grants an extra reward screen when an attack kills", () => {
|
||||||
|
const data = {
|
||||||
|
cards: {
|
||||||
|
TheHunt: { name: "TheHunt", cost: 1, kind: "Attack", damage: 10, rewardOnKill: 1 },
|
||||||
|
},
|
||||||
|
starterDeck: ["TheHunt"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 10, intents: [{ kind: "Attack", value: 0 }] }],
|
||||||
|
};
|
||||||
|
const r = simulateCombat(data, () => 0.999999);
|
||||||
|
assert.equal(r.win, true);
|
||||||
|
assert.equal(r.bonusRewardScreens, 1);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: intangible cards reduce incoming damage and persist across turns", () => {
|
||||||
|
const data = {
|
||||||
|
cards: {
|
||||||
|
Wraith: { name: "WraithForm", cost: 3, kind: "Power", intangible: 2, endTurnDexLoss: 1, innate: true },
|
||||||
|
Strike: { name: "Strike", cost: 1, kind: "Attack", damage: 1 },
|
||||||
|
},
|
||||||
|
starterDeck: ["Wraith", "Strike"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 1, intents: [{ kind: "Attack", value: 10 }] }],
|
||||||
|
};
|
||||||
|
const r = simulateCombat(data, () => 0.999999);
|
||||||
|
assert.equal(r.win, true);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: useAllEnergy skewer consumes all energy for damage", () => {
|
||||||
|
const data = {
|
||||||
|
cards: {
|
||||||
|
Skewer: { name: "Skewer", cost: 2, kind: "Attack", useAllEnergy: true, xDamagePerEnergy: 8 },
|
||||||
|
},
|
||||||
|
starterDeck: ["Skewer"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 24, intents: [{ kind: "Attack", value: 0 }] }],
|
||||||
|
};
|
||||||
|
const r = simulateCombat(data, () => 0.999999);
|
||||||
|
assert.equal(r.win, true);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: useAllEnergy malaise scales weak with energy spent", () => {
|
||||||
|
const data = {
|
||||||
|
cards: {
|
||||||
|
Malaise: { name: "Malaise", cost: 2, kind: "Skill", useAllEnergy: true, xWeakPerEnergy: 1 },
|
||||||
|
Strike: { name: "Strike", cost: 1, kind: "Attack", damage: 1 },
|
||||||
|
},
|
||||||
|
starterDeck: ["Malaise", "Strike"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 1, intents: [{ kind: "Attack", value: 10 }] }],
|
||||||
|
};
|
||||||
|
const r = simulateCombat(data, () => 0.999999);
|
||||||
|
assert.equal(r.win, true);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: damagePerCardDrawnThisCombat scales murder", () => {
|
||||||
|
const data = {
|
||||||
|
cards: {
|
||||||
|
Murder: { name: "Murder", cost: 3, kind: "Attack", damage: 1, damagePerCardDrawnThisCombat: 1 },
|
||||||
|
Filler1: { name: "Filler1", cost: 99, kind: "Skill" },
|
||||||
|
Filler2: { name: "Filler2", cost: 99, kind: "Skill" },
|
||||||
|
Filler3: { name: "Filler3", cost: 99, kind: "Skill" },
|
||||||
|
Filler4: { name: "Filler4", cost: 99, kind: "Skill" },
|
||||||
|
Filler5: { name: "Filler5", cost: 99, kind: "Skill" },
|
||||||
|
},
|
||||||
|
starterDeck: ["Murder", "Filler1", "Filler2", "Filler3", "Filler4", "Filler5"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 6, intents: [{ kind: "Attack", value: 0 }] }],
|
||||||
|
};
|
||||||
|
const stats = {};
|
||||||
|
const r = simulateCombat(data, () => 0.999999, stats);
|
||||||
|
assert.equal(r.win, true);
|
||||||
|
assert.ok(stats.Murder.damage > 1);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: shiv damage bonuses stack and first Shiv bonus applies once per turn", () => {
|
||||||
|
const data = {
|
||||||
|
cards: {
|
||||||
|
Accuracy: { name: "Accuracy", cost: 1, kind: "Power", shivDamageBonus: 2 },
|
||||||
|
PhantomBlades: { name: "PhantomBlades", cost: 1, kind: "Power", firstShivDamageBonus: 3 },
|
||||||
|
Shiv: { name: "Shiv", cost: 0, kind: "Attack", class: "shiv", damage: 1 },
|
||||||
|
},
|
||||||
|
starterDeck: ["Accuracy", "PhantomBlades", "Shiv"],
|
||||||
|
monsters: [{ name: "Dummy", maxHp: 6, intents: [{ kind: "Attack", value: 0 }] }],
|
||||||
|
};
|
||||||
|
const r = simulateCombat(data, () => 0.999999);
|
||||||
|
assert.equal(r.win, true);
|
||||||
|
assert.equal(r.turns, 1);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simulateCombat: shivAoe makes Shivs hit all enemies", () => {
|
||||||
|
const data = {
|
||||||
|
cards: {
|
||||||
|
FanOfKnives: { name: "FanOfKnives", cost: 2, kind: "Skill", addShiv: 2, shivAoe: true },
|
||||||
|
Accuracy: { name: "Accuracy", cost: 1, kind: "Power", shivDamageBonus: 2 },
|
||||||
|
Shiv: { name: "Shiv", cost: 0, kind: "Attack", class: "shiv", damage: 1 },
|
||||||
|
Pass: { name: "Pass", cost: 99, kind: "Skill" },
|
||||||
|
},
|
||||||
|
starterDeck: ["Accuracy", "FanOfKnives", "Pass"],
|
||||||
|
monsters: [
|
||||||
|
{ name: "A", maxHp: 3, intents: [{ kind: "Attack", value: 0 }] },
|
||||||
|
{ name: "B", maxHp: 3, intents: [{ kind: "Attack", value: 0 }] },
|
||||||
|
{ name: "C", maxHp: 3, intents: [{ kind: "Attack", value: 0 }] },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
const r = simulateCombat(data, () => 0.999999);
|
||||||
|
assert.equal(r.win, true);
|
||||||
|
assert.equal(r.turns, 1);
|
||||||
|
});
|
||||||
|
|||||||
@@ -10,7 +10,20 @@ ${luaCharsTable()}
|
|||||||
${luaSoulShopTable(SOUL_UNLOCKS)}
|
${luaSoulShopTable(SOUL_UNLOCKS)}
|
||||||
self.SoulUnlocks = {}
|
self.SoulUnlocks = {}
|
||||||
self.SoulPoints = self.SoulPoints or 0
|
self.SoulPoints = self.SoulPoints or 0
|
||||||
self:ShowLobby()
|
local uiTries = 0
|
||||||
|
local uiInit = 0
|
||||||
|
uiInit = _TimerService:SetTimerRepeat(function()
|
||||||
|
uiTries = uiTries + 1
|
||||||
|
if _EntityService:GetEntityByPath("/ui/DeckUIGroup") ~= nil then
|
||||||
|
self:ActivateUIGroups()
|
||||||
|
-- MainMenu는 한동안 비활성화: 시작 시 바로 로비로 진입.
|
||||||
|
-- 추후 싱글/멀티/종료 선택 메뉴가 필요하면 self:ShowMainMenu()로 되돌린다(메서드·UI 유지됨).
|
||||||
|
self:ShowLobby()
|
||||||
|
_TimerService:ClearTimer(uiInit)
|
||||||
|
elseif uiTries > 80 then
|
||||||
|
_TimerService:ClearTimer(uiInit)
|
||||||
|
end
|
||||||
|
end, 0.1)
|
||||||
local lp = _UserService.LocalPlayer
|
local lp = _UserService.LocalPlayer
|
||||||
if lp ~= nil then
|
if lp ~= nil then
|
||||||
self:ReqLoadAscension(lp.PlayerComponent.UserId)
|
self:ReqLoadAscension(lp.PlayerComponent.UserId)
|
||||||
@@ -18,12 +31,38 @@ if lp ~= nil then
|
|||||||
end
|
end
|
||||||
_InputService:ConnectEvent(KeyDownEvent, function(e)
|
_InputService:ConnectEvent(KeyDownEvent, function(e)
|
||||||
if e.key == KeyboardKey.LeftControl then
|
if e.key == KeyboardKey.LeftControl then
|
||||||
|
self.DebugCtrlDown = true
|
||||||
local lp2 = _UserService.LocalPlayer
|
local lp2 = _UserService.LocalPlayer
|
||||||
if lp2 ~= nil and lp2.CurrentMapName == "${LOBBY_MAP}" and self.RunActive ~= true then
|
if lp2 ~= nil and lp2.CurrentMapName == "${LOBBY_MAP}" and self.RunActive ~= true then
|
||||||
self:PlayerAttackMotion()
|
self:PlayerAttackMotion()
|
||||||
end
|
end
|
||||||
|
elseif e.key == KeyboardKey.LeftShift or e.key == KeyboardKey.RightShift then
|
||||||
|
self.DebugShiftDown = true
|
||||||
|
elseif e.key == KeyboardKey.C then
|
||||||
|
if self.DebugCtrlDown == true and self.DebugShiftDown == true then
|
||||||
|
self:OpenDebugCardPicker()
|
||||||
|
end
|
||||||
|
elseif e.key == KeyboardKey.E then
|
||||||
|
if self.DebugCtrlDown == true and self.DebugShiftDown == true then
|
||||||
|
self:CheatFillEnergy()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
_InputService:ConnectEvent(KeyUpEvent, function(e)
|
||||||
|
if e.key == KeyboardKey.LeftControl then
|
||||||
|
self.DebugCtrlDown = false
|
||||||
|
elseif e.key == KeyboardKey.LeftShift or e.key == KeyboardKey.RightShift then
|
||||||
|
self.DebugShiftDown = false
|
||||||
end
|
end
|
||||||
end)`),
|
end)`),
|
||||||
|
method('CheatFillEnergy', `if self.RunActive ~= true or self.CombatOver == true then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
self.PlayerHp = self.PlayerMaxHp
|
||||||
|
self.Energy = self.MaxEnergy
|
||||||
|
self:RenderCombat()
|
||||||
|
self:RenderPiles()
|
||||||
|
self:Toast("치트: 체력·에너지 회복")`),
|
||||||
method('ReqLoadAscension', `local ds = _DataStorageService:GetUserDataStorage(userId)
|
method('ReqLoadAscension', `local ds = _DataStorageService:GetUserDataStorage(userId)
|
||||||
local errCode, value = ds:GetAndWait("ascensionUnlocked")
|
local errCode, value = ds:GetAndWait("ascensionUnlocked")
|
||||||
local n = 0
|
local n = 0
|
||||||
@@ -50,7 +89,7 @@ if v > self.AscensionUnlocked then v = self.AscensionUnlocked end
|
|||||||
self.AscensionLevel = v
|
self.AscensionLevel = v
|
||||||
self:RenderAscension()`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'delta' }]),
|
self:RenderAscension()`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'delta' }]),
|
||||||
method('RenderAscension', `self:SetText("/ui/DefaultGroup/MainMenu/AscLabel", "승천 " .. string.format("%d", self.AscensionLevel) .. " / 해금 " .. string.format("%d", self.AscensionUnlocked))
|
method('RenderAscension', `self:SetText("/ui/DefaultGroup/MainMenu/AscLabel", "승천 " .. string.format("%d", self.AscensionLevel) .. " / 해금 " .. string.format("%d", self.AscensionUnlocked))
|
||||||
self:SetText("/ui/DefaultGroup/LobbyHud/AscLabel", "승천 " .. string.format("%d", self.AscensionLevel) .. " / 해금 " .. string.format("%d", self.AscensionUnlocked))`),
|
self:SetText("/ui/LobbyUIGroup/LobbyHud/AscLabel", "승천 " .. string.format("%d", self.AscensionLevel) .. " / 해금 " .. string.format("%d", self.AscensionUnlocked))`),
|
||||||
method('AscHpMult', `local m = 1
|
method('AscHpMult', `local m = 1
|
||||||
if self.AscensionLevel >= 1 then m = m + 0.1 end
|
if self.AscensionLevel >= 1 then m = m + 0.1 end
|
||||||
if self.AscensionLevel >= 6 then m = m + 0.1 end
|
if self.AscensionLevel >= 6 then m = m + 0.1 end
|
||||||
|
|||||||
@@ -10,53 +10,63 @@ self:RenderCharacterSelect()`),
|
|||||||
self:RenderCharacterSelect()`, [
|
self:RenderCharacterSelect()`, [
|
||||||
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'className' },
|
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'className' },
|
||||||
]),
|
]),
|
||||||
method('RenderCharacterSelect', `local warriorArt = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/WarriorButton/Art")
|
method('RenderCharacterSelect', `local base = "/ui/SelectUIGroup/CharacterSelectHud"
|
||||||
if warriorArt ~= nil and warriorArt.SpriteGUIRendererComponent ~= nil and self.ClassPortraits ~= nil and self.ClassPortraits["warrior"] ~= nil then
|
local arts = { { p = "/WarriorButton/Art", c = "warrior" }, { p = "/MageButton/Art", c = "magician" }, { p = "/BanditButton/Art", c = "bandit" } }
|
||||||
warriorArt.SpriteGUIRendererComponent.ImageRUID = self.ClassPortraits["warrior"]
|
for i = 1, #arts do
|
||||||
end
|
local e = _EntityService:GetEntityByPath(base .. arts[i].p)
|
||||||
local mageArt = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/MageButton/Art")
|
if e ~= nil and e.SpriteGUIRendererComponent ~= nil and self.ClassPortraits ~= nil and self.ClassPortraits[arts[i].c] ~= nil then
|
||||||
if mageArt ~= nil and mageArt.SpriteGUIRendererComponent ~= nil and self.ClassPortraits ~= nil and self.ClassPortraits["magician"] ~= nil then
|
e.SpriteGUIRendererComponent.ImageRUID = self.ClassPortraits[arts[i].c]
|
||||||
mageArt.SpriteGUIRendererComponent.ImageRUID = self.ClassPortraits["magician"]
|
|
||||||
end
|
|
||||||
local thiefArt = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/ThiefButton/Art")
|
|
||||||
if thiefArt ~= nil and thiefArt.SpriteGUIRendererComponent ~= nil and self.ClassPortraits ~= nil and self.ClassPortraits["bandit"] ~= nil then
|
|
||||||
thiefArt.SpriteGUIRendererComponent.ImageRUID = self.ClassPortraits["bandit"]
|
|
||||||
end
|
|
||||||
local warrior = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/WarriorButton")
|
|
||||||
if warrior ~= nil and warrior.SpriteGUIRendererComponent ~= nil then
|
|
||||||
if self.SelectedClass == "warrior" then
|
|
||||||
warrior.SpriteGUIRendererComponent.Color = Color(1, 0.82, 0.3, 1)
|
|
||||||
else
|
|
||||||
warrior.SpriteGUIRendererComponent.Color = Color(0.16, 0.2, 0.26, 1)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local mage = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/MageButton")
|
local btns = { { p = "/WarriorButton", c = "warrior" }, { p = "/MageButton", c = "magician" }, { p = "/BanditButton", c = "bandit" } }
|
||||||
if mage ~= nil and mage.SpriteGUIRendererComponent ~= nil then
|
for i = 1, #btns do
|
||||||
if self.SelectedClass == "magician" then
|
local e = _EntityService:GetEntityByPath(base .. btns[i].p)
|
||||||
mage.SpriteGUIRendererComponent.Color = Color(1, 0.82, 0.3, 1)
|
if e ~= nil then
|
||||||
else
|
if e.MaskComponent == nil then
|
||||||
mage.SpriteGUIRendererComponent.Color = Color(0.16, 0.2, 0.26, 1)
|
e:AddComponent("MaskComponent")
|
||||||
end
|
end
|
||||||
end
|
if e.SpriteGUIRendererComponent ~= nil then
|
||||||
local thief = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/ThiefButton")
|
if self.SelectedClass == btns[i].c then
|
||||||
if thief ~= nil and thief.SpriteGUIRendererComponent ~= nil then
|
e.SpriteGUIRendererComponent.Color = Color(1, 1, 1, 1)
|
||||||
if self.SelectedClass == "bandit" then
|
else
|
||||||
thief.SpriteGUIRendererComponent.Color = Color(1, 0.82, 0.3, 1)
|
e.SpriteGUIRendererComponent.Color = Color(0.45, 0.5, 0.58, 1)
|
||||||
else
|
end
|
||||||
thief.SpriteGUIRendererComponent.Color = Color(0.16, 0.2, 0.26, 1)
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
local nl = string.char(10)
|
||||||
|
local name = ""
|
||||||
|
local eng = ""
|
||||||
|
local desc = "직업을 선택하고 시작하세요"
|
||||||
|
local btnName = ""
|
||||||
if self.SelectedClass == "warrior" then
|
if self.SelectedClass == "warrior" then
|
||||||
self:SetText("/ui/DefaultGroup/CharacterSelectHud/Status", "전사 선택됨")
|
name = "전사"
|
||||||
|
eng = "Warrior"
|
||||||
|
btnName = "/WarriorButton"
|
||||||
|
desc = "직업군 · 모험가" .. nl .. "방어를 쌓고 버티다 강하게 역공하는 단단한 탱커."
|
||||||
elseif self.SelectedClass == "bandit" then
|
elseif self.SelectedClass == "bandit" then
|
||||||
self:SetText("/ui/DefaultGroup/CharacterSelectHud/Status", "도적 선택됨")
|
name = "도적"
|
||||||
|
eng = "Thief"
|
||||||
|
btnName = "/BanditButton"
|
||||||
|
desc = "직업군 · 모험가" .. nl .. "표창 난사와 독으로 빠르게 몰아치는 민첩한 직업."
|
||||||
elseif self.SelectedClass == "magician" then
|
elseif self.SelectedClass == "magician" then
|
||||||
self:SetText("/ui/DefaultGroup/CharacterSelectHud/Status", "마법사 선택됨")
|
name = "법사"
|
||||||
else
|
eng = "Magician"
|
||||||
self:SetText("/ui/DefaultGroup/CharacterSelectHud/Status", "직업을 선택하고 시작하세요")
|
btnName = "/MageButton"
|
||||||
end`),
|
desc = "직업군 · 모험가" .. nl .. "약하지만 게이지 운용으로 화력을 집중하는 원소 마법사."
|
||||||
|
end
|
||||||
|
if btnName ~= "" then
|
||||||
|
local art = _EntityService:GetEntityByPath(base .. btnName .. "/Art")
|
||||||
|
local target = _EntityService:GetEntityByPath(base .. "/SelectedCharacterArt")
|
||||||
|
if art ~= nil and art.SpriteGUIRendererComponent ~= nil and target ~= nil and target.SpriteGUIRendererComponent ~= nil then
|
||||||
|
target.SpriteGUIRendererComponent.ImageRUID = art.SpriteGUIRendererComponent.ImageRUID
|
||||||
|
end
|
||||||
|
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 ~= "bandit" and self.SelectedClass ~= "magician" then
|
||||||
self:SetText("/ui/DefaultGroup/CharacterSelectHud/Status", "직업을 먼저 선택하세요")
|
self:SetText("/ui/SelectUIGroup/CharacterSelectHud/SelectedClassStatus", "직업을 먼저 선택하세요")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
self:StartRun()`),
|
self:StartRun()`),
|
||||||
@@ -66,5 +76,5 @@ if e ~= nil then
|
|||||||
end`, [
|
end`, [
|
||||||
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'path' },
|
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'path' },
|
||||||
{ Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'enabled' },
|
{ Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'enabled' },
|
||||||
]),
|
], 2),
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -3,10 +3,26 @@ 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';
|
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 combatMethods = [
|
export const combatMethods = [
|
||||||
|
method('CanPlayCardNow', `if c == nil then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
if c.playableWhenDrawPileEmpty == true and self.DrawPile ~= nil and #self.DrawPile > 0 then
|
||||||
|
self:Toast("뽑을 카드 더미가 비어 있을 때만 사용할 수 있습니다.")
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
return true`, [{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'c' }], 0, 'boolean'),
|
||||||
method('PlayCard', `if self:IsDiscardSelecting() == true then
|
method('PlayCard', `if self:IsDiscardSelecting() == true then
|
||||||
self:SelectDiscardSlot(slot)
|
self:SelectDiscardSlot(slot)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
if self:IsRetainSelecting() == true then
|
||||||
|
self:SelectRetainSlot(slot)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if self:IsReserveSelecting() == true then
|
||||||
|
self:SelectReserveSlot(slot)
|
||||||
|
return
|
||||||
|
end
|
||||||
if self.CombatOver == true or self.FxBusy == true or self.TurnBusy == true then
|
if self.CombatOver == true or self.FxBusy == true or self.TurnBusy == true then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@@ -25,12 +41,77 @@ if c.unplayable == true then
|
|||||||
self:Toast("사용할 수 없는 카드입니다")
|
self:Toast("사용할 수 없는 카드입니다")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if self.Energy < c.cost then
|
if self:CanPlayCardNow(c) ~= true then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local cost = c.cost or 0
|
||||||
|
local skillFree = false
|
||||||
|
local skillRepeat = 0
|
||||||
|
if self.HandCostZeroThisTurn == true then
|
||||||
|
cost = 0
|
||||||
|
elseif c.useAllEnergy == true then
|
||||||
|
cost = self.Energy
|
||||||
|
end
|
||||||
|
if c.kind == "Skill" and self.NextSkillCostZero == true then
|
||||||
|
cost = 0
|
||||||
|
skillFree = true
|
||||||
|
end
|
||||||
|
if c.kind == "Skill" and self.SkillCostReductionThisTurn ~= nil and self.SkillCostReductionThisTurn > 0 then
|
||||||
|
cost = math.max(0, cost - self.SkillCostReductionThisTurn)
|
||||||
|
end
|
||||||
|
if self.CombatCardCostReduction ~= nil and self.CombatCardCostReduction[cardId] ~= nil then
|
||||||
|
cost = math.max(0, cost - self.CombatCardCostReduction[cardId])
|
||||||
|
end
|
||||||
|
if c.kind == "Skill" and self.NextSkillRepeatCount ~= nil and self.NextSkillRepeatCount > 0 then
|
||||||
|
skillRepeat = self.NextSkillRepeatCount
|
||||||
|
end
|
||||||
|
if self.Energy < cost then
|
||||||
self:Toast("에너지가 부족합니다")
|
self:Toast("에너지가 부족합니다")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
self.Energy = self.Energy - c.cost
|
self.Energy = self.Energy - cost
|
||||||
self:ResolveCardEffects(cardId, c, false)
|
self.ActiveKillReward = c.rewardOnKill or 0
|
||||||
|
self:ResolveCardEffects(cardId, slot, c, false, cost)
|
||||||
|
local function applyCardPlayHooks()
|
||||||
|
if self:HasPowerField("cardPlayedBlock") == true then
|
||||||
|
self:AddCardBlock(self:AddPowerFieldTotal("cardPlayedBlock"))
|
||||||
|
end
|
||||||
|
if c.cardPlayedDamage ~= nil and c.cardPlayedDamage > 0 then
|
||||||
|
self:DealDirectDamageToTarget(c.cardPlayedDamage)
|
||||||
|
end
|
||||||
|
if c.cardPlayedRandomDamage ~= nil and c.cardPlayedRandomDamage > 0 then
|
||||||
|
self:DealDirectDamageToRandomMonster(c.cardPlayedRandomDamage)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
applyCardPlayHooks()
|
||||||
|
if skillRepeat > 0 then
|
||||||
|
local remaining = (self.NextSkillRepeatCount or 0) - skillRepeat
|
||||||
|
if remaining < 0 then
|
||||||
|
remaining = 0
|
||||||
|
end
|
||||||
|
self.NextSkillRepeatCount = remaining
|
||||||
|
for i = 1, skillRepeat do
|
||||||
|
self:ResolveCardEffects(cardId, slot, c, false, cost)
|
||||||
|
applyCardPlayHooks()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if c.kind == "Attack" then
|
||||||
|
self.TurnAttackCardsPlayed = (self.TurnAttackCardsPlayed or 0) + 1
|
||||||
|
end
|
||||||
|
if skillFree == true then
|
||||||
|
if c.nextSkillCostZero ~= true then
|
||||||
|
self.NextSkillCostZero = false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if self.ActiveKillReward ~= nil and self.ActiveKillReward <= 0 then
|
||||||
|
self.ActiveKillReward = 0
|
||||||
|
end
|
||||||
|
if c.combatCostReductionOnPlay ~= nil and c.combatCostReductionOnPlay > 0 then
|
||||||
|
if self.CombatCardCostReduction == nil then
|
||||||
|
self.CombatCardCostReduction = {}
|
||||||
|
end
|
||||||
|
self.CombatCardCostReduction[cardId] = (self.CombatCardCostReduction[cardId] or 0) + c.combatCostReductionOnPlay
|
||||||
|
end
|
||||||
table.remove(self.Hand, slot)
|
table.remove(self.Hand, slot)
|
||||||
if c.exhaust == true then
|
if c.exhaust == true then
|
||||||
if self.ExhaustPile == nil then self.ExhaustPile = {} end
|
if self.ExhaustPile == nil then self.ExhaustPile = {} end
|
||||||
@@ -44,12 +125,19 @@ self:RenderCombat()
|
|||||||
if self:BeginDiscardSelection(c) == true then
|
if self:BeginDiscardSelection(c) == true then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
if self:BeginReserveSelection(c) == true then
|
||||||
|
return
|
||||||
|
end
|
||||||
self:RenderHand(false)
|
self:RenderHand(false)
|
||||||
self:RenderPiles()
|
self:RenderPiles()
|
||||||
self:RenderCombat()
|
self:RenderCombat()
|
||||||
self:CheckCombatEnd()`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }]),
|
self:CheckCombatEnd()`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }]),
|
||||||
method('OnCardButton', `if self:IsDiscardSelecting() == true then
|
method('OnCardButton', `if self:IsDiscardSelecting() == true then
|
||||||
self:SelectDiscardSlot(slot)
|
self:SelectDiscardSlot(slot)
|
||||||
|
elseif self:IsRetainSelecting() == true then
|
||||||
|
self:SelectRetainSlot(slot)
|
||||||
|
elseif self:IsReserveSelecting() == true then
|
||||||
|
self:SelectReserveSlot(slot)
|
||||||
end`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }]),
|
end`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }]),
|
||||||
method('FindMonsterAtTouch', `local best = 0
|
method('FindMonsterAtTouch', `local best = 0
|
||||||
local bestDist = 200
|
local bestDist = 200
|
||||||
@@ -75,9 +163,8 @@ for i = 1, #self.Monsters do
|
|||||||
local m = self.Monsters[i]
|
local m = self.Monsters[i]
|
||||||
local active = false
|
local active = false
|
||||||
if m ~= nil and m.alive == true and i == shownTarget then active = true end
|
if m ~= nil and m.alive == true and i == shownTarget then active = true end
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/MonsterSlot" .. tostring(i) .. "/TargetFrame", active)
|
self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/MonsterStatus" .. tostring(i) .. "/TargetMarker", active and dragActive)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/MonsterSlot" .. tostring(i) .. "/TargetMarker", active and dragActive)
|
self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/MonsterStatus" .. tostring(i) .. "/TargetMarker/Label", active and dragActive)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/MonsterSlot" .. tostring(i) .. "/TargetMarker/Label", active and dragActive)
|
|
||||||
end`),
|
end`),
|
||||||
method('OnCardDragBegin', `if self.CombatOver == true or self.FxBusy == true or self.TurnBusy == true then
|
method('OnCardDragBegin', `if self.CombatOver == true or self.FxBusy == true or self.TurnBusy == true then
|
||||||
return
|
return
|
||||||
@@ -90,7 +177,7 @@ if self.CardHoverTweenId ~= nil and self.CardHoverTweenId ~= 0 then
|
|||||||
self.CardHoverTweenId = 0
|
self.CardHoverTweenId = 0
|
||||||
end
|
end
|
||||||
for i = 1, 10 do
|
for i = 1, 10 do
|
||||||
local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand/Card" .. tostring(i))
|
local e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. tostring(i))
|
||||||
if e ~= nil and e.UITransformComponent ~= nil then
|
if e ~= nil and e.UITransformComponent ~= nil then
|
||||||
e.UITransformComponent.UIScale = Vector3(1, 1, 1)
|
e.UITransformComponent.UIScale = Vector3(1, 1, 1)
|
||||||
e.UITransformComponent.anchoredPosition = Vector2(self:GetHandSlotX(i), 0)
|
e.UITransformComponent.anchoredPosition = Vector2(self:GetHandSlotX(i), 0)
|
||||||
@@ -102,7 +189,7 @@ self:RenderTargetFrames()`, [{ Type: 'number', DefaultValue: null, SyncDirection
|
|||||||
method('OnCardDrag', `if self.DragSlot ~= slot then
|
method('OnCardDrag', `if self.DragSlot ~= slot then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand/Card" .. tostring(slot))
|
local e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. tostring(slot))
|
||||||
if e ~= nil and e.UITransformComponent ~= nil then
|
if e ~= nil and e.UITransformComponent ~= nil then
|
||||||
local ui = _UILogic:ScreenToUIPosition(touchPoint)
|
local ui = _UILogic:ScreenToUIPosition(touchPoint)
|
||||||
e.UITransformComponent.anchoredPosition = Vector2(ui.x, ui.y + 360)
|
e.UITransformComponent.anchoredPosition = Vector2(ui.x, ui.y + 360)
|
||||||
@@ -124,7 +211,7 @@ end`, [
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
self.DragSlot = 0
|
self.DragSlot = 0
|
||||||
local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand/Card" .. tostring(slot))
|
local e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. tostring(slot))
|
||||||
if e ~= nil and e.UITransformComponent ~= nil then
|
if e ~= nil and e.UITransformComponent ~= nil then
|
||||||
e.UITransformComponent.anchoredPosition = Vector2(self:GetHandSlotX(slot), 0)
|
e.UITransformComponent.anchoredPosition = Vector2(self:GetHandSlotX(slot), 0)
|
||||||
e.UITransformComponent.UIScale = Vector3(1, 1, 1)
|
e.UITransformComponent.UIScale = Vector3(1, 1, 1)
|
||||||
@@ -137,6 +224,14 @@ self:ResolveCardDrop(slot, touchPoint)`, [
|
|||||||
self:SelectDiscardSlot(slot)
|
self:SelectDiscardSlot(slot)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
if self:IsRetainSelecting() == true then
|
||||||
|
self:SelectRetainSlot(slot)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if self:IsReserveSelecting() == true then
|
||||||
|
self:SelectReserveSlot(slot)
|
||||||
|
return
|
||||||
|
end
|
||||||
if self.CombatOver == true or self.FxBusy == true or self.TurnBusy == true then
|
if self.CombatOver == true or self.FxBusy == true or self.TurnBusy == true then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@@ -171,7 +266,7 @@ end`, [
|
|||||||
{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'touchPoint' },
|
{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'touchPoint' },
|
||||||
]),
|
]),
|
||||||
method('Toast', `log(message)`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'message' }]),
|
method('Toast', `log(message)`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'message' }]),
|
||||||
method('DealDamageToTarget', `local m = self.Monsters[self.TargetIndex]
|
method('DealDamageToTarget', `local m = self.Monsters[self.TargetIndex]
|
||||||
if m == nil or m.alive ~= true then
|
if m == nil or m.alive ~= true then
|
||||||
m = nil
|
m = nil
|
||||||
for i = 1, #self.Monsters do
|
for i = 1, #self.Monsters do
|
||||||
@@ -179,35 +274,152 @@ if m == nil or m.alive ~= true then
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if m == nil then
|
if m == nil then
|
||||||
return
|
return false
|
||||||
end
|
end
|
||||||
local dmg = amount
|
local dmg = amount
|
||||||
if m.vuln > 0 then
|
if m.vuln > 0 then
|
||||||
dmg = math.floor(dmg * 1.5)
|
dmg = math.floor(dmg * 1.5)
|
||||||
end
|
end
|
||||||
|
if m.weak > 0 and self.ActiveAttackDamageVsWeakMultiplier ~= nil and self.ActiveAttackDamageVsWeakMultiplier > 1 then
|
||||||
|
dmg = math.floor(dmg * self.ActiveAttackDamageVsWeakMultiplier)
|
||||||
|
end
|
||||||
if m.block > 0 and pierce ~= true then
|
if m.block > 0 and pierce ~= true then
|
||||||
local absorbed = math.min(m.block, dmg)
|
local absorbed = math.min(m.block, dmg)
|
||||||
m.block = m.block - absorbed
|
m.block = m.block - absorbed
|
||||||
dmg = dmg - absorbed
|
dmg = dmg - absorbed
|
||||||
end
|
end
|
||||||
m.hp = m.hp - dmg
|
m.hp = m.hp - dmg
|
||||||
|
if dmg > 0 then
|
||||||
|
local poison = self:AddPowerFieldTotal("attackPoison")
|
||||||
|
if poison ~= nil and poison > 0 then
|
||||||
|
self:ApplyPoisonToMonster(m, poison)
|
||||||
|
end
|
||||||
|
end
|
||||||
self:MonsterHitMotion(m.slot)
|
self:MonsterHitMotion(m.slot)
|
||||||
|
local killed = false
|
||||||
if m.hp <= 0 then
|
if m.hp <= 0 then
|
||||||
m.hp = 0
|
m.hp = 0
|
||||||
self:KillMonster(m.slot)
|
self:KillMonster(m.slot)
|
||||||
end`, [
|
killed = true
|
||||||
|
end
|
||||||
|
return killed`, [
|
||||||
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'amount' },
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'amount' },
|
||||||
{ Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'pierce' },
|
{ Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'pierce' },
|
||||||
|
], 0, 'boolean'),
|
||||||
|
method('DealDirectDamageToTarget', `local m = self.Monsters[self.TargetIndex]
|
||||||
|
if m == nil or m.alive ~= true then
|
||||||
|
m = nil
|
||||||
|
for i = 1, #self.Monsters do
|
||||||
|
if self.Monsters[i].alive == true then m = self.Monsters[i]; self.TargetIndex = i; break end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if m == nil then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
m.hp = m.hp - amount
|
||||||
|
self:ShowDmgPop(m.slot, amount)
|
||||||
|
self:MonsterHitMotion(m.slot)
|
||||||
|
local killed = false
|
||||||
|
if m.hp <= 0 then
|
||||||
|
m.hp = 0
|
||||||
|
self:KillMonster(m.slot)
|
||||||
|
killed = true
|
||||||
|
end
|
||||||
|
return killed`, [
|
||||||
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'amount' },
|
||||||
|
], 0, 'boolean'),
|
||||||
|
method('DealDirectDamageToRandomMonster', `local alive = {}
|
||||||
|
for i = 1, #self.Monsters do
|
||||||
|
local m = self.Monsters[i]
|
||||||
|
if m ~= nil and m.alive == true then
|
||||||
|
table.insert(alive, m)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if #alive <= 0 then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
local m = alive[math.random(1, #alive)]
|
||||||
|
if m == nil then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
m.hp = m.hp - amount
|
||||||
|
self:ShowDmgPop(m.slot, amount)
|
||||||
|
self:MonsterHitMotion(m.slot)
|
||||||
|
local killed = false
|
||||||
|
if m.hp <= 0 then
|
||||||
|
m.hp = 0
|
||||||
|
self:KillMonster(m.slot)
|
||||||
|
killed = true
|
||||||
|
end
|
||||||
|
return killed`, [
|
||||||
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'amount' },
|
||||||
|
], 0, 'boolean'),
|
||||||
|
method('ApplyPoisonToMonster', `if target == nil or target.alive ~= true or amount == nil or amount <= 0 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if target.artifact ~= nil and target.artifact > 0 then
|
||||||
|
target.artifact = target.artifact - 1
|
||||||
|
return
|
||||||
|
end
|
||||||
|
target.poison = (target.poison or 0) + amount
|
||||||
|
self.PoisonApplicationsThisCombat = (self.PoisonApplicationsThisCombat or 0) + 1
|
||||||
|
local burstEvery = self:AddPowerFieldTotal("poisonApplicationBurstEvery")
|
||||||
|
local burstDamage = self:AddPowerFieldTotal("poisonApplicationBurstDamage")
|
||||||
|
if burstEvery ~= nil and burstEvery > 0 and burstDamage ~= nil and burstDamage > 0 then
|
||||||
|
if (self.PoisonApplicationsThisCombat % burstEvery) == 0 then
|
||||||
|
self:DealDamageToAllMonsters(burstDamage)
|
||||||
|
end
|
||||||
|
end`, [
|
||||||
|
{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'target' },
|
||||||
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'amount' },
|
||||||
]),
|
]),
|
||||||
|
method('DealDamageToAllMonsters', `if self.Monsters == nil then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
local killCount = 0
|
||||||
|
for i = 1, #self.Monsters do
|
||||||
|
local m = self.Monsters[i]
|
||||||
|
if m ~= nil and m.alive == true then
|
||||||
|
local dmg = amount
|
||||||
|
if m.vuln > 0 then
|
||||||
|
dmg = math.floor(dmg * 1.5)
|
||||||
|
end
|
||||||
|
if m.block > 0 then
|
||||||
|
local absorbed = math.min(m.block, dmg)
|
||||||
|
m.block = m.block - absorbed
|
||||||
|
dmg = dmg - absorbed
|
||||||
|
end
|
||||||
|
m.hp = m.hp - dmg
|
||||||
|
if dmg > 0 then
|
||||||
|
self.DamageDealtThisTurn = (self.DamageDealtThisTurn or 0) + dmg
|
||||||
|
end
|
||||||
|
self:ShowDmgPop(i, dmg)
|
||||||
|
self:MonsterHitMotion(i)
|
||||||
|
if m.hp <= 0 then
|
||||||
|
m.hp = 0
|
||||||
|
self:KillMonster(m.slot)
|
||||||
|
killCount = killCount + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if killCount > 0 and self.ActiveKillReward ~= nil and self.ActiveKillReward > 0 then
|
||||||
|
self.BonusRewardScreens = (self.BonusRewardScreens or 0) + (killCount * self.ActiveKillReward)
|
||||||
|
end
|
||||||
|
self:RenderCombat()
|
||||||
|
self:CheckCombatEnd()
|
||||||
|
return killCount > 0`, [
|
||||||
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'amount' },
|
||||||
|
], 0, 'boolean'),
|
||||||
method('PlayAttackFx', `local m = self.Monsters[targetIndex]
|
method('PlayAttackFx', `local m = self.Monsters[targetIndex]
|
||||||
if m == nil or m.alive ~= true or m.entity == nil or not isvalid(m.entity) then
|
if m == nil or m.alive ~= true or m.entity == nil or not isvalid(m.entity) then
|
||||||
self:DealDamageToTarget(damage, pierce)
|
self:DealDamageToTarget(damage, pierce)
|
||||||
|
self.ActiveAttackDamageVsWeakMultiplier = 1
|
||||||
self:RenderCombat()
|
self:RenderCombat()
|
||||||
self:CheckCombatEnd()
|
self:CheckCombatEnd()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
self.FxBusy = true
|
self.FxBusy = true
|
||||||
local fx = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/SkillFx")
|
local fx = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/SkillFx")
|
||||||
if fx ~= nil then
|
if fx ~= nil then
|
||||||
if fx.SpriteGUIRendererComponent ~= nil and image ~= nil and image ~= "" then
|
if fx.SpriteGUIRendererComponent ~= nil and image ~= nil and image ~= "" then
|
||||||
fx.SpriteGUIRendererComponent.ImageRUID = image
|
fx.SpriteGUIRendererComponent.ImageRUID = image
|
||||||
@@ -227,7 +439,15 @@ _TimerService:SetTimerOnce(function()
|
|||||||
if mt ~= nil and mt.alive == true and mt.vuln > 0 then
|
if mt ~= nil and mt.alive == true and mt.vuln > 0 then
|
||||||
shown = math.floor(damage * 1.5)
|
shown = math.floor(damage * 1.5)
|
||||||
end
|
end
|
||||||
self:DealDamageToTarget(damage, pierce)
|
if mt ~= nil and mt.alive == true and mt.weak > 0 and self.ActiveAttackDamageVsWeakMultiplier ~= nil and self.ActiveAttackDamageVsWeakMultiplier > 1 then
|
||||||
|
shown = math.floor(shown * self.ActiveAttackDamageVsWeakMultiplier)
|
||||||
|
end
|
||||||
|
local killed = self:DealDamageToTarget(damage, pierce)
|
||||||
|
if killed == true and self.ActiveKillReward ~= nil and self.ActiveKillReward > 0 then
|
||||||
|
self.BonusRewardScreens = (self.BonusRewardScreens or 0) + self.ActiveKillReward
|
||||||
|
end
|
||||||
|
self.ActiveKillReward = 0
|
||||||
|
self.ActiveAttackDamageVsWeakMultiplier = 1
|
||||||
self:ShowDmgPop(targetIndex, shown)
|
self:ShowDmgPop(targetIndex, shown)
|
||||||
self:RenderCombat()
|
self:RenderCombat()
|
||||||
self:CheckCombatEnd()
|
self:CheckCombatEnd()
|
||||||
@@ -238,7 +458,7 @@ end, 0.35)`, [
|
|||||||
{ Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'pierce' },
|
{ Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'pierce' },
|
||||||
]),
|
]),
|
||||||
method('PlayAoeFx', `self.FxBusy = true
|
method('PlayAoeFx', `self.FxBusy = true
|
||||||
local fx = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/SkillFx")
|
local fx = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/SkillFx")
|
||||||
if fx ~= nil then
|
if fx ~= nil then
|
||||||
if fx.SpriteGUIRendererComponent ~= nil and image ~= nil and image ~= "" then
|
if fx.SpriteGUIRendererComponent ~= nil and image ~= nil and image ~= "" then
|
||||||
fx.SpriteGUIRendererComponent.ImageRUID = image
|
fx.SpriteGUIRendererComponent.ImageRUID = image
|
||||||
@@ -251,6 +471,7 @@ end
|
|||||||
_TimerService:SetTimerOnce(function()
|
_TimerService:SetTimerOnce(function()
|
||||||
if fx ~= nil then fx.Enable = false end
|
if fx ~= nil then fx.Enable = false end
|
||||||
self.FxBusy = false
|
self.FxBusy = false
|
||||||
|
local killCount = 0
|
||||||
for i = 1, #self.Monsters do
|
for i = 1, #self.Monsters do
|
||||||
local m = self.Monsters[i]
|
local m = self.Monsters[i]
|
||||||
if m ~= nil and m.alive == true then
|
if m ~= nil and m.alive == true then
|
||||||
@@ -258,20 +479,35 @@ _TimerService:SetTimerOnce(function()
|
|||||||
if m.vuln > 0 then
|
if m.vuln > 0 then
|
||||||
dmg = math.floor(dmg * 1.5)
|
dmg = math.floor(dmg * 1.5)
|
||||||
end
|
end
|
||||||
|
if m.weak > 0 and self.ActiveAttackDamageVsWeakMultiplier ~= nil and self.ActiveAttackDamageVsWeakMultiplier > 1 then
|
||||||
|
dmg = math.floor(dmg * self.ActiveAttackDamageVsWeakMultiplier)
|
||||||
|
end
|
||||||
if m.block > 0 then
|
if m.block > 0 then
|
||||||
local absorbed = math.min(m.block, dmg)
|
local absorbed = math.min(m.block, dmg)
|
||||||
m.block = m.block - absorbed
|
m.block = m.block - absorbed
|
||||||
dmg = dmg - absorbed
|
dmg = dmg - absorbed
|
||||||
end
|
end
|
||||||
m.hp = m.hp - dmg
|
m.hp = m.hp - dmg
|
||||||
|
if dmg > 0 then
|
||||||
|
local poison = self:AddPowerFieldTotal("attackPoison")
|
||||||
|
if poison ~= nil and poison > 0 then
|
||||||
|
self:ApplyPoisonToMonster(m, poison)
|
||||||
|
end
|
||||||
|
end
|
||||||
self:ShowDmgPop(i, dmg)
|
self:ShowDmgPop(i, dmg)
|
||||||
self:MonsterHitMotion(i)
|
self:MonsterHitMotion(i)
|
||||||
if m.hp <= 0 then
|
if m.hp <= 0 then
|
||||||
m.hp = 0
|
m.hp = 0
|
||||||
self:KillMonster(m.slot)
|
self:KillMonster(m.slot)
|
||||||
|
killCount = killCount + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if killCount > 0 and self.ActiveKillReward ~= nil and self.ActiveKillReward > 0 then
|
||||||
|
self.BonusRewardScreens = (self.BonusRewardScreens or 0) + (killCount * self.ActiveKillReward)
|
||||||
|
end
|
||||||
|
self.ActiveKillReward = 0
|
||||||
|
self.ActiveAttackDamageVsWeakMultiplier = 1
|
||||||
self:RenderCombat()
|
self:RenderCombat()
|
||||||
self:CheckCombatEnd()
|
self:CheckCombatEnd()
|
||||||
end, 0.35)`, [
|
end, 0.35)`, [
|
||||||
@@ -287,7 +523,7 @@ if m.entity ~= nil and isvalid(m.entity) then
|
|||||||
local ent = m.entity
|
local ent = m.entity
|
||||||
_TimerService:SetTimerOnce(function() if isvalid(ent) then ent:SetVisible(false) end end, 0.4)
|
_TimerService:SetTimerOnce(function() if isvalid(ent) then ent:SetVisible(false) end end, 0.4)
|
||||||
end
|
end
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/MonsterSlot" .. tostring(slot), false)
|
self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/MonsterStatus" .. tostring(slot), false)
|
||||||
for i = 1, #self.Monsters do
|
for i = 1, #self.Monsters do
|
||||||
if self.Monsters[i].alive == true then self.TargetIndex = i; break end
|
if self.Monsters[i].alive == true then self.TargetIndex = i; break end
|
||||||
end`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }]),
|
end`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }]),
|
||||||
@@ -297,6 +533,9 @@ if self.PlayerBlock > 0 then
|
|||||||
self.PlayerBlock = self.PlayerBlock - absorbed
|
self.PlayerBlock = self.PlayerBlock - absorbed
|
||||||
dmg = dmg - absorbed
|
dmg = dmg - absorbed
|
||||||
end
|
end
|
||||||
|
if dmg > 0 and self.PlayerIntangible ~= nil and self.PlayerIntangible > 0 and dmg > 1 then
|
||||||
|
dmg = 1
|
||||||
|
end
|
||||||
if dmg > 0 then
|
if dmg > 0 then
|
||||||
self.PlayerHp = self.PlayerHp - dmg
|
self.PlayerHp = self.PlayerHp - dmg
|
||||||
local reflect = self.PlayerThorns or 0
|
local reflect = self.PlayerThorns or 0
|
||||||
@@ -341,21 +580,28 @@ if idx == 0 or self.PlayerHp <= 0 then
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
local m = self.Monsters[idx]
|
local m = self.Monsters[idx]
|
||||||
local base = "/ui/DefaultGroup/CombatHud/MonsterSlot" .. tostring(idx)
|
local base = "/ui/RunUIGroup/CombatHud/MonsterStatus" .. tostring(idx)
|
||||||
self:SetEntityEnabled(base .. "/ActFrame", true)
|
self:SetEntityEnabled(base .. "/ActFrame", true)
|
||||||
_TimerService:SetTimerOnce(function()
|
_TimerService:SetTimerOnce(function()
|
||||||
if m.poison ~= nil and m.poison > 0 then
|
local poisonTicks = 1
|
||||||
m.hp = m.hp - m.poison
|
local bonusTicks = self:AddPowerFieldTotal("extraPoisonTicks")
|
||||||
self:ShowDmgPop(idx, m.poison)
|
if bonusTicks ~= nil and bonusTicks > 0 then
|
||||||
self:MonsterHitMotion(idx)
|
poisonTicks = poisonTicks + bonusTicks
|
||||||
m.poison = m.poison - 1
|
end
|
||||||
if m.hp <= 0 then
|
for pt = 1, poisonTicks do
|
||||||
m.hp = 0
|
if m.poison ~= nil and m.poison > 0 then
|
||||||
self:KillMonster(m.slot)
|
m.hp = m.hp - m.poison
|
||||||
self:RenderCombat()
|
self:ShowDmgPop(idx, m.poison)
|
||||||
self:SetEntityEnabled(base .. "/ActFrame", false)
|
self:MonsterHitMotion(idx)
|
||||||
_TimerService:SetTimerOnce(function() self:EnemyActStep(idx + 1) end, 0.15)
|
m.poison = m.poison - 1
|
||||||
return
|
if m.hp <= 0 then
|
||||||
|
m.hp = 0
|
||||||
|
self:KillMonster(m.slot)
|
||||||
|
self:RenderCombat()
|
||||||
|
self:SetEntityEnabled(base .. "/ActFrame", false)
|
||||||
|
_TimerService:SetTimerOnce(function() self:EnemyActStep(idx + 1) end, 0.15)
|
||||||
|
return
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
m.block = 0
|
m.block = 0
|
||||||
@@ -364,6 +610,10 @@ _TimerService:SetTimerOnce(function()
|
|||||||
if intent.kind == "Attack" then
|
if intent.kind == "Attack" then
|
||||||
self:MonsterLunge(idx)
|
self:MonsterLunge(idx)
|
||||||
local atk = intent.value + m.str
|
local atk = intent.value + m.str
|
||||||
|
if self.EnemyStrengthLossThisTurn ~= nil and self.EnemyStrengthLossThisTurn > 0 then
|
||||||
|
atk = atk - self.EnemyStrengthLossThisTurn
|
||||||
|
if atk < 0 then atk = 0 end
|
||||||
|
end
|
||||||
if m.weak > 0 then
|
if m.weak > 0 then
|
||||||
atk = math.floor(atk * 0.75)
|
atk = math.floor(atk * 0.75)
|
||||||
end
|
end
|
||||||
@@ -417,6 +667,18 @@ self.DiscardSelectRemaining = 0
|
|||||||
self.DiscardSelectTotal = 0
|
self.DiscardSelectTotal = 0
|
||||||
self.DiscardPostShiv = 0
|
self.DiscardPostShiv = 0
|
||||||
self.DiscardShivPerPick = 0
|
self.DiscardShivPerPick = 0
|
||||||
|
self.RetainSelectActive = false
|
||||||
|
self.TurnAttackCardsPlayed = 0
|
||||||
|
self.TurnDiscardedCards = 0
|
||||||
|
self.ReserveSelectActive = false
|
||||||
|
self.NextTurnBlock = 0
|
||||||
|
self.NextTurnDraw = 0
|
||||||
|
self.NextTurnKeepBlock = false
|
||||||
|
self.NextTurnAttackMultiplier = 1
|
||||||
|
self.TurnAttackMultiplier = 1
|
||||||
|
self.NextTurnSelectPrompt = ""
|
||||||
|
self.NextTurnSelectCopies = 0
|
||||||
|
self.NextTurnAddCards = {}
|
||||||
self:UpdateDiscardPrompt()
|
self:UpdateDiscardPrompt()
|
||||||
self:RenderHand(false)
|
self:RenderHand(false)
|
||||||
self:RenderPiles()`),
|
self:RenderPiles()`),
|
||||||
|
|||||||
@@ -10,56 +10,56 @@ for i = #list, 2, -1 do
|
|||||||
\tlocal j = math.random(1, i)
|
\tlocal j = math.random(1, i)
|
||||||
\tlist[i], list[j] = list[j], list[i]
|
\tlist[i], list[j] = list[j], list[i]
|
||||||
end`, [{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'list' }]),
|
end`, [{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'list' }]),
|
||||||
method('BindButtons', `local endTurn = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckHud/EndTurnButton")
|
method('BindButtons', `local endTurn = _EntityService:GetEntityByPath("/ui/RunUIGroup/DeckHud/EndTurnButton")
|
||||||
if endTurn ~= nil and endTurn.ButtonComponent ~= nil then
|
if endTurn ~= nil and (endTurn.ButtonComponent ~= nil or endTurn:AddComponent("ButtonComponent") ~= nil) then
|
||||||
if self.EndTurnHandler ~= nil then
|
if self.EndTurnHandler ~= nil then
|
||||||
endTurn:DisconnectEvent(ButtonClickEvent, self.EndTurnHandler)
|
endTurn:DisconnectEvent(ButtonClickEvent, self.EndTurnHandler)
|
||||||
self.EndTurnHandler = nil
|
self.EndTurnHandler = nil
|
||||||
end
|
end
|
||||||
self.EndTurnHandler = endTurn:ConnectEvent(ButtonClickEvent, function() self:EndPlayerTurn() end)
|
self.EndTurnHandler = endTurn:ConnectEvent(ButtonClickEvent, function() self:EndPlayerTurn() end)
|
||||||
end
|
end
|
||||||
local drawPile = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckHud/DrawPile")
|
local drawPile = _EntityService:GetEntityByPath("/ui/RunUIGroup/DeckHud/DrawPile")
|
||||||
if drawPile ~= nil and drawPile.ButtonComponent ~= nil then
|
if drawPile ~= nil and (drawPile.ButtonComponent ~= nil or drawPile:AddComponent("ButtonComponent") ~= nil) then
|
||||||
if self.DrawPileHandler ~= nil then
|
if self.DrawPileHandler ~= nil then
|
||||||
drawPile:DisconnectEvent(ButtonClickEvent, self.DrawPileHandler)
|
drawPile:DisconnectEvent(ButtonClickEvent, self.DrawPileHandler)
|
||||||
self.DrawPileHandler = nil
|
self.DrawPileHandler = nil
|
||||||
end
|
end
|
||||||
self.DrawPileHandler = drawPile:ConnectEvent(ButtonClickEvent, function() self:OpenDeckInspect("draw") end)
|
self.DrawPileHandler = drawPile:ConnectEvent(ButtonClickEvent, function() self:OpenDeckInspect("draw") end)
|
||||||
end
|
end
|
||||||
local discardPile = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckHud/DiscardPile")
|
local discardPile = _EntityService:GetEntityByPath("/ui/RunUIGroup/DeckHud/DiscardPile")
|
||||||
if discardPile ~= nil and discardPile.ButtonComponent ~= nil then
|
if discardPile ~= nil and (discardPile.ButtonComponent ~= nil or discardPile:AddComponent("ButtonComponent") ~= nil) then
|
||||||
if self.DiscardPileHandler ~= nil then
|
if self.DiscardPileHandler ~= nil then
|
||||||
discardPile:DisconnectEvent(ButtonClickEvent, self.DiscardPileHandler)
|
discardPile:DisconnectEvent(ButtonClickEvent, self.DiscardPileHandler)
|
||||||
self.DiscardPileHandler = nil
|
self.DiscardPileHandler = nil
|
||||||
end
|
end
|
||||||
self.DiscardPileHandler = discardPile:ConnectEvent(ButtonClickEvent, function() self:OpenDeckInspect("discard") end)
|
self.DiscardPileHandler = discardPile:ConnectEvent(ButtonClickEvent, function() self:OpenDeckInspect("discard") end)
|
||||||
end
|
end
|
||||||
local exhaustPile = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckHud/ExhaustPile")
|
local exhaustPile = _EntityService:GetEntityByPath("/ui/RunUIGroup/DeckHud/ExhaustPile")
|
||||||
if exhaustPile ~= nil and exhaustPile.ButtonComponent ~= nil then
|
if exhaustPile ~= nil and (exhaustPile.ButtonComponent ~= nil or exhaustPile:AddComponent("ButtonComponent") ~= nil) then
|
||||||
if self.ExhaustPileHandler ~= nil then
|
if self.ExhaustPileHandler ~= nil then
|
||||||
exhaustPile:DisconnectEvent(ButtonClickEvent, self.ExhaustPileHandler)
|
exhaustPile:DisconnectEvent(ButtonClickEvent, self.ExhaustPileHandler)
|
||||||
self.ExhaustPileHandler = nil
|
self.ExhaustPileHandler = nil
|
||||||
end
|
end
|
||||||
self.ExhaustPileHandler = exhaustPile:ConnectEvent(ButtonClickEvent, function() self:OpenDeckInspect("exhaust") end)
|
self.ExhaustPileHandler = exhaustPile:ConnectEvent(ButtonClickEvent, function() self:OpenDeckInspect("exhaust") end)
|
||||||
end
|
end
|
||||||
local inspectClose = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckInspectHud/Close")
|
local inspectClose = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckInspectHud/Close")
|
||||||
if inspectClose ~= nil and inspectClose.ButtonComponent ~= nil then
|
if inspectClose ~= nil and (inspectClose.ButtonComponent ~= nil or inspectClose:AddComponent("ButtonComponent") ~= nil) then
|
||||||
if self.DeckInspectCloseHandler ~= nil then
|
if self.DeckInspectCloseHandler ~= nil then
|
||||||
inspectClose:DisconnectEvent(ButtonClickEvent, self.DeckInspectCloseHandler)
|
inspectClose:DisconnectEvent(ButtonClickEvent, self.DeckInspectCloseHandler)
|
||||||
self.DeckInspectCloseHandler = nil
|
self.DeckInspectCloseHandler = nil
|
||||||
end
|
end
|
||||||
self.DeckInspectCloseHandler = inspectClose:ConnectEvent(ButtonClickEvent, function() self:CloseDeckInspect() end)
|
self.DeckInspectCloseHandler = inspectClose:ConnectEvent(ButtonClickEvent, function() self:CloseDeckInspect() end)
|
||||||
end
|
end
|
||||||
local allDeckButton = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/TopBar/AllDeckButton")
|
local allDeckButton = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/TopBar/AllDeckButton")
|
||||||
if allDeckButton ~= nil and allDeckButton.ButtonComponent ~= nil then
|
if allDeckButton ~= nil and (allDeckButton.ButtonComponent ~= nil or allDeckButton:AddComponent("ButtonComponent") ~= nil) then
|
||||||
if self.AllDeckHandler ~= nil then
|
if self.AllDeckHandler ~= nil then
|
||||||
allDeckButton:DisconnectEvent(ButtonClickEvent, self.AllDeckHandler)
|
allDeckButton:DisconnectEvent(ButtonClickEvent, self.AllDeckHandler)
|
||||||
self.AllDeckHandler = nil
|
self.AllDeckHandler = nil
|
||||||
end
|
end
|
||||||
self.AllDeckHandler = allDeckButton:ConnectEvent(ButtonClickEvent, function() self:OpenAllDeck() end)
|
self.AllDeckHandler = allDeckButton:ConnectEvent(ButtonClickEvent, function() self:OpenAllDeck() end)
|
||||||
end
|
end
|
||||||
local allDeckClose = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud/Close")
|
local allDeckClose = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud/Close")
|
||||||
if allDeckClose ~= nil and allDeckClose.ButtonComponent ~= nil then
|
if allDeckClose ~= nil and (allDeckClose.ButtonComponent ~= nil or allDeckClose:AddComponent("ButtonComponent") ~= nil) then
|
||||||
if self.AllDeckCloseHandler ~= nil then
|
if self.AllDeckCloseHandler ~= nil then
|
||||||
allDeckClose:DisconnectEvent(ButtonClickEvent, self.AllDeckCloseHandler)
|
allDeckClose:DisconnectEvent(ButtonClickEvent, self.AllDeckCloseHandler)
|
||||||
self.AllDeckCloseHandler = nil
|
self.AllDeckCloseHandler = nil
|
||||||
@@ -67,10 +67,20 @@ if allDeckClose ~= nil and allDeckClose.ButtonComponent ~= nil then
|
|||||||
self.AllDeckCloseHandler = allDeckClose:ConnectEvent(ButtonClickEvent, function() self:CloseAllDeck() end)
|
self.AllDeckCloseHandler = allDeckClose:ConnectEvent(ButtonClickEvent, function() self:CloseAllDeck() end)
|
||||||
end
|
end
|
||||||
self:BindClassDeckTabs()
|
self:BindClassDeckTabs()
|
||||||
|
for i = 1, 120 do
|
||||||
|
local allCard = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud/Grid/Card" .. tostring(i))
|
||||||
|
if allCard ~= nil and (allCard.ButtonComponent ~= nil or allCard:AddComponent("ButtonComponent") ~= nil) then
|
||||||
|
if allCard.SpriteGUIRendererComponent ~= nil then
|
||||||
|
allCard.SpriteGUIRendererComponent.RaycastTarget = true
|
||||||
|
end
|
||||||
|
local slot = i
|
||||||
|
allCard:ConnectEvent(ButtonClickEvent, function() self:OnAllDeckCardButton(slot) end)
|
||||||
|
end
|
||||||
|
end
|
||||||
for i = 1, 10 do
|
for i = 1, 10 do
|
||||||
local cardEntity = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand/Card" .. tostring(i))
|
local cardEntity = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. tostring(i))
|
||||||
if cardEntity ~= nil and cardEntity.UITouchReceiveComponent ~= nil then
|
if cardEntity ~= nil and cardEntity.UITouchReceiveComponent ~= nil then
|
||||||
local cardPath = "/ui/DefaultGroup/CardHand/Card" .. tostring(i)
|
local cardPath = "/ui/RunUIGroup/CardHand/Card" .. tostring(i)
|
||||||
cardEntity:ConnectEvent(UITouchEnterEvent, function() self:SetCardHover(cardPath, true) end)
|
cardEntity:ConnectEvent(UITouchEnterEvent, function() self:SetCardHover(cardPath, true) end)
|
||||||
cardEntity:ConnectEvent(UITouchExitEvent, function() self:SetCardHover(cardPath, false) end)
|
cardEntity:ConnectEvent(UITouchExitEvent, function() self:SetCardHover(cardPath, false) end)
|
||||||
cardEntity:ConnectEvent(UITouchBeginDragEvent, function(ev) self:OnCardDragBegin(i) end)
|
cardEntity:ConnectEvent(UITouchBeginDragEvent, function(ev) self:OnCardDragBegin(i) end)
|
||||||
@@ -78,24 +88,24 @@ for i = 1, 10 do
|
|||||||
cardEntity:ConnectEvent(UITouchEndDragEvent, function(ev) self:OnCardDragEnd(i, ev.TouchPoint) end)
|
cardEntity:ConnectEvent(UITouchEndDragEvent, function(ev) self:OnCardDragEnd(i, ev.TouchPoint) end)
|
||||||
cardEntity:ConnectEvent(UITouchEnterEvent, function() self:HoverCard(i) end)
|
cardEntity:ConnectEvent(UITouchEnterEvent, function() self:HoverCard(i) end)
|
||||||
cardEntity:ConnectEvent(UITouchExitEvent, function() self:UnhoverCard(i) end)
|
cardEntity:ConnectEvent(UITouchExitEvent, function() self:UnhoverCard(i) end)
|
||||||
if cardEntity.ButtonComponent ~= nil then
|
if (cardEntity.ButtonComponent ~= nil or cardEntity:AddComponent("ButtonComponent") ~= nil) then
|
||||||
cardEntity:ConnectEvent(ButtonClickEvent, function() self:OnCardButton(i) end)
|
cardEntity:ConnectEvent(ButtonClickEvent, function() self:OnCardButton(i) end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
for i = 1, 3 do
|
for i = 1, 3 do
|
||||||
local rc = _EntityService:GetEntityByPath("/ui/DefaultGroup/RewardHud/Reward" .. tostring(i))
|
local rc = _EntityService:GetEntityByPath("/ui/RunUIGroup/RewardHud/Reward" .. tostring(i))
|
||||||
if rc ~= nil and rc.ButtonComponent ~= nil then
|
if rc ~= nil and (rc.ButtonComponent ~= nil or rc:AddComponent("ButtonComponent") ~= nil) then
|
||||||
rc:ConnectEvent(ButtonClickEvent, function() self:PickReward(i) end)
|
rc:ConnectEvent(ButtonClickEvent, function() self:PickReward(i) end)
|
||||||
if rc.UITouchReceiveComponent ~= nil then
|
if rc.UITouchReceiveComponent ~= nil then
|
||||||
local cardPath = "/ui/DefaultGroup/RewardHud/Reward" .. tostring(i)
|
local cardPath = "/ui/RunUIGroup/RewardHud/Reward" .. tostring(i)
|
||||||
rc:ConnectEvent(UITouchEnterEvent, function() self:SetCardHover(cardPath, true) end)
|
rc:ConnectEvent(UITouchEnterEvent, function() self:SetCardHover(cardPath, true) end)
|
||||||
rc:ConnectEvent(UITouchExitEvent, function() self:SetCardHover(cardPath, false) end)
|
rc:ConnectEvent(UITouchExitEvent, function() self:SetCardHover(cardPath, false) end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local skip = _EntityService:GetEntityByPath("/ui/DefaultGroup/RewardHud/Skip")
|
local skip = _EntityService:GetEntityByPath("/ui/RunUIGroup/RewardHud/Skip")
|
||||||
if skip ~= nil and skip.ButtonComponent ~= nil then
|
if skip ~= nil and (skip.ButtonComponent ~= nil or skip:AddComponent("ButtonComponent") ~= nil) then
|
||||||
skip:ConnectEvent(ButtonClickEvent, function() self:PickReward(0) end)
|
skip:ConnectEvent(ButtonClickEvent, function() self:PickReward(0) end)
|
||||||
end
|
end
|
||||||
local mapNodeIds = {}
|
local mapNodeIds = {}
|
||||||
@@ -107,42 +117,42 @@ end
|
|||||||
table.insert(mapNodeIds, "boss")
|
table.insert(mapNodeIds, "boss")
|
||||||
for i = 1, #mapNodeIds do
|
for i = 1, #mapNodeIds do
|
||||||
local nid = mapNodeIds[i]
|
local nid = mapNodeIds[i]
|
||||||
local mn = _EntityService:GetEntityByPath("/ui/DefaultGroup/MapHud/Node_" .. nid)
|
local mn = _EntityService:GetEntityByPath("/ui/RunUIGroup/MapHud/Node_" .. nid)
|
||||||
if mn ~= nil and mn.ButtonComponent ~= nil then
|
if mn ~= nil and (mn.ButtonComponent ~= nil or mn:AddComponent("ButtonComponent") ~= nil) then
|
||||||
mn:ConnectEvent(ButtonClickEvent, function() self:PickNode(nid) end)
|
mn:ConnectEvent(ButtonClickEvent, function() self:PickNode(nid) end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
for i = 1, 3 do
|
for i = 1, 3 do
|
||||||
local sc = _EntityService:GetEntityByPath("/ui/DefaultGroup/ShopHud/Card" .. tostring(i))
|
local sc = _EntityService:GetEntityByPath("/ui/RunUIGroup/ShopHud/Card" .. tostring(i))
|
||||||
if sc ~= nil and sc.ButtonComponent ~= nil then
|
if sc ~= nil and (sc.ButtonComponent ~= nil or sc:AddComponent("ButtonComponent") ~= nil) then
|
||||||
sc:ConnectEvent(ButtonClickEvent, function() self:BuyCard(i) end)
|
sc:ConnectEvent(ButtonClickEvent, function() self:BuyCard(i) end)
|
||||||
if sc.UITouchReceiveComponent ~= nil then
|
if sc.UITouchReceiveComponent ~= nil then
|
||||||
local cardPath = "/ui/DefaultGroup/ShopHud/Card" .. tostring(i)
|
local cardPath = "/ui/RunUIGroup/ShopHud/Card" .. tostring(i)
|
||||||
sc:ConnectEvent(UITouchEnterEvent, function() self:SetCardHover(cardPath, true) end)
|
sc:ConnectEvent(UITouchEnterEvent, function() self:SetCardHover(cardPath, true) end)
|
||||||
sc:ConnectEvent(UITouchExitEvent, function() self:SetCardHover(cardPath, false) end)
|
sc:ConnectEvent(UITouchExitEvent, function() self:SetCardHover(cardPath, false) end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local shopLeave = _EntityService:GetEntityByPath("/ui/DefaultGroup/ShopHud/Leave")
|
local shopLeave = _EntityService:GetEntityByPath("/ui/RunUIGroup/ShopHud/Leave")
|
||||||
if shopLeave ~= nil and shopLeave.ButtonComponent ~= nil then
|
if shopLeave ~= nil and (shopLeave.ButtonComponent ~= nil or shopLeave:AddComponent("ButtonComponent") ~= nil) then
|
||||||
shopLeave:ConnectEvent(ButtonClickEvent, function() self:LeaveNode() end)
|
shopLeave:ConnectEvent(ButtonClickEvent, function() self:LeaveNode() end)
|
||||||
end
|
end
|
||||||
local shopRelic = _EntityService:GetEntityByPath("/ui/DefaultGroup/ShopHud/Relic")
|
local shopRelic = _EntityService:GetEntityByPath("/ui/RunUIGroup/ShopHud/Relic")
|
||||||
if shopRelic ~= nil and shopRelic.ButtonComponent ~= nil then
|
if shopRelic ~= nil and (shopRelic.ButtonComponent ~= nil or shopRelic:AddComponent("ButtonComponent") ~= nil) then
|
||||||
shopRelic:ConnectEvent(ButtonClickEvent, function() self:BuyRelic() end)
|
shopRelic:ConnectEvent(ButtonClickEvent, function() self:BuyRelic() end)
|
||||||
end
|
end
|
||||||
local restLeave = _EntityService:GetEntityByPath("/ui/DefaultGroup/RestHud/Leave")
|
local restLeave = _EntityService:GetEntityByPath("/ui/RunUIGroup/RestHud/Leave")
|
||||||
if restLeave ~= nil and restLeave.ButtonComponent ~= nil then
|
if restLeave ~= nil and (restLeave.ButtonComponent ~= nil or restLeave:AddComponent("ButtonComponent") ~= nil) then
|
||||||
restLeave:ConnectEvent(ButtonClickEvent, function() self:LeaveNode() end)
|
restLeave:ConnectEvent(ButtonClickEvent, function() self:LeaveNode() end)
|
||||||
end
|
end
|
||||||
for i = 1, ${MAX_MONSTERS} do
|
for i = 1, ${MAX_MONSTERS} do
|
||||||
local ms = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/MonsterSlot" .. tostring(i))
|
local ms = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/MonsterStatus" .. tostring(i))
|
||||||
if ms ~= nil and ms.ButtonComponent ~= nil then
|
if ms ~= nil and (ms.ButtonComponent ~= nil or ms:AddComponent("ButtonComponent") ~= nil) then
|
||||||
ms:ConnectEvent(ButtonClickEvent, function() self:SetTarget(i) end)
|
ms:ConnectEvent(ButtonClickEvent, function() self:SetTarget(i) end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
for i = 1, 10 do
|
for i = 1, 10 do
|
||||||
local rs = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/TopBar/RelicSlot" .. tostring(i))
|
local rs = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/TopBar/RelicSlot" .. tostring(i))
|
||||||
if rs ~= nil and rs.UITouchReceiveComponent ~= nil then
|
if rs ~= nil and rs.UITouchReceiveComponent ~= nil then
|
||||||
local idx = i
|
local idx = i
|
||||||
rs:ConnectEvent(UITouchEnterEvent, function()
|
rs:ConnectEvent(UITouchEnterEvent, function()
|
||||||
@@ -156,7 +166,7 @@ for i = 1, 10 do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
for i = 1, 5 do
|
for i = 1, 5 do
|
||||||
local ps = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/TopBar/PotionSlot" .. tostring(i))
|
local ps = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/TopBar/PotionSlot" .. tostring(i))
|
||||||
if ps ~= nil and ps.UITouchReceiveComponent ~= nil then
|
if ps ~= nil and ps.UITouchReceiveComponent ~= nil then
|
||||||
local idx = i
|
local idx = i
|
||||||
ps:ConnectEvent(UITouchEnterEvent, function()
|
ps:ConnectEvent(UITouchEnterEvent, function()
|
||||||
@@ -170,42 +180,42 @@ for i = 1, 5 do
|
|||||||
ps:ConnectEvent(UITouchDownEvent, function() self:OpenPotionMenu(idx) end)
|
ps:ConnectEvent(UITouchDownEvent, function() self:OpenPotionMenu(idx) end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local pmUse = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/PotionMenu/Use")
|
local pmUse = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/PotionMenu/Use")
|
||||||
if pmUse ~= nil and pmUse.ButtonComponent ~= nil then
|
if pmUse ~= nil and (pmUse.ButtonComponent ~= nil or pmUse:AddComponent("ButtonComponent") ~= nil) then
|
||||||
pmUse:ConnectEvent(ButtonClickEvent, function() self:UsePotion() end)
|
pmUse:ConnectEvent(ButtonClickEvent, function() self:UsePotion() end)
|
||||||
end
|
end
|
||||||
local pmToss = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/PotionMenu/Toss")
|
local pmToss = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/PotionMenu/Toss")
|
||||||
if pmToss ~= nil and pmToss.ButtonComponent ~= nil then
|
if pmToss ~= nil and (pmToss.ButtonComponent ~= nil or pmToss:AddComponent("ButtonComponent") ~= nil) then
|
||||||
pmToss:ConnectEvent(ButtonClickEvent, function() self:TossPotion() end)
|
pmToss:ConnectEvent(ButtonClickEvent, function() self:TossPotion() end)
|
||||||
end
|
end
|
||||||
local pmClose = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/PotionMenu/Close")
|
local pmClose = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/PotionMenu/Close")
|
||||||
if pmClose ~= nil and pmClose.ButtonComponent ~= nil then
|
if pmClose ~= nil and (pmClose.ButtonComponent ~= nil or pmClose:AddComponent("ButtonComponent") ~= nil) then
|
||||||
pmClose:ConnectEvent(ButtonClickEvent, function() self:ClosePotionMenu() end)
|
pmClose:ConnectEvent(ButtonClickEvent, function() self:ClosePotionMenu() end)
|
||||||
end
|
end
|
||||||
local shopPotion = _EntityService:GetEntityByPath("/ui/DefaultGroup/ShopHud/Potion")
|
local shopPotion = _EntityService:GetEntityByPath("/ui/RunUIGroup/ShopHud/Potion")
|
||||||
if shopPotion ~= nil and shopPotion.ButtonComponent ~= nil then
|
if shopPotion ~= nil and (shopPotion.ButtonComponent ~= nil or shopPotion:AddComponent("ButtonComponent") ~= nil) then
|
||||||
shopPotion:ConnectEvent(ButtonClickEvent, function() self:BuyPotion() end)
|
shopPotion:ConnectEvent(ButtonClickEvent, function() self:BuyPotion() end)
|
||||||
end
|
end
|
||||||
local chest = _EntityService:GetEntityByPath("/ui/DefaultGroup/TreasureHud/Chest")
|
local chest = _EntityService:GetEntityByPath("/ui/RunUIGroup/TreasureHud/Chest")
|
||||||
if chest ~= nil and chest.ButtonComponent ~= nil then
|
if chest ~= nil and (chest.ButtonComponent ~= nil or chest:AddComponent("ButtonComponent") ~= nil) then
|
||||||
chest:ConnectEvent(ButtonClickEvent, function() self:OpenChest() end)
|
chest:ConnectEvent(ButtonClickEvent, function() self:OpenChest() end)
|
||||||
end
|
end
|
||||||
local treasureLeave = _EntityService:GetEntityByPath("/ui/DefaultGroup/TreasureHud/Leave")
|
local treasureLeave = _EntityService:GetEntityByPath("/ui/RunUIGroup/TreasureHud/Leave")
|
||||||
if treasureLeave ~= nil and treasureLeave.ButtonComponent ~= nil then
|
if treasureLeave ~= nil and (treasureLeave.ButtonComponent ~= nil or treasureLeave:AddComponent("ButtonComponent") ~= nil) then
|
||||||
treasureLeave:ConnectEvent(ButtonClickEvent, function() self:LeaveNode() end)
|
treasureLeave:ConnectEvent(ButtonClickEvent, function() self:LeaveNode() end)
|
||||||
end
|
end
|
||||||
local jcRelic = _EntityService:GetEntityByPath("/ui/DefaultGroup/JobChoiceHud/RelicButton")
|
local jcRelic = _EntityService:GetEntityByPath("/ui/SelectUIGroup/JobChoiceHud/RelicButton")
|
||||||
if jcRelic ~= nil and jcRelic.ButtonComponent ~= nil then
|
if jcRelic ~= nil and (jcRelic.ButtonComponent ~= nil or jcRelic:AddComponent("ButtonComponent") ~= nil) then
|
||||||
jcRelic:ConnectEvent(ButtonClickEvent, function() self:PickJobReward("relic") end)
|
jcRelic:ConnectEvent(ButtonClickEvent, function() self:PickJobReward("relic") end)
|
||||||
end
|
end
|
||||||
local jcJob = _EntityService:GetEntityByPath("/ui/DefaultGroup/JobChoiceHud/JobButton")
|
local jcJob = _EntityService:GetEntityByPath("/ui/SelectUIGroup/JobChoiceHud/JobButton")
|
||||||
if jcJob ~= nil and jcJob.ButtonComponent ~= nil then
|
if jcJob ~= nil and (jcJob.ButtonComponent ~= nil or jcJob:AddComponent("ButtonComponent") ~= nil) then
|
||||||
jcJob:ConnectEvent(ButtonClickEvent, function() self:PickJobReward("job") end)
|
jcJob:ConnectEvent(ButtonClickEvent, function() self:PickJobReward("job") end)
|
||||||
end
|
end
|
||||||
for i = 1, 3 do
|
for i = 1, 3 do
|
||||||
local slotIdx = i
|
local slotIdx = i
|
||||||
local jb = _EntityService:GetEntityByPath("/ui/DefaultGroup/JobSelectHud/Job_slot" .. tostring(i))
|
local jb = _EntityService:GetEntityByPath("/ui/SelectUIGroup/JobSelectHud/Job_slot" .. tostring(i))
|
||||||
if jb ~= nil and jb.ButtonComponent ~= nil then
|
if jb ~= nil and (jb.ButtonComponent ~= nil or jb:AddComponent("ButtonComponent") ~= nil) then
|
||||||
jb:ConnectEvent(ButtonClickEvent, function()
|
jb:ConnectEvent(ButtonClickEvent, function()
|
||||||
if self.JobOpts ~= nil and self.JobOpts[slotIdx] ~= nil then
|
if self.JobOpts ~= nil and self.JobOpts[slotIdx] ~= nil then
|
||||||
self:SetJob(self.JobOpts[slotIdx].id)
|
self:SetJob(self.JobOpts[slotIdx].id)
|
||||||
@@ -214,13 +224,43 @@ for i = 1, 3 do
|
|||||||
end
|
end
|
||||||
end`),
|
end`),
|
||||||
method('StartPlayerTurn', `self.Turn = self.Turn + 1
|
method('StartPlayerTurn', `self.Turn = self.Turn + 1
|
||||||
|
self.RetainSelectActive = false
|
||||||
|
self.ReserveSelectActive = false
|
||||||
|
self.TurnAttackCardsPlayed = 0
|
||||||
|
self.TurnDiscardedCards = 0
|
||||||
|
self.TurnCardsPlayedThisTurn = 0
|
||||||
|
self.DamageDealtThisTurn = 0
|
||||||
|
self.NextTurnSelectCopies = 0
|
||||||
|
self.NextTurnSelectPrompt = ""
|
||||||
|
self.SkillCostReductionThisTurn = 0
|
||||||
|
self:UpdateDiscardPrompt()
|
||||||
self.Energy = self.MaxEnergy
|
self.Energy = self.MaxEnergy
|
||||||
|
self.BlockGainMultiplier = 1
|
||||||
self:ApplyRelics("turnStart")
|
self:ApplyRelics("turnStart")
|
||||||
self.PlayerBlock = 0
|
if self.NextTurnKeepBlock == true then
|
||||||
|
self.NextTurnKeepBlock = false
|
||||||
|
else
|
||||||
|
self.PlayerBlock = 0
|
||||||
|
end
|
||||||
if self.ClayBlockNext > 0 then
|
if self.ClayBlockNext > 0 then
|
||||||
self.PlayerBlock = self.PlayerBlock + self.ClayBlockNext
|
self.PlayerBlock = self.PlayerBlock + self.ClayBlockNext
|
||||||
self.ClayBlockNext = 0
|
self.ClayBlockNext = 0
|
||||||
end
|
end
|
||||||
|
self.TurnAttackMultiplier = self.NextTurnAttackMultiplier or 1
|
||||||
|
self.NextTurnAttackMultiplier = 1
|
||||||
|
self.CardsDrawnThisCombat = self.CardsDrawnThisCombat or 0
|
||||||
|
self.ShivFirstDamageBonusUsed = false
|
||||||
|
self.ActiveAttackDamageVsWeakMultiplier = 1
|
||||||
|
self.DrawDamageThisTurn = 0
|
||||||
|
self.DrawPoisonThisTurn = 0
|
||||||
|
self.ShivAoeThisCombat = false
|
||||||
|
self.SkillSlyOnPlayCards = self.SkillSlyOnPlayCards or {}
|
||||||
|
self.TurnSkillSlyCards = {}
|
||||||
|
self.EnemyStrengthLossThisTurn = 0
|
||||||
|
self.HandCostZeroThisTurn = false
|
||||||
|
self.DrawDisabledThisTurn = false
|
||||||
|
local powerTurnDraw = 0
|
||||||
|
local powerTurnDiscard = 0
|
||||||
if self.PlayerPowers ~= nil then
|
if self.PlayerPowers ~= nil then
|
||||||
for i = 1, #self.PlayerPowers do
|
for i = 1, #self.PlayerPowers do
|
||||||
local pc = self.Cards[self.PlayerPowers[i]]
|
local pc = self.Cards[self.PlayerPowers[i]]
|
||||||
@@ -231,16 +271,124 @@ if self.PlayerPowers ~= nil then
|
|||||||
self.Energy = self.Energy + pc.value
|
self.Energy = self.Energy + pc.value
|
||||||
elseif pc.powerEffect == "blockPerTurn" then
|
elseif pc.powerEffect == "blockPerTurn" then
|
||||||
self.PlayerBlock = self.PlayerBlock + pc.value
|
self.PlayerBlock = self.PlayerBlock + pc.value
|
||||||
|
elseif pc.powerEffect == "poisonPerTurn" then
|
||||||
|
if self.Monsters ~= nil then
|
||||||
|
for j = 1, #self.Monsters do
|
||||||
|
local tm = self.Monsters[j]
|
||||||
|
if tm ~= nil and tm.alive == true then
|
||||||
|
self:ApplyPoisonToMonster(tm, pc.value)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
elseif pc.powerEffect == "damagePerTurn" then
|
||||||
|
if self.Monsters ~= nil then
|
||||||
|
self:PlayAoeFx(pc.fx or pc.image, pc.value or 0)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if pc.turnStartShiv ~= nil then
|
if pc.turnStartShiv ~= nil then
|
||||||
self:AddCardsToHand("Shiv", pc.turnStartShiv)
|
self:AddCardsToHand("Shiv", pc.turnStartShiv)
|
||||||
end
|
end
|
||||||
|
if pc.turnStartDraw ~= nil then
|
||||||
|
powerTurnDraw = powerTurnDraw + pc.turnStartDraw
|
||||||
|
end
|
||||||
|
if pc.turnStartDiscard ~= nil then
|
||||||
|
powerTurnDiscard = powerTurnDiscard + pc.turnStartDiscard
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
self:DrawCards(5)
|
if self.NextTurnBlock ~= nil and self.NextTurnBlock > 0 then
|
||||||
|
self:AddCardBlock(self.NextTurnBlock)
|
||||||
|
self.NextTurnBlock = 0
|
||||||
|
end
|
||||||
|
if self.NextTurnAddCards ~= nil then
|
||||||
|
for i = 1, #self.NextTurnAddCards do
|
||||||
|
local entry = self.NextTurnAddCards[i]
|
||||||
|
if entry ~= nil and entry.cardId ~= nil and entry.amount ~= nil and entry.amount > 0 then
|
||||||
|
self:AddCardsToHand(entry.cardId, entry.amount)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self.NextTurnAddCards = {}
|
||||||
|
end
|
||||||
|
local drawN = 5 + (self.NextTurnDraw or 0) + powerTurnDraw
|
||||||
|
self.NextTurnDraw = 0
|
||||||
|
self:DrawCards(drawN)
|
||||||
self:RenderHand(true)
|
self:RenderHand(true)
|
||||||
|
self:RenderCombat()
|
||||||
|
if powerTurnDiscard > 0 then
|
||||||
|
self:BeginDiscardSelection({ discard = math.min(powerTurnDiscard, #self.Hand) })
|
||||||
|
return
|
||||||
|
end
|
||||||
self:RenderCombat()`),
|
self:RenderCombat()`),
|
||||||
|
method('PrepareCombatDrawPile', `if self.DrawPile == nil or self.Cards == nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local rest = {}
|
||||||
|
local innate = {}
|
||||||
|
for i = 1, #self.DrawPile do
|
||||||
|
local cardId = self.DrawPile[i]
|
||||||
|
local c = self.Cards[cardId]
|
||||||
|
if c ~= nil and c.innate == true then
|
||||||
|
table.insert(innate, cardId)
|
||||||
|
else
|
||||||
|
table.insert(rest, cardId)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self.DrawPile = {}
|
||||||
|
for i = 1, #rest do
|
||||||
|
table.insert(self.DrawPile, rest[i])
|
||||||
|
end
|
||||||
|
for i = 1, #innate do
|
||||||
|
table.insert(self.DrawPile, innate[i])
|
||||||
|
end`, []),
|
||||||
|
method('HasPowerEffect', `if self.PlayerPowers == nil then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
for i = 1, #self.PlayerPowers do
|
||||||
|
local pc = self.Cards[self.PlayerPowers[i]]
|
||||||
|
if pc ~= nil and pc.powerEffect == effect then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'effect' }], 0, 'boolean'),
|
||||||
|
method('HasPowerField', `if self.PlayerPowers == nil then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
for i = 1, #self.PlayerPowers do
|
||||||
|
local pc = self.Cards[self.PlayerPowers[i]]
|
||||||
|
if pc ~= nil and pc[field] ~= nil and pc[field] ~= 0 then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'field' }], 0, 'boolean'),
|
||||||
|
method('AddPowerFieldTotal', `local total = 0
|
||||||
|
if self.PlayerPowers == nil then
|
||||||
|
return total
|
||||||
|
end
|
||||||
|
for i = 1, #self.PlayerPowers do
|
||||||
|
local pc = self.Cards[self.PlayerPowers[i]]
|
||||||
|
if pc ~= nil and pc[field] ~= nil then
|
||||||
|
total = total + pc[field]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return total`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'field' }], 0, 'number'),
|
||||||
|
method('ShouldOfferRetain', `if self:HasPowerEffect("retainOne") ~= true then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
if self.Hand == nil or #self.Hand <= 0 then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
for i = 1, #self.Hand do
|
||||||
|
local c = self.Cards[self.Hand[i]]
|
||||||
|
if c ~= nil and c.retain ~= true then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false`, [], 0, 'boolean'),
|
||||||
|
method('BeginRetainSelection', `self.RetainSelectActive = true
|
||||||
|
self:UpdateDiscardPrompt()
|
||||||
|
self:Toast("보존할 카드를 선택하세요")
|
||||||
|
self:RenderHand(false)`, []),
|
||||||
method('EndPlayerTurn', `if self.CombatOver == true or self.FxBusy == true or self.TurnBusy == true then
|
method('EndPlayerTurn', `if self.CombatOver == true or self.FxBusy == true or self.TurnBusy == true then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@@ -248,6 +396,24 @@ if self:IsDiscardSelecting() == true then
|
|||||||
self:Toast("버릴 카드를 먼저 선택하세요")
|
self:Toast("버릴 카드를 먼저 선택하세요")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
if self:IsRetainSelecting() == true then
|
||||||
|
self:FinishPlayerTurn(0)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if self:IsReserveSelecting() == true then
|
||||||
|
self:Toast("예약할 카드를 먼저 선택하세요")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if self:ShouldOfferRetain() == true then
|
||||||
|
self:BeginRetainSelection()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
self:FinishPlayerTurn(0)`),
|
||||||
|
method('FinishPlayerTurn', `self.RetainSelectActive = false
|
||||||
|
self.ReserveSelectActive = false
|
||||||
|
self.NextTurnSelectCopies = 0
|
||||||
|
self.NextTurnSelectPrompt = ""
|
||||||
|
self:UpdateDiscardPrompt()
|
||||||
local burn = 0
|
local burn = 0
|
||||||
for bi = 1, #self.Hand do
|
for bi = 1, #self.Hand do
|
||||||
\tlocal hc = self.Cards[self.Hand[bi]]
|
\tlocal hc = self.Cards[self.Hand[bi]]
|
||||||
@@ -263,19 +429,38 @@ local kept = {}
|
|||||||
for i = 1, #self.Hand do
|
for i = 1, #self.Hand do
|
||||||
\tlocal cardId = self.Hand[i]
|
\tlocal cardId = self.Hand[i]
|
||||||
\tlocal c = self.Cards[cardId]
|
\tlocal c = self.Cards[cardId]
|
||||||
\tif c ~= nil and c.retain == true then
|
\tif c ~= nil and (c.retain == true or (c.class == "shiv" and self:HasPowerField("shivRetain") == true) or i == retainSlot) then
|
||||||
\t\ttable.insert(kept, cardId)
|
\t\ttable.insert(kept, cardId)
|
||||||
\telse
|
\telse
|
||||||
\t\ttable.insert(self.DiscardPile, cardId)
|
\t\ttable.insert(self.DiscardPile, cardId)
|
||||||
\tend
|
\tend
|
||||||
end
|
end
|
||||||
self.Hand = kept
|
self.Hand = kept
|
||||||
|
if self.PlayerPowers ~= nil then
|
||||||
|
for i = 1, #self.PlayerPowers do
|
||||||
|
local pc = self.Cards[self.PlayerPowers[i]]
|
||||||
|
if pc ~= nil and pc.endTurnDexLoss ~= nil and pc.endTurnDexLoss > 0 then
|
||||||
|
self.PlayerDex = self.PlayerDex - pc.endTurnDexLoss
|
||||||
|
if self.PlayerDex < 0 then self.PlayerDex = 0 end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if self.PlayerIntangible ~= nil and self.PlayerIntangible > 0 then
|
||||||
|
self.PlayerIntangible = self.PlayerIntangible - 1
|
||||||
|
if self.PlayerIntangible < 0 then self.PlayerIntangible = 0 end
|
||||||
|
end
|
||||||
if self.PlayerWeak > 0 then self.PlayerWeak = self.PlayerWeak - 1 end
|
if self.PlayerWeak > 0 then self.PlayerWeak = self.PlayerWeak - 1 end
|
||||||
if self.PlayerVuln > 0 then self.PlayerVuln = self.PlayerVuln - 1 end
|
if self.PlayerVuln > 0 then self.PlayerVuln = self.PlayerVuln - 1 end
|
||||||
self:RenderHand(false)
|
self:RenderHand(false)
|
||||||
self:RenderPiles()
|
self:RenderPiles()
|
||||||
self:EnemyTurn()`),
|
self.TurnSkillSlyCards = {}
|
||||||
method('DrawCards', `local drawnSlots = {}
|
self:EnemyTurn()`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'retainSlot' }]),
|
||||||
|
method('DrawCards', `local drawnSlots = {}
|
||||||
|
local drawnCards = {}
|
||||||
|
local drewAny = false
|
||||||
|
if self.DrawDisabledThisTurn == true then
|
||||||
|
\treturn drawnCards
|
||||||
|
end
|
||||||
for i = 1, amount do
|
for i = 1, amount do
|
||||||
\tif #self.DrawPile <= 0 then
|
\tif #self.DrawPile <= 0 then
|
||||||
\t\tself:RecycleDiscardIntoDraw()
|
\t\tself:RecycleDiscardIntoDraw()
|
||||||
@@ -284,28 +469,32 @@ for i = 1, amount do
|
|||||||
\t\tbreak
|
\t\tbreak
|
||||||
\tend
|
\tend
|
||||||
\tlocal cardId = table.remove(self.DrawPile)
|
\tlocal cardId = table.remove(self.DrawPile)
|
||||||
|
\ttable.insert(drawnCards, cardId)
|
||||||
|
\tself.CardsDrawnThisCombat = (self.CardsDrawnThisCombat or 0) + 1
|
||||||
\tif #self.Hand >= 10 then
|
\tif #self.Hand >= 10 then
|
||||||
\t\ttable.insert(self.DiscardPile, cardId)
|
\t\ttable.insert(self.DiscardPile, cardId)
|
||||||
\t\tself:TriggerSly(cardId)
|
\t\tself:TriggerSly(cardId)
|
||||||
\telse
|
\telse
|
||||||
\t\ttable.insert(self.Hand, cardId)
|
\t\ttable.insert(self.Hand, cardId)
|
||||||
\t\tif #self.Hand <= 5 then
|
\t\tdrewAny = true
|
||||||
\t\t\ttable.insert(drawnSlots, #self.Hand)
|
\t\ttable.insert(drawnSlots, #self.Hand)
|
||||||
\t\tend
|
|
||||||
\tend
|
\tend
|
||||||
end
|
end
|
||||||
self:RenderPiles()
|
self:RenderPiles()
|
||||||
if animate == true and #drawnSlots > 0 then
|
if drewAny == true then
|
||||||
\tself:RenderHand(false)
|
\tself:RenderHand(false)
|
||||||
|
end
|
||||||
|
if animate == true and #drawnSlots > 0 then
|
||||||
\tlocal drawStart = Vector2(-590, 8)
|
\tlocal drawStart = Vector2(-590, 8)
|
||||||
\tfor i = 1, #drawnSlots do
|
\tfor i = 1, #drawnSlots do
|
||||||
\t\tlocal slot = drawnSlots[i]
|
\t\tlocal slot = drawnSlots[i]
|
||||||
\t\tself:AnimateCardFrom(slot, drawStart, Vector2(self:GetHandSlotX(slot), 0), 0.08 + i * 0.045)
|
\t\tself:AnimateCardFrom(slot, drawStart, Vector2(self:GetHandSlotX(slot), 0), 0.08 + i * 0.045)
|
||||||
\tend
|
\tend
|
||||||
|
return drawnCards
|
||||||
end`, [
|
end`, [
|
||||||
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'amount' },
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'amount' },
|
||||||
{ Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'animate' },
|
{ Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'animate' },
|
||||||
]),
|
], 0, 'any'),
|
||||||
method('AddCardsToHand', `if self.Hand == nil then
|
method('AddCardsToHand', `if self.Hand == nil then
|
||||||
self.Hand = {}
|
self.Hand = {}
|
||||||
end
|
end
|
||||||
@@ -333,11 +522,11 @@ for i = 1, #self.DiscardPile do
|
|||||||
end
|
end
|
||||||
self.DiscardPile = {}
|
self.DiscardPile = {}
|
||||||
self:Shuffle(self.DrawPile)`),
|
self:Shuffle(self.DrawPile)`),
|
||||||
method('RenderPiles', `self:SetText("/ui/DefaultGroup/DeckHud/DrawPile/Count", self:FormatNumber(#self.DrawPile))
|
method('RenderPiles', `self:SetText("/ui/RunUIGroup/DeckHud/DrawPile/Count", self:FormatNumber(#self.DrawPile))
|
||||||
self:SetText("/ui/DefaultGroup/DeckHud/DiscardPile/Count", self:FormatNumber(#self.DiscardPile))
|
self:SetText("/ui/RunUIGroup/DeckHud/DiscardPile/Count", self:FormatNumber(#self.DiscardPile))
|
||||||
self:SetText("/ui/DefaultGroup/DeckHud/ExhaustPile/Count", self:FormatNumber(#(self.ExhaustPile or {})))
|
self:SetText("/ui/RunUIGroup/DeckHud/ExhaustPile/Count", self:FormatNumber(#(self.ExhaustPile or {})))
|
||||||
self:SetText("/ui/DefaultGroup/DeckHud/EnergyOrb/Value", string.format("%d", self.Energy) .. "/" .. string.format("%d", self.MaxEnergy))
|
self:SetText("/ui/RunUIGroup/DeckHud/EnergyOrb/Value", string.format("%d", self.Energy) .. "/" .. string.format("%d", self.MaxEnergy))
|
||||||
local inspect = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckInspectHud")
|
local inspect = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckInspectHud")
|
||||||
if inspect ~= nil and inspect.Enable == true and self.DeckInspectKind ~= "" then
|
if inspect ~= nil and inspect.Enable == true and self.DeckInspectKind ~= "" then
|
||||||
self:OpenDeckInspect(self.DeckInspectKind)
|
self:OpenDeckInspect(self.DeckInspectKind)
|
||||||
end`),
|
end`),
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ export const deckViewMethods = [
|
|||||||
method('OpenDeckInspect', `self.DeckInspectKind = kind
|
method('OpenDeckInspect', `self.DeckInspectKind = kind
|
||||||
if self.DeckAllOpen == true then
|
if self.DeckAllOpen == true then
|
||||||
self.DeckAllOpen = false
|
self.DeckAllOpen = false
|
||||||
local allHud = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud")
|
local allHud = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud")
|
||||||
if allHud ~= nil then
|
if allHud ~= nil then
|
||||||
allHud.Enable = false
|
allHud.Enable = false
|
||||||
end
|
end
|
||||||
@@ -24,12 +24,12 @@ else
|
|||||||
title = "뽑을 덱"
|
title = "뽑을 덱"
|
||||||
end
|
end
|
||||||
self:RenderDeckInspect(pile, title)
|
self:RenderDeckInspect(pile, title)
|
||||||
local hud = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckInspectHud")
|
local hud = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckInspectHud")
|
||||||
if hud ~= nil then
|
if hud ~= nil then
|
||||||
hud.Enable = true
|
hud.Enable = true
|
||||||
end`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'kind' }]),
|
end`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'kind' }]),
|
||||||
method('CloseDeckInspect', `self.DeckInspectKind = ""
|
method('CloseDeckInspect', `self.DeckInspectKind = ""
|
||||||
local hud = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckInspectHud")
|
local hud = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckInspectHud")
|
||||||
if hud ~= nil then
|
if hud ~= nil then
|
||||||
hud.Enable = false
|
hud.Enable = false
|
||||||
end`),
|
end`),
|
||||||
@@ -41,51 +41,46 @@ local suffix = " (" .. tostring(count) .. ")"
|
|||||||
if count > 60 then
|
if count > 60 then
|
||||||
suffix = suffix .. " - 60장까지 표시"
|
suffix = suffix .. " - 60장까지 표시"
|
||||||
end
|
end
|
||||||
self:SetText("/ui/DefaultGroup/DeckInspectHud/Title", title .. suffix)
|
self:SetText("/ui/DeckUIGroup/DeckInspectHud/Title", title .. suffix)
|
||||||
local empty = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckInspectHud/Empty")
|
self:SetEntityEnabled("/ui/DeckUIGroup/DeckInspectHud/Empty", count <= 0)
|
||||||
if empty ~= nil then
|
|
||||||
empty.Enable = count <= 0
|
|
||||||
end
|
|
||||||
for i = 1, 60 do
|
for i = 1, 60 do
|
||||||
local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckInspectHud/Grid/Card" .. tostring(i))
|
local path = "/ui/DeckUIGroup/DeckInspectHud/Grid/Card" .. tostring(i)
|
||||||
if e ~= nil then
|
local cardId = nil
|
||||||
local cardId = nil
|
if pile ~= nil then
|
||||||
if pile ~= nil then
|
cardId = pile[i]
|
||||||
cardId = pile[i]
|
end
|
||||||
end
|
if cardId == nil then
|
||||||
if cardId == nil then
|
self:SetEntityEnabled(path, false)
|
||||||
e.Enable = false
|
else
|
||||||
else
|
self:SetEntityEnabled(path, true)
|
||||||
e.Enable = true
|
self:ApplyInspectCardVisual(i, cardId)
|
||||||
self:ApplyInspectCardVisual(i, cardId)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end`, [
|
end`, [
|
||||||
{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'pile' },
|
{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'pile' },
|
||||||
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'title' },
|
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'title' },
|
||||||
]),
|
]),
|
||||||
method('ApplyInspectCardVisual', `self:ApplyCardFace("/ui/DefaultGroup/DeckInspectHud/Grid/Card" .. tostring(slot), cardId)`, [
|
method('ApplyInspectCardVisual', `self:ApplyCardFace("/ui/DeckUIGroup/DeckInspectHud/Grid/Card" .. tostring(slot), cardId)`, [
|
||||||
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' },
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' },
|
||||||
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'cardId' },
|
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'cardId' },
|
||||||
]),
|
]),
|
||||||
method('BindClassDeckTabs', `local warriorTab = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud/WarriorTab")
|
method('BindClassDeckTabs', `local warriorTab = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud/WarriorTab")
|
||||||
if warriorTab ~= nil and warriorTab.ButtonComponent ~= nil then
|
if warriorTab ~= nil and (warriorTab.ButtonComponent ~= nil or warriorTab:AddComponent("ButtonComponent") ~= nil) then
|
||||||
if self.WarriorDeckTabHandler ~= nil then
|
if self.WarriorDeckTabHandler ~= nil then
|
||||||
warriorTab:DisconnectEvent(ButtonClickEvent, self.WarriorDeckTabHandler)
|
warriorTab:DisconnectEvent(ButtonClickEvent, self.WarriorDeckTabHandler)
|
||||||
self.WarriorDeckTabHandler = nil
|
self.WarriorDeckTabHandler = nil
|
||||||
end
|
end
|
||||||
self.WarriorDeckTabHandler = warriorTab:ConnectEvent(ButtonClickEvent, function() self:SetClassDeckTab("warrior") end)
|
self.WarriorDeckTabHandler = warriorTab:ConnectEvent(ButtonClickEvent, function() self:SetClassDeckTab("warrior") end)
|
||||||
end
|
end
|
||||||
local thiefTab = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud/ThiefTab")
|
local thiefTab = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud/ThiefTab")
|
||||||
if thiefTab ~= nil and thiefTab.ButtonComponent ~= nil then
|
if thiefTab ~= nil and (thiefTab.ButtonComponent ~= nil or thiefTab:AddComponent("ButtonComponent") ~= nil) then
|
||||||
if self.ThiefDeckTabHandler ~= nil then
|
if self.ThiefDeckTabHandler ~= nil then
|
||||||
thiefTab:DisconnectEvent(ButtonClickEvent, self.ThiefDeckTabHandler)
|
thiefTab:DisconnectEvent(ButtonClickEvent, self.ThiefDeckTabHandler)
|
||||||
self.ThiefDeckTabHandler = nil
|
self.ThiefDeckTabHandler = nil
|
||||||
end
|
end
|
||||||
self.ThiefDeckTabHandler = thiefTab:ConnectEvent(ButtonClickEvent, function() self:SetClassDeckTab("bandit") end)
|
self.ThiefDeckTabHandler = thiefTab:ConnectEvent(ButtonClickEvent, function() self:SetClassDeckTab("bandit") end)
|
||||||
end
|
end
|
||||||
local mageTab = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud/MageTab")
|
local mageTab = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud/MageTab")
|
||||||
if mageTab ~= nil and mageTab.ButtonComponent ~= nil then
|
if mageTab ~= nil and (mageTab.ButtonComponent ~= nil or mageTab:AddComponent("ButtonComponent") ~= nil) then
|
||||||
if self.MageDeckTabHandler ~= nil then
|
if self.MageDeckTabHandler ~= nil then
|
||||||
mageTab:DisconnectEvent(ButtonClickEvent, self.MageDeckTabHandler)
|
mageTab:DisconnectEvent(ButtonClickEvent, self.MageDeckTabHandler)
|
||||||
self.MageDeckTabHandler = nil
|
self.MageDeckTabHandler = nil
|
||||||
@@ -94,12 +89,31 @@ if mageTab ~= nil and mageTab.ButtonComponent ~= nil then
|
|||||||
end`),
|
end`),
|
||||||
method('OpenClassDeck', `self.CodexMode = false
|
method('OpenClassDeck', `self.CodexMode = false
|
||||||
self.ClassDeckMode = true
|
self.ClassDeckMode = true
|
||||||
|
self.DebugCardPickerMode = false
|
||||||
self.DeckAllOpen = true
|
self.DeckAllOpen = true
|
||||||
self:SetClassDeckTab(className)
|
self:SetClassDeckTab(className)
|
||||||
local hud = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud")
|
local hud = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud")
|
||||||
if hud ~= nil then
|
if hud ~= nil then
|
||||||
hud.Enable = true
|
hud.Enable = true
|
||||||
end`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'className' }]),
|
end`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'className' }]),
|
||||||
|
method('OpenDebugCardPicker', `if self.RunActive ~= true or self.CombatOver == true or self.Hand == nil then
|
||||||
|
self:Toast("전투 중에만 테스트 카드를 추가할 수 있습니다")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local className = self.SelectedClass
|
||||||
|
if className ~= "warrior" and className ~= "magician" and className ~= "bandit" then
|
||||||
|
className = "bandit"
|
||||||
|
end
|
||||||
|
self.CodexMode = false
|
||||||
|
self.ClassDeckMode = true
|
||||||
|
self.DebugCardPickerMode = true
|
||||||
|
self.DeckAllOpen = true
|
||||||
|
self:SetClassDeckTab(className)
|
||||||
|
local hud = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud")
|
||||||
|
if hud ~= nil then
|
||||||
|
hud.Enable = true
|
||||||
|
end
|
||||||
|
self:Toast("테스트 카드 추가 모드")`),
|
||||||
method('SetClassDeckTab', `if self.ClassDeckMode ~= true then
|
method('SetClassDeckTab', `if self.ClassDeckMode ~= true then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@@ -147,39 +161,38 @@ end)
|
|||||||
self:RenderAllDeck()
|
self:RenderAllDeck()
|
||||||
self:RenderClassDeckTabs()`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'className' }]),
|
self:RenderClassDeckTabs()`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'className' }]),
|
||||||
method('RenderClassDeckTabs', `local tabs = {
|
method('RenderClassDeckTabs', `local tabs = {
|
||||||
{ path = "/ui/DefaultGroup/DeckAllHud/WarriorTab", cls = "warrior" },
|
{ path = "/ui/DeckUIGroup/DeckAllHud/WarriorTab", cls = "warrior" },
|
||||||
{ path = "/ui/DefaultGroup/DeckAllHud/ThiefTab", cls = "bandit" },
|
{ path = "/ui/DeckUIGroup/DeckAllHud/ThiefTab", cls = "bandit" },
|
||||||
{ path = "/ui/DefaultGroup/DeckAllHud/MageTab", cls = "magician" },
|
{ path = "/ui/DeckUIGroup/DeckAllHud/MageTab", cls = "magician" },
|
||||||
}
|
}
|
||||||
for i = 1, #tabs do
|
for i = 1, #tabs do
|
||||||
|
self:SetEntityEnabled(tabs[i].path, self.ClassDeckMode == true)
|
||||||
local e = _EntityService:GetEntityByPath(tabs[i].path)
|
local e = _EntityService:GetEntityByPath(tabs[i].path)
|
||||||
if e ~= nil then
|
if e ~= nil and e.SpriteGUIRendererComponent ~= nil then
|
||||||
e.Enable = self.ClassDeckMode == true
|
if self.ClassDeckClass == tabs[i].cls then
|
||||||
if e.SpriteGUIRendererComponent ~= nil then
|
e.SpriteGUIRendererComponent.Color = Color(0.22, 0.28, 0.34, 1)
|
||||||
if self.ClassDeckClass == tabs[i].cls then
|
else
|
||||||
e.SpriteGUIRendererComponent.Color = Color(0.22, 0.28, 0.34, 1)
|
e.SpriteGUIRendererComponent.Color = Color(0.11, 0.13, 0.16, 1)
|
||||||
else
|
|
||||||
e.SpriteGUIRendererComponent.Color = Color(0.11, 0.13, 0.16, 1)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end`),
|
end`),
|
||||||
method('OpenAllDeck', `local inspectHud = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckInspectHud")
|
method('OpenAllDeck', `local inspectHud = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckInspectHud")
|
||||||
if inspectHud ~= nil then
|
if inspectHud ~= nil then
|
||||||
inspectHud.Enable = false
|
inspectHud.Enable = false
|
||||||
end
|
end
|
||||||
self.DeckInspectKind = ""
|
self.DeckInspectKind = ""
|
||||||
self.ClassDeckMode = false
|
self.ClassDeckMode = false
|
||||||
self.ClassDeckClass = ""
|
self.ClassDeckClass = ""
|
||||||
|
self.DebugCardPickerMode = false
|
||||||
self:RenderClassDeckTabs()
|
self:RenderClassDeckTabs()
|
||||||
self.DeckAllOpen = true
|
self.DeckAllOpen = true
|
||||||
self:RenderAllDeck()
|
self:RenderAllDeck()
|
||||||
local hud = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud")
|
local hud = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud")
|
||||||
if hud ~= nil then
|
if hud ~= nil then
|
||||||
hud.Enable = true
|
hud.Enable = true
|
||||||
end`),
|
end`),
|
||||||
method('CloseAllDeck', `self.DeckAllOpen = false
|
method('CloseAllDeck', `self.DeckAllOpen = false
|
||||||
local hud = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud")
|
local hud = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud")
|
||||||
if hud ~= nil then
|
if hud ~= nil then
|
||||||
hud.Enable = false
|
hud.Enable = false
|
||||||
end
|
end
|
||||||
@@ -189,6 +202,7 @@ if self.ClassDeckMode == true then
|
|||||||
self.ClassDeckTitle = ""
|
self.ClassDeckTitle = ""
|
||||||
self.ClassDeckClass = ""
|
self.ClassDeckClass = ""
|
||||||
end
|
end
|
||||||
|
self.DebugCardPickerMode = false
|
||||||
self:RenderClassDeckTabs()
|
self:RenderClassDeckTabs()
|
||||||
if self.CodexMode == true then
|
if self.CodexMode == true then
|
||||||
self.CodexMode = false
|
self.CodexMode = false
|
||||||
@@ -199,31 +213,46 @@ local title = "모든 덱"
|
|||||||
if self.ClassDeckMode == true then
|
if self.ClassDeckMode == true then
|
||||||
pile = self.ClassDeckCards or {}
|
pile = self.ClassDeckCards or {}
|
||||||
title = self.ClassDeckTitle
|
title = self.ClassDeckTitle
|
||||||
|
if self.DebugCardPickerMode == true then
|
||||||
|
title = title .. " - 테스트 카드 추가"
|
||||||
|
end
|
||||||
elseif self.CodexMode == true then
|
elseif self.CodexMode == true then
|
||||||
pile = self.CodexCards or {}
|
pile = self.CodexCards or {}
|
||||||
title = "카드 도감"
|
title = "카드 도감"
|
||||||
end
|
end
|
||||||
local count = #pile
|
local count = #pile
|
||||||
self:SetText("/ui/DefaultGroup/DeckAllHud/Title", title .. " (" .. tostring(count) .. ")")
|
self:SetText("/ui/DeckUIGroup/DeckAllHud/Title", title .. " (" .. tostring(count) .. ")")
|
||||||
self:RenderClassDeckTabs()
|
self:RenderClassDeckTabs()
|
||||||
local empty = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud/Empty")
|
self:SetEntityEnabled("/ui/DeckUIGroup/DeckAllHud/Empty", count <= 0)
|
||||||
if empty ~= nil then
|
|
||||||
empty.Enable = count <= 0
|
|
||||||
end
|
|
||||||
for i = 1, 120 do
|
for i = 1, 120 do
|
||||||
local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud/Grid/Card" .. tostring(i))
|
local path = "/ui/DeckUIGroup/DeckAllHud/Grid/Card" .. tostring(i)
|
||||||
if e ~= nil then
|
local cardId = pile[i]
|
||||||
local cardId = pile[i]
|
if cardId == nil then
|
||||||
if cardId == nil then
|
self:SetEntityEnabled(path, false)
|
||||||
e.Enable = false
|
else
|
||||||
else
|
self:SetEntityEnabled(path, true)
|
||||||
e.Enable = true
|
self:ApplyAllDeckCardVisual(i, cardId)
|
||||||
self:ApplyAllDeckCardVisual(i, cardId)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end`),
|
end`),
|
||||||
method('ApplyAllDeckCardVisual', `self:ApplyCardFace("/ui/DefaultGroup/DeckAllHud/Grid/Card" .. tostring(slot), cardId)`, [
|
method('ApplyAllDeckCardVisual', `self:ApplyCardFace("/ui/DeckUIGroup/DeckAllHud/Grid/Card" .. tostring(slot), cardId)`, [
|
||||||
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' },
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' },
|
||||||
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'cardId' },
|
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'cardId' },
|
||||||
]),
|
]),
|
||||||
|
method('OnAllDeckCardButton', `if self.DebugCardPickerMode ~= true then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if self.ClassDeckCards == nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local cardId = self.ClassDeckCards[slot]
|
||||||
|
if cardId == nil or self.Cards == nil or self.Cards[cardId] == nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
self:AddCardsToHand(cardId, 1)
|
||||||
|
local c = self.Cards[cardId]
|
||||||
|
local name = cardId
|
||||||
|
if c.name ~= nil then name = c.name end
|
||||||
|
self:Toast("테스트 카드 추가: " .. name)`, [
|
||||||
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' },
|
||||||
|
]),
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ if n > 8 then spacing = math.floor(1400 / n) end
|
|||||||
local startX = -((n - 1) * spacing) / 2
|
local startX = -((n - 1) * spacing) / 2
|
||||||
local drawStart = Vector2(-590, 8)
|
local drawStart = Vector2(-590, 8)
|
||||||
for i = 1, 10 do
|
for i = 1, 10 do
|
||||||
\tlocal cardEntity = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand/Card" .. tostring(i))
|
\tlocal cardEntity = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. tostring(i))
|
||||||
\tif cardEntity ~= nil then
|
\tif cardEntity ~= nil then
|
||||||
\t\tlocal cardId = self.Hand[i]
|
\t\tlocal cardId = self.Hand[i]
|
||||||
\t\tif cardId == nil then
|
\t\tif cardId == nil then
|
||||||
@@ -60,7 +60,7 @@ if e ~= nil and e.SpriteGUIRendererComponent ~= nil then
|
|||||||
end
|
end
|
||||||
self:SetText(base .. "/Cost", string.format("%d", c.cost))
|
self:SetText(base .. "/Cost", string.format("%d", c.cost))
|
||||||
self:SetText(base .. "/Name", c.name)
|
self:SetText(base .. "/Name", c.name)
|
||||||
self:SetText(base .. "/Desc", c.desc)
|
self:SetText(base .. "/Desc", self:FormatCardDescription(c.desc))
|
||||||
local art = _EntityService:GetEntityByPath(base .. "/Art")
|
local art = _EntityService:GetEntityByPath(base .. "/Art")
|
||||||
if art ~= nil then
|
if art ~= nil then
|
||||||
if c.image ~= nil and c.image ~= "" then
|
if c.image ~= nil and c.image ~= "" then
|
||||||
@@ -81,11 +81,11 @@ local xs = {}
|
|||||||
local baseY = 0
|
local baseY = 0
|
||||||
local hoverIndex = 0
|
local hoverIndex = 0
|
||||||
local push = 110
|
local push = 110
|
||||||
if string.find(path, "/ui/DefaultGroup/CardHand/Card") == 1 then
|
if string.find(path, "/ui/RunUIGroup/CardHand/Card") == 1 then
|
||||||
if self.DragSlot ~= nil and self.DragSlot > 0 then
|
if self.DragSlot ~= nil and self.DragSlot > 0 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
prefix = "/ui/DefaultGroup/CardHand/Card"
|
prefix = "/ui/RunUIGroup/CardHand/Card"
|
||||||
count = 0
|
count = 0
|
||||||
if self.Hand ~= nil then count = #self.Hand end
|
if self.Hand ~= nil then count = #self.Hand end
|
||||||
for i = 1, count do
|
for i = 1, count do
|
||||||
@@ -93,14 +93,14 @@ if string.find(path, "/ui/DefaultGroup/CardHand/Card") == 1 then
|
|||||||
end
|
end
|
||||||
baseY = 0
|
baseY = 0
|
||||||
hoverIndex = tonumber(string.match(path, "Card(%d+)")) or 0
|
hoverIndex = tonumber(string.match(path, "Card(%d+)")) or 0
|
||||||
elseif string.find(path, "/ui/DefaultGroup/RewardHud/Reward") == 1 then
|
elseif string.find(path, "/ui/RunUIGroup/RewardHud/Reward") == 1 then
|
||||||
prefix = "/ui/DefaultGroup/RewardHud/Reward"
|
prefix = "/ui/RunUIGroup/RewardHud/Reward"
|
||||||
count = 3
|
count = 3
|
||||||
xs = { -300, 0, 300 }
|
xs = { -300, 0, 300 }
|
||||||
baseY = 0
|
baseY = 0
|
||||||
hoverIndex = tonumber(string.match(path, "Reward(%d+)")) or 0
|
hoverIndex = tonumber(string.match(path, "Reward(%d+)")) or 0
|
||||||
elseif string.find(path, "/ui/DefaultGroup/ShopHud/Card") == 1 then
|
elseif string.find(path, "/ui/RunUIGroup/ShopHud/Card") == 1 then
|
||||||
prefix = "/ui/DefaultGroup/ShopHud/Card"
|
prefix = "/ui/RunUIGroup/ShopHud/Card"
|
||||||
count = 3
|
count = 3
|
||||||
xs = { -300, 0, 300 }
|
xs = { -300, 0, 300 }
|
||||||
baseY = 20
|
baseY = 20
|
||||||
@@ -159,7 +159,7 @@ self.CardHoverTweenId = eventId`, [
|
|||||||
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'path' },
|
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'path' },
|
||||||
{ Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'hover' },
|
{ Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'hover' },
|
||||||
]),
|
]),
|
||||||
method('ApplyCardVisual', `self:ApplyCardFace("/ui/DefaultGroup/CardHand/Card" .. tostring(slot), cardId)`, [
|
method('ApplyCardVisual', `self:ApplyCardFace("/ui/RunUIGroup/CardHand/Card" .. tostring(slot), cardId)`, [
|
||||||
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' },
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' },
|
||||||
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'cardId' },
|
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'cardId' },
|
||||||
]),
|
]),
|
||||||
@@ -181,7 +181,7 @@ if math.abs(n - math.floor(n)) < 0.00001 then
|
|||||||
return string.format("%d", math.floor(n))
|
return string.format("%d", math.floor(n))
|
||||||
end
|
end
|
||||||
return tostring(n)`, [{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'value' }], 0, 'string'),
|
return tostring(n)`, [{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'value' }], 0, 'string'),
|
||||||
method('AnimateCardFrom', `local cardEntity = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand/Card" .. tostring(slot))
|
method('AnimateCardFrom', `local cardEntity = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. tostring(slot))
|
||||||
if cardEntity == nil or cardEntity.UITransformComponent == nil then
|
if cardEntity == nil or cardEntity.UITransformComponent == nil then
|
||||||
\treturn
|
\treturn
|
||||||
end
|
end
|
||||||
@@ -203,15 +203,132 @@ end, 1 / 60)`, [
|
|||||||
{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'toPos' },
|
{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'toPos' },
|
||||||
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'duration' },
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'duration' },
|
||||||
]),
|
]),
|
||||||
|
method('AnimateDiscardCards', `if cardIds == nil or slots == nil then
|
||||||
|
\treturn
|
||||||
|
end
|
||||||
|
local target = Vector2(590, 8)
|
||||||
|
local duration = 0.18
|
||||||
|
for i = 1, #cardIds do
|
||||||
|
\tlocal slot = slots[i] or i
|
||||||
|
\tlocal e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. tostring(slot))
|
||||||
|
\tif e ~= nil then
|
||||||
|
\t\te.Enable = true
|
||||||
|
\t\tself:ApplyCardFace("/ui/RunUIGroup/CardHand/Card" .. tostring(slot), cardIds[i])
|
||||||
|
\t\tif e.UITransformComponent ~= nil then
|
||||||
|
\t\t\tlocal sx = 0
|
||||||
|
\t\t\tif startXs ~= nil and startXs[i] ~= nil then sx = startXs[i] else sx = self:GetHandSlotX(slot) end
|
||||||
|
\t\t\te.UITransformComponent.anchoredPosition = Vector2(sx, 0)
|
||||||
|
\t\t\te.UITransformComponent.UIScale = Vector3(1, 1, 1)
|
||||||
|
\t\tend
|
||||||
|
\tend
|
||||||
|
end
|
||||||
|
local elapsed = 0
|
||||||
|
local eventId = 0
|
||||||
|
eventId = _TimerService:SetTimerRepeat(function()
|
||||||
|
\telapsed = elapsed + 1 / 60
|
||||||
|
\tlocal t = math.min(elapsed / duration, 1)
|
||||||
|
\tlocal eased = _TweenLogic:Ease(0, 1, 1, EaseType.SineEaseIn, t)
|
||||||
|
\tfor i = 1, #cardIds do
|
||||||
|
\t\tlocal slot = slots[i] or i
|
||||||
|
\t\tlocal e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. tostring(slot))
|
||||||
|
\t\tif e ~= nil and e.UITransformComponent ~= nil then
|
||||||
|
\t\t\tlocal sx = 0
|
||||||
|
\t\t\tif startXs ~= nil and startXs[i] ~= nil then sx = startXs[i] else sx = self:GetHandSlotX(slot) end
|
||||||
|
\t\t\tlocal x = sx + (target.x - sx) * eased
|
||||||
|
\t\t\tlocal y = 0 + (target.y - 0) * eased
|
||||||
|
\t\t\tlocal s = 1 - 0.25 * eased
|
||||||
|
\t\t\te.UITransformComponent.anchoredPosition = Vector2(x, y)
|
||||||
|
\t\t\te.UITransformComponent.UIScale = Vector3(s, s, 1)
|
||||||
|
\t\tend
|
||||||
|
\tend
|
||||||
|
\tif t >= 1 then
|
||||||
|
\t\t_TimerService:ClearTimer(eventId)
|
||||||
|
\t\tfor i = 1, #cardIds do
|
||||||
|
\t\t\tlocal slot = slots[i] or i
|
||||||
|
\t\t\tlocal e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. tostring(slot))
|
||||||
|
\t\t\tif e ~= nil then
|
||||||
|
\t\t\t\tif self.Hand ~= nil and self.Hand[slot] ~= nil then
|
||||||
|
\t\t\t\t\te.Enable = true
|
||||||
|
\t\t\t\t\tself:ApplyCardVisual(slot, self.Hand[slot])
|
||||||
|
\t\t\t\t\tif e.UITransformComponent ~= nil then
|
||||||
|
\t\t\t\t\t\te.UITransformComponent.anchoredPosition = Vector2(self:GetHandSlotX(slot), 0)
|
||||||
|
\t\t\t\t\t\te.UITransformComponent.UIScale = Vector3(1, 1, 1)
|
||||||
|
\t\t\t\t\tend
|
||||||
|
\t\t\t\telse
|
||||||
|
\t\t\t\t\te.Enable = false
|
||||||
|
\t\t\t\tend
|
||||||
|
\t\t\tend
|
||||||
|
\t\tend
|
||||||
|
\tend
|
||||||
|
end, 1 / 60)`, [
|
||||||
|
{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'cardIds' },
|
||||||
|
{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'startXs' },
|
||||||
|
{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slots' },
|
||||||
|
]),
|
||||||
method('AddCardBlock', `local amount = base or 0
|
method('AddCardBlock', `local amount = base or 0
|
||||||
if amount > 0 and self.PlayerDex ~= nil then
|
if amount > 0 and self.PlayerDex ~= nil then
|
||||||
amount = amount + self.PlayerDex
|
amount = amount + self.PlayerDex
|
||||||
end
|
end
|
||||||
|
if self.BlockGainMultiplier ~= nil and self.BlockGainMultiplier > 1 then
|
||||||
|
amount = amount * self.BlockGainMultiplier
|
||||||
|
end
|
||||||
if amount < 0 then
|
if amount < 0 then
|
||||||
amount = 0
|
amount = 0
|
||||||
end
|
end
|
||||||
self.PlayerBlock = self.PlayerBlock + amount
|
self.PlayerBlock = self.PlayerBlock + amount
|
||||||
return amount`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'base' }], 0, 'number'),
|
return amount`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'base' }], 0, 'number'),
|
||||||
|
method('CountOtherHandSkills', `if self.Hand == nil then
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
local n = 0
|
||||||
|
for i = 1, #self.Hand do
|
||||||
|
if i ~= slot then
|
||||||
|
local hc = self.Cards[self.Hand[i]]
|
||||||
|
if hc ~= nil and hc.kind == "Skill" then
|
||||||
|
n = n + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return n`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }], 0, 'number'),
|
||||||
|
method('AttackBaseForCard', `local base2 = c.damage or 0
|
||||||
|
local otherHand = 0
|
||||||
|
if self.Hand ~= nil then
|
||||||
|
otherHand = #self.Hand - 1
|
||||||
|
if otherHand < 0 then otherHand = 0 end
|
||||||
|
end
|
||||||
|
if c.damagePerOtherHandCard ~= nil then
|
||||||
|
base2 = base2 + otherHand * c.damagePerOtherHandCard
|
||||||
|
end
|
||||||
|
if c.damagePerAttackPlayedThisTurn ~= nil then
|
||||||
|
base2 = base2 + (self.TurnAttackCardsPlayed or 0) * c.damagePerAttackPlayedThisTurn
|
||||||
|
end
|
||||||
|
if c.damagePerDiscardedThisTurn ~= nil then
|
||||||
|
base2 = base2 + (self.TurnDiscardedCards or 0) * c.damagePerDiscardedThisTurn
|
||||||
|
end
|
||||||
|
if c.damagePerSkillInHand ~= nil then
|
||||||
|
base2 = base2 + self:CountOtherHandSkills(slot) * c.damagePerSkillInHand
|
||||||
|
end
|
||||||
|
if c.damagePerCardDrawnThisCombat ~= nil then
|
||||||
|
base2 = base2 + (self.CardsDrawnThisCombat or 0) * c.damagePerCardDrawnThisCombat
|
||||||
|
end
|
||||||
|
if c.class == "Attack" and (self.TurnCardsPlayedThisTurn or 0) == 0 and c.firstCardDamageBonus ~= nil then
|
||||||
|
base2 = base2 + c.firstCardDamageBonus
|
||||||
|
end
|
||||||
|
if c.class == "shiv" then
|
||||||
|
if self:HasPowerField("shivDamageBonus") == true then
|
||||||
|
base2 = base2 + self:AddPowerFieldTotal("shivDamageBonus")
|
||||||
|
end
|
||||||
|
if self.ShivFirstDamageBonusUsed ~= true and self:HasPowerField("firstShivDamageBonus") == true then
|
||||||
|
base2 = base2 + self:AddPowerFieldTotal("firstShivDamageBonus")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if base2 < 0 then
|
||||||
|
base2 = 0
|
||||||
|
end
|
||||||
|
return base2`, [
|
||||||
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' },
|
||||||
|
{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'c' },
|
||||||
|
], 0, 'number'),
|
||||||
method('CalcPlayerAttack', `local base2 = base
|
method('CalcPlayerAttack', `local base2 = base
|
||||||
self.FightAttackCount = self.FightAttackCount + 1
|
self.FightAttackCount = self.FightAttackCount + 1
|
||||||
if self.FightAttackCount == 1 and self:HasRelic("akabeko") then
|
if self.FightAttackCount == 1 and self:HasRelic("akabeko") then
|
||||||
@@ -224,6 +341,9 @@ end
|
|||||||
if self.PlayerWeak > 0 then
|
if self.PlayerWeak > 0 then
|
||||||
dmg = math.floor(dmg * 0.75)
|
dmg = math.floor(dmg * 0.75)
|
||||||
end
|
end
|
||||||
|
if self.TurnAttackMultiplier ~= nil and self.TurnAttackMultiplier > 1 then
|
||||||
|
dmg = dmg * self.TurnAttackMultiplier
|
||||||
|
end
|
||||||
if dmg > 0 and dmg < 5 and self:HasRelic("boot") then
|
if dmg > 0 and dmg < 5 and self:HasRelic("boot") then
|
||||||
dmg = 5
|
dmg = 5
|
||||||
end
|
end
|
||||||
@@ -231,22 +351,187 @@ if dmg < 0 then
|
|||||||
dmg = 0
|
dmg = 0
|
||||||
end
|
end
|
||||||
return dmg`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'base' }], 0, 'number'),
|
return dmg`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'base' }], 0, 'number'),
|
||||||
method('ResolveCardEffects', `if c == nil then
|
method('QueueNextTurnAddCard', `if cardId == nil or cardId == "" or amount == nil or amount <= 0 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
if self.NextTurnAddCards == nil then
|
||||||
|
self.NextTurnAddCards = {}
|
||||||
|
end
|
||||||
|
for i = 1, #self.NextTurnAddCards do
|
||||||
|
local entry = self.NextTurnAddCards[i]
|
||||||
|
if entry ~= nil and entry.cardId == cardId then
|
||||||
|
entry.amount = (entry.amount or 0) + amount
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
table.insert(self.NextTurnAddCards, { cardId = cardId, amount = amount })`, [
|
||||||
|
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'cardId' },
|
||||||
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'amount' },
|
||||||
|
]),
|
||||||
|
method('QueueNextTurnEffects', `if c == nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if c.nextTurnBlock ~= nil then
|
||||||
|
self.NextTurnBlock = (self.NextTurnBlock or 0) + c.nextTurnBlock
|
||||||
|
end
|
||||||
|
if c.nextTurnDraw ~= nil then
|
||||||
|
self.NextTurnDraw = (self.NextTurnDraw or 0) + c.nextTurnDraw
|
||||||
|
end
|
||||||
|
if c.nextTurnKeepBlock == true then
|
||||||
|
self.NextTurnKeepBlock = true
|
||||||
|
end
|
||||||
|
if c.nextTurnAttackMultiplier ~= nil and c.nextTurnAttackMultiplier > 0 then
|
||||||
|
local cur = self.NextTurnAttackMultiplier or 1
|
||||||
|
self.NextTurnAttackMultiplier = cur * c.nextTurnAttackMultiplier
|
||||||
|
end`, [{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'c' }]),
|
||||||
|
method('ResolveCardEffects', `if c == nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if c.blockGainMultiplier ~= nil and c.blockGainMultiplier > 0 then
|
||||||
|
self.BlockGainMultiplier = (self.BlockGainMultiplier or 1) * c.blockGainMultiplier
|
||||||
|
end
|
||||||
|
if c.nextSkillCostZero == true then
|
||||||
|
self.NextSkillCostZero = true
|
||||||
|
end
|
||||||
|
if c.nextSkillRepeatCount ~= nil and c.nextSkillRepeatCount > 0 then
|
||||||
|
self.NextSkillRepeatCount = (self.NextSkillRepeatCount or 0) + c.nextSkillRepeatCount
|
||||||
|
end
|
||||||
|
if c.skillCostReductionThisTurn ~= nil and c.skillCostReductionThisTurn > 0 then
|
||||||
|
self.SkillCostReductionThisTurn = (self.SkillCostReductionThisTurn or 0) + c.skillCostReductionThisTurn
|
||||||
|
end
|
||||||
|
if c.handCostZeroThisTurn == true then
|
||||||
|
self.HandCostZeroThisTurn = true
|
||||||
|
end
|
||||||
|
if c.drawDisabledThisTurn == true then
|
||||||
|
self.DrawDisabledThisTurn = true
|
||||||
|
end
|
||||||
|
if c.drawDamage ~= nil and c.drawDamage > 0 and c.kind ~= "Power" then
|
||||||
|
self.DrawDamageThisTurn = (self.DrawDamageThisTurn or 0) + c.drawDamage
|
||||||
|
end
|
||||||
|
if c.drawPoison ~= nil and c.drawPoison > 0 and c.kind ~= "Power" then
|
||||||
|
self.DrawPoisonThisTurn = (self.DrawPoisonThisTurn or 0) + c.drawPoison
|
||||||
|
end
|
||||||
|
if c.shivAoe == true and c.kind ~= "Power" then
|
||||||
|
self.ShivAoeThisCombat = true
|
||||||
|
end
|
||||||
|
if c.skillSlyOnPlay == true and c.kind == "Skill" then
|
||||||
|
if self.SkillSlyOnPlayCards == nil then
|
||||||
|
self.SkillSlyOnPlayCards = {}
|
||||||
|
end
|
||||||
|
self.SkillSlyOnPlayCards[cardId] = true
|
||||||
|
end
|
||||||
|
if c.turnHandSlyCount ~= nil and c.turnHandSlyCount > 0 then
|
||||||
|
if self.TurnSkillSlyCards == nil then
|
||||||
|
self.TurnSkillSlyCards = {}
|
||||||
|
end
|
||||||
|
local picked = 0
|
||||||
|
if self.Hand ~= nil then
|
||||||
|
for i = 1, #self.Hand do
|
||||||
|
local hid = self.Hand[i]
|
||||||
|
if hid ~= nil and hid ~= cardId then
|
||||||
|
local hc = self.Cards[hid]
|
||||||
|
if hc ~= nil and hc.kind == "Skill" and self.TurnSkillSlyCards[hid] ~= true and self.SkillSlyOnPlayCards[hid] ~= true and hc.sly ~= true then
|
||||||
|
self.TurnSkillSlyCards[hid] = true
|
||||||
|
picked = picked + 1
|
||||||
|
if picked >= c.turnHandSlyCount then
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local xEnergy = energySpent or 0
|
||||||
|
local weakAmount = c.weak or 0
|
||||||
|
local vulnAmount = c.vuln or 0
|
||||||
|
local poisonAmount = c.poison or 0
|
||||||
|
if c.xWeakPerEnergy ~= nil and c.xWeakPerEnergy > 0 then
|
||||||
|
weakAmount = weakAmount + xEnergy * c.xWeakPerEnergy
|
||||||
|
end
|
||||||
if c.kind == "Attack" then
|
if c.kind == "Attack" then
|
||||||
if c.damage ~= nil then
|
if c.damage ~= nil or c.xDamagePerEnergy ~= nil then
|
||||||
self:PlayerAttackMotion()
|
self:PlayerAttackMotion()
|
||||||
|
local baseDmg = self:AttackBaseForCard(slot, c)
|
||||||
|
self.ActiveAttackDamageVsWeakMultiplier = c.attackDamageVsWeakMultiplier or 1
|
||||||
|
if c.xDamagePerEnergy ~= nil and c.xDamagePerEnergy > 0 then
|
||||||
|
baseDmg = xEnergy * c.xDamagePerEnergy
|
||||||
|
end
|
||||||
local total = 0
|
local total = 0
|
||||||
local hitN = c.hits or 1
|
local hitN = c.hits or 1
|
||||||
|
if c.otherHandAtLeast ~= nil and c.bonusHitsWhenOtherHandAtLeast ~= nil then
|
||||||
|
local otherHand = 0
|
||||||
|
if self.Hand ~= nil then
|
||||||
|
otherHand = #self.Hand - 1
|
||||||
|
if otherHand < 0 then otherHand = 0 end
|
||||||
|
end
|
||||||
|
if otherHand >= c.otherHandAtLeast then
|
||||||
|
hitN = hitN + c.bonusHitsWhenOtherHandAtLeast
|
||||||
|
end
|
||||||
|
end
|
||||||
for h = 1, hitN do
|
for h = 1, hitN do
|
||||||
total = total + self:CalcPlayerAttack(c.damage)
|
total = total + self:CalcPlayerAttack(baseDmg)
|
||||||
end
|
end
|
||||||
if c.aoe == true then
|
local useAoe = c.aoe == true
|
||||||
self:PlayAoeFx(c.fx or c.image, total)
|
if c.class == "shiv" and (self.ShivAoeThisCombat == true or self:HasPowerField("shivAoe") == true) then
|
||||||
else
|
useAoe = true
|
||||||
self:PlayAttackFx(self.TargetIndex, c.fx or c.image, total, c.pierce == true)
|
|
||||||
end
|
end
|
||||||
|
if c.class == "shiv" and self.ShivFirstDamageBonusUsed ~= true and self:HasPowerField("firstShivDamageBonus") == true then
|
||||||
|
self.ShivFirstDamageBonusUsed = true
|
||||||
|
end
|
||||||
|
local function countAliveMonsters()
|
||||||
|
local n = 0
|
||||||
|
if self.Monsters ~= nil then
|
||||||
|
for mi = 1, #self.Monsters do
|
||||||
|
local om = self.Monsters[mi]
|
||||||
|
if om ~= nil and om.alive == true then n = n + 1 end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return n
|
||||||
|
end
|
||||||
|
local function randomAliveMonsterIndex()
|
||||||
|
local alive = {}
|
||||||
|
if self.Monsters ~= nil then
|
||||||
|
for mi = 1, #self.Monsters do
|
||||||
|
local om = self.Monsters[mi]
|
||||||
|
if om ~= nil and om.alive == true then
|
||||||
|
table.insert(alive, mi)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if #alive <= 0 then
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
return alive[math.random(1, #alive)]
|
||||||
|
end
|
||||||
|
local function resolveAttackRound()
|
||||||
|
local roundKilled = false
|
||||||
|
if useAoe == true then
|
||||||
|
local killed = self:DealDamageToAllMonsters(total)
|
||||||
|
if killed == true then roundKilled = true end
|
||||||
|
elseif c.randomTargetEachHit == true then
|
||||||
|
for h = 1, hitN do
|
||||||
|
local targetIdx = randomAliveMonsterIndex()
|
||||||
|
if targetIdx ~= nil and targetIdx > 0 then
|
||||||
|
local prev = self.TargetIndex
|
||||||
|
self.TargetIndex = targetIdx
|
||||||
|
local killed = self:DealDamageToTarget(total / hitN, c.pierce == true)
|
||||||
|
self.TargetIndex = prev
|
||||||
|
if killed == true then roundKilled = true end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
local killed = self:DealDamageToTarget(total, c.pierce == true)
|
||||||
|
if killed == true then roundKilled = true end
|
||||||
|
end
|
||||||
|
return roundKilled
|
||||||
|
end
|
||||||
|
local totalDamage = 0
|
||||||
|
local roundKilled = false
|
||||||
|
repeat
|
||||||
|
roundKilled = resolveAttackRound()
|
||||||
|
totalDamage = totalDamage + total
|
||||||
|
until c.repeatOnKill ~= true or roundKilled ~= true or countAliveMonsters() <= 0
|
||||||
|
self.DamageDealtThisTurn = (self.DamageDealtThisTurn or 0) + totalDamage
|
||||||
end
|
end
|
||||||
if c.block ~= nil then
|
if c.block ~= nil then
|
||||||
self:AddCardBlock(c.block)
|
self:AddCardBlock(c.block)
|
||||||
@@ -278,40 +563,179 @@ end
|
|||||||
if c.heal ~= nil then
|
if c.heal ~= nil then
|
||||||
self.PlayerHp = math.min(self.PlayerHp + c.heal, self.PlayerMaxHp)
|
self.PlayerHp = math.min(self.PlayerHp + c.heal, self.PlayerMaxHp)
|
||||||
end
|
end
|
||||||
if c.weak ~= nil or c.vuln ~= nil or c.poison ~= nil then
|
if c.gainEnergy ~= nil and c.gainEnergy ~= 0 then
|
||||||
|
self.Energy = self.Energy + c.gainEnergy
|
||||||
|
end
|
||||||
|
if c.intangible ~= nil and c.intangible > 0 then
|
||||||
|
self.PlayerIntangible = (self.PlayerIntangible or 0) + c.intangible
|
||||||
|
end
|
||||||
|
self.TurnCardsPlayedThisTurn = (self.TurnCardsPlayedThisTurn or 0) + 1
|
||||||
|
if c.blockPerDamageDealtThisTurn ~= nil and c.blockPerDamageDealtThisTurn > 0 then
|
||||||
|
self:AddCardBlock((self.DamageDealtThisTurn or 0) * c.blockPerDamageDealtThisTurn)
|
||||||
|
end
|
||||||
|
self:QueueNextTurnEffects(c)
|
||||||
|
if c.combatCostReductionOnPlay ~= nil and c.combatCostReductionOnPlay > 0 then
|
||||||
|
if self.CombatCardCostReduction == nil then
|
||||||
|
self.CombatCardCostReduction = {}
|
||||||
|
end
|
||||||
|
self.CombatCardCostReduction[cardId] = (self.CombatCardCostReduction[cardId] or 0) + c.combatCostReductionOnPlay
|
||||||
|
end
|
||||||
|
if c.weak ~= nil or c.vuln ~= nil or c.poison ~= nil or c.xWeakPerEnergy ~= nil or c.affectsAllEnemies == true or c.removeEnemyBlock == true or c.removeEnemyArtifact == true or (c.enemyStrengthLossThisTurn ~= nil and c.enemyStrengthLossThisTurn > 0) then
|
||||||
local tm = self.Monsters[self.TargetIndex]
|
local tm = self.Monsters[self.TargetIndex]
|
||||||
if tm == nil or tm.alive ~= true then
|
if tm == nil or tm.alive ~= true then
|
||||||
for i = 1, #self.Monsters do
|
for i = 1, #self.Monsters do
|
||||||
if self.Monsters[i].alive == true then tm = self.Monsters[i]; self.TargetIndex = i; break end
|
if self.Monsters[i].alive == true then tm = self.Monsters[i]; self.TargetIndex = i; break end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if tm ~= nil and tm.alive == true then
|
local targets = {}
|
||||||
if c.weak ~= nil then tm.weak = tm.weak + c.weak end
|
if c.affectsAllEnemies == true and self.Monsters ~= nil then
|
||||||
if c.poison ~= nil then tm.poison = (tm.poison or 0) + c.poison end
|
for mi = 1, #self.Monsters do
|
||||||
if c.vuln ~= nil then
|
local om = self.Monsters[mi]
|
||||||
tm.vuln = tm.vuln + c.vuln
|
if om ~= nil and om.alive == true then
|
||||||
if self:HasRelic("championBelt") then
|
table.insert(targets, om)
|
||||||
tm.weak = tm.weak + 1
|
end
|
||||||
|
end
|
||||||
|
elseif tm ~= nil and tm.alive == true then
|
||||||
|
table.insert(targets, tm)
|
||||||
|
end
|
||||||
|
if c.enemyStrengthLossThisTurn ~= nil and c.enemyStrengthLossThisTurn > 0 then
|
||||||
|
self.EnemyStrengthLossThisTurn = (self.EnemyStrengthLossThisTurn or 0) + c.enemyStrengthLossThisTurn
|
||||||
|
end
|
||||||
|
for ti = 1, #targets do
|
||||||
|
local target = targets[ti]
|
||||||
|
if target ~= nil and target.alive == true then
|
||||||
|
if c.removeEnemyBlock == true then
|
||||||
|
target.block = 0
|
||||||
|
end
|
||||||
|
if c.removeEnemyArtifact == true then
|
||||||
|
target.artifact = 0
|
||||||
|
end
|
||||||
|
if weakAmount ~= nil and weakAmount > 0 then
|
||||||
|
if target.artifact ~= nil and target.artifact > 0 then
|
||||||
|
target.artifact = target.artifact - 1
|
||||||
|
else
|
||||||
|
target.weak = target.weak + weakAmount
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if poisonAmount ~= nil and poisonAmount > 0 then
|
||||||
|
if c.poisonIfTargetPoisoned ~= true or (target.poison ~= nil and target.poison > 0) then
|
||||||
|
local poisonHits = c.poisonHits or 1
|
||||||
|
for pi = 1, poisonHits do
|
||||||
|
local target2 = target
|
||||||
|
if c.poisonRandomTargets == true and self.Monsters ~= nil then
|
||||||
|
local alive = {}
|
||||||
|
for mi = 1, #self.Monsters do
|
||||||
|
local om = self.Monsters[mi]
|
||||||
|
if om ~= nil and om.alive == true then
|
||||||
|
table.insert(alive, om)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if #alive > 0 then
|
||||||
|
target2 = alive[math.random(#alive)]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if target2 ~= nil and target2.alive == true then
|
||||||
|
self:ApplyPoisonToMonster(target2, poisonAmount)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if vulnAmount ~= nil and vulnAmount > 0 then
|
||||||
|
if target.artifact ~= nil and target.artifact > 0 then
|
||||||
|
target.artifact = target.artifact - 1
|
||||||
|
else
|
||||||
|
target.vuln = target.vuln + vulnAmount
|
||||||
|
if self:HasRelic("championBelt") then
|
||||||
|
target.weak = target.weak + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
local drawnCards = {}
|
||||||
if c.draw ~= nil then
|
if c.draw ~= nil then
|
||||||
self:DrawCards(c.draw, true)
|
drawnCards = self:DrawCards(c.draw, true) or {}
|
||||||
|
end
|
||||||
|
if c.drawUntilHandSize ~= nil and c.drawUntilHandSize > 0 then
|
||||||
|
local currentHand = 0
|
||||||
|
if self.Hand ~= nil then
|
||||||
|
currentHand = #self.Hand
|
||||||
|
if slot ~= nil and slot > 0 and self.Hand[slot] == cardId then
|
||||||
|
currentHand = currentHand - 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local need = c.drawUntilHandSize - currentHand
|
||||||
|
if need > 0 then
|
||||||
|
local moreDrawnCards = self:DrawCards(need, true) or {}
|
||||||
|
for i = 1, #moreDrawnCards do
|
||||||
|
table.insert(drawnCards, moreDrawnCards[i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if c.drawSkillBlock ~= nil and c.drawSkillBlock > 0 then
|
||||||
|
for i = 1, #drawnCards do
|
||||||
|
local drawnCard = self.Cards[drawnCards[i]]
|
||||||
|
if drawnCard ~= nil and drawnCard.kind == "Skill" then
|
||||||
|
self:AddCardBlock(c.drawSkillBlock)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local drawDamage = self:AddPowerFieldTotal("drawDamage") + (self.DrawDamageThisTurn or 0)
|
||||||
|
local drawPoison = self:AddPowerFieldTotal("drawPoison") + (self.DrawPoisonThisTurn or 0)
|
||||||
|
if (drawDamage ~= nil and drawDamage > 0) or (drawPoison ~= nil and drawPoison > 0) then
|
||||||
|
for mi = 1, #self.Monsters do
|
||||||
|
local m2 = self.Monsters[mi]
|
||||||
|
if m2 ~= nil and m2.alive == true then
|
||||||
|
local dmg = drawDamage or 0
|
||||||
|
if m2.vuln > 0 then
|
||||||
|
dmg = math.floor(dmg * 1.5)
|
||||||
|
end
|
||||||
|
if m2.block > 0 then
|
||||||
|
local absorbed = math.min(m2.block, dmg)
|
||||||
|
m2.block = m2.block - absorbed
|
||||||
|
dmg = dmg - absorbed
|
||||||
|
end
|
||||||
|
if drawPoison ~= nil and drawPoison > 0 then
|
||||||
|
self:ApplyPoisonToMonster(m2, drawPoison)
|
||||||
|
end
|
||||||
|
if dmg > 0 then
|
||||||
|
m2.hp = m2.hp - dmg
|
||||||
|
self.DamageDealtThisTurn = (self.DamageDealtThisTurn or 0) + dmg
|
||||||
|
end
|
||||||
|
self:ShowDmgPop(mi, dmg)
|
||||||
|
self:MonsterHitMotion(mi)
|
||||||
|
if m2.hp <= 0 then
|
||||||
|
m2.hp = 0
|
||||||
|
self:KillMonster(m2.slot)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self:RenderCombat()
|
||||||
|
self:CheckCombatEnd()
|
||||||
end
|
end
|
||||||
if c.addShiv ~= nil and c.discard == nil and c.discardAll ~= true then
|
if c.addShiv ~= nil and c.discard == nil and c.discardAll ~= true then
|
||||||
self:AddCardsToHand("Shiv", c.addShiv)
|
self:AddCardsToHand("Shiv", c.addShiv)
|
||||||
end`, [
|
end`, [
|
||||||
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'cardId' },
|
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'cardId' },
|
||||||
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' },
|
||||||
{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'c' },
|
{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'c' },
|
||||||
{ Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'free' },
|
{ Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'free' },
|
||||||
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'energySpent' },
|
||||||
]),
|
]),
|
||||||
method('TriggerSly', `local c = self.Cards[cardId]
|
method('TriggerSly', `local c = self.Cards[cardId]
|
||||||
if c == nil or c.sly ~= true then
|
if c == nil then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
if c.sly ~= true then
|
||||||
|
local onPlay = self.SkillSlyOnPlayCards ~= nil and self.SkillSlyOnPlayCards[cardId] == true
|
||||||
|
local tempSly = self.TurnSkillSlyCards ~= nil and self.TurnSkillSlyCards[cardId] == true
|
||||||
|
if onPlay ~= true and tempSly ~= true then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
self:Toast("교활 발동: " .. c.name)
|
self:Toast("교활 발동: " .. c.name)
|
||||||
self:ResolveCardEffects(cardId, c, true)`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'cardId' }]),
|
self:ResolveCardEffects(cardId, 0, c, true, 0)`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'cardId' }]),
|
||||||
method('DiscardHandCard', `if self.Hand == nil then
|
method('DiscardHandCard', `if self.Hand == nil then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@@ -319,22 +743,40 @@ local cardId = self.Hand[slot]
|
|||||||
if cardId == nil then
|
if cardId == nil then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
local startX = self:GetHandSlotX(slot)
|
||||||
table.remove(self.Hand, slot)
|
table.remove(self.Hand, slot)
|
||||||
table.insert(self.DiscardPile, cardId)
|
table.insert(self.DiscardPile, cardId)
|
||||||
|
self.TurnDiscardedCards = (self.TurnDiscardedCards or 0) + 1
|
||||||
if triggerSly == true then
|
if triggerSly == true then
|
||||||
self:TriggerSly(cardId)
|
self:TriggerSly(cardId)
|
||||||
|
end
|
||||||
|
if animate == true then
|
||||||
|
self:AnimateDiscardCards({ cardId }, { startX }, { slot })
|
||||||
end`, [
|
end`, [
|
||||||
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' },
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' },
|
||||||
{ Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'triggerSly' },
|
{ Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'triggerSly' },
|
||||||
|
{ Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'animate' },
|
||||||
]),
|
]),
|
||||||
method('IsDiscardSelecting', `return self.DiscardSelectRemaining ~= nil and self.DiscardSelectRemaining > 0`, [], 0, 'boolean'),
|
method('IsDiscardSelecting', `return self.DiscardSelectRemaining ~= nil and self.DiscardSelectRemaining > 0`, [], 0, 'boolean'),
|
||||||
method('UpdateDiscardPrompt', `local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/DiscardPrompt")
|
method('IsRetainSelecting', `return self.RetainSelectActive == true`, [], 0, 'boolean'),
|
||||||
|
method('IsReserveSelecting', `return self.ReserveSelectActive == true`, [], 0, 'boolean'),
|
||||||
|
method('UpdateDiscardPrompt', `local e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/DiscardPrompt")
|
||||||
if e == nil then
|
if e == nil then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if self:IsDiscardSelecting() == true then
|
if self:IsDiscardSelecting() == true then
|
||||||
local picked = self.DiscardSelectTotal - self.DiscardSelectRemaining
|
local picked = self.DiscardSelectTotal - self.DiscardSelectRemaining
|
||||||
self:SetText("/ui/DefaultGroup/CombatHud/DiscardPrompt", "버릴 카드 선택 " .. self:FormatNumber(picked + 1) .. "/" .. self:FormatNumber(self.DiscardSelectTotal))
|
self:SetText("/ui/RunUIGroup/CombatHud/DiscardPrompt", "버릴 카드 선택 " .. self:FormatNumber(picked + 1) .. "/" .. self:FormatNumber(self.DiscardSelectTotal))
|
||||||
|
e.Enable = true
|
||||||
|
elseif self:IsRetainSelecting() == true then
|
||||||
|
self:SetText("/ui/RunUIGroup/CombatHud/DiscardPrompt", "보존할 카드 선택 (턴 종료: 건너뛰기)")
|
||||||
|
e.Enable = true
|
||||||
|
elseif self:IsReserveSelecting() == true then
|
||||||
|
local msg = self.NextTurnSelectPrompt or ""
|
||||||
|
if msg == "" then
|
||||||
|
msg = "다음 턴에 예약할 카드를 선택하세요"
|
||||||
|
end
|
||||||
|
self:SetText("/ui/RunUIGroup/CombatHud/DiscardPrompt", msg)
|
||||||
e.Enable = true
|
e.Enable = true
|
||||||
else
|
else
|
||||||
e.Enable = false
|
e.Enable = false
|
||||||
@@ -342,10 +784,11 @@ end`),
|
|||||||
method('BeginDiscardSelection', `if c == nil or self.Hand == nil then
|
method('BeginDiscardSelection', `if c == nil or self.Hand == nil then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
local n = 0
|
|
||||||
if c.discardAll == true then
|
if c.discardAll == true then
|
||||||
n = #self.Hand
|
return self:AutoDiscardHand(c)
|
||||||
elseif c.discard ~= nil then
|
end
|
||||||
|
local n = 0
|
||||||
|
if c.discard ~= nil then
|
||||||
n = math.min(c.discard, #self.Hand)
|
n = math.min(c.discard, #self.Hand)
|
||||||
end
|
end
|
||||||
if n <= 0 then
|
if n <= 0 then
|
||||||
@@ -355,28 +798,137 @@ self.DiscardSelectRemaining = n
|
|||||||
self.DiscardSelectTotal = n
|
self.DiscardSelectTotal = n
|
||||||
self.DiscardPostShiv = 0
|
self.DiscardPostShiv = 0
|
||||||
self.DiscardShivPerPick = 0
|
self.DiscardShivPerPick = 0
|
||||||
|
self.DiscardPostDraw = 0
|
||||||
|
self.DiscardDrawPerPick = 0
|
||||||
if c.addShiv ~= nil then
|
if c.addShiv ~= nil then
|
||||||
self.DiscardPostShiv = c.addShiv
|
self.DiscardPostShiv = c.addShiv
|
||||||
end
|
end
|
||||||
if c.addShivPerDiscard == true then
|
if c.addShivPerDiscard == true then
|
||||||
self.DiscardShivPerPick = 1
|
self.DiscardShivPerPick = 1
|
||||||
end
|
end
|
||||||
|
if c.drawPerDiscarded ~= nil and c.drawPerDiscarded > 0 then
|
||||||
|
self.DiscardDrawPerPick = c.drawPerDiscarded
|
||||||
|
end
|
||||||
self:UpdateDiscardPrompt()
|
self:UpdateDiscardPrompt()
|
||||||
self:Toast("버릴 카드를 선택하세요")
|
self:Toast("버릴 카드를 선택하세요")
|
||||||
|
return true`, [{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'c' }], 0, 'boolean'),
|
||||||
|
method('BeginReserveSelection', `if c == nil or c.nextTurnSelectHandCard ~= true or c.nextTurnCopies == nil or c.nextTurnCopies <= 0 then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
if self.Hand == nil or #self.Hand <= 0 then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
self.ReserveSelectActive = true
|
||||||
|
self.NextTurnSelectCopies = c.nextTurnCopies
|
||||||
|
self.NextTurnSelectPrompt = c.nextTurnSelectPrompt or ""
|
||||||
|
self:UpdateDiscardPrompt()
|
||||||
|
self:Toast("예약할 카드를 선택하세요")
|
||||||
|
self:RenderHand(false)
|
||||||
|
return true`, [{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'c' }], 0, 'boolean'),
|
||||||
|
method('SelectReserveSlot', `if self:IsReserveSelecting() ~= true then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
if self.Hand == nil or self.Hand[slot] == nil then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
local cardId = self.Hand[slot]
|
||||||
|
local amount = self.NextTurnSelectCopies or 0
|
||||||
|
self.ReserveSelectActive = false
|
||||||
|
self.NextTurnSelectCopies = 0
|
||||||
|
self.NextTurnSelectPrompt = ""
|
||||||
|
self:UpdateDiscardPrompt()
|
||||||
|
if amount > 0 and cardId ~= nil then
|
||||||
|
self:QueueNextTurnAddCard(cardId, amount)
|
||||||
|
local label = cardId
|
||||||
|
if self.Cards[cardId] ~= nil and self.Cards[cardId].name ~= nil then
|
||||||
|
label = self.Cards[cardId].name
|
||||||
|
end
|
||||||
|
self:Toast("다음 턴 예약: " .. label .. " " .. self:FormatNumber(amount) .. "장")
|
||||||
|
end
|
||||||
|
self:RenderPiles()
|
||||||
|
self:RenderCombat()
|
||||||
|
return true`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }], 0, 'boolean'),
|
||||||
|
method('SelectRetainSlot', `if self:IsRetainSelecting() ~= true then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
if self.Hand == nil or self.Hand[slot] == nil then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
self:FinishPlayerTurn(slot)
|
||||||
|
return true`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }], 0, 'boolean'),
|
||||||
|
method('AutoDiscardHand', `if c == nil or self.Hand == nil or #self.Hand <= 0 then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
local cardIds = {}
|
||||||
|
local startXs = {}
|
||||||
|
local slots = {}
|
||||||
|
local n = #self.Hand
|
||||||
|
for i = 1, n do
|
||||||
|
local cardId = self.Hand[i]
|
||||||
|
table.insert(cardIds, cardId)
|
||||||
|
table.insert(startXs, self:GetHandSlotX(i))
|
||||||
|
table.insert(slots, i)
|
||||||
|
table.insert(self.DiscardPile, cardId)
|
||||||
|
self.TurnDiscardedCards = (self.TurnDiscardedCards or 0) + 1
|
||||||
|
end
|
||||||
|
self.Hand = {}
|
||||||
|
local shivCount = 0
|
||||||
|
if c.addShiv ~= nil then shivCount = shivCount + c.addShiv end
|
||||||
|
if c.addShivPerDiscard == true then shivCount = shivCount + n end
|
||||||
|
self.DiscardSelectRemaining = 0
|
||||||
|
self.DiscardSelectTotal = 0
|
||||||
|
self.DiscardPostShiv = 0
|
||||||
|
self.DiscardShivPerPick = 0
|
||||||
|
self.DiscardPostDraw = 0
|
||||||
|
self.DiscardDrawPerPick = 0
|
||||||
|
self:UpdateDiscardPrompt()
|
||||||
|
self:AnimateDiscardCards(cardIds, startXs, slots)
|
||||||
|
for i = 1, #cardIds do
|
||||||
|
self:TriggerSly(cardIds[i])
|
||||||
|
end
|
||||||
|
self:RenderPiles()
|
||||||
|
self:RenderCombat()
|
||||||
|
_TimerService:SetTimerOnce(function()
|
||||||
|
if shivCount > 0 then
|
||||||
|
self:AddCardsToHand("Shiv", shivCount)
|
||||||
|
else
|
||||||
|
self:RenderHand(false)
|
||||||
|
self:RenderPiles()
|
||||||
|
end
|
||||||
|
if c.drawPerDiscarded ~= nil and c.drawPerDiscarded > 0 then
|
||||||
|
self:DrawCards(n * c.drawPerDiscarded, true)
|
||||||
|
end
|
||||||
|
self:RenderCombat()
|
||||||
|
self:CheckCombatEnd()
|
||||||
|
end, 0.22)
|
||||||
return true`, [{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'c' }], 0, 'boolean'),
|
return true`, [{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'c' }], 0, 'boolean'),
|
||||||
method('FinishDiscardSelection', `self.DiscardSelectRemaining = 0
|
method('FinishDiscardSelection', `self.DiscardSelectRemaining = 0
|
||||||
self.DiscardSelectTotal = 0
|
self.DiscardSelectTotal = 0
|
||||||
local shivCount = self.DiscardPostShiv or 0
|
local shivCount = self.DiscardPostShiv or 0
|
||||||
|
local drawCount = self.DiscardPostDraw or 0
|
||||||
self.DiscardPostShiv = 0
|
self.DiscardPostShiv = 0
|
||||||
|
self.DiscardPostDraw = 0
|
||||||
self.DiscardShivPerPick = 0
|
self.DiscardShivPerPick = 0
|
||||||
|
self.DiscardDrawPerPick = 0
|
||||||
self:UpdateDiscardPrompt()
|
self:UpdateDiscardPrompt()
|
||||||
if shivCount > 0 then
|
local finish = function()
|
||||||
self:AddCardsToHand("Shiv", shivCount)
|
if shivCount > 0 then
|
||||||
|
self:AddCardsToHand("Shiv", shivCount)
|
||||||
|
else
|
||||||
|
self:RenderHand(false)
|
||||||
|
self:RenderPiles()
|
||||||
|
end
|
||||||
|
if drawCount > 0 then
|
||||||
|
self:DrawCards(drawCount, true)
|
||||||
|
end
|
||||||
|
self:RenderCombat()
|
||||||
|
self:CheckCombatEnd()
|
||||||
end
|
end
|
||||||
self:RenderHand(false)
|
if delayRender == true then
|
||||||
self:RenderPiles()
|
_TimerService:SetTimerOnce(finish, 0.22)
|
||||||
self:RenderCombat()
|
else
|
||||||
self:CheckCombatEnd()`),
|
finish()
|
||||||
|
end`, [{ Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'delayRender' }]),
|
||||||
method('SelectDiscardSlot', `if self:IsDiscardSelecting() ~= true then
|
method('SelectDiscardSlot', `if self:IsDiscardSelecting() ~= true then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
@@ -384,18 +936,21 @@ if self.Hand == nil or self.Hand[slot] == nil then
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
local discarded = self.Hand[slot]
|
local discarded = self.Hand[slot]
|
||||||
self:DiscardHandCard(slot, true)
|
self:DiscardHandCard(slot, true, true)
|
||||||
if discarded ~= nil and self.DiscardShivPerPick ~= nil and self.DiscardShivPerPick > 0 then
|
if discarded ~= nil and self.DiscardShivPerPick ~= nil and self.DiscardShivPerPick > 0 then
|
||||||
self.DiscardPostShiv = (self.DiscardPostShiv or 0) + self.DiscardShivPerPick
|
self.DiscardPostShiv = (self.DiscardPostShiv or 0) + self.DiscardShivPerPick
|
||||||
end
|
end
|
||||||
|
if discarded ~= nil and self.DiscardDrawPerPick ~= nil and self.DiscardDrawPerPick > 0 then
|
||||||
|
self.DiscardPostDraw = (self.DiscardPostDraw or 0) + self.DiscardDrawPerPick
|
||||||
|
end
|
||||||
self.DiscardSelectRemaining = self.DiscardSelectRemaining - 1
|
self.DiscardSelectRemaining = self.DiscardSelectRemaining - 1
|
||||||
if self.DiscardSelectRemaining <= 0 or #self.Hand <= 0 then
|
if self.DiscardSelectRemaining <= 0 or #self.Hand <= 0 then
|
||||||
self:FinishDiscardSelection()
|
self:FinishDiscardSelection(true)
|
||||||
else
|
else
|
||||||
self:UpdateDiscardPrompt()
|
self:UpdateDiscardPrompt()
|
||||||
self:RenderHand(false)
|
|
||||||
self:RenderPiles()
|
self:RenderPiles()
|
||||||
self:RenderCombat()
|
self:RenderCombat()
|
||||||
|
_TimerService:SetTimerOnce(function() self:RenderHand(false) end, 0.22)
|
||||||
end
|
end
|
||||||
return true`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }], 0, 'boolean'),
|
return true`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }], 0, 'boolean'),
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ if self:AddPotion(pid) == true then
|
|||||||
self:Toast("물약 획득: " .. p.name)
|
self:Toast("물약 획득: " .. p.name)
|
||||||
end`),
|
end`),
|
||||||
method('RenderPotions', `for i = 1, 5 do
|
method('RenderPotions', `for i = 1, 5 do
|
||||||
local base = "/ui/DefaultGroup/CombatHud/TopBar/PotionSlot" .. tostring(i)
|
local base = "/ui/RunUIGroup/CombatHud/TopBar/PotionSlot" .. tostring(i)
|
||||||
local e = _EntityService:GetEntityByPath(base)
|
local e = _EntityService:GetEntityByPath(base)
|
||||||
if e ~= nil and e.SpriteGUIRendererComponent ~= nil then
|
if e ~= nil and e.SpriteGUIRendererComponent ~= nil then
|
||||||
local pid = nil
|
local pid = nil
|
||||||
@@ -121,11 +121,11 @@ self.PotionMenuSlot = slot
|
|||||||
local pid = self.RunPotions[slot]
|
local pid = self.RunPotions[slot]
|
||||||
local p = self.Potions[pid]
|
local p = self.Potions[pid]
|
||||||
if p ~= nil then
|
if p ~= nil then
|
||||||
self:SetText("/ui/DefaultGroup/CombatHud/PotionMenu/Title", p.name .. " — " .. p.desc)
|
self:SetText("/ui/RunUIGroup/CombatHud/PotionMenu/Title", p.name .. " — " .. p.desc)
|
||||||
end
|
end
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/PotionMenu", true)`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }]),
|
self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/PotionMenu", true)`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }]),
|
||||||
method('ClosePotionMenu', `self.PotionMenuSlot = 0
|
method('ClosePotionMenu', `self.PotionMenuSlot = 0
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/PotionMenu", false)`),
|
self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/PotionMenu", false)`),
|
||||||
method('UsePotion', `if self.PotionMenuSlot <= 0 then
|
method('UsePotion', `if self.PotionMenuSlot <= 0 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@@ -133,8 +133,8 @@ if self.CombatOver == true or self.TurnBusy == true or self.FxBusy == true then
|
|||||||
self:Toast("지금은 사용할 수 없습니다")
|
self:Toast("지금은 사용할 수 없습니다")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local combat = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud")
|
local combat = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud")
|
||||||
local hand = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand")
|
local hand = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand")
|
||||||
if combat == nil or combat.Enable ~= true or hand == nil or hand.Enable ~= true then
|
if combat == nil or combat.Enable ~= true or hand == nil or hand.Enable ~= true then
|
||||||
self:Toast("전투 중에만 사용할 수 있습니다")
|
self:Toast("전투 중에만 사용할 수 있습니다")
|
||||||
return
|
return
|
||||||
@@ -189,7 +189,7 @@ if self.RunRelics ~= nil then
|
|||||||
count = #self.RunRelics
|
count = #self.RunRelics
|
||||||
end
|
end
|
||||||
for i = 1, 10 do
|
for i = 1, 10 do
|
||||||
local base = "/ui/DefaultGroup/CombatHud/TopBar/RelicSlot" .. tostring(i)
|
local base = "/ui/RunUIGroup/CombatHud/TopBar/RelicSlot" .. tostring(i)
|
||||||
local e = _EntityService:GetEntityByPath(base)
|
local e = _EntityService:GetEntityByPath(base)
|
||||||
if e ~= nil and e.SpriteGUIRendererComponent ~= nil then
|
if e ~= nil and e.SpriteGUIRendererComponent ~= nil then
|
||||||
local rid = nil
|
local rid = nil
|
||||||
@@ -209,5 +209,5 @@ local of = ""
|
|||||||
if count > 10 then
|
if count > 10 then
|
||||||
of = "+" .. tostring(count - 9)
|
of = "+" .. tostring(count - 9)
|
||||||
end
|
end
|
||||||
self:SetText("/ui/DefaultGroup/CombatHud/TopBar/RelicOverflow", of)`),
|
self:SetText("/ui/RunUIGroup/CombatHud/TopBar/RelicOverflow", of)`),
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ 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';
|
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 jobMethods = [
|
export const jobMethods = [
|
||||||
method('ShowJobChoice', `self:SetEntityEnabled("/ui/DefaultGroup/CardHand", false)
|
method('ShowJobChoice', `self:SetEntityEnabled("/ui/RunUIGroup/CardHand", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/DeckHud", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/DeckHud", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/JobChoiceHud", true)`),
|
self:SetEntityEnabled("/ui/SelectUIGroup/JobChoiceHud", true)`),
|
||||||
method('PickJobReward', `self:SetEntityEnabled("/ui/DefaultGroup/JobChoiceHud", false)
|
method('PickJobReward', `self:SetEntityEnabled("/ui/SelectUIGroup/JobChoiceHud", false)
|
||||||
if kind == "relic" then
|
if kind == "relic" then
|
||||||
local bid = self:PickNewRelic()
|
local bid = self:PickNewRelic()
|
||||||
if bid ~= "" then
|
if bid ~= "" then
|
||||||
@@ -26,7 +26,7 @@ if opts == nil then
|
|||||||
end
|
end
|
||||||
self.JobOpts = opts
|
self.JobOpts = opts
|
||||||
for i = 1, 3 do
|
for i = 1, 3 do
|
||||||
local base = "/ui/DefaultGroup/JobSelectHud/Job_slot" .. tostring(i)
|
local base = "/ui/SelectUIGroup/JobSelectHud/Job_slot" .. tostring(i)
|
||||||
local o = opts[i]
|
local o = opts[i]
|
||||||
if o ~= nil then
|
if o ~= nil then
|
||||||
self:SetEntityEnabled(base, true)
|
self:SetEntityEnabled(base, true)
|
||||||
@@ -40,7 +40,7 @@ for i = 1, 3 do
|
|||||||
self:SetEntityEnabled(base, false)
|
self:SetEntityEnabled(base, false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/JobSelectHud", true)`),
|
self:SetEntityEnabled("/ui/SelectUIGroup/JobSelectHud", true)`),
|
||||||
method('JobLabel', `if self.PlayerJob ~= "" and self.Jobs ~= nil then
|
method('JobLabel', `if self.PlayerJob ~= "" and self.Jobs ~= nil then
|
||||||
for cls, list in pairs(self.Jobs) do
|
for cls, list in pairs(self.Jobs) do
|
||||||
for i = 1, #list do
|
for i = 1, #list do
|
||||||
@@ -73,7 +73,7 @@ if starter ~= "" then
|
|||||||
self:Toast("2차 전직: " .. self:JobLabel() .. "! 신규 카드 — " .. sc.name)
|
self:Toast("2차 전직: " .. self:JobLabel() .. "! 신규 카드 — " .. sc.name)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
self:SetText("/ui/DefaultGroup/CombatHud/PlayerPanel/Name", self:JobLabel())
|
self:SetText("/ui/RunUIGroup/CombatHud/PlayerPanel/Name", self:JobLabel())
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/JobSelectHud", false)
|
self:SetEntityEnabled("/ui/SelectUIGroup/JobSelectHud", false)
|
||||||
self:ContinueAfterBoss()`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'jobId' }]),
|
self:ContinueAfterBoss()`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'jobId' }]),
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ for i = 1, #list do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
return false`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'id' }], 0, 'boolean'),
|
return false`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'id' }], 0, 'boolean'),
|
||||||
method('RenderMapNode', `local base = "/ui/DefaultGroup/MapHud/Node_" .. id
|
method('RenderMapNode', `local base = "/ui/RunUIGroup/MapHud/Node_" .. id
|
||||||
local e = _EntityService:GetEntityByPath(base)
|
local e = _EntityService:GetEntityByPath(base)
|
||||||
if e == nil then
|
if e == nil then
|
||||||
return
|
return
|
||||||
@@ -151,7 +151,7 @@ if e.SpriteGUIRendererComponent ~= nil then
|
|||||||
e.SpriteGUIRendererComponent.Color = Color(0.68, 0.68, 0.72, 0.85)
|
e.SpriteGUIRendererComponent.Color = Color(0.68, 0.68, 0.72, 0.85)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if e.ButtonComponent ~= nil then
|
if (e.ButtonComponent ~= nil or e:AddComponent("ButtonComponent") ~= nil) then
|
||||||
e.ButtonComponent.Enable = reachable
|
e.ButtonComponent.Enable = reachable
|
||||||
end`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'id' }]),
|
end`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'id' }]),
|
||||||
method('RenderMapDots', `local node = self.MapNodes[fromId]
|
method('RenderMapDots', `local node = self.MapNodes[fromId]
|
||||||
@@ -162,7 +162,7 @@ if node ~= nil then
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
for k = 1, 3 do
|
for k = 1, 3 do
|
||||||
local d = _EntityService:GetEntityByPath("/ui/DefaultGroup/MapHud/Dot_" .. dotId .. "_" .. tostring(k))
|
local d = _EntityService:GetEntityByPath("/ui/RunUIGroup/MapHud/Dot_" .. dotId .. "_" .. tostring(k))
|
||||||
if d ~= nil then
|
if d ~= nil then
|
||||||
d.Enable = has
|
d.Enable = has
|
||||||
if has == true and d.SpriteGUIRendererComponent ~= nil then
|
if has == true and d.SpriteGUIRendererComponent ~= nil then
|
||||||
@@ -210,7 +210,7 @@ if self.VisitedNodes == nil then
|
|||||||
self.VisitedNodes = {}
|
self.VisitedNodes = {}
|
||||||
end
|
end
|
||||||
table.insert(self.VisitedNodes, id)
|
table.insert(self.VisitedNodes, id)
|
||||||
local hud = _EntityService:GetEntityByPath("/ui/DefaultGroup/MapHud")
|
local hud = _EntityService:GetEntityByPath("/ui/RunUIGroup/MapHud")
|
||||||
if hud ~= nil then
|
if hud ~= nil then
|
||||||
hud.Enable = false
|
hud.Enable = false
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ return table.concat(parts, " ")`, [
|
|||||||
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'poison' },
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'poison' },
|
||||||
], 0, 'string'),
|
], 0, 'string'),
|
||||||
method('RenderCombat', `for i = 1, ${MAX_MONSTERS} do
|
method('RenderCombat', `for i = 1, ${MAX_MONSTERS} do
|
||||||
local base = "/ui/DefaultGroup/CombatHud/MonsterSlot" .. tostring(i)
|
local base = "/ui/RunUIGroup/CombatHud/MonsterStatus" .. tostring(i)
|
||||||
local m = self.Monsters[i]
|
local m = self.Monsters[i]
|
||||||
if m ~= nil and m.alive == true then
|
if m ~= nil and m.alive == true then
|
||||||
self:SetEntityEnabled(base, true)
|
self:SetEntityEnabled(base, true)
|
||||||
@@ -41,7 +41,6 @@ return table.concat(parts, " ")`, [
|
|||||||
local dragActive = self.DragTargetIndex ~= nil and self.DragTargetIndex > 0
|
local dragActive = self.DragTargetIndex ~= nil and self.DragTargetIndex > 0
|
||||||
local shownTarget = self.TargetIndex
|
local shownTarget = self.TargetIndex
|
||||||
if dragActive == true then shownTarget = self.DragTargetIndex end
|
if dragActive == true then shownTarget = self.DragTargetIndex end
|
||||||
self:SetEntityEnabled(base .. "/TargetFrame", i == shownTarget)
|
|
||||||
self:SetEntityEnabled(base .. "/TargetMarker", i == shownTarget and dragActive)
|
self:SetEntityEnabled(base .. "/TargetMarker", i == shownTarget and dragActive)
|
||||||
self:SetEntityEnabled(base .. "/TargetMarker/Label", i == shownTarget and dragActive)
|
self:SetEntityEnabled(base .. "/TargetMarker/Label", i == shownTarget and dragActive)
|
||||||
local intentEntity = _EntityService:GetEntityByPath(base .. "/Intent")
|
local intentEntity = _EntityService:GetEntityByPath(base .. "/Intent")
|
||||||
@@ -64,11 +63,15 @@ return table.concat(parts, " ")`, [
|
|||||||
self:SetEntityEnabled(base, false)
|
self:SetEntityEnabled(base, false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
self:SetText("/ui/DefaultGroup/CombatHud/PlayerPanel/HpText", string.format("%d", self.PlayerHp) .. "/" .. string.format("%d", self.PlayerMaxHp))
|
self:SetText("/ui/RunUIGroup/CombatHud/PlayerPanel/HpText", string.format("%d", self.PlayerHp) .. "/" .. string.format("%d", self.PlayerMaxHp))
|
||||||
self:SetHpBar("/ui/DefaultGroup/CombatHud/PlayerPanel/HpBarFill", self.PlayerHp, self.PlayerMaxHp, 220)
|
self:SetHpBar("/ui/RunUIGroup/CombatHud/PlayerPanel/HpBarFill", self.PlayerHp, self.PlayerMaxHp, 220)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/PlayerPanel/BlockBadge", self.PlayerBlock > 0)
|
self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/PlayerPanel/BlockBadge", self.PlayerBlock > 0)
|
||||||
self:SetText("/ui/DefaultGroup/CombatHud/PlayerPanel/BlockBadge/Value", string.format("%d", self.PlayerBlock))
|
self:SetText("/ui/RunUIGroup/CombatHud/PlayerPanel/BlockBadge/Value", string.format("%d", self.PlayerBlock))
|
||||||
local pb = self:BuffsLabel(self.PlayerStr, self.PlayerWeak, self.PlayerVuln, 0)
|
local pb = self:BuffsLabel(self.PlayerStr, self.PlayerWeak, self.PlayerVuln, 0)
|
||||||
|
if self.PlayerIntangible ~= nil and self.PlayerIntangible > 0 then
|
||||||
|
if pb ~= "" then pb = pb .. " " end
|
||||||
|
pb = pb .. "불가침" .. tostring(self.PlayerIntangible)
|
||||||
|
end
|
||||||
if self.PlayerDex ~= nil and self.PlayerDex > 0 then
|
if self.PlayerDex ~= nil and self.PlayerDex > 0 then
|
||||||
if pb ~= "" then pb = pb .. " " end
|
if pb ~= "" then pb = pb .. " " end
|
||||||
pb = pb .. "민첩+" .. tostring(self.PlayerDex)
|
pb = pb .. "민첩+" .. tostring(self.PlayerDex)
|
||||||
@@ -86,10 +89,10 @@ if self.PlayerPowers ~= nil and #self.PlayerPowers > 0 then
|
|||||||
if pb ~= "" then pb = pb .. " · " end
|
if pb ~= "" then pb = pb .. " · " end
|
||||||
pb = pb .. table.concat(names, " ")
|
pb = pb .. table.concat(names, " ")
|
||||||
end
|
end
|
||||||
self:SetText("/ui/DefaultGroup/CombatHud/PlayerPanel/Buffs", pb)
|
self:SetText("/ui/RunUIGroup/CombatHud/PlayerPanel/Buffs", pb)
|
||||||
self:RenderRun()`),
|
self:RenderRun()`),
|
||||||
method('ShowDmgPop', `local slotKey = string.format("%d", math.floor(slot or 0))
|
method('ShowDmgPop', `local slotKey = string.format("%d", math.floor(slot or 0))
|
||||||
local base = "/ui/DefaultGroup/CombatHud/DmgPop" .. slotKey
|
local base = "/ui/RunUIGroup/CombatHud/DmgPop" .. slotKey
|
||||||
local pop = _EntityService:GetEntityByPath(base)
|
local pop = _EntityService:GetEntityByPath(base)
|
||||||
if pop == nil then
|
if pop == nil then
|
||||||
return
|
return
|
||||||
@@ -134,7 +137,7 @@ if m ~= nil and m.entity ~= nil and isvalid(m.entity) and m.entity.TransformComp
|
|||||||
local screen = _UILogic:WorldToScreenPosition(Vector2(wp.x, wp.y + ${HEAD_OFFSET_Y + 0.45}))
|
local screen = _UILogic:WorldToScreenPosition(Vector2(wp.x, wp.y + ${HEAD_OFFSET_Y + 0.45}))
|
||||||
popPos = _UILogic:ScreenToUIPosition(screen)
|
popPos = _UILogic:ScreenToUIPosition(screen)
|
||||||
else
|
else
|
||||||
local slotEntity = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/MonsterSlot" .. slotKey)
|
local slotEntity = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/MonsterStatus" .. slotKey)
|
||||||
if slotEntity ~= nil and slotEntity.UITransformComponent ~= nil then
|
if slotEntity ~= nil and slotEntity.UITransformComponent ~= nil then
|
||||||
local sp = slotEntity.UITransformComponent.anchoredPosition
|
local sp = slotEntity.UITransformComponent.anchoredPosition
|
||||||
popPos = Vector2(sp.x, sp.y + 76)
|
popPos = Vector2(sp.x, sp.y + 76)
|
||||||
@@ -169,7 +172,7 @@ end, 0.48)`, [
|
|||||||
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' },
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' },
|
||||||
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'amount' },
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'amount' },
|
||||||
]),
|
]),
|
||||||
method('ShowPlayerDmgPop', `local base = "/ui/DefaultGroup/CombatHud/PlayerPanel/DmgPop"
|
method('ShowPlayerDmgPop', `local base = "/ui/RunUIGroup/CombatHud/PlayerPanel/DmgPop"
|
||||||
if amount > 0 then
|
if amount > 0 then
|
||||||
self:SetText(base, "-" .. string.format("%d", amount))
|
self:SetText(base, "-" .. string.format("%d", amount))
|
||||||
else
|
else
|
||||||
@@ -291,7 +294,7 @@ end
|
|||||||
local wp = tr.WorldPosition
|
local wp = tr.WorldPosition
|
||||||
local screen = _UILogic:WorldToScreenPosition(Vector2(wp.x, wp.y + ${HEAD_OFFSET_Y}))
|
local screen = _UILogic:WorldToScreenPosition(Vector2(wp.x, wp.y + ${HEAD_OFFSET_Y}))
|
||||||
local uipos = _UILogic:ScreenToUIPosition(screen)
|
local uipos = _UILogic:ScreenToUIPosition(screen)
|
||||||
local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/MonsterSlot" .. tostring(slot))
|
local e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/MonsterStatus" .. tostring(slot))
|
||||||
if e ~= nil and e.UITransformComponent ~= nil then
|
if e ~= nil and e.UITransformComponent ~= nil then
|
||||||
e.UITransformComponent.anchoredPosition = uipos
|
e.UITransformComponent.anchoredPosition = uipos
|
||||||
end`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }]),
|
end`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }]),
|
||||||
@@ -303,6 +306,6 @@ end`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], N
|
|||||||
if self.AscensionLevel > 0 then
|
if self.AscensionLevel > 0 then
|
||||||
floorText = floorText .. " · 승천" .. string.format("%d", self.AscensionLevel)
|
floorText = floorText .. " · 승천" .. string.format("%d", self.AscensionLevel)
|
||||||
end
|
end
|
||||||
self:SetText("/ui/DefaultGroup/CombatHud/TopBar/Floor", floorText)
|
self:SetText("/ui/RunUIGroup/CombatHud/TopBar/Floor", floorText)
|
||||||
self:SetText("/ui/DefaultGroup/CombatHud/TopBar/Gold", "메소 " .. string.format("%d", self.Gold))`),
|
self:SetText("/ui/RunUIGroup/CombatHud/TopBar/Gold", "메소 " .. string.format("%d", self.Gold))`),
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ for id, c in pairs(self.Cards) do
|
|||||||
end
|
end
|
||||||
table.sort(pool)
|
table.sort(pool)
|
||||||
return pool`, [], 0, 'any'),
|
return pool`, [], 0, 'any'),
|
||||||
method('OfferReward', `self:SetEntityEnabled("/ui/DefaultGroup/CardHand", false)
|
method('OfferReward', `self:SetEntityEnabled("/ui/RunUIGroup/CardHand", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/DeckHud", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/DeckHud", false)
|
||||||
local pool = self:CardPool()
|
local pool = self:CardPool()
|
||||||
local byRarity = {}
|
local byRarity = {}
|
||||||
for _, id in ipairs(pool) do
|
for _, id in ipairs(pool) do
|
||||||
@@ -30,15 +30,15 @@ for i = 1, 3 do
|
|||||||
self.RewardChoices[i] = bucket[math.random(1, #bucket)]
|
self.RewardChoices[i] = bucket[math.random(1, #bucket)]
|
||||||
self:ApplyRewardVisual(i, self.RewardChoices[i])
|
self:ApplyRewardVisual(i, self.RewardChoices[i])
|
||||||
end
|
end
|
||||||
local hud = _EntityService:GetEntityByPath("/ui/DefaultGroup/RewardHud")
|
local hud = _EntityService:GetEntityByPath("/ui/RunUIGroup/RewardHud")
|
||||||
if hud ~= nil then
|
if hud ~= nil then
|
||||||
hud.Enable = true
|
hud.Enable = true
|
||||||
end`),
|
end`),
|
||||||
method('ApplyRewardVisual', `self:ApplyCardFace("/ui/DefaultGroup/RewardHud/Reward" .. tostring(slot), cardId)`, [
|
method('ApplyRewardVisual', `self:ApplyCardFace("/ui/RunUIGroup/RewardHud/Reward" .. tostring(slot), cardId)`, [
|
||||||
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' },
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' },
|
||||||
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'cardId' },
|
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'cardId' },
|
||||||
]),
|
]),
|
||||||
method('PickReward', `if self.CombatOver ~= true or self.RunActive ~= true then
|
method('PickReward', `if self.CombatOver ~= true or self.RunActive ~= true then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if slot ~= 0 and self.RewardChoices ~= nil then
|
if slot ~= 0 and self.RewardChoices ~= nil then
|
||||||
@@ -47,7 +47,12 @@ if slot ~= 0 and self.RewardChoices ~= nil then
|
|||||||
table.insert(self.RunDeck, id)
|
table.insert(self.RunDeck, id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local hud = _EntityService:GetEntityByPath("/ui/DefaultGroup/RewardHud")
|
if self.BonusRewardScreens ~= nil and self.BonusRewardScreens > 0 and slot ~= 0 then
|
||||||
|
self.BonusRewardScreens = self.BonusRewardScreens - 1
|
||||||
|
self:OfferReward()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local hud = _EntityService:GetEntityByPath("/ui/RunUIGroup/RewardHud")
|
||||||
if hud ~= nil then
|
if hud ~= nil then
|
||||||
hud.Enable = false
|
hud.Enable = false
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -59,21 +59,45 @@ _TimerService:SetTimerOnce(function()
|
|||||||
end, 0.2)`),
|
end, 0.2)`),
|
||||||
method('StartCombat', `self:ShowState("combat")
|
method('StartCombat', `self:ShowState("combat")
|
||||||
self:KickCombatCamera()
|
self:KickCombatCamera()
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/Result", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/Result", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/PotionMenu", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/PotionMenu", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/TooltipBox", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/TooltipBox", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/DiscardPrompt", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/DiscardPrompt", false)
|
||||||
self:SetText("/ui/DefaultGroup/CombatHud/PlayerPanel/Name", self:JobLabel())
|
self:SetText("/ui/RunUIGroup/CombatHud/PlayerPanel/Name", self:JobLabel())
|
||||||
self.MaxEnergy = 3
|
self.MaxEnergy = 3
|
||||||
self.Turn = 0
|
self.Turn = 0
|
||||||
self.PlayerBlock = 0
|
self.PlayerBlock = 0
|
||||||
|
self.BlockGainMultiplier = 1
|
||||||
|
self.CardsDrawnThisCombat = 0
|
||||||
|
self.HandCostZeroThisTurn = false
|
||||||
|
self.DrawDisabledThisTurn = false
|
||||||
|
self.NextSkillCostZero = false
|
||||||
|
self.NextSkillRepeatCount = 0
|
||||||
|
self.SkillCostReductionThisTurn = 0
|
||||||
|
self.CombatCardCostReduction = {}
|
||||||
|
self.SkillSlyOnPlayCards = {}
|
||||||
|
self.TurnSkillSlyCards = {}
|
||||||
|
self.ShivFirstDamageBonusUsed = false
|
||||||
|
self.ActiveAttackDamageVsWeakMultiplier = 1
|
||||||
|
self.DrawDamageThisTurn = 0
|
||||||
|
self.DrawPoisonThisTurn = 0
|
||||||
|
self.ShivAoeThisCombat = false
|
||||||
|
self.PoisonApplicationsThisCombat = 0
|
||||||
|
self.EnemyStrengthLossThisTurn = 0
|
||||||
self.PlayerStr = 0
|
self.PlayerStr = 0
|
||||||
self.PlayerDex = 0
|
self.PlayerDex = 0
|
||||||
self.PlayerThorns = 0
|
self.PlayerThorns = 0
|
||||||
self.PlayerWeak = 0
|
self.PlayerWeak = 0
|
||||||
self.PlayerVuln = 0
|
self.PlayerVuln = 0
|
||||||
|
self.PlayerIntangible = 0
|
||||||
|
self.BonusRewardScreens = 0
|
||||||
|
self.ActiveKillReward = 0
|
||||||
self.PlayerPowers = {}
|
self.PlayerPowers = {}
|
||||||
self.FightAttackCount = 0
|
self.FightAttackCount = 0
|
||||||
|
self.TurnAttackCardsPlayed = 0
|
||||||
|
self.TurnDiscardedCards = 0
|
||||||
|
self.TurnCardsPlayedThisTurn = 0
|
||||||
|
self.DamageDealtThisTurn = 0
|
||||||
self.DmgPopSeq = 0
|
self.DmgPopSeq = 0
|
||||||
self.FirstHpLossDone = false
|
self.FirstHpLossDone = false
|
||||||
self.ClayBlockNext = 0
|
self.ClayBlockNext = 0
|
||||||
@@ -81,6 +105,16 @@ self.DiscardSelectRemaining = 0
|
|||||||
self.DiscardSelectTotal = 0
|
self.DiscardSelectTotal = 0
|
||||||
self.DiscardPostShiv = 0
|
self.DiscardPostShiv = 0
|
||||||
self.DiscardShivPerPick = 0
|
self.DiscardShivPerPick = 0
|
||||||
|
self.RetainSelectActive = false
|
||||||
|
self.ReserveSelectActive = false
|
||||||
|
self.NextTurnBlock = 0
|
||||||
|
self.NextTurnDraw = 0
|
||||||
|
self.NextTurnKeepBlock = false
|
||||||
|
self.NextTurnAttackMultiplier = 1
|
||||||
|
self.TurnAttackMultiplier = 1
|
||||||
|
self.NextTurnSelectPrompt = ""
|
||||||
|
self.NextTurnSelectCopies = 0
|
||||||
|
self.NextTurnAddCards = {}
|
||||||
self.CombatOver = false
|
self.CombatOver = false
|
||||||
self.DiscardPile = {}
|
self.DiscardPile = {}
|
||||||
self.ExhaustPile = {}
|
self.ExhaustPile = {}
|
||||||
@@ -91,11 +125,24 @@ for i = 1, #self.RunDeck do
|
|||||||
self.DrawPile[i] = self.RunDeck[i]
|
self.DrawPile[i] = self.RunDeck[i]
|
||||||
end
|
end
|
||||||
self:Shuffle(self.DrawPile)
|
self:Shuffle(self.DrawPile)
|
||||||
|
self:PrepareCombatDrawPile()
|
||||||
self:BuildMonsters()
|
self:BuildMonsters()
|
||||||
self:RenderCombat()
|
self:RenderCombat()
|
||||||
self:StartPlayerTurn()
|
self:StartPlayerTurn()
|
||||||
self:ApplyRelics("combatStart")
|
self:ApplyRelics("combatStart")
|
||||||
self:RenderCombat()`),
|
self:RenderCombat()
|
||||||
|
local slotTid = 0
|
||||||
|
slotTid = _TimerService:SetTimerRepeat(function()
|
||||||
|
if self.CombatOver == true or self.Monsters == nil or #self.Monsters == 0 then
|
||||||
|
_TimerService:ClearTimer(slotTid)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
for i = 1, #self.Monsters do
|
||||||
|
if self.Monsters[i] ~= nil and self.Monsters[i].alive == true then
|
||||||
|
self:PositionMonsterSlot(i)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end, 0.15)`),
|
||||||
method('RegisterMonster', `if self.Registered == nil then
|
method('RegisterMonster', `if self.Registered == nil then
|
||||||
self.Registered = {}
|
self.Registered = {}
|
||||||
end
|
end
|
||||||
@@ -193,7 +240,7 @@ for i = 1, n do
|
|||||||
local startIdx = 1
|
local startIdx = 1
|
||||||
if #intents > 0 then startIdx = math.random(1, #intents) end
|
if #intents > 0 then startIdx = math.random(1, #intents) end
|
||||||
self.Monsters[i] = { entity = item.entity, enemyId = item.enemyId, name = e.name,
|
self.Monsters[i] = { entity = item.entity, enemyId = item.enemyId, name = e.name,
|
||||||
hp = maxHp, maxHp = maxHp, block = 0, str = 0, weak = 0, vuln = 0, poison = 0,
|
hp = maxHp, maxHp = maxHp, block = 0, str = e.str or 0, weak = 0, vuln = 0, poison = 0, artifact = e.artifact or 0,
|
||||||
hitClip = hitClip, standClip = standClip, motionBusy = false,
|
hitClip = hitClip, standClip = standClip, motionBusy = false,
|
||||||
intents = intents, intentIdx = startIdx, alive = true, slot = i }
|
intents = intents, intentIdx = startIdx, alive = true, slot = i }
|
||||||
self:ReviveMonsterEntity(item.entity)
|
self:ReviveMonsterEntity(item.entity)
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ if lp.CurrentMapName == target then
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
_TeleportService:TeleportToMapPosition(lp, Vector3(-6, 0.03, 0), target)`),
|
_TeleportService:TeleportToMapPosition(lp, Vector3(-6, 0.03, 0), target)`),
|
||||||
method('ShowResult', `self:SetText("/ui/DefaultGroup/CombatHud/Result", text)
|
method('ShowResult', `self:SetText("/ui/RunUIGroup/CombatHud/Result", text)
|
||||||
local entity = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/Result")
|
local entity = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/Result")
|
||||||
if entity ~= nil then
|
if entity ~= nil then
|
||||||
entity.Enable = true
|
entity.Enable = true
|
||||||
end`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'text' }]),
|
end`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'text' }]),
|
||||||
|
|||||||
@@ -20,11 +20,11 @@ self.ShopPotion = pkeys[math.random(1, #pkeys)]
|
|||||||
self.ShopPotionBought = false
|
self.ShopPotionBought = false
|
||||||
self:RenderShop()
|
self:RenderShop()
|
||||||
self:ShowState("shop")`),
|
self:ShowState("shop")`),
|
||||||
method('RenderShop', `self:SetText("/ui/DefaultGroup/ShopHud/Gold", "메소 " .. string.format("%d", self.Gold))
|
method('RenderShop', `self:SetText("/ui/RunUIGroup/ShopHud/Gold", "메소 " .. string.format("%d", self.Gold))
|
||||||
for i = 1, 3 do
|
for i = 1, 3 do
|
||||||
local cid = self.ShopChoices[i]
|
local cid = self.ShopChoices[i]
|
||||||
local c = self.Cards[cid]
|
local c = self.Cards[cid]
|
||||||
local base = "/ui/DefaultGroup/ShopHud/Card" .. tostring(i)
|
local base = "/ui/RunUIGroup/ShopHud/Card" .. tostring(i)
|
||||||
if c ~= nil then
|
if c ~= nil then
|
||||||
self:ApplyCardFace(base, cid)
|
self:ApplyCardFace(base, cid)
|
||||||
self:SetText(base .. "/Price", string.format("%d", ${CARD_PRICE}) .. " 메소")
|
self:SetText(base .. "/Price", string.format("%d", ${CARD_PRICE}) .. " 메소")
|
||||||
@@ -38,9 +38,9 @@ for i = 1, 3 do
|
|||||||
end
|
end
|
||||||
local rr = self.Relics[self.ShopRelic]
|
local rr = self.Relics[self.ShopRelic]
|
||||||
if rr ~= nil then
|
if rr ~= nil then
|
||||||
self:SetText("/ui/DefaultGroup/ShopHud/Relic/Label", rr.name .. " — " .. rr.desc)
|
self:SetText("/ui/RunUIGroup/ShopHud/Relic/Label", rr.name .. " — " .. rr.desc)
|
||||||
self:SetText("/ui/DefaultGroup/ShopHud/Relic/Price", string.format("%d", ${RELIC_PRICE}) .. " 메소")
|
self:SetText("/ui/RunUIGroup/ShopHud/Relic/Price", string.format("%d", ${RELIC_PRICE}) .. " 메소")
|
||||||
local re = _EntityService:GetEntityByPath("/ui/DefaultGroup/ShopHud/Relic")
|
local re = _EntityService:GetEntityByPath("/ui/RunUIGroup/ShopHud/Relic")
|
||||||
if re ~= nil and re.SpriteGUIRendererComponent ~= nil then
|
if re ~= nil and re.SpriteGUIRendererComponent ~= nil then
|
||||||
if self.ShopRelicBought == true then
|
if self.ShopRelicBought == true then
|
||||||
re.SpriteGUIRendererComponent.Color = Color(0.2, 0.22, 0.26, 0.6)
|
re.SpriteGUIRendererComponent.Color = Color(0.2, 0.22, 0.26, 0.6)
|
||||||
@@ -51,9 +51,9 @@ if rr ~= nil then
|
|||||||
end
|
end
|
||||||
local pp = self.Potions[self.ShopPotion]
|
local pp = self.Potions[self.ShopPotion]
|
||||||
if pp ~= nil then
|
if pp ~= nil then
|
||||||
self:SetText("/ui/DefaultGroup/ShopHud/Potion/Label", pp.name .. " — " .. pp.desc)
|
self:SetText("/ui/RunUIGroup/ShopHud/Potion/Label", pp.name .. " — " .. pp.desc)
|
||||||
self:SetText("/ui/DefaultGroup/ShopHud/Potion/Price", string.format("%d", ${POTIONS.shopPrice}) .. " 메소")
|
self:SetText("/ui/RunUIGroup/ShopHud/Potion/Price", string.format("%d", ${POTIONS.shopPrice}) .. " 메소")
|
||||||
local pe = _EntityService:GetEntityByPath("/ui/DefaultGroup/ShopHud/Potion")
|
local pe = _EntityService:GetEntityByPath("/ui/RunUIGroup/ShopHud/Potion")
|
||||||
if pe ~= nil and pe.SpriteGUIRendererComponent ~= nil then
|
if pe ~= nil and pe.SpriteGUIRendererComponent ~= nil then
|
||||||
if self.ShopPotionBought == true then
|
if self.ShopPotionBought == true then
|
||||||
pe.SpriteGUIRendererComponent.Color = Color(0.2, 0.22, 0.26, 0.6)
|
pe.SpriteGUIRendererComponent.Color = Color(0.2, 0.22, 0.26, 0.6)
|
||||||
@@ -106,24 +106,24 @@ if self.PlayerHp > self.PlayerMaxHp then
|
|||||||
self.PlayerHp = self.PlayerMaxHp
|
self.PlayerHp = self.PlayerMaxHp
|
||||||
end
|
end
|
||||||
local healed = self.PlayerHp - old
|
local healed = self.PlayerHp - old
|
||||||
self:SetText("/ui/DefaultGroup/RestHud/Info", "HP " .. string.format("%d", old) .. " → " .. string.format("%d", self.PlayerHp) .. " (+" .. string.format("%d", healed) .. ")")
|
self:SetText("/ui/RunUIGroup/RestHud/Info", "HP " .. string.format("%d", old) .. " → " .. string.format("%d", self.PlayerHp) .. " (+" .. string.format("%d", healed) .. ")")
|
||||||
self:RenderCombat()
|
self:RenderCombat()
|
||||||
self:ShowState("rest")`),
|
self:ShowState("rest")`),
|
||||||
method('LeaveNode', `local s = _EntityService:GetEntityByPath("/ui/DefaultGroup/ShopHud")
|
method('LeaveNode', `local s = _EntityService:GetEntityByPath("/ui/RunUIGroup/ShopHud")
|
||||||
if s ~= nil then
|
if s ~= nil then
|
||||||
s.Enable = false
|
s.Enable = false
|
||||||
end
|
end
|
||||||
local r = _EntityService:GetEntityByPath("/ui/DefaultGroup/RestHud")
|
local r = _EntityService:GetEntityByPath("/ui/RunUIGroup/RestHud")
|
||||||
if r ~= nil then
|
if r ~= nil then
|
||||||
r.Enable = false
|
r.Enable = false
|
||||||
end
|
end
|
||||||
local t = _EntityService:GetEntityByPath("/ui/DefaultGroup/TreasureHud")
|
local t = _EntityService:GetEntityByPath("/ui/RunUIGroup/TreasureHud")
|
||||||
if t ~= nil then
|
if t ~= nil then
|
||||||
t.Enable = false
|
t.Enable = false
|
||||||
end
|
end
|
||||||
self:ShowMap()`),
|
self:ShowMap()`),
|
||||||
method('ShowTreasure', `self.ChestOpened = false
|
method('ShowTreasure', `self.ChestOpened = false
|
||||||
local chest = _EntityService:GetEntityByPath("/ui/DefaultGroup/TreasureHud/Chest")
|
local chest = _EntityService:GetEntityByPath("/ui/RunUIGroup/TreasureHud/Chest")
|
||||||
if chest ~= nil then
|
if chest ~= nil then
|
||||||
if chest.SpriteGUIRendererComponent ~= nil then
|
if chest.SpriteGUIRendererComponent ~= nil then
|
||||||
chest.SpriteGUIRendererComponent.ImageRUID = "${CHEST_CLOSED_RUID}"
|
chest.SpriteGUIRendererComponent.ImageRUID = "${CHEST_CLOSED_RUID}"
|
||||||
@@ -132,15 +132,15 @@ if chest ~= nil then
|
|||||||
chest.UITransformComponent.anchoredPosition = Vector2(0, 40)
|
chest.UITransformComponent.anchoredPosition = Vector2(0, 40)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/TreasureHud/Reward", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/TreasureHud/Reward", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/TreasureHud/Hint", true)
|
self:SetEntityEnabled("/ui/RunUIGroup/TreasureHud/Hint", true)
|
||||||
self:ShowState("treasure")`),
|
self:ShowState("treasure")`),
|
||||||
method('OpenChest', `if self.ChestOpened == true then
|
method('OpenChest', `if self.ChestOpened == true then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
self.ChestOpened = true
|
self.ChestOpened = true
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/TreasureHud/Hint", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/TreasureHud/Hint", false)
|
||||||
local chest = _EntityService:GetEntityByPath("/ui/DefaultGroup/TreasureHud/Chest")
|
local chest = _EntityService:GetEntityByPath("/ui/RunUIGroup/TreasureHud/Chest")
|
||||||
local steps = { 10, -10, 8, -8, 5, 0 }
|
local steps = { 10, -10, 8, -8, 5, 0 }
|
||||||
for i = 1, #steps do
|
for i = 1, #steps do
|
||||||
local dx = steps[i]
|
local dx = steps[i]
|
||||||
@@ -167,7 +167,7 @@ _TimerService:SetTimerOnce(function()
|
|||||||
end
|
end
|
||||||
self.Gold = self.Gold + g
|
self.Gold = self.Gold + g
|
||||||
self:RenderRun()
|
self:RenderRun()
|
||||||
self:SetText("/ui/DefaultGroup/TreasureHud/Reward", msg)
|
self:SetText("/ui/RunUIGroup/TreasureHud/Reward", msg)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/TreasureHud/Reward", true)
|
self:SetEntityEnabled("/ui/RunUIGroup/TreasureHud/Reward", true)
|
||||||
end, 0.55)`),
|
end, 0.55)`),
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ export const soulMethods = [
|
|||||||
method('ShowSoulShop', `self:RenderSoulLabel()
|
method('ShowSoulShop', `self:RenderSoulLabel()
|
||||||
self:RenderSoulShop()
|
self:RenderSoulShop()
|
||||||
self:BindSoulShopButtons()
|
self:BindSoulShopButtons()
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/SoulShopHud", true)`),
|
self:SetEntityEnabled("/ui/LobbyUIGroup/SoulShopHud", true)`),
|
||||||
method('CloseSoulShop', `self:SetEntityEnabled("/ui/DefaultGroup/SoulShopHud", false)`),
|
method('CloseSoulShop', `self:SetEntityEnabled("/ui/LobbyUIGroup/SoulShopHud", false)`),
|
||||||
method('ReqLoadSouls', `local ds = _DataStorageService:GetUserDataStorage(userId)
|
method('ReqLoadSouls', `local ds = _DataStorageService:GetUserDataStorage(userId)
|
||||||
local e1, pts = ds:GetAndWait("soulPoints")
|
local e1, pts = ds:GetAndWait("soulPoints")
|
||||||
local e2, unl = ds:GetAndWait("soulUnlocks")
|
local e2, unl = ds:GetAndWait("soulUnlocks")
|
||||||
@@ -63,7 +63,7 @@ self:RenderSoulLabel()
|
|||||||
self:RenderSoulShop()`, [{ Type: "number", DefaultValue: null, SyncDirection: 0, Attributes: [], Name: "slot" }]),
|
self:RenderSoulShop()`, [{ Type: "number", DefaultValue: null, SyncDirection: 0, Attributes: [], Name: "slot" }]),
|
||||||
method('RenderSoulShop', `local defs = self.SoulShopDef or {}
|
method('RenderSoulShop', `local defs = self.SoulShopDef or {}
|
||||||
for i = 1, 4 do
|
for i = 1, 4 do
|
||||||
local base = "/ui/DefaultGroup/SoulShopHud/Item" .. tostring(i)
|
local base = "/ui/LobbyUIGroup/SoulShopHud/Item" .. tostring(i)
|
||||||
local d = defs[i]
|
local d = defs[i]
|
||||||
if d == nil then
|
if d == nil then
|
||||||
self:SetEntityEnabled(base, false)
|
self:SetEntityEnabled(base, false)
|
||||||
@@ -87,8 +87,8 @@ end
|
|||||||
self.SoulShopBound = true
|
self.SoulShopBound = true
|
||||||
for i = 1, 4 do
|
for i = 1, 4 do
|
||||||
local idx = i
|
local idx = i
|
||||||
local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/SoulShopHud/Item" .. tostring(i))
|
local e = _EntityService:GetEntityByPath("/ui/LobbyUIGroup/SoulShopHud/Item" .. tostring(i))
|
||||||
if e ~= nil and e.ButtonComponent ~= nil then
|
if e ~= nil and (e.ButtonComponent ~= nil or e:AddComponent("ButtonComponent") ~= nil) then
|
||||||
e:ConnectEvent(ButtonClickEvent, function() self:BuySoulUnlock(idx) end)
|
e:ConnectEvent(ButtonClickEvent, function() self:BuySoulUnlock(idx) end)
|
||||||
end
|
end
|
||||||
end`),
|
end`),
|
||||||
|
|||||||
@@ -6,37 +6,45 @@ export const stateMethods = [
|
|||||||
method('HideGameHud', `self:SetEntityEnabled("/ui/DefaultGroup/Button_Attack", false)
|
method('HideGameHud', `self:SetEntityEnabled("/ui/DefaultGroup/Button_Attack", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/Button_Jump", false)
|
self:SetEntityEnabled("/ui/DefaultGroup/Button_Jump", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/UIJoystick", false)
|
self:SetEntityEnabled("/ui/DefaultGroup/UIJoystick", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/DeckHud", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/DeckHud", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CardHand", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/CardHand", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CombatHud", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/CombatHud", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/RewardHud", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/RewardHud", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/MapHud", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/MapHud", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/ShopHud", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/ShopHud", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/RestHud", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/RestHud", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/TreasureHud", false)
|
self:SetEntityEnabled("/ui/RunUIGroup/TreasureHud", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/JobChoiceHud", false)
|
self:SetEntityEnabled("/ui/SelectUIGroup/JobChoiceHud", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/JobSelectHud", false)
|
self:SetEntityEnabled("/ui/SelectUIGroup/JobSelectHud", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/DeckInspectHud", false)
|
self:SetEntityEnabled("/ui/DeckUIGroup/DeckInspectHud", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/DeckAllHud", false)
|
self:SetEntityEnabled("/ui/DeckUIGroup/DeckAllHud", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/LobbyHud", false)
|
self:SetEntityEnabled("/ui/LobbyUIGroup/LobbyHud", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/BoardHud", false)
|
self:SetEntityEnabled("/ui/LobbyUIGroup/BoardHud", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/SoulShopHud", false)`),
|
self:SetEntityEnabled("/ui/LobbyUIGroup/SoulShopHud", false)`),
|
||||||
|
method('ActivateUIGroups', `local function grp(n)
|
||||||
|
local g = _EntityService:GetEntityByPath("/ui/" .. n)
|
||||||
|
if g ~= nil then g:SetEnable(true) end
|
||||||
|
end
|
||||||
|
grp("SelectUIGroup")
|
||||||
|
grp("LobbyUIGroup")
|
||||||
|
grp("RunUIGroup")
|
||||||
|
grp("DeckUIGroup")`, [], 2),
|
||||||
method('ShowState', `self:HideGameHud()
|
method('ShowState', `self:HideGameHud()
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/MainMenu", state == "menu")
|
self:SetEntityEnabled("/ui/DefaultGroup/MainMenu", state == "menu")
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CharacterSelectHud", state == "charselect")
|
self:SetEntityEnabled("/ui/SelectUIGroup/CharacterSelectHud", state == "charselect")
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/LobbyHud", state == "lobby")
|
self:SetEntityEnabled("/ui/LobbyUIGroup/LobbyHud", state == "lobby")
|
||||||
if state == "map" then
|
if state == "map" then
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/MapHud", true)
|
self:SetEntityEnabled("/ui/RunUIGroup/MapHud", true)
|
||||||
elseif state == "combat" then
|
elseif state == "combat" then
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CombatHud", true)
|
self:SetEntityEnabled("/ui/RunUIGroup/CombatHud", true)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/DeckHud", true)
|
self:SetEntityEnabled("/ui/RunUIGroup/DeckHud", true)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/CardHand", true)
|
self:SetEntityEnabled("/ui/RunUIGroup/CardHand", true)
|
||||||
elseif state == "shop" then
|
elseif state == "shop" then
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/ShopHud", true)
|
self:SetEntityEnabled("/ui/RunUIGroup/ShopHud", true)
|
||||||
elseif state == "rest" then
|
elseif state == "rest" then
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/RestHud", true)
|
self:SetEntityEnabled("/ui/RunUIGroup/RestHud", true)
|
||||||
elseif state == "treasure" then
|
elseif state == "treasure" then
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/TreasureHud", true)
|
self:SetEntityEnabled("/ui/RunUIGroup/TreasureHud", true)
|
||||||
end`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'state' }]),
|
end`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'state' }]),
|
||||||
method('ShowMainMenu', `self.SelectedClass = ""
|
method('ShowMainMenu', `self.SelectedClass = ""
|
||||||
self:RenderAscension()
|
self:RenderAscension()
|
||||||
@@ -46,39 +54,39 @@ self:SetText("/ui/DefaultGroup/MainMenu/Subtitle", "캐릭터를 고르고 덱
|
|||||||
self:SetText("/ui/DefaultGroup/MainMenu/NewGameButton", "새 게임")
|
self:SetText("/ui/DefaultGroup/MainMenu/NewGameButton", "새 게임")
|
||||||
self:BindMenuButtons()`),
|
self:BindMenuButtons()`),
|
||||||
method('BindMenuButtons', `local buttonEntity = _EntityService:GetEntityByPath("/ui/DefaultGroup/MainMenu/NewGameButton")
|
method('BindMenuButtons', `local buttonEntity = _EntityService:GetEntityByPath("/ui/DefaultGroup/MainMenu/NewGameButton")
|
||||||
if buttonEntity ~= nil and buttonEntity.ButtonComponent ~= nil then
|
if buttonEntity ~= nil and (buttonEntity.ButtonComponent ~= nil or buttonEntity:AddComponent("ButtonComponent") ~= nil) then
|
||||||
if self.NewGameHandler ~= nil then
|
if self.NewGameHandler ~= nil then
|
||||||
buttonEntity:DisconnectEvent(ButtonClickEvent, self.NewGameHandler)
|
buttonEntity:DisconnectEvent(ButtonClickEvent, self.NewGameHandler)
|
||||||
self.NewGameHandler = nil
|
self.NewGameHandler = nil
|
||||||
end
|
end
|
||||||
self.NewGameHandler = buttonEntity:ConnectEvent(ButtonClickEvent, function() self:ShowCharacterSelect() end)
|
self.NewGameHandler = buttonEntity:ConnectEvent(ButtonClickEvent, function() self:ShowLobby() end)
|
||||||
end
|
end
|
||||||
local warrior = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/WarriorButton")
|
local warrior = _EntityService:GetEntityByPath("/ui/SelectUIGroup/CharacterSelectHud/WarriorButton")
|
||||||
if warrior ~= nil and warrior.ButtonComponent ~= nil then
|
if warrior ~= nil and (warrior.ButtonComponent ~= nil or warrior:AddComponent("ButtonComponent") ~= nil) then
|
||||||
if self.WarriorSelectHandler ~= nil then
|
if self.WarriorSelectHandler ~= nil then
|
||||||
warrior:DisconnectEvent(ButtonClickEvent, self.WarriorSelectHandler)
|
warrior:DisconnectEvent(ButtonClickEvent, self.WarriorSelectHandler)
|
||||||
self.WarriorSelectHandler = nil
|
self.WarriorSelectHandler = nil
|
||||||
end
|
end
|
||||||
self.WarriorSelectHandler = warrior:ConnectEvent(ButtonClickEvent, function() self:SelectClass("warrior") end)
|
self.WarriorSelectHandler = warrior:ConnectEvent(ButtonClickEvent, function() self:SelectClass("warrior") end)
|
||||||
end
|
end
|
||||||
local thief = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/ThiefButton")
|
local thief = _EntityService:GetEntityByPath("/ui/SelectUIGroup/CharacterSelectHud/BanditButton")
|
||||||
if thief ~= nil and thief.ButtonComponent ~= nil then
|
if thief ~= nil and (thief.ButtonComponent ~= nil or thief:AddComponent("ButtonComponent") ~= nil) then
|
||||||
if self.ThiefSelectHandler ~= nil then
|
if self.ThiefSelectHandler ~= nil then
|
||||||
thief:DisconnectEvent(ButtonClickEvent, self.ThiefSelectHandler)
|
thief:DisconnectEvent(ButtonClickEvent, self.ThiefSelectHandler)
|
||||||
self.ThiefSelectHandler = nil
|
self.ThiefSelectHandler = nil
|
||||||
end
|
end
|
||||||
self.ThiefSelectHandler = thief:ConnectEvent(ButtonClickEvent, function() self:SelectClass("bandit") end)
|
self.ThiefSelectHandler = thief:ConnectEvent(ButtonClickEvent, function() self:SelectClass("bandit") end)
|
||||||
end
|
end
|
||||||
local mage = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/MageButton")
|
local mage = _EntityService:GetEntityByPath("/ui/SelectUIGroup/CharacterSelectHud/MageButton")
|
||||||
if mage ~= nil and mage.ButtonComponent ~= nil then
|
if mage ~= nil and (mage.ButtonComponent ~= nil or mage:AddComponent("ButtonComponent") ~= nil) then
|
||||||
if self.MageSelectHandler ~= nil then
|
if self.MageSelectHandler ~= nil then
|
||||||
mage:DisconnectEvent(ButtonClickEvent, self.MageSelectHandler)
|
mage:DisconnectEvent(ButtonClickEvent, self.MageSelectHandler)
|
||||||
self.MageSelectHandler = nil
|
self.MageSelectHandler = nil
|
||||||
end
|
end
|
||||||
self.MageSelectHandler = mage:ConnectEvent(ButtonClickEvent, function() self:SelectClass("magician") end)
|
self.MageSelectHandler = mage:ConnectEvent(ButtonClickEvent, function() self:SelectClass("magician") end)
|
||||||
end
|
end
|
||||||
local allDeckClose = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud/Close")
|
local allDeckClose = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud/Close")
|
||||||
if allDeckClose ~= nil and allDeckClose.ButtonComponent ~= nil then
|
if allDeckClose ~= nil and (allDeckClose.ButtonComponent ~= nil or allDeckClose:AddComponent("ButtonComponent") ~= nil) then
|
||||||
if self.AllDeckCloseHandler ~= nil then
|
if self.AllDeckCloseHandler ~= nil then
|
||||||
allDeckClose:DisconnectEvent(ButtonClickEvent, self.AllDeckCloseHandler)
|
allDeckClose:DisconnectEvent(ButtonClickEvent, self.AllDeckCloseHandler)
|
||||||
self.AllDeckCloseHandler = nil
|
self.AllDeckCloseHandler = nil
|
||||||
@@ -86,16 +94,16 @@ if allDeckClose ~= nil and allDeckClose.ButtonComponent ~= nil then
|
|||||||
self.AllDeckCloseHandler = allDeckClose:ConnectEvent(ButtonClickEvent, function() self:CloseAllDeck() end)
|
self.AllDeckCloseHandler = allDeckClose:ConnectEvent(ButtonClickEvent, function() self:CloseAllDeck() end)
|
||||||
end
|
end
|
||||||
self:BindClassDeckTabs()
|
self:BindClassDeckTabs()
|
||||||
local start = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/StartButton")
|
local start = _EntityService:GetEntityByPath("/ui/SelectUIGroup/CharacterSelectHud/StartButton")
|
||||||
if start ~= nil and start.ButtonComponent ~= nil then
|
if start ~= nil and (start.ButtonComponent ~= nil or start:AddComponent("ButtonComponent") ~= nil) then
|
||||||
if self.StartGameHandler ~= nil then
|
if self.StartGameHandler ~= nil then
|
||||||
start:DisconnectEvent(ButtonClickEvent, self.StartGameHandler)
|
start:DisconnectEvent(ButtonClickEvent, self.StartGameHandler)
|
||||||
self.StartGameHandler = nil
|
self.StartGameHandler = nil
|
||||||
end
|
end
|
||||||
self.StartGameHandler = start:ConnectEvent(ButtonClickEvent, function() self:StartNewGame() end)
|
self.StartGameHandler = start:ConnectEvent(ButtonClickEvent, function() self:StartNewGame() end)
|
||||||
end
|
end
|
||||||
local charBack = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/BackButton")
|
local charBack = _EntityService:GetEntityByPath("/ui/SelectUIGroup/CharacterSelectHud/BackButton")
|
||||||
if charBack ~= nil and charBack.ButtonComponent ~= nil then
|
if charBack ~= nil and (charBack.ButtonComponent ~= nil or charBack:AddComponent("ButtonComponent") ~= nil) then
|
||||||
if self.CharBackHandler ~= nil then
|
if self.CharBackHandler ~= nil then
|
||||||
charBack:DisconnectEvent(ButtonClickEvent, self.CharBackHandler)
|
charBack:DisconnectEvent(ButtonClickEvent, self.CharBackHandler)
|
||||||
self.CharBackHandler = nil
|
self.CharBackHandler = nil
|
||||||
@@ -103,7 +111,7 @@ if charBack ~= nil and charBack.ButtonComponent ~= nil then
|
|||||||
self.CharBackHandler = charBack:ConnectEvent(ButtonClickEvent, function() self:ShowLobby() end)
|
self.CharBackHandler = charBack:ConnectEvent(ButtonClickEvent, function() self:ShowLobby() end)
|
||||||
end
|
end
|
||||||
local ascMinus = _EntityService:GetEntityByPath("/ui/DefaultGroup/MainMenu/AscMinus")
|
local ascMinus = _EntityService:GetEntityByPath("/ui/DefaultGroup/MainMenu/AscMinus")
|
||||||
if ascMinus ~= nil and ascMinus.ButtonComponent ~= nil then
|
if ascMinus ~= nil and (ascMinus.ButtonComponent ~= nil or ascMinus:AddComponent("ButtonComponent") ~= nil) then
|
||||||
if self.AscMinusHandler ~= nil then
|
if self.AscMinusHandler ~= nil then
|
||||||
ascMinus:DisconnectEvent(ButtonClickEvent, self.AscMinusHandler)
|
ascMinus:DisconnectEvent(ButtonClickEvent, self.AscMinusHandler)
|
||||||
self.AscMinusHandler = nil
|
self.AscMinusHandler = nil
|
||||||
@@ -111,7 +119,7 @@ if ascMinus ~= nil and ascMinus.ButtonComponent ~= nil then
|
|||||||
self.AscMinusHandler = ascMinus:ConnectEvent(ButtonClickEvent, function() self:AdjustAscension(-1) end)
|
self.AscMinusHandler = ascMinus:ConnectEvent(ButtonClickEvent, function() self:AdjustAscension(-1) end)
|
||||||
end
|
end
|
||||||
local ascPlus = _EntityService:GetEntityByPath("/ui/DefaultGroup/MainMenu/AscPlus")
|
local ascPlus = _EntityService:GetEntityByPath("/ui/DefaultGroup/MainMenu/AscPlus")
|
||||||
if ascPlus ~= nil and ascPlus.ButtonComponent ~= nil then
|
if ascPlus ~= nil and (ascPlus.ButtonComponent ~= nil or ascPlus:AddComponent("ButtonComponent") ~= nil) then
|
||||||
if self.AscPlusHandler ~= nil then
|
if self.AscPlusHandler ~= nil then
|
||||||
ascPlus:DisconnectEvent(ButtonClickEvent, self.AscPlusHandler)
|
ascPlus:DisconnectEvent(ButtonClickEvent, self.AscPlusHandler)
|
||||||
self.AscPlusHandler = nil
|
self.AscPlusHandler = nil
|
||||||
@@ -122,8 +130,8 @@ end`),
|
|||||||
self:RenderAscension()
|
self:RenderAscension()
|
||||||
self:RenderSoulLabel()
|
self:RenderSoulLabel()
|
||||||
self:ShowState("lobby")
|
self:ShowState("lobby")
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/BoardHud", false)
|
self:SetEntityEnabled("/ui/LobbyUIGroup/BoardHud", false)
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/SoulShopHud", false)
|
self:SetEntityEnabled("/ui/LobbyUIGroup/SoulShopHud", false)
|
||||||
self:BindLobbyButtons()
|
self:BindLobbyButtons()
|
||||||
self:BindMenuButtons()
|
self:BindMenuButtons()
|
||||||
self:GoLobbyMap()`),
|
self:GoLobbyMap()`),
|
||||||
@@ -155,39 +163,39 @@ elseif id == "board" then
|
|||||||
self:ShowBoard()
|
self:ShowBoard()
|
||||||
end`, [{ Type: 'string', DefaultValue: '""', SyncDirection: 0, Attributes: [], Name: 'id' }]),
|
end`, [{ Type: 'string', DefaultValue: '""', SyncDirection: 0, Attributes: [], Name: 'id' }]),
|
||||||
method('RenderSoulLabel', `local s = self.SoulPoints or 0
|
method('RenderSoulLabel', `local s = self.SoulPoints or 0
|
||||||
self:SetText("/ui/DefaultGroup/LobbyHud/SoulLabel", "영혼 " .. string.format("%d", s))
|
self:SetText("/ui/LobbyUIGroup/LobbyHud/SoulLabel", "영혼 " .. string.format("%d", s))
|
||||||
self:SetText("/ui/DefaultGroup/SoulShopHud/Souls", "영혼 " .. string.format("%d", s))`),
|
self:SetText("/ui/LobbyUIGroup/SoulShopHud/Souls", "영혼 " .. string.format("%d", s))`),
|
||||||
method('BindLobbyButtons', `if self.LobbyBound == true then
|
method('BindLobbyButtons', `if self.LobbyBound == true then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
self.LobbyBound = true
|
self.LobbyBound = true
|
||||||
local function bindClick(path, fn)
|
local function bindClick(path, fn)
|
||||||
local e = _EntityService:GetEntityByPath(path)
|
local e = _EntityService:GetEntityByPath(path)
|
||||||
if e ~= nil and e.ButtonComponent ~= nil then
|
if e ~= nil and (e.ButtonComponent ~= nil or e:AddComponent("ButtonComponent") ~= nil) then
|
||||||
e:ConnectEvent(ButtonClickEvent, fn)
|
e:ConnectEvent(ButtonClickEvent, fn)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
bindClick("/ui/DefaultGroup/LobbyHud/AscMinus", function() self:AdjustAscension(-1) end)
|
bindClick("/ui/LobbyUIGroup/LobbyHud/AscMinus", function() self:AdjustAscension(-1) end)
|
||||||
bindClick("/ui/DefaultGroup/LobbyHud/AscPlus", function() self:AdjustAscension(1) end)
|
bindClick("/ui/LobbyUIGroup/LobbyHud/AscPlus", function() self:AdjustAscension(1) end)
|
||||||
bindClick("/ui/DefaultGroup/BoardHud/Close", function() self:CloseBoard() end)
|
bindClick("/ui/LobbyUIGroup/BoardHud/Close", function() self:CloseBoard() end)
|
||||||
bindClick("/ui/DefaultGroup/SoulShopHud/Close", function() self:CloseSoulShop() end)`),
|
bindClick("/ui/LobbyUIGroup/SoulShopHud/Close", function() self:CloseSoulShop() end)`),
|
||||||
method('ShowCodex', `self.CodexMode = true
|
method('ShowCodex', `self.CodexMode = true
|
||||||
self.ClassDeckMode = true
|
self.ClassDeckMode = true
|
||||||
local close = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud/Close")
|
local close = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud/Close")
|
||||||
if close ~= nil and close.ButtonComponent ~= nil then
|
if close ~= nil and (close.ButtonComponent ~= nil or close:AddComponent("ButtonComponent") ~= nil) then
|
||||||
if self.AllDeckCloseHandler ~= nil then
|
if self.AllDeckCloseHandler ~= nil then
|
||||||
close:DisconnectEvent(ButtonClickEvent, self.AllDeckCloseHandler)
|
close:DisconnectEvent(ButtonClickEvent, self.AllDeckCloseHandler)
|
||||||
end
|
end
|
||||||
self.AllDeckCloseHandler = close:ConnectEvent(ButtonClickEvent, function() self:CloseAllDeck() end)
|
self.AllDeckCloseHandler = close:ConnectEvent(ButtonClickEvent, function() self:CloseAllDeck() end)
|
||||||
end
|
end
|
||||||
self:BindClassDeckTabs()
|
self:BindClassDeckTabs()
|
||||||
self:SetEntityEnabled("/ui/DefaultGroup/LobbyHud", false)
|
self:SetEntityEnabled("/ui/LobbyUIGroup/LobbyHud", false)
|
||||||
self:SetClassDeckTab("warrior")
|
self:SetClassDeckTab("warrior")
|
||||||
local hud = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud")
|
local hud = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud")
|
||||||
if hud ~= nil then
|
if hud ~= nil then
|
||||||
hud.Enable = true
|
hud.Enable = true
|
||||||
end
|
end
|
||||||
self:RenderAllDeck()`),
|
self:RenderAllDeck()`),
|
||||||
method('ShowBoard', `self:SetEntityEnabled("/ui/DefaultGroup/BoardHud", true)`),
|
method('ShowBoard', `self:SetEntityEnabled("/ui/LobbyUIGroup/BoardHud", true)`),
|
||||||
method('CloseBoard', `self:SetEntityEnabled("/ui/DefaultGroup/BoardHud", false)`),
|
method('CloseBoard', `self:SetEntityEnabled("/ui/LobbyUIGroup/BoardHud", false)`),
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -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';
|
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 = [
|
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
|
method('BuildCardKeywordTooltip', `if c == nil then
|
||||||
return ""
|
return ""
|
||||||
end
|
end
|
||||||
@@ -64,11 +105,14 @@ return out`, [{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [
|
|||||||
method('HoverCard', `if self.DragSlot ~= nil and self.DragSlot > 0 then
|
method('HoverCard', `if self.DragSlot ~= nil and self.DragSlot > 0 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
if self.Hand == nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
local cardId = self.Hand[slot]
|
local cardId = self.Hand[slot]
|
||||||
if cardId == nil then
|
if cardId == nil then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand/Card" .. tostring(slot))
|
local e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. tostring(slot))
|
||||||
local tx = 0
|
local tx = 0
|
||||||
if e ~= nil and e.UITransformComponent ~= nil then
|
if e ~= nil and e.UITransformComponent ~= nil then
|
||||||
tx = e.UITransformComponent.anchoredPosition.x
|
tx = e.UITransformComponent.anchoredPosition.x
|
||||||
@@ -87,7 +131,7 @@ if c ~= nil then
|
|||||||
self:HideTooltip()
|
self:HideTooltip()
|
||||||
end
|
end
|
||||||
end`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }]),
|
end`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }]),
|
||||||
method('UnhoverCard', `local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand/Card" .. tostring(slot))
|
method('UnhoverCard', `local e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. tostring(slot))
|
||||||
if e ~= nil and e.UITransformComponent ~= nil then
|
if e ~= nil and e.UITransformComponent ~= nil then
|
||||||
e.UITransformComponent.UIScale = Vector3(1, 1, 1)
|
e.UITransformComponent.UIScale = Vector3(1, 1, 1)
|
||||||
end
|
end
|
||||||
@@ -97,9 +141,9 @@ self:HideTooltip()`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, At
|
|||||||
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'desc' },
|
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'desc' },
|
||||||
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'x' },
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'x' },
|
||||||
]),
|
]),
|
||||||
method('ShowTooltipAt', `self:SetText("/ui/DefaultGroup/CombatHud/TooltipBox/Name", name)
|
method('ShowTooltipAt', `self:SetText("/ui/RunUIGroup/CombatHud/TooltipBox/Name", name)
|
||||||
self:SetText("/ui/DefaultGroup/CombatHud/TooltipBox/Desc", desc)
|
self:SetText("/ui/RunUIGroup/CombatHud/TooltipBox/Desc", desc)
|
||||||
local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/TooltipBox")
|
local e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/TooltipBox")
|
||||||
if e ~= nil then
|
if e ~= nil then
|
||||||
if e.UITransformComponent ~= nil then
|
if e.UITransformComponent ~= nil then
|
||||||
e.UITransformComponent.anchoredPosition = Vector2(x, y)
|
e.UITransformComponent.anchoredPosition = Vector2(x, y)
|
||||||
@@ -111,5 +155,5 @@ end`, [
|
|||||||
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'x' },
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'x' },
|
||||||
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'y' },
|
{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'y' },
|
||||||
]),
|
]),
|
||||||
method('HideTooltip', `self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/TooltipBox", false)`),
|
method('HideTooltip', `self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/TooltipBox", false)`),
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { readFileSync, writeFileSync } from 'node:fs';
|
import { readFileSync, writeFileSync } from 'node:fs';
|
||||||
|
|
||||||
import { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from './lib/data.mjs';
|
import { POTIONS } from './lib/data.mjs';
|
||||||
import { prop, method, codeblock, RUN_LENGTH, GOLD_PER_WIN, CARD_PRICE, REST_HEAL, RELIC_PRICE, ACT_COUNT, ACT_MAPS, LOBBY_MAP, LOBBY_SPAWN } from './lib/codeblock.mjs';
|
import { prop, codeblock, RUN_LENGTH } from './lib/codeblock.mjs';
|
||||||
import { bootMethods } from './cb/boot.mjs';
|
import { bootMethods } from './cb/boot.mjs';
|
||||||
import { stateMethods } from './cb/state.mjs';
|
import { stateMethods } from './cb/state.mjs';
|
||||||
import { soulMethods } from './cb/soul.mjs';
|
import { soulMethods } from './cb/soul.mjs';
|
||||||
@@ -19,241 +19,7 @@ import { itemMethods } from './cb/items.mjs';
|
|||||||
import { tooltipMethods } from './cb/tooltip.mjs';
|
import { tooltipMethods } from './cb/tooltip.mjs';
|
||||||
import { mapMethods } from './cb/map.mjs';
|
import { mapMethods } from './cb/map.mjs';
|
||||||
import { shopMethods } from './cb/shop.mjs';
|
import { shopMethods } from './cb/shop.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 { COMMON_FILE } from './lib/ui-helpers.mjs';
|
||||||
import { buildDeckHud } from './hud/deckhud.mjs';
|
|
||||||
import { buildDeckInspect } from './hud/deckinspect.mjs';
|
|
||||||
import { buildDeckAll } from './hud/deckall.mjs';
|
|
||||||
import { buildCombat } from './hud/combat.mjs';
|
|
||||||
import { buildReward } from './hud/reward.mjs';
|
|
||||||
import { buildMap } from './hud/map.mjs';
|
|
||||||
import { buildShop } from './hud/shop.mjs';
|
|
||||||
import { buildRest } from './hud/rest.mjs';
|
|
||||||
import { buildTreasure } from './hud/treasure.mjs';
|
|
||||||
import { buildJobChoice } from './hud/jobchoice.mjs';
|
|
||||||
import { buildJobSelect } from './hud/jobselect.mjs';
|
|
||||||
import { buildLobby } from './hud/lobby.mjs';
|
|
||||||
import { buildBoard } from './hud/board.mjs';
|
|
||||||
import { buildSoulShop } from './hud/soulshop.mjs';
|
|
||||||
import { buildMainMenu } from './hud/mainmenu.mjs';
|
|
||||||
|
|
||||||
function upsertUi() {
|
|
||||||
const ui = JSON.parse(readFileSync(UI_FILE, 'utf8'));
|
|
||||||
const E = ui.ContentProto.Entities;
|
|
||||||
// CardHand는 스톡 섹션이라 과거 생성된 단색판(NamePlate/CostPlate)이 잔존 → 프레임 이미지 도입으로 제거
|
|
||||||
const obsoletePlate = /^\/ui\/DefaultGroup\/CardHand\/Card\d+\/(NamePlate|CostPlate)$/;
|
|
||||||
ui.ContentProto.Entities = E.filter((e) => !isGeneratedUiEntity(e) && !obsoletePlate.test(e.path));
|
|
||||||
|
|
||||||
const byPath = new Map(ui.ContentProto.Entities.map((e) => [e.path, e]));
|
|
||||||
const uiSections = new Map();
|
|
||||||
const emit = (section, entities) => {
|
|
||||||
if (uiSections.has(section)) {
|
|
||||||
throw new Error(`[gen-slaydeck] duplicate generated UI section: ${section}`);
|
|
||||||
}
|
|
||||||
uiSections.set(section, entities);
|
|
||||||
};
|
|
||||||
|
|
||||||
for (const path of DISABLED_STOCK_CONTROLS.map((name) => uiPath(name))) {
|
|
||||||
const e = byPath.get(path);
|
|
||||||
if (e != null) {
|
|
||||||
e.jsonString.enable = false;
|
|
||||||
e.jsonString.visible = false;
|
|
||||||
for (const component of e.jsonString['@components'] || []) {
|
|
||||||
component.Enable = false;
|
|
||||||
if (component.RaycastTarget != null) component.RaycastTarget = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 카드 미리보기(초기 정적 표시 — 런타임 RenderHand가 덮어씀): 카드 종류를 순환해 다양성 표시
|
|
||||||
const previewIds = Object.keys(CARDS.cards);
|
|
||||||
const cards = Array.from({ length: 10 }, (_, i) => {
|
|
||||||
const c = CARDS.cards[previewIds[i % previewIds.length]];
|
|
||||||
return { name: c.name, cost: String(c.cost), desc: c.desc, frame: frameRuid(c) };
|
|
||||||
});
|
|
||||||
|
|
||||||
// 손패 슬롯 10개 (최대 손패 한도). Card1~5는 기존 엔티티, Card6~10은 신규 생성.
|
|
||||||
for (let i = 1; i <= 10; i++) {
|
|
||||||
const cardPath = `/ui/DefaultGroup/CardHand/Card${i}`;
|
|
||||||
let card = byPath.get(cardPath);
|
|
||||||
if (!card) {
|
|
||||||
card = entity({
|
|
||||||
id: guid('dck', 500 + i),
|
|
||||||
path: cardPath,
|
|
||||||
modelId: 'uisprite',
|
|
||||||
entryId: 'UISprite',
|
|
||||||
componentNames: 'MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.ButtonComponent,MOD.Core.UITouchReceiveComponent',
|
|
||||||
displayOrder: 4,
|
|
||||||
components: [
|
|
||||||
transform({ parentW: 1920, parentH: 1080, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: { x: CARD_W, y: CARD_H }, pos: { x: 0, y: 0 } }),
|
|
||||||
sprite({ color: WHITE, type: 0, raycast: true }),
|
|
||||||
button(),
|
|
||||||
],
|
|
||||||
});
|
|
||||||
ui.ContentProto.Entities.push(card);
|
|
||||||
byPath.set(cardPath, card);
|
|
||||||
}
|
|
||||||
const tr = card.jsonString['@components'].find((c) => c['@type'] === 'MOD.Core.UITransformComponent');
|
|
||||||
const sp = card.jsonString['@components'].find((c) => c['@type'] === 'MOD.Core.SpriteGUIRendererComponent');
|
|
||||||
const sx = -680 + (i - 1) * 150;
|
|
||||||
tr.RectSize = { x: CARD_W, y: CARD_H };
|
|
||||||
tr.anchoredPosition = { x: sx, y: 0 };
|
|
||||||
tr.OffsetMin = { x: sx - CARD_W / 2, y: -CARD_H / 2 };
|
|
||||||
tr.OffsetMax = { x: sx + CARD_W / 2, y: CARD_H / 2 };
|
|
||||||
sp.ImageRUID = { DataId: cards[i - 1].frame };
|
|
||||||
sp.Type = 0;
|
|
||||||
sp.Color = WHITE;
|
|
||||||
sp.RaycastTarget = true;
|
|
||||||
const comps = card.jsonString['@components'];
|
|
||||||
if (!comps.some((c) => c['@type'] === 'MOD.Core.ButtonComponent')) {
|
|
||||||
comps.push(button());
|
|
||||||
}
|
|
||||||
if (!card.componentNames.includes('MOD.Core.ButtonComponent')) {
|
|
||||||
card.componentNames += ',MOD.Core.ButtonComponent';
|
|
||||||
}
|
|
||||||
if (!comps.some((c) => c['@type'] === 'MOD.Core.UITouchReceiveComponent')) {
|
|
||||||
comps.push({ '@type': 'MOD.Core.UITouchReceiveComponent', Enable: true });
|
|
||||||
}
|
|
||||||
if (!card.componentNames.includes('MOD.Core.UITouchReceiveComponent')) {
|
|
||||||
card.componentNames += ',MOD.Core.UITouchReceiveComponent';
|
|
||||||
}
|
|
||||||
card.jsonString.enable = true;
|
|
||||||
card.jsonString.visible = true;
|
|
||||||
|
|
||||||
const handLayout = cardFaceLayout(CARD_W);
|
|
||||||
const previewValues = { Cost: cards[i - 1].cost, Name: cards[i - 1].name, Desc: cards[i - 1].desc };
|
|
||||||
const children = handLayout.texts.map(([suffix, cfg]) => [suffix, { ...cfg, value: previewValues[suffix] }]);
|
|
||||||
for (const [suffix, cfg] of children) {
|
|
||||||
const path = `/ui/DefaultGroup/CardHand/Card${i}/${suffix}`;
|
|
||||||
const dOrder = suffix === 'Cost' ? 7 : suffix === 'Name' ? 6 : 8;
|
|
||||||
let child = byPath.get(path);
|
|
||||||
if (!child) {
|
|
||||||
child = entity({
|
|
||||||
id: guid('dck', i * 10 + children.findIndex(([s]) => s === suffix)),
|
|
||||||
path,
|
|
||||||
modelId: 'uitext',
|
|
||||||
entryId: 'UIText',
|
|
||||||
componentNames: 'MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent',
|
|
||||||
displayOrder: dOrder,
|
|
||||||
components: [
|
|
||||||
transform({ parentW: CARD_W, parentH: CARD_H, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: cfg.size, pos: cfg.pos }),
|
|
||||||
sprite({ color: TRANSPARENT }),
|
|
||||||
text({ value: cfg.value, fontSize: cfg.fontSize, bold: cfg.bold, color: cfg.color, dropShadow: cfg.dropShadow, outlineWidth: cfg.outlineWidth }),
|
|
||||||
],
|
|
||||||
});
|
|
||||||
ui.ContentProto.Entities.push(child);
|
|
||||||
byPath.set(path, child);
|
|
||||||
} else {
|
|
||||||
child.id = guid('dck', i * 10 + children.findIndex(([s]) => s === suffix));
|
|
||||||
child.jsonString.enable = true;
|
|
||||||
child.jsonString.visible = true;
|
|
||||||
child.jsonString.displayOrder = dOrder;
|
|
||||||
const ctr = child.jsonString['@components'].find((c) => c['@type'] === 'MOD.Core.UITransformComponent');
|
|
||||||
if (ctr) {
|
|
||||||
const pivot = { x: 0.5, y: 0.5 };
|
|
||||||
ctr.RectSize = cfg.size;
|
|
||||||
ctr.anchoredPosition = cfg.pos;
|
|
||||||
ctr.OffsetMin = { x: cfg.pos.x - pivot.x * cfg.size.x, y: cfg.pos.y - pivot.y * cfg.size.y };
|
|
||||||
ctr.OffsetMax = { x: cfg.pos.x + (1 - pivot.x) * cfg.size.x, y: cfg.pos.y + (1 - pivot.y) * cfg.size.y };
|
|
||||||
}
|
|
||||||
child.jsonString['@components'][2].Text = cfg.value;
|
|
||||||
child.jsonString['@components'][2].FontSize = cfg.fontSize;
|
|
||||||
child.jsonString['@components'][2].MaxSize = cfg.fontSize;
|
|
||||||
child.jsonString['@components'][2].FontColor = cfg.color;
|
|
||||||
child.jsonString['@components'][2].Bold = cfg.bold;
|
|
||||||
child.jsonString['@components'][2].DropShadow = cfg.dropShadow === true;
|
|
||||||
child.jsonString['@components'][2].DropShadowDistance = cfg.dropShadow === true ? 18 : 32;
|
|
||||||
child.jsonString['@components'][2].OutlineWidth = cfg.outlineWidth || 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 프레임 이미지가 이름판·코스트판을 내장하므로 Art만 유지 (잔존 NamePlate/CostPlate는 upsertUi 초입에서 제거)
|
|
||||||
const frameKids = [
|
|
||||||
['Art', 5, handLayout.art, WHITE, 0],
|
|
||||||
];
|
|
||||||
for (const [suffix, dOrder, cfg, color, spriteType] of frameKids) {
|
|
||||||
const fPath = `/ui/DefaultGroup/CardHand/Card${i}/${suffix}`;
|
|
||||||
let fe = byPath.get(fPath);
|
|
||||||
if (!fe) {
|
|
||||||
fe = entity({
|
|
||||||
id: guid('dck', 200 + i * 10 + dOrder),
|
|
||||||
path: fPath,
|
|
||||||
modelId: 'uisprite',
|
|
||||||
entryId: 'UISprite',
|
|
||||||
componentNames: 'MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent',
|
|
||||||
displayOrder: dOrder,
|
|
||||||
components: [
|
|
||||||
transform({ parentW: CARD_W, parentH: CARD_H, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: cfg.size, pos: cfg.pos }),
|
|
||||||
sprite({ color, type: spriteType, raycast: false }),
|
|
||||||
],
|
|
||||||
});
|
|
||||||
ui.ContentProto.Entities.push(fe);
|
|
||||||
byPath.set(fPath, fe);
|
|
||||||
} else {
|
|
||||||
const ftr = fe.jsonString['@components'].find((c) => c['@type'] === 'MOD.Core.UITransformComponent');
|
|
||||||
if (ftr) {
|
|
||||||
ftr.RectSize = cfg.size;
|
|
||||||
ftr.anchoredPosition = cfg.pos;
|
|
||||||
ftr.OffsetMin = { x: cfg.pos.x - cfg.size.x / 2, y: cfg.pos.y - cfg.size.y / 2 };
|
|
||||||
ftr.OffsetMax = { x: cfg.pos.x + cfg.size.x / 2, y: cfg.pos.y + cfg.size.y / 2 };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
emit('DeckHud', buildDeckHud());
|
|
||||||
|
|
||||||
emit('DeckInspectHud', buildDeckInspect());
|
|
||||||
|
|
||||||
emit('DeckAllHud', buildDeckAll());
|
|
||||||
|
|
||||||
emit('CombatHud', buildCombat());
|
|
||||||
|
|
||||||
emit('RewardHud', buildReward());
|
|
||||||
|
|
||||||
emit('MapHud', buildMap());
|
|
||||||
|
|
||||||
emit('ShopHud', buildShop());
|
|
||||||
|
|
||||||
emit('RestHud', buildRest());
|
|
||||||
|
|
||||||
// 유물 방 — 보물 상자 (P8)
|
|
||||||
emit('TreasureHud', buildTreasure());
|
|
||||||
|
|
||||||
// 전직 선택 (P9) — 보스 보상: 유물 vs 2차 전직
|
|
||||||
emit('JobChoiceHud', buildJobChoice());
|
|
||||||
|
|
||||||
emit('JobSelectHud', buildJobSelect());
|
|
||||||
|
|
||||||
emit('MainMenu', buildMainMenu());
|
|
||||||
|
|
||||||
// ── LobbyHud — 반복 런의 허브. NPC 클릭으로 런시작/도감/영혼상점/게시판 ──
|
|
||||||
emit('LobbyHud', buildLobby());
|
|
||||||
|
|
||||||
// ── BoardHud — 게시판(공지/팁) ──
|
|
||||||
emit('BoardHud', buildBoard());
|
|
||||||
|
|
||||||
// ── SoulShopHud — 영혼 메타 상점 (Phase 9에서 해금 항목·구매 로직 채움) ──
|
|
||||||
emit('SoulShopHud', buildSoulShop());
|
|
||||||
|
|
||||||
for (const section of UI_APPEND_ORDER) {
|
|
||||||
const entities = uiSections.get(section);
|
|
||||||
if (entities == null) {
|
|
||||||
throw new Error(`[gen-slaydeck] missing generated UI section: ${section}`);
|
|
||||||
}
|
|
||||||
appendUiSection(ui, section, entities);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 엔티티 id 유일성 검증 — 같은 id가 다른 path에 재배정되면 메이커 refresh 병합이 꼬임
|
|
||||||
const seenIds = new Map();
|
|
||||||
for (const e of ui.ContentProto.Entities) {
|
|
||||||
const prev = seenIds.get(e.id);
|
|
||||||
if (prev != null) throw new Error(`[gen-slaydeck] 엔티티 id 중복: ${e.id} (${prev} ↔ ${e.path})`);
|
|
||||||
seenIds.set(e.id, e.path);
|
|
||||||
}
|
|
||||||
|
|
||||||
JSON.parse(JSON.stringify(ui));
|
|
||||||
writeFileSync(UI_FILE, JSON.stringify(ui, null, 2), 'utf8');
|
|
||||||
}
|
|
||||||
|
|
||||||
function writeCodeblocks() {
|
function writeCodeblocks() {
|
||||||
const combat = codeblock('SlayDeckController', 'SlayDeckController', [
|
const combat = codeblock('SlayDeckController', 'SlayDeckController', [
|
||||||
@@ -296,6 +62,9 @@ function writeCodeblocks() {
|
|||||||
prop('boolean', 'CodexMode', 'false'),
|
prop('boolean', 'CodexMode', 'false'),
|
||||||
prop('any', 'CodexCards'),
|
prop('any', 'CodexCards'),
|
||||||
prop('boolean', 'ClassDeckMode', 'false'),
|
prop('boolean', 'ClassDeckMode', 'false'),
|
||||||
|
prop('boolean', 'DebugCardPickerMode', 'false'),
|
||||||
|
prop('boolean', 'DebugCtrlDown', 'false'),
|
||||||
|
prop('boolean', 'DebugShiftDown', 'false'),
|
||||||
prop('any', 'ClassDeckCards'),
|
prop('any', 'ClassDeckCards'),
|
||||||
prop('string', 'ClassDeckTitle', '""'),
|
prop('string', 'ClassDeckTitle', '""'),
|
||||||
prop('string', 'ClassDeckClass', '""'),
|
prop('string', 'ClassDeckClass', '""'),
|
||||||
@@ -312,6 +81,7 @@ function writeCodeblocks() {
|
|||||||
prop('number', 'PlayerHp', '0'),
|
prop('number', 'PlayerHp', '0'),
|
||||||
prop('number', 'PlayerMaxHp', '80'),
|
prop('number', 'PlayerMaxHp', '80'),
|
||||||
prop('number', 'PlayerBlock', '0'),
|
prop('number', 'PlayerBlock', '0'),
|
||||||
|
prop('number', 'BlockGainMultiplier', '1'),
|
||||||
prop('number', 'PlayerDex', '0'),
|
prop('number', 'PlayerDex', '0'),
|
||||||
prop('number', 'PlayerThorns', '0'),
|
prop('number', 'PlayerThorns', '0'),
|
||||||
prop('boolean', 'CombatOver', 'false'),
|
prop('boolean', 'CombatOver', 'false'),
|
||||||
@@ -343,13 +113,30 @@ function writeCodeblocks() {
|
|||||||
prop('number', 'PlayerStr', '0'),
|
prop('number', 'PlayerStr', '0'),
|
||||||
prop('number', 'PlayerWeak', '0'),
|
prop('number', 'PlayerWeak', '0'),
|
||||||
prop('number', 'PlayerVuln', '0'),
|
prop('number', 'PlayerVuln', '0'),
|
||||||
|
prop('number', 'PlayerIntangible', '0'),
|
||||||
prop('any', 'PlayerPowers'),
|
prop('any', 'PlayerPowers'),
|
||||||
prop('any', 'Potions'),
|
prop('any', 'Potions'),
|
||||||
prop('any', 'RunPotions'),
|
prop('any', 'RunPotions'),
|
||||||
prop('number', 'PotionSlots', String(POTIONS.baseSlots)),
|
prop('number', 'PotionSlots', String(POTIONS.baseSlots)),
|
||||||
prop('string', 'ShopPotion', '""'),
|
prop('string', 'ShopPotion', '""'),
|
||||||
prop('boolean', 'ShopPotionBought', 'false'),
|
prop('boolean', 'ShopPotionBought', 'false'),
|
||||||
|
prop('number', 'CardsDrawnThisCombat', '0'),
|
||||||
|
prop('boolean', 'HandCostZeroThisTurn', 'false'),
|
||||||
|
prop('boolean', 'DrawDisabledThisTurn', 'false'),
|
||||||
|
prop('number', 'SkillCostReductionThisTurn', '0'),
|
||||||
|
prop('any', 'CombatCardCostReduction'),
|
||||||
|
prop('number', 'ActiveAttackDamageVsWeakMultiplier', '1'),
|
||||||
|
prop('number', 'DrawDamageThisTurn', '0'),
|
||||||
|
prop('number', 'DrawPoisonThisTurn', '0'),
|
||||||
|
prop('boolean', 'ShivAoeThisCombat', 'false'),
|
||||||
|
prop('number', 'PoisonApplicationsThisCombat', '0'),
|
||||||
|
prop('number', 'EnemyStrengthLossThisTurn', '0'),
|
||||||
|
prop('number', 'ActiveKillReward', '0'),
|
||||||
prop('number', 'FightAttackCount', '0'),
|
prop('number', 'FightAttackCount', '0'),
|
||||||
|
prop('number', 'TurnAttackCardsPlayed', '0'),
|
||||||
|
prop('number', 'TurnCardsPlayedThisTurn', '0'),
|
||||||
|
prop('number', 'DamageDealtThisTurn', '0'),
|
||||||
|
prop('number', 'TurnDiscardedCards', '0'),
|
||||||
prop('boolean', 'FirstHpLossDone', 'false'),
|
prop('boolean', 'FirstHpLossDone', 'false'),
|
||||||
prop('number', 'ClayBlockNext', '0'),
|
prop('number', 'ClayBlockNext', '0'),
|
||||||
prop('number', 'PotionMenuSlot', '0'),
|
prop('number', 'PotionMenuSlot', '0'),
|
||||||
@@ -361,6 +148,18 @@ function writeCodeblocks() {
|
|||||||
prop('number', 'DiscardSelectTotal', '0'),
|
prop('number', 'DiscardSelectTotal', '0'),
|
||||||
prop('number', 'DiscardPostShiv', '0'),
|
prop('number', 'DiscardPostShiv', '0'),
|
||||||
prop('number', 'DiscardShivPerPick', '0'),
|
prop('number', 'DiscardShivPerPick', '0'),
|
||||||
|
prop('boolean', 'RetainSelectActive', 'false'),
|
||||||
|
prop('boolean', 'ReserveSelectActive', 'false'),
|
||||||
|
prop('number', 'NextTurnBlock', '0'),
|
||||||
|
prop('number', 'NextTurnDraw', '0'),
|
||||||
|
prop('boolean', 'NextTurnKeepBlock', 'false'),
|
||||||
|
prop('number', 'NextTurnAttackMultiplier', '1'),
|
||||||
|
prop('number', 'TurnAttackMultiplier', '1'),
|
||||||
|
prop('string', 'NextTurnSelectPrompt', '""'),
|
||||||
|
prop('number', 'NextTurnSelectCopies', '0'),
|
||||||
|
prop('boolean', 'NextSkillCostZero', 'false'),
|
||||||
|
prop('number', 'SkillCostReductionThisTurn', '0'),
|
||||||
|
prop('any', 'NextTurnAddCards'),
|
||||||
], [
|
], [
|
||||||
...bootMethods,
|
...bootMethods,
|
||||||
...stateMethods,
|
...stateMethods,
|
||||||
@@ -397,8 +196,7 @@ function patchCommon() {
|
|||||||
writeFileSync(COMMON_FILE, JSON.stringify(common, null, 2), 'utf8');
|
writeFileSync(COMMON_FILE, JSON.stringify(common, null, 2), 'utf8');
|
||||||
}
|
}
|
||||||
|
|
||||||
upsertUi();
|
|
||||||
writeCodeblocks();
|
writeCodeblocks();
|
||||||
patchCommon();
|
patchCommon();
|
||||||
|
|
||||||
console.log('Slay deck UI and combat codeblocks generated.');
|
console.log('SlayDeckController/common 생성 완료 (UI는 메이커 저작 — 생성기 미접근).');
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
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 { 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 { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../lib/data.mjs';
|
import { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../../lib/data.mjs';
|
||||||
|
|
||||||
export function buildBoard() {
|
export function buildBoard() {
|
||||||
const board = [];
|
const board = [];
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
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 { 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 { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../lib/data.mjs';
|
import { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../../lib/data.mjs';
|
||||||
|
|
||||||
export function buildCombat() {
|
export function buildCombat() {
|
||||||
const PANEL_BG = { r: 0.08, g: 0.09, b: 0.11, a: 0.78 };
|
const PANEL_BG = { r: 0.08, g: 0.09, b: 0.11, a: 0.78 };
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
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 { 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 { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../lib/data.mjs';
|
import { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../../lib/data.mjs';
|
||||||
|
|
||||||
export function buildDeckAll() {
|
export function buildDeckAll() {
|
||||||
const allDeck = [];
|
const allDeck = [];
|
||||||
@@ -116,11 +116,12 @@ export function buildDeckAll() {
|
|||||||
path: cardPath,
|
path: cardPath,
|
||||||
modelId: 'uisprite',
|
modelId: 'uisprite',
|
||||||
entryId: 'UISprite',
|
entryId: 'UISprite',
|
||||||
componentNames: 'MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent',
|
componentNames: 'MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.ButtonComponent',
|
||||||
displayOrder: i,
|
displayOrder: i,
|
||||||
components: [
|
components: [
|
||||||
transform({ parentW: 980, parentH: 620, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: { x: ALL_DECK_CARD_W, y: ALL_DECK_CARD_H }, pos: { x: 0, y: 0 } }),
|
transform({ parentW: 980, parentH: 620, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: { x: ALL_DECK_CARD_W, y: ALL_DECK_CARD_H }, pos: { x: 0, y: 0 } }),
|
||||||
sprite({ dataId: CARDFRAMES.frames.warrior.normal, color: WHITE, type: 0 }),
|
sprite({ dataId: CARDFRAMES.frames.warrior.normal, color: WHITE, type: 0, raycast: true }),
|
||||||
|
button(),
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
card.jsonString.enable = false;
|
card.jsonString.enable = false;
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
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 { 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 { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../lib/data.mjs';
|
import { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../../lib/data.mjs';
|
||||||
|
|
||||||
export function buildDeckHud() {
|
export function buildDeckHud() {
|
||||||
const hud = [];
|
const hud = [];
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
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 { 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 { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../lib/data.mjs';
|
import { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../../lib/data.mjs';
|
||||||
|
|
||||||
export function buildDeckInspect() {
|
export function buildDeckInspect() {
|
||||||
const inspect = [];
|
const inspect = [];
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
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 { 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 { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../lib/data.mjs';
|
import { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../../lib/data.mjs';
|
||||||
|
|
||||||
export function buildJobChoice() {
|
export function buildJobChoice() {
|
||||||
const jobChoice = [];
|
const jobChoice = [];
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
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 { 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 { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../lib/data.mjs';
|
import { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../../lib/data.mjs';
|
||||||
|
|
||||||
export function buildJobSelect() {
|
export function buildJobSelect() {
|
||||||
const jobSelect = [];
|
const jobSelect = [];
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
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 { 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 { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../lib/data.mjs';
|
import { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../../lib/data.mjs';
|
||||||
|
|
||||||
export function buildLobby() {
|
export function buildLobby() {
|
||||||
const lobby = [];
|
const lobby = [];
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
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 { 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 { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../lib/data.mjs';
|
import { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../../lib/data.mjs';
|
||||||
|
|
||||||
export function buildMainMenu() {
|
export function buildMainMenu() {
|
||||||
const menu = [];
|
const menu = [];
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
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 { 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 { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../lib/data.mjs';
|
import { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../../lib/data.mjs';
|
||||||
|
|
||||||
export function buildMap() {
|
export function buildMap() {
|
||||||
const TYPE_KO = { combat: '전투', elite: '엘리트', boss: '보스', shop: '상점', rest: '휴식' };
|
const TYPE_KO = { combat: '전투', elite: '엘리트', boss: '보스', shop: '상점', rest: '휴식' };
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
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 { 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 { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../lib/data.mjs';
|
import { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../../lib/data.mjs';
|
||||||
|
|
||||||
export function buildRest() {
|
export function buildRest() {
|
||||||
const rest = [];
|
const rest = [];
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
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 { 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 { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../lib/data.mjs';
|
import { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../../lib/data.mjs';
|
||||||
|
|
||||||
export function buildReward() {
|
export function buildReward() {
|
||||||
const reward = [];
|
const reward = [];
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
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 { 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 { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../lib/data.mjs';
|
import { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../../lib/data.mjs';
|
||||||
|
|
||||||
export function buildShop() {
|
export function buildShop() {
|
||||||
const shop = [];
|
const shop = [];
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
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 { 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 { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../lib/data.mjs';
|
import { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../../lib/data.mjs';
|
||||||
|
|
||||||
export function buildSoulShop() {
|
export function buildSoulShop() {
|
||||||
const soulShop = [];
|
const soulShop = [];
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
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 { 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 { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../lib/data.mjs';
|
import { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, luaSoulShopTable, CARDFRAMES, RARITIES, frameRuid, luaFramesTable, luaNodeIconsTable, MAP_ROWS, MAP_COLS, CHEST_CLOSED_RUID, CHEST_OPEN_RUID, NODEICONS, CHARS, CAM, RELICS, luaRelicsTable, POTIONS, luaPotionsTable, luaIntentsArray, luaEnemiesTable, luaStr, luaJobsTable, luaCardsTable, luaDeckTable } from '../../lib/data.mjs';
|
||||||
|
|
||||||
export function buildTreasure() {
|
export function buildTreasure() {
|
||||||
const treasure = [];
|
const treasure = [];
|
||||||
246
tools/deck/legacy/upsert-ui.mjs
Normal file
246
tools/deck/legacy/upsert-ui.mjs
Normal file
@@ -0,0 +1,246 @@
|
|||||||
|
import { readFileSync, writeFileSync } from 'node:fs';
|
||||||
|
import { fileURLToPath } from 'node:url';
|
||||||
|
import { CARDS, frameRuid } from '../lib/data.mjs';
|
||||||
|
import { UI_FILE, isGeneratedUiEntity, DISABLED_STOCK_CONTROLS, uiPath, guid, entity, transform, sprite, button, text, WHITE, TRANSPARENT, CARD_W, CARD_H, cardFaceLayout, UI_APPEND_ORDER, appendUiSection } from '../lib/ui-helpers.mjs';
|
||||||
|
import { buildDeckHud } from './hud/deckhud.mjs';
|
||||||
|
import { buildDeckInspect } from './hud/deckinspect.mjs';
|
||||||
|
import { buildDeckAll } from './hud/deckall.mjs';
|
||||||
|
import { buildCombat } from './hud/combat.mjs';
|
||||||
|
import { buildReward } from './hud/reward.mjs';
|
||||||
|
import { buildMap } from './hud/map.mjs';
|
||||||
|
import { buildShop } from './hud/shop.mjs';
|
||||||
|
import { buildRest } from './hud/rest.mjs';
|
||||||
|
import { buildTreasure } from './hud/treasure.mjs';
|
||||||
|
import { buildJobChoice } from './hud/jobchoice.mjs';
|
||||||
|
import { buildJobSelect } from './hud/jobselect.mjs';
|
||||||
|
import { buildLobby } from './hud/lobby.mjs';
|
||||||
|
import { buildBoard } from './hud/board.mjs';
|
||||||
|
import { buildSoulShop } from './hud/soulshop.mjs';
|
||||||
|
import { buildMainMenu } from './hud/mainmenu.mjs';
|
||||||
|
|
||||||
|
// ⚠️ 휴면(LEGACY): 메이커 저작 전환 후 생성기는 .ui를 안 만든다. 이 파일은 옛 DefaultGroup.ui
|
||||||
|
// 단일 저작 로직의 롤백/참조용. import는 무해(함수만 정의), 직접 실행할 때만 .ui를 옛 생성본으로 덮어쓴다.
|
||||||
|
|
||||||
|
function upsertUi() {
|
||||||
|
const ui = JSON.parse(readFileSync(UI_FILE, 'utf8'));
|
||||||
|
const E = ui.ContentProto.Entities;
|
||||||
|
// CardHand는 스톡 섹션이라 과거 생성된 단색판(NamePlate/CostPlate)이 잔존 → 프레임 이미지 도입으로 제거
|
||||||
|
const obsoletePlate = /^\/ui\/DefaultGroup\/CardHand\/Card\d+\/(NamePlate|CostPlate)$/;
|
||||||
|
ui.ContentProto.Entities = E.filter((e) => !isGeneratedUiEntity(e) && !obsoletePlate.test(e.path));
|
||||||
|
|
||||||
|
const byPath = new Map(ui.ContentProto.Entities.map((e) => [e.path, e]));
|
||||||
|
const uiSections = new Map();
|
||||||
|
const emit = (section, entities) => {
|
||||||
|
if (uiSections.has(section)) {
|
||||||
|
throw new Error(`[gen-slaydeck] duplicate generated UI section: ${section}`);
|
||||||
|
}
|
||||||
|
uiSections.set(section, entities);
|
||||||
|
};
|
||||||
|
|
||||||
|
for (const path of DISABLED_STOCK_CONTROLS.map((name) => uiPath(name))) {
|
||||||
|
const e = byPath.get(path);
|
||||||
|
if (e != null) {
|
||||||
|
e.jsonString.enable = false;
|
||||||
|
e.jsonString.visible = false;
|
||||||
|
for (const component of e.jsonString['@components'] || []) {
|
||||||
|
component.Enable = false;
|
||||||
|
if (component.RaycastTarget != null) component.RaycastTarget = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 카드 미리보기(초기 정적 표시 — 런타임 RenderHand가 덮어씀): 카드 종류를 순환해 다양성 표시
|
||||||
|
const previewIds = Object.keys(CARDS.cards);
|
||||||
|
const cards = Array.from({ length: 10 }, (_, i) => {
|
||||||
|
const c = CARDS.cards[previewIds[i % previewIds.length]];
|
||||||
|
return { name: c.name, cost: String(c.cost), desc: c.desc, frame: frameRuid(c) };
|
||||||
|
});
|
||||||
|
|
||||||
|
// 손패 슬롯 10개 (최대 손패 한도). Card1~5는 기존 엔티티, Card6~10은 신규 생성.
|
||||||
|
for (let i = 1; i <= 10; i++) {
|
||||||
|
const cardPath = `/ui/DefaultGroup/CardHand/Card${i}`;
|
||||||
|
let card = byPath.get(cardPath);
|
||||||
|
if (!card) {
|
||||||
|
card = entity({
|
||||||
|
id: guid('dck', 500 + i),
|
||||||
|
path: cardPath,
|
||||||
|
modelId: 'uisprite',
|
||||||
|
entryId: 'UISprite',
|
||||||
|
componentNames: 'MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.ButtonComponent,MOD.Core.UITouchReceiveComponent',
|
||||||
|
displayOrder: 4,
|
||||||
|
components: [
|
||||||
|
transform({ parentW: 1920, parentH: 1080, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: { x: CARD_W, y: CARD_H }, pos: { x: 0, y: 0 } }),
|
||||||
|
sprite({ color: WHITE, type: 0, raycast: true }),
|
||||||
|
button(),
|
||||||
|
],
|
||||||
|
});
|
||||||
|
ui.ContentProto.Entities.push(card);
|
||||||
|
byPath.set(cardPath, card);
|
||||||
|
}
|
||||||
|
const tr = card.jsonString['@components'].find((c) => c['@type'] === 'MOD.Core.UITransformComponent');
|
||||||
|
const sp = card.jsonString['@components'].find((c) => c['@type'] === 'MOD.Core.SpriteGUIRendererComponent');
|
||||||
|
const sx = -680 + (i - 1) * 150;
|
||||||
|
tr.RectSize = { x: CARD_W, y: CARD_H };
|
||||||
|
tr.anchoredPosition = { x: sx, y: 0 };
|
||||||
|
tr.OffsetMin = { x: sx - CARD_W / 2, y: -CARD_H / 2 };
|
||||||
|
tr.OffsetMax = { x: sx + CARD_W / 2, y: CARD_H / 2 };
|
||||||
|
sp.ImageRUID = { DataId: cards[i - 1].frame };
|
||||||
|
sp.Type = 0;
|
||||||
|
sp.Color = WHITE;
|
||||||
|
sp.RaycastTarget = true;
|
||||||
|
const comps = card.jsonString['@components'];
|
||||||
|
if (!comps.some((c) => c['@type'] === 'MOD.Core.ButtonComponent')) {
|
||||||
|
comps.push(button());
|
||||||
|
}
|
||||||
|
if (!card.componentNames.includes('MOD.Core.ButtonComponent')) {
|
||||||
|
card.componentNames += ',MOD.Core.ButtonComponent';
|
||||||
|
}
|
||||||
|
if (!comps.some((c) => c['@type'] === 'MOD.Core.UITouchReceiveComponent')) {
|
||||||
|
comps.push({ '@type': 'MOD.Core.UITouchReceiveComponent', Enable: true });
|
||||||
|
}
|
||||||
|
if (!card.componentNames.includes('MOD.Core.UITouchReceiveComponent')) {
|
||||||
|
card.componentNames += ',MOD.Core.UITouchReceiveComponent';
|
||||||
|
}
|
||||||
|
card.jsonString.enable = true;
|
||||||
|
card.jsonString.visible = true;
|
||||||
|
|
||||||
|
const handLayout = cardFaceLayout(CARD_W);
|
||||||
|
const previewValues = { Cost: cards[i - 1].cost, Name: cards[i - 1].name, Desc: cards[i - 1].desc };
|
||||||
|
const children = handLayout.texts.map(([suffix, cfg]) => [suffix, { ...cfg, value: previewValues[suffix] }]);
|
||||||
|
for (const [suffix, cfg] of children) {
|
||||||
|
const path = `/ui/DefaultGroup/CardHand/Card${i}/${suffix}`;
|
||||||
|
const dOrder = suffix === 'Cost' ? 7 : suffix === 'Name' ? 6 : 8;
|
||||||
|
let child = byPath.get(path);
|
||||||
|
if (!child) {
|
||||||
|
child = entity({
|
||||||
|
id: guid('dck', i * 10 + children.findIndex(([s]) => s === suffix)),
|
||||||
|
path,
|
||||||
|
modelId: 'uitext',
|
||||||
|
entryId: 'UIText',
|
||||||
|
componentNames: 'MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent',
|
||||||
|
displayOrder: dOrder,
|
||||||
|
components: [
|
||||||
|
transform({ parentW: CARD_W, parentH: CARD_H, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: cfg.size, pos: cfg.pos }),
|
||||||
|
sprite({ color: TRANSPARENT }),
|
||||||
|
text({ value: cfg.value, fontSize: cfg.fontSize, bold: cfg.bold, color: cfg.color, dropShadow: cfg.dropShadow, outlineWidth: cfg.outlineWidth }),
|
||||||
|
],
|
||||||
|
});
|
||||||
|
ui.ContentProto.Entities.push(child);
|
||||||
|
byPath.set(path, child);
|
||||||
|
} else {
|
||||||
|
child.id = guid('dck', i * 10 + children.findIndex(([s]) => s === suffix));
|
||||||
|
child.jsonString.enable = true;
|
||||||
|
child.jsonString.visible = true;
|
||||||
|
child.jsonString.displayOrder = dOrder;
|
||||||
|
const ctr = child.jsonString['@components'].find((c) => c['@type'] === 'MOD.Core.UITransformComponent');
|
||||||
|
if (ctr) {
|
||||||
|
const pivot = { x: 0.5, y: 0.5 };
|
||||||
|
ctr.RectSize = cfg.size;
|
||||||
|
ctr.anchoredPosition = cfg.pos;
|
||||||
|
ctr.OffsetMin = { x: cfg.pos.x - pivot.x * cfg.size.x, y: cfg.pos.y - pivot.y * cfg.size.y };
|
||||||
|
ctr.OffsetMax = { x: cfg.pos.x + (1 - pivot.x) * cfg.size.x, y: cfg.pos.y + (1 - pivot.y) * cfg.size.y };
|
||||||
|
}
|
||||||
|
child.jsonString['@components'][2].Text = cfg.value;
|
||||||
|
child.jsonString['@components'][2].FontSize = cfg.fontSize;
|
||||||
|
child.jsonString['@components'][2].MaxSize = cfg.fontSize;
|
||||||
|
child.jsonString['@components'][2].FontColor = cfg.color;
|
||||||
|
child.jsonString['@components'][2].Bold = cfg.bold;
|
||||||
|
child.jsonString['@components'][2].DropShadow = cfg.dropShadow === true;
|
||||||
|
child.jsonString['@components'][2].DropShadowDistance = cfg.dropShadow === true ? 18 : 32;
|
||||||
|
child.jsonString['@components'][2].OutlineWidth = cfg.outlineWidth || 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 프레임 이미지가 이름판·코스트판을 내장하므로 Art만 유지 (잔존 NamePlate/CostPlate는 upsertUi 초입에서 제거)
|
||||||
|
const frameKids = [
|
||||||
|
['Art', 5, handLayout.art, WHITE, 0],
|
||||||
|
];
|
||||||
|
for (const [suffix, dOrder, cfg, color, spriteType] of frameKids) {
|
||||||
|
const fPath = `/ui/DefaultGroup/CardHand/Card${i}/${suffix}`;
|
||||||
|
let fe = byPath.get(fPath);
|
||||||
|
if (!fe) {
|
||||||
|
fe = entity({
|
||||||
|
id: guid('dck', 200 + i * 10 + dOrder),
|
||||||
|
path: fPath,
|
||||||
|
modelId: 'uisprite',
|
||||||
|
entryId: 'UISprite',
|
||||||
|
componentNames: 'MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent',
|
||||||
|
displayOrder: dOrder,
|
||||||
|
components: [
|
||||||
|
transform({ parentW: CARD_W, parentH: CARD_H, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: cfg.size, pos: cfg.pos }),
|
||||||
|
sprite({ color, type: spriteType, raycast: false }),
|
||||||
|
],
|
||||||
|
});
|
||||||
|
ui.ContentProto.Entities.push(fe);
|
||||||
|
byPath.set(fPath, fe);
|
||||||
|
} else {
|
||||||
|
const ftr = fe.jsonString['@components'].find((c) => c['@type'] === 'MOD.Core.UITransformComponent');
|
||||||
|
if (ftr) {
|
||||||
|
ftr.RectSize = cfg.size;
|
||||||
|
ftr.anchoredPosition = cfg.pos;
|
||||||
|
ftr.OffsetMin = { x: cfg.pos.x - cfg.size.x / 2, y: cfg.pos.y - cfg.size.y / 2 };
|
||||||
|
ftr.OffsetMax = { x: cfg.pos.x + cfg.size.x / 2, y: cfg.pos.y + cfg.size.y / 2 };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
emit('DeckHud', buildDeckHud());
|
||||||
|
|
||||||
|
emit('DeckInspectHud', buildDeckInspect());
|
||||||
|
|
||||||
|
emit('DeckAllHud', buildDeckAll());
|
||||||
|
|
||||||
|
emit('CombatHud', buildCombat());
|
||||||
|
|
||||||
|
emit('RewardHud', buildReward());
|
||||||
|
|
||||||
|
emit('MapHud', buildMap());
|
||||||
|
|
||||||
|
emit('ShopHud', buildShop());
|
||||||
|
|
||||||
|
emit('RestHud', buildRest());
|
||||||
|
|
||||||
|
// 유물 방 — 보물 상자 (P8)
|
||||||
|
emit('TreasureHud', buildTreasure());
|
||||||
|
|
||||||
|
// 전직 선택 (P9) — 보스 보상: 유물 vs 2차 전직
|
||||||
|
emit('JobChoiceHud', buildJobChoice());
|
||||||
|
|
||||||
|
emit('JobSelectHud', buildJobSelect());
|
||||||
|
|
||||||
|
emit('MainMenu', buildMainMenu());
|
||||||
|
|
||||||
|
// ── LobbyHud — 반복 런의 허브. NPC 클릭으로 런시작/도감/영혼상점/게시판 ──
|
||||||
|
emit('LobbyHud', buildLobby());
|
||||||
|
|
||||||
|
// ── BoardHud — 게시판(공지/팁) ──
|
||||||
|
emit('BoardHud', buildBoard());
|
||||||
|
|
||||||
|
// ── SoulShopHud — 영혼 메타 상점 (Phase 9에서 해금 항목·구매 로직 채움) ──
|
||||||
|
emit('SoulShopHud', buildSoulShop());
|
||||||
|
|
||||||
|
for (const section of UI_APPEND_ORDER) {
|
||||||
|
const entities = uiSections.get(section);
|
||||||
|
if (entities == null) {
|
||||||
|
throw new Error(`[gen-slaydeck] missing generated UI section: ${section}`);
|
||||||
|
}
|
||||||
|
appendUiSection(ui, section, entities);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 엔티티 id 유일성 검증 — 같은 id가 다른 path에 재배정되면 메이커 refresh 병합이 꼬임
|
||||||
|
const seenIds = new Map();
|
||||||
|
for (const e of ui.ContentProto.Entities) {
|
||||||
|
const prev = seenIds.get(e.id);
|
||||||
|
if (prev != null) throw new Error(`[gen-slaydeck] 엔티티 id 중복: ${e.id} (${prev} ↔ ${e.path})`);
|
||||||
|
seenIds.set(e.id, e.path);
|
||||||
|
}
|
||||||
|
|
||||||
|
JSON.parse(JSON.stringify(ui));
|
||||||
|
writeFileSync(UI_FILE, JSON.stringify(ui, null, 2), 'utf8');
|
||||||
|
}
|
||||||
|
|
||||||
|
// 롤백/참조용 직접 실행 시에만 동작 (import 시에는 실행 안 함)
|
||||||
|
if (process.argv[1] === fileURLToPath(import.meta.url)) {
|
||||||
|
upsertUi();
|
||||||
|
}
|
||||||
@@ -158,10 +158,29 @@ function luaCardsTable(cards) {
|
|||||||
const lines = Object.entries(cards).map(([id, c]) => {
|
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)}`];
|
const fields = [`name = ${luaStr(c.name)}`, `cost = ${c.cost}`, `desc = ${luaStr(c.desc)}`, `kind = ${luaStr(c.kind)}`];
|
||||||
if (c.damage != null) fields.push(`damage = ${c.damage}`);
|
if (c.damage != null) fields.push(`damage = ${c.damage}`);
|
||||||
|
if (c.damagePerOtherHandCard != null) fields.push(`damagePerOtherHandCard = ${c.damagePerOtherHandCard}`);
|
||||||
|
if (c.damagePerAttackPlayedThisTurn != null) fields.push(`damagePerAttackPlayedThisTurn = ${c.damagePerAttackPlayedThisTurn}`);
|
||||||
|
if (c.damagePerDiscardedThisTurn != null) fields.push(`damagePerDiscardedThisTurn = ${c.damagePerDiscardedThisTurn}`);
|
||||||
|
if (c.damagePerSkillInHand != null) fields.push(`damagePerSkillInHand = ${c.damagePerSkillInHand}`);
|
||||||
|
if (c.damagePerCardDrawnThisCombat != null) fields.push(`damagePerCardDrawnThisCombat = ${c.damagePerCardDrawnThisCombat}`);
|
||||||
|
if (c.damagePerTurn != null) fields.push(`damagePerTurn = ${c.damagePerTurn}`);
|
||||||
|
if (c.cardPlayedDamage != null) fields.push(`cardPlayedDamage = ${c.cardPlayedDamage}`);
|
||||||
|
if (c.cardPlayedRandomDamage != null) fields.push(`cardPlayedRandomDamage = ${c.cardPlayedRandomDamage}`);
|
||||||
|
if (c.firstCardDamageBonus != null) fields.push(`firstCardDamageBonus = ${c.firstCardDamageBonus}`);
|
||||||
|
if (c.rewardOnKill != null) fields.push(`rewardOnKill = ${c.rewardOnKill}`);
|
||||||
|
if (c.intangible != null) fields.push(`intangible = ${c.intangible}`);
|
||||||
|
if (c.endTurnDexLoss != null) fields.push(`endTurnDexLoss = ${c.endTurnDexLoss}`);
|
||||||
|
if (c.poisonPerTurn != null) fields.push(`poisonPerTurn = ${c.poisonPerTurn}`);
|
||||||
|
if (c.attackPoison != null) fields.push(`attackPoison = ${c.attackPoison}`);
|
||||||
|
if (c.otherHandAtLeast != null) fields.push(`otherHandAtLeast = ${c.otherHandAtLeast}`);
|
||||||
|
if (c.bonusHitsWhenOtherHandAtLeast != null) fields.push(`bonusHitsWhenOtherHandAtLeast = ${c.bonusHitsWhenOtherHandAtLeast}`);
|
||||||
if (c.block != null) fields.push(`block = ${c.block}`);
|
if (c.block != null) fields.push(`block = ${c.block}`);
|
||||||
|
if (c.blockGainMultiplier != null) fields.push(`blockGainMultiplier = ${c.blockGainMultiplier}`);
|
||||||
|
if (c.blockPerDamageDealtThisTurn != null) fields.push(`blockPerDamageDealtThisTurn = ${c.blockPerDamageDealtThisTurn}`);
|
||||||
if (c.strength != null) fields.push(`strength = ${c.strength}`);
|
if (c.strength != null) fields.push(`strength = ${c.strength}`);
|
||||||
if (c.dex != null) fields.push(`dex = ${c.dex}`);
|
if (c.dex != null) fields.push(`dex = ${c.dex}`);
|
||||||
if (c.thorns != null) fields.push(`thorns = ${c.thorns}`);
|
if (c.thorns != null) fields.push(`thorns = ${c.thorns}`);
|
||||||
|
if (c.cardPlayedBlock != null) fields.push(`cardPlayedBlock = ${c.cardPlayedBlock}`);
|
||||||
if (c.weak != null) fields.push(`weak = ${c.weak}`);
|
if (c.weak != null) fields.push(`weak = ${c.weak}`);
|
||||||
if (c.vuln != null) fields.push(`vuln = ${c.vuln}`);
|
if (c.vuln != null) fields.push(`vuln = ${c.vuln}`);
|
||||||
if (c.powerEffect != null) fields.push(`powerEffect = ${luaStr(c.powerEffect)}`);
|
if (c.powerEffect != null) fields.push(`powerEffect = ${luaStr(c.powerEffect)}`);
|
||||||
@@ -173,13 +192,58 @@ function luaCardsTable(cards) {
|
|||||||
if (c.pierce === true) fields.push('pierce = true');
|
if (c.pierce === true) fields.push('pierce = true');
|
||||||
if (c.selfVuln != null) fields.push(`selfVuln = ${c.selfVuln}`);
|
if (c.selfVuln != null) fields.push(`selfVuln = ${c.selfVuln}`);
|
||||||
if (c.draw != null) fields.push(`draw = ${c.draw}`);
|
if (c.draw != null) fields.push(`draw = ${c.draw}`);
|
||||||
|
if (c.drawUntilHandSize != null) fields.push(`drawUntilHandSize = ${c.drawUntilHandSize}`);
|
||||||
|
if (c.drawSkillBlock != null) fields.push(`drawSkillBlock = ${c.drawSkillBlock}`);
|
||||||
|
if (c.drawDamage != null) fields.push(`drawDamage = ${c.drawDamage}`);
|
||||||
|
if (c.drawPoison != null) fields.push(`drawPoison = ${c.drawPoison}`);
|
||||||
if (c.heal != null) fields.push(`heal = ${c.heal}`);
|
if (c.heal != null) fields.push(`heal = ${c.heal}`);
|
||||||
|
if (c.gainEnergy != null) fields.push(`gainEnergy = ${c.gainEnergy}`);
|
||||||
if (c.poison != null) fields.push(`poison = ${c.poison}`);
|
if (c.poison != null) fields.push(`poison = ${c.poison}`);
|
||||||
if (c.discard != null) fields.push(`discard = ${c.discard}`);
|
if (c.discard != null) fields.push(`discard = ${c.discard}`);
|
||||||
if (c.discardAll === true) fields.push('discardAll = true');
|
if (c.discardAll === true) fields.push('discardAll = true');
|
||||||
|
if (c.drawPerDiscarded != null) fields.push(`drawPerDiscarded = ${c.drawPerDiscarded}`);
|
||||||
if (c.addShiv != null) fields.push(`addShiv = ${c.addShiv}`);
|
if (c.addShiv != null) fields.push(`addShiv = ${c.addShiv}`);
|
||||||
if (c.turnStartShiv != null) fields.push(`turnStartShiv = ${c.turnStartShiv}`);
|
if (c.turnStartShiv != null) fields.push(`turnStartShiv = ${c.turnStartShiv}`);
|
||||||
|
if (c.turnStartDraw != null) fields.push(`turnStartDraw = ${c.turnStartDraw}`);
|
||||||
|
if (c.turnStartDiscard != null) fields.push(`turnStartDiscard = ${c.turnStartDiscard}`);
|
||||||
|
if (c.handCostZeroThisTurn === true) fields.push('handCostZeroThisTurn = true');
|
||||||
|
if (c.drawDisabledThisTurn === true) fields.push('drawDisabledThisTurn = true');
|
||||||
if (c.addShivPerDiscard === true) fields.push('addShivPerDiscard = true');
|
if (c.addShivPerDiscard === true) fields.push('addShivPerDiscard = true');
|
||||||
|
if (c.useAllEnergy === true) fields.push('useAllEnergy = true');
|
||||||
|
if (c.shivDamageBonus != null) fields.push(`shivDamageBonus = ${c.shivDamageBonus}`);
|
||||||
|
if (c.firstShivDamageBonus != null) fields.push(`firstShivDamageBonus = ${c.firstShivDamageBonus}`);
|
||||||
|
if (c.shivRetain === true) fields.push('shivRetain = true');
|
||||||
|
if (c.shivAoe === true) fields.push('shivAoe = true');
|
||||||
|
if (c.attackDamageVsWeakMultiplier != null) fields.push(`attackDamageVsWeakMultiplier = ${c.attackDamageVsWeakMultiplier}`);
|
||||||
|
if (c.poisonHits != null) fields.push(`poisonHits = ${c.poisonHits}`);
|
||||||
|
if (c.poisonRandomTargets === true) fields.push('poisonRandomTargets = true');
|
||||||
|
if (c.poisonIfTargetPoisoned === true) fields.push('poisonIfTargetPoisoned = true');
|
||||||
|
if (c.xDamagePerEnergy != null) fields.push(`xDamagePerEnergy = ${c.xDamagePerEnergy}`);
|
||||||
|
if (c.xWeakPerEnergy != null) fields.push(`xWeakPerEnergy = ${c.xWeakPerEnergy}`);
|
||||||
|
if (c.nextTurnBlock != null) fields.push(`nextTurnBlock = ${c.nextTurnBlock}`);
|
||||||
|
if (c.nextTurnDraw != null) fields.push(`nextTurnDraw = ${c.nextTurnDraw}`);
|
||||||
|
if (c.nextTurnKeepBlock === true) fields.push('nextTurnKeepBlock = true');
|
||||||
|
if (c.nextTurnAttackMultiplier != null) fields.push(`nextTurnAttackMultiplier = ${c.nextTurnAttackMultiplier}`);
|
||||||
|
if (c.nextTurnCopies != null) fields.push(`nextTurnCopies = ${c.nextTurnCopies}`);
|
||||||
|
if (c.nextTurnSelectHandCard === true) fields.push('nextTurnSelectHandCard = true');
|
||||||
|
if (c.nextTurnSelectPrompt != null) fields.push(`nextTurnSelectPrompt = ${luaStr(c.nextTurnSelectPrompt)}`);
|
||||||
|
if (c.nextSkillRepeatCount != null) fields.push(`nextSkillRepeatCount = ${c.nextSkillRepeatCount}`);
|
||||||
|
if (c.nextSkillCostZero === true) fields.push('nextSkillCostZero = true');
|
||||||
|
if (c.skillCostReductionThisTurn != null) fields.push(`skillCostReductionThisTurn = ${c.skillCostReductionThisTurn}`);
|
||||||
|
if (c.skillSlyOnPlay === true) fields.push('skillSlyOnPlay = true');
|
||||||
|
if (c.turnHandSlyCount != null) fields.push(`turnHandSlyCount = ${c.turnHandSlyCount}`);
|
||||||
|
if (c.combatCostReductionOnPlay != null) fields.push(`combatCostReductionOnPlay = ${c.combatCostReductionOnPlay}`);
|
||||||
|
if (c.randomTargetEachHit === true) fields.push('randomTargetEachHit = true');
|
||||||
|
if (c.repeatOnKill === true) fields.push('repeatOnKill = true');
|
||||||
|
if (c.affectsAllEnemies === true) fields.push('affectsAllEnemies = true');
|
||||||
|
if (c.removeEnemyBlock === true) fields.push('removeEnemyBlock = true');
|
||||||
|
if (c.removeEnemyArtifact === true) fields.push('removeEnemyArtifact = true');
|
||||||
|
if (c.enemyStrengthLossThisTurn != null) fields.push(`enemyStrengthLossThisTurn = ${c.enemyStrengthLossThisTurn}`);
|
||||||
|
if (c.extraPoisonTicks != null) fields.push(`extraPoisonTicks = ${c.extraPoisonTicks}`);
|
||||||
|
if (c.poisonApplicationBurstEvery != null) fields.push(`poisonApplicationBurstEvery = ${c.poisonApplicationBurstEvery}`);
|
||||||
|
if (c.poisonApplicationBurstDamage != null) fields.push(`poisonApplicationBurstDamage = ${c.poisonApplicationBurstDamage}`);
|
||||||
|
if (c.innate === true) fields.push('innate = true');
|
||||||
|
if (c.playableWhenDrawPileEmpty === true) fields.push('playableWhenDrawPileEmpty = true');
|
||||||
if (c.sly === true) fields.push('sly = true');
|
if (c.sly === true) fields.push('sly = true');
|
||||||
if (c.retain === true) fields.push('retain = true');
|
if (c.retain === true) fields.push('retain = true');
|
||||||
if (c.exhaust === true || String(c.desc || '').includes('소멸.')) fields.push('exhaust = true');
|
if (c.exhaust === true || String(c.desc || '').includes('소멸.')) fields.push('exhaust = true');
|
||||||
|
|||||||
28
tools/deck/reconnect-ui-paths.mjs
Normal file
28
tools/deck/reconnect-ui-paths.mjs
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
import { readFileSync, writeFileSync, readdirSync } from 'node:fs';
|
||||||
|
import { join } from 'node:path';
|
||||||
|
|
||||||
|
// 일회성·멱등 마이그레이션: cb/*.mjs의 UI 경로 리터럴을 메이커 재편 UIGroup으로 재연결.
|
||||||
|
// 이미 이동된 경로는 매치 안 됨(멱등). MainMenu·Button_Attack/Jump·UIJoystick(=DefaultGroup 잔류)은 미변경.
|
||||||
|
// 섹션→UIGroup 매핑은 tools/verify/uimap.mjs 탐색으로 검증된 실제 .ui 분포 기준.
|
||||||
|
const MOVE = {
|
||||||
|
CharacterSelectHud: 'SelectUIGroup', JobChoiceHud: 'SelectUIGroup', JobSelectHud: 'SelectUIGroup',
|
||||||
|
LobbyHud: 'LobbyUIGroup', BoardHud: 'LobbyUIGroup', SoulShopHud: 'LobbyUIGroup',
|
||||||
|
CombatHud: 'RunUIGroup', DeckHud: 'RunUIGroup', CardHand: 'RunUIGroup', MapHud: 'RunUIGroup',
|
||||||
|
RewardHud: 'RunUIGroup', ShopHud: 'RunUIGroup', RestHud: 'RunUIGroup', TreasureHud: 'RunUIGroup',
|
||||||
|
DeckInspectHud: 'DeckUIGroup', DeckAllHud: 'DeckUIGroup',
|
||||||
|
};
|
||||||
|
const CB_DIR = 'tools/deck/cb';
|
||||||
|
let n = 0;
|
||||||
|
for (const f of readdirSync(CB_DIR).filter((x) => x.endsWith('.mjs'))) {
|
||||||
|
const p = join(CB_DIR, f);
|
||||||
|
const before = readFileSync(p, 'utf8');
|
||||||
|
let s = before;
|
||||||
|
// 1) 몬스터 슬롯: 그룹+이름 동시 (CombatHud 일반 remap보다 먼저). 슬롯 5→4는 MAX_MONSTERS(=4)가 이미 반영.
|
||||||
|
s = s.split('/ui/DefaultGroup/CombatHud/MonsterSlot').join('/ui/RunUIGroup/CombatHud/MonsterStatus');
|
||||||
|
// 2) 섹션별 그룹 접두사 remap
|
||||||
|
for (const [section, group] of Object.entries(MOVE)) {
|
||||||
|
s = s.split(`/ui/DefaultGroup/${section}`).join(`/ui/${group}/${section}`);
|
||||||
|
}
|
||||||
|
if (s !== before) { writeFileSync(p, s, 'utf8'); n++; console.log(' remapped', f); }
|
||||||
|
}
|
||||||
|
console.log(`reconnect-ui-paths: ${n} files updated`);
|
||||||
69
tools/verify/cbgap.mjs
Normal file
69
tools/verify/cbgap.mjs
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
import { readFileSync, readdirSync } from 'node:fs';
|
||||||
|
import { join } from 'node:path';
|
||||||
|
|
||||||
|
// cb 컨트롤러가 참조하는 /ui/DefaultGroup/... 경로를, 사용자가 메이커에서 재편한
|
||||||
|
// 새 UIGroup(.ui) 구조에 대조해 "그대로 옮겨지면 해결(resolved)" vs "이름/구조가 바뀌어
|
||||||
|
// 못 찾음(GAP)"을 분류. GAP = 사용자에게 구→신 매핑을 받아야 할 항목.
|
||||||
|
// 출력은 경로 이름 + EXISTS/GAP boolean 뿐(엔티티 값 본문 미출력 → RULES §2 준수).
|
||||||
|
|
||||||
|
// 섹션(=DefaultGroup 다음 첫 세그먼트) → 이동된 UIGroup (uimap.mjs 탐색 결과 기반)
|
||||||
|
const SECTION_TO_GROUP = {
|
||||||
|
MainMenu: 'DefaultGroup', Button_Attack: 'DefaultGroup', Button_Jump: 'DefaultGroup', UIJoystick: 'DefaultGroup',
|
||||||
|
CharacterSelectHud: 'SelectUIGroup', JobChoiceHud: 'SelectUIGroup', JobSelectHud: 'SelectUIGroup',
|
||||||
|
LobbyHud: 'LobbyUIGroup', BoardHud: 'LobbyUIGroup', SoulShopHud: 'LobbyUIGroup',
|
||||||
|
CombatHud: 'RunUIGroup', DeckHud: 'RunUIGroup', CardHand: 'RunUIGroup', MapHud: 'RunUIGroup',
|
||||||
|
RewardHud: 'RunUIGroup', ShopHud: 'RunUIGroup', RestHud: 'RunUIGroup', TreasureHud: 'RunUIGroup',
|
||||||
|
DeckInspectHud: 'DeckUIGroup', DeckAllHud: 'DeckUIGroup',
|
||||||
|
};
|
||||||
|
|
||||||
|
// 새 .ui 로드
|
||||||
|
const UI_DIR = 'ui';
|
||||||
|
const ui = {};
|
||||||
|
for (const f of readdirSync(UI_DIR).filter((x) => x.endsWith('.ui'))) {
|
||||||
|
ui[f.replace('.ui', '')] = readFileSync(join(UI_DIR, f), 'utf8');
|
||||||
|
}
|
||||||
|
|
||||||
|
// cb 소스에서 /ui/DefaultGroup/... 경로 리터럴 추출 (템플릿 ${...} 포함)
|
||||||
|
const CB_DIR = 'tools/deck/cb';
|
||||||
|
const re = /\/ui\/DefaultGroup\/[^"'`\s),]+/g;
|
||||||
|
const paths = new Set();
|
||||||
|
for (const f of readdirSync(CB_DIR).filter((x) => x.endsWith('.mjs'))) {
|
||||||
|
const src = readFileSync(join(CB_DIR, f), 'utf8');
|
||||||
|
for (const m of src.match(re) || []) paths.add(m);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 동적 세그먼트(${...}) 앞 정적 prefix만 취해 존재검사 (e.g. .../Card${i} → .../Card)
|
||||||
|
function staticPrefix(p) {
|
||||||
|
const i = p.indexOf('${');
|
||||||
|
if (i === -1) return { p, dyn: false };
|
||||||
|
// ${...} 직전까지 (마지막 세그먼트의 정적 앞부분 포함)
|
||||||
|
return { p: p.slice(0, i), dyn: true };
|
||||||
|
}
|
||||||
|
|
||||||
|
const bySection = {};
|
||||||
|
for (const p of [...paths].sort()) {
|
||||||
|
const rest = p.slice('/ui/DefaultGroup/'.length); // Section/child/...
|
||||||
|
const section = rest.split('/')[0].split('${')[0];
|
||||||
|
const group = SECTION_TO_GROUP[section] || '??';
|
||||||
|
const newPath = group === '??' ? p : p.replace('/ui/DefaultGroup/', `/ui/${group}/`);
|
||||||
|
const { p: probe } = staticPrefix(newPath);
|
||||||
|
const blob = ui[group] || '';
|
||||||
|
const exists = group !== '??' && blob.includes(probe);
|
||||||
|
(bySection[section] ||= []).push({ old: p, neu: newPath, exists, group });
|
||||||
|
}
|
||||||
|
|
||||||
|
// 보고
|
||||||
|
let totResolved = 0, totGap = 0;
|
||||||
|
for (const section of Object.keys(bySection).sort()) {
|
||||||
|
const rows = bySection[section];
|
||||||
|
const group = rows[0].group;
|
||||||
|
const gaps = rows.filter((r) => !r.exists);
|
||||||
|
const ok = rows.length - gaps.length;
|
||||||
|
totResolved += ok; totGap += gaps.length;
|
||||||
|
console.log(`\n[${section}] → ${group} 해결 ${ok} / GAP ${gaps.length} (총 ${rows.length})`);
|
||||||
|
for (const g of gaps) {
|
||||||
|
// GAP만 상세 출력 (사용자가 신규 이름 채워야 할 대상)
|
||||||
|
console.log(` GAP ${g.old.replace('/ui/DefaultGroup/', '')} →(없음) ${g.neu.replace(`/ui/${group}/`, `${group}: `)}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log(`\n=== 합계: 자동해결 ${totResolved} / GAP ${totGap} (distinct 경로 ${paths.size}) ===`);
|
||||||
35
tools/verify/uimap.mjs
Normal file
35
tools/verify/uimap.mjs
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
import { readFileSync, readdirSync } from 'node:fs';
|
||||||
|
import { join } from 'node:path';
|
||||||
|
|
||||||
|
// UIGroup(.ui) 매핑 헬퍼 (RULES §2: 내용 출력 금지·카운트만).
|
||||||
|
// 어떤 섹션/엔티티 이름이 어느 .ui 파일에 들어있는지 카운트 매트릭스로 보고.
|
||||||
|
// 산출물 경로를 명령줄에 노출하지 않아(디렉토리 스캔) deny 회피.
|
||||||
|
//
|
||||||
|
// 사용: node tools/verify/uimap.mjs <pattern> [<pattern> ...]
|
||||||
|
// 각 pattern은 정규식. 출력은 "pattern | file=count ..." 형식(본문 미출력).
|
||||||
|
const UI_DIR = 'ui';
|
||||||
|
const files = readdirSync(UI_DIR).filter((f) => f.endsWith('.ui'));
|
||||||
|
const cache = {};
|
||||||
|
for (const f of files) {
|
||||||
|
cache[f] = readFileSync(join(UI_DIR, f), 'utf8');
|
||||||
|
}
|
||||||
|
// 파일별 크기/JSON 유효성 헤더
|
||||||
|
console.log('=== ui/*.ui ===');
|
||||||
|
for (const f of files) {
|
||||||
|
let ok = false;
|
||||||
|
try { JSON.parse(cache[f]); ok = true; } catch { ok = false; }
|
||||||
|
console.log(` ${f} bytes=${cache[f].length} jsonValid=${ok}`);
|
||||||
|
}
|
||||||
|
const pats = process.argv.slice(2);
|
||||||
|
if (pats.length === 0) process.exit(0);
|
||||||
|
console.log('=== matches (file=count, 0 생략) ===');
|
||||||
|
for (const pat of pats) {
|
||||||
|
const re = new RegExp(pat, 'g');
|
||||||
|
const hits = [];
|
||||||
|
for (const f of files) {
|
||||||
|
const m = cache[f].match(re);
|
||||||
|
const n = m ? m.length : 0;
|
||||||
|
if (n > 0) hits.push(`${f}=${n}`);
|
||||||
|
}
|
||||||
|
console.log(` /${pat}/ ${hits.length ? hits.join(' ') : '(none)'}`);
|
||||||
|
}
|
||||||
157957
ui/DeckUIGroup.ui
Normal file
157957
ui/DeckUIGroup.ui
Normal file
File diff suppressed because it is too large
Load Diff
243887
ui/DefaultGroup.ui
243887
ui/DefaultGroup.ui
File diff suppressed because it is too large
Load Diff
5414
ui/LobbyUIGroup.ui
Normal file
5414
ui/LobbyUIGroup.ui
Normal file
File diff suppressed because it is too large
Load Diff
100
ui/PopupGroup.ui
100
ui/PopupGroup.ui
@@ -97,7 +97,7 @@
|
|||||||
{
|
{
|
||||||
"@type": "MOD.Core.UIGroupComponent",
|
"@type": "MOD.Core.UIGroupComponent",
|
||||||
"DefaultShow": false,
|
"DefaultShow": false,
|
||||||
"GroupOrder": 1,
|
"GroupOrder": 2,
|
||||||
"GroupType": 1,
|
"GroupType": 1,
|
||||||
"Enable": true
|
"Enable": true
|
||||||
},
|
},
|
||||||
@@ -585,7 +585,7 @@
|
|||||||
{
|
{
|
||||||
"id": "94a274e4-4111-40f1-924d-c95a3a1f14d5",
|
"id": "94a274e4-4111-40f1-924d-c95a3a1f14d5",
|
||||||
"path": "/ui/PopupGroup/PopupBack/PopupPanel/PopupBtnOK",
|
"path": "/ui/PopupGroup/PopupBack/PopupPanel/PopupBtnOK",
|
||||||
"componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.ButtonComponent,MOD.Core.TextComponent",
|
"componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent",
|
||||||
"jsonString": {
|
"jsonString": {
|
||||||
"name": "PopupBtnOK",
|
"name": "PopupBtnOK",
|
||||||
"path": "/ui/PopupGroup/PopupBack/PopupPanel/PopupBtnOK",
|
"path": "/ui/PopupGroup/PopupBack/PopupPanel/PopupBtnOK",
|
||||||
@@ -719,53 +719,6 @@
|
|||||||
"Type": 1,
|
"Type": 1,
|
||||||
"Enable": true
|
"Enable": true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"@type": "MOD.Core.ButtonComponent",
|
|
||||||
"Colors": {
|
|
||||||
"NormalColor": {
|
|
||||||
"r": 1.0,
|
|
||||||
"g": 1.0,
|
|
||||||
"b": 1.0,
|
|
||||||
"a": 1.0
|
|
||||||
},
|
|
||||||
"HighlightedColor": {
|
|
||||||
"r": 0.9607843,
|
|
||||||
"g": 0.9607843,
|
|
||||||
"b": 0.9607843,
|
|
||||||
"a": 1.0
|
|
||||||
},
|
|
||||||
"PressedColor": {
|
|
||||||
"r": 0.784313738,
|
|
||||||
"g": 0.784313738,
|
|
||||||
"b": 0.784313738,
|
|
||||||
"a": 1.0
|
|
||||||
},
|
|
||||||
"SelectedColor": {
|
|
||||||
"r": 0.9607843,
|
|
||||||
"g": 0.9607843,
|
|
||||||
"b": 0.9607843,
|
|
||||||
"a": 1.0
|
|
||||||
},
|
|
||||||
"DisabledColor": {
|
|
||||||
"r": 0.784313738,
|
|
||||||
"g": 0.784313738,
|
|
||||||
"b": 0.784313738,
|
|
||||||
"a": 0.5019608
|
|
||||||
},
|
|
||||||
"ColorMultiplier": 1.0,
|
|
||||||
"FadeDuration": 0.1
|
|
||||||
},
|
|
||||||
"ImageRUIDs": {
|
|
||||||
"HighlightedSprite": null,
|
|
||||||
"PressedSprite": null,
|
|
||||||
"SelectedSprite": null,
|
|
||||||
"DisabledSprite": null
|
|
||||||
},
|
|
||||||
"KeyCode": 0,
|
|
||||||
"OverrideSorting": false,
|
|
||||||
"Transition": 1,
|
|
||||||
"Enable": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"@type": "MOD.Core.TextComponent",
|
"@type": "MOD.Core.TextComponent",
|
||||||
"Alignment": 4,
|
"Alignment": 4,
|
||||||
@@ -820,7 +773,7 @@
|
|||||||
{
|
{
|
||||||
"id": "0f5de49b-2adc-409a-816d-15aa43df8e0d",
|
"id": "0f5de49b-2adc-409a-816d-15aa43df8e0d",
|
||||||
"path": "/ui/PopupGroup/PopupBack/PopupPanel/PopupBtnCancel",
|
"path": "/ui/PopupGroup/PopupBack/PopupPanel/PopupBtnCancel",
|
||||||
"componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.ButtonComponent,MOD.Core.TextComponent",
|
"componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent",
|
||||||
"jsonString": {
|
"jsonString": {
|
||||||
"name": "PopupBtnCancel",
|
"name": "PopupBtnCancel",
|
||||||
"path": "/ui/PopupGroup/PopupBack/PopupPanel/PopupBtnCancel",
|
"path": "/ui/PopupGroup/PopupBack/PopupPanel/PopupBtnCancel",
|
||||||
@@ -954,53 +907,6 @@
|
|||||||
"Type": 1,
|
"Type": 1,
|
||||||
"Enable": true
|
"Enable": true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"@type": "MOD.Core.ButtonComponent",
|
|
||||||
"Colors": {
|
|
||||||
"NormalColor": {
|
|
||||||
"r": 1.0,
|
|
||||||
"g": 1.0,
|
|
||||||
"b": 1.0,
|
|
||||||
"a": 1.0
|
|
||||||
},
|
|
||||||
"HighlightedColor": {
|
|
||||||
"r": 0.9607843,
|
|
||||||
"g": 0.9607843,
|
|
||||||
"b": 0.9607843,
|
|
||||||
"a": 1.0
|
|
||||||
},
|
|
||||||
"PressedColor": {
|
|
||||||
"r": 0.784313738,
|
|
||||||
"g": 0.784313738,
|
|
||||||
"b": 0.784313738,
|
|
||||||
"a": 1.0
|
|
||||||
},
|
|
||||||
"SelectedColor": {
|
|
||||||
"r": 0.9607843,
|
|
||||||
"g": 0.9607843,
|
|
||||||
"b": 0.9607843,
|
|
||||||
"a": 1.0
|
|
||||||
},
|
|
||||||
"DisabledColor": {
|
|
||||||
"r": 0.784313738,
|
|
||||||
"g": 0.784313738,
|
|
||||||
"b": 0.784313738,
|
|
||||||
"a": 0.5019608
|
|
||||||
},
|
|
||||||
"ColorMultiplier": 1.0,
|
|
||||||
"FadeDuration": 0.1
|
|
||||||
},
|
|
||||||
"ImageRUIDs": {
|
|
||||||
"HighlightedSprite": null,
|
|
||||||
"PressedSprite": null,
|
|
||||||
"SelectedSprite": null,
|
|
||||||
"DisabledSprite": null
|
|
||||||
},
|
|
||||||
"KeyCode": 0,
|
|
||||||
"OverrideSorting": false,
|
|
||||||
"Transition": 1,
|
|
||||||
"Enable": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"@type": "MOD.Core.TextComponent",
|
"@type": "MOD.Core.TextComponent",
|
||||||
"Alignment": 4,
|
"Alignment": 4,
|
||||||
|
|||||||
69868
ui/RunUIGroup.ui
Normal file
69868
ui/RunUIGroup.ui
Normal file
File diff suppressed because it is too large
Load Diff
6311
ui/SelectUIGroup.ui
Normal file
6311
ui/SelectUIGroup.ui
Normal file
File diff suppressed because it is too large
Load Diff
@@ -97,7 +97,7 @@
|
|||||||
{
|
{
|
||||||
"@type": "MOD.Core.UIGroupComponent",
|
"@type": "MOD.Core.UIGroupComponent",
|
||||||
"DefaultShow": false,
|
"DefaultShow": false,
|
||||||
"GroupOrder": 2,
|
"GroupOrder": 3,
|
||||||
"GroupType": 1,
|
"GroupType": 1,
|
||||||
"Enable": true
|
"Enable": true
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user