96 lines
2.9 KiB
Python
96 lines
2.9 KiB
Python
"""All tunable values and colors live here. No magic numbers in logic."""
|
|
|
|
MAP_W: int = 80
|
|
MAP_H: int = 50
|
|
TILE: int = 16
|
|
SIGHT_RADIUS: int = 8
|
|
FLOORS: int = 10
|
|
|
|
BOSS_FLOOR: int = 9
|
|
|
|
# --- BSP dungeon generation --------------------------------------------------
|
|
BSP_SPLITS_MIN: int = 5
|
|
BSP_SPLITS_MAX: int = 8
|
|
SPLIT_MIN_DIM: int = 18
|
|
SPLIT_RATIO_MIN: float = 0.40
|
|
SPLIT_RATIO_MAX: float = 0.60
|
|
|
|
ROOM_MIN_W: int = 4
|
|
ROOM_MAX_W: int = 10
|
|
ROOM_MIN_H: int = 4
|
|
ROOM_MAX_H: int = 8
|
|
ROOM_SHRINK_MIN: int = 1
|
|
ROOM_SHRINK_MAX: int = 2
|
|
|
|
BOSS_ROOM_W: int = 20
|
|
BOSS_ROOM_H: int = 15
|
|
|
|
# --- combat tuning (referenced by phase 2, defined once here) ----------------
|
|
HIT_BASE: float = 0.70
|
|
HIT_STEP: float = 0.05
|
|
HIT_FLOOR: float = 0.10
|
|
HIT_CEIL: float = 0.95
|
|
RANGE_HIT_PENALTY: float = 0.03
|
|
|
|
# --- progression (XP, leveling) ----------------------------------------------
|
|
# XP_THRESHOLDS[i] is the cumulative XP needed to reach level i+2 (index 0 -> L2).
|
|
XP_THRESHOLDS: list[int] = [30, 70, 140, 250, 400, 600, 850, 1150, 1500]
|
|
# Per-level HP/power gains applied on reaching that level; index 0 -> L1->L2.
|
|
LEVEL_HP_GAINS: list[int] = [10, 10, 10, 10, 15, 15, 15, 15, 20]
|
|
LEVEL_POWER_GAINS: list[int] = [1, 1, 1, 1, 2, 2, 2, 2, 3]
|
|
MAX_LEVEL: int = 10
|
|
|
|
LOG_MAX: int = 50
|
|
|
|
# --- viewport / UI layout (renderer + main) ----------------------------------
|
|
VIEW_TILES_W: int = 50
|
|
VIEW_TILES_H: int = 30
|
|
PANEL_W: int = 200
|
|
TOP_BAR_H: int = 24
|
|
BOTTOM_BAR_H: int = 80
|
|
SCREEN_W: int = VIEW_TILES_W * TILE + PANEL_W # 1000
|
|
SCREEN_H: int = TOP_BAR_H + VIEW_TILES_H * TILE + BOTTOM_BAR_H # 584
|
|
|
|
# message-log color classifier keys (renderer heuristic)
|
|
LOG_COLOR_GOOD: tuple[str, ...] = (
|
|
"defeat", "defeats", "reach level", "slew", "conquer", "recover", "pick up",
|
|
"level up", "equip",
|
|
)
|
|
|
|
# --- consumable effects -------------------------------------------------------
|
|
STRENGTH_POWER_BONUS: int = 5
|
|
FIREBALL_DEFAULT_DAMAGE: int = 20
|
|
|
|
# --- colors ------------------------------------------------------------------
|
|
COLORS: dict[str, tuple[int, int, int]] = {
|
|
"wall_visible": (60, 60, 70),
|
|
"wall_explored": (30, 30, 35),
|
|
"floor_visible": (40, 35, 30),
|
|
"floor_explored": (20, 18, 15),
|
|
"player": (255, 255, 255),
|
|
"stairs": (255, 235, 50),
|
|
"weapon": (255, 215, 0),
|
|
"armor": (60, 120, 220),
|
|
"potion": (220, 40, 40),
|
|
"scroll": (0, 200, 200),
|
|
"ui_fg": (220, 220, 220),
|
|
"ui_dim": (140, 140, 140),
|
|
"ui_hp": (200, 40, 40),
|
|
"ui_xp": (80, 160, 240),
|
|
"msg_combat": (235, 235, 235),
|
|
"msg_hurt": (220, 60, 60),
|
|
"msg_good": (90, 220, 90),
|
|
"msg_item": (255, 215, 0),
|
|
"background": (0, 0, 0),
|
|
}
|
|
|
|
ENEMY_COLORS: dict[str, tuple[int, int, int]] = {
|
|
"Rat": (139, 69, 19),
|
|
"Goblin": (34, 139, 34),
|
|
"Skeleton Archer": (200, 200, 210),
|
|
"Orc Warrior": (139, 0, 0),
|
|
"Wraith": (138, 43, 226),
|
|
"Green Slime": (50, 205, 50),
|
|
"Ancient Dragon": (255, 40, 0),
|
|
}
|