78 lines
3.7 KiB
C#
78 lines
3.7 KiB
C#
using UnityEngine;
|
||
|
||
namespace TKS
|
||
{
|
||
/// <summary>
|
||
/// 플레이 테스트 전용 옵션(PD 2026-11-18 「테스트 전용 전 스테이지 열기 및 기준 스펙 편성」) — 에디터 메뉴 TKS/테스트/… 가 PlayerPrefs 에 켜고 끈다.
|
||
/// 아무도 켜지 않으면(기본) 게임 동작은 그대로다. 기기 빌드에는 켜는 메뉴가 없다.
|
||
/// · 전 스테이지 열기 = 월드맵 모든 장·노드 입장 가능 + 출정 군량 면제(서버 모드는 서버가 입장을 거절하면 보상 없이 전투만)
|
||
/// · 기준 스펙 = 출전 영웅 능력치 = 병종 기본 × 영웅 고유 배율(레벨 · 승급 · 장비 · 성급 · 훈련 · 보물 무시) · 스킬 Lv1 — 레벨디자인 측정(LevelSimTests spec 1.0)과 같은 조건
|
||
/// · 기준 편성 = 출전할 영웅 id 목록(비면 내 편성 프리셋) · 보유 여부와 무관
|
||
/// </summary>
|
||
public static class TestOptions
|
||
{
|
||
public const string KeyUnlockAll = "TKS_TEST_UNLOCK_ALL";
|
||
public const string KeyStandardSpec = "TKS_TEST_STD_SPEC";
|
||
public const string KeyLineup = "TKS_TEST_LINEUP";
|
||
public const string KeyAimMode = "TKS_TEST_AIM_MODE";
|
||
|
||
public static bool UnlockAllStages
|
||
{
|
||
get { return PlayerPrefs.GetInt(KeyUnlockAll, 0) == 1; }
|
||
set { PlayerPrefs.SetInt(KeyUnlockAll, value ? 1 : 0); PlayerPrefs.Save(); }
|
||
}
|
||
|
||
public static bool StandardSpec
|
||
{
|
||
get { return PlayerPrefs.GetInt(KeyStandardSpec, 0) == 1; }
|
||
set { PlayerPrefs.SetInt(KeyStandardSpec, value ? 1 : 0); PlayerPrefs.Save(); }
|
||
}
|
||
|
||
/// <summary>기준 편성 영웅 id(; 로 · 비면 내 편성).</summary>
|
||
public static string LineupIds
|
||
{
|
||
get { return PlayerPrefs.GetString(KeyLineup, ""); }
|
||
set { PlayerPrefs.SetString(KeyLineup, value ?? ""); PlayerPrefs.Save(); }
|
||
}
|
||
|
||
/// <summary>조준 방식 덮어쓰기(-1 = 표 ib_ui.csv aim_mode 그대로 · 0 = 게이지 거리 · 1 = 끌기 거리 + 붉은 구간 치명타).</summary>
|
||
public static int AimModeOverride
|
||
{
|
||
get { return PlayerPrefs.GetInt(KeyAimMode, -1); }
|
||
set { PlayerPrefs.SetInt(KeyAimMode, value); PlayerPrefs.Save(); AimRules.Refresh(); }
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// 조준 방식(PD 2026-11-18 게임성 변경안 · 테스트 — 기존 게이지 방식은 지우지 않고 보류):
|
||
/// 0 = 게이지 거리(2026-11-16 · 끈 거리는 방향만 · 이동 거리 = 최대 × 게이지 · 게이지 끝 구간 = 치명타)
|
||
/// 1 = 끌기 거리(화살표 길이 = 당긴 거리 비례 · 최대 = 슬링 최대 거리) + 오르내리는 게이지의 무작위 붉은 구간에서 놓으면 치명타 · 그 밖 = 일반 피해(아군 궁·책 목표점 명중 치명타도 없음).
|
||
/// 값 = 표 Resources/Skills/ib_ui.csv aim_mode · 테스트 메뉴 덮어쓰기(TestOptions.AimModeOverride)가 있으면 그 값.
|
||
/// </summary>
|
||
public static class AimRules
|
||
{
|
||
static int cached = int.MinValue;
|
||
|
||
/// <summary>표·테스트 덮어쓰기를 다시 읽는다(조준 시작 · 메뉴 전환 때) — 전투 계산(적 AI 가상 실행 포함)은 저장된 값만 본다.</summary>
|
||
public static void Refresh()
|
||
{
|
||
int o = TestOptions.AimModeOverride;
|
||
cached = o >= 0 ? o : Mathf.RoundToInt(IbUi.Num("aim_mode", 0f));
|
||
}
|
||
|
||
public static int Mode
|
||
{
|
||
get
|
||
{
|
||
if (cached == int.MinValue) Refresh();
|
||
return cached;
|
||
}
|
||
}
|
||
|
||
public static bool DragMode
|
||
{
|
||
get { return Mode == 1; }
|
||
}
|
||
}
|
||
}
|