80 lines
2.1 KiB
Python
80 lines
2.1 KiB
Python
"""Underdepths tuning constants.
|
|
|
|
Every magic number lives here so balancing is trivial. See plan.md for the
|
|
source-of-truth design tables.
|
|
"""
|
|
|
|
MAP_W = 80
|
|
MAP_H = 50
|
|
TILE_WALL = 0
|
|
TILE_FLOOR = 1
|
|
SIGHT_RADIUS = 8
|
|
|
|
# Cumulative XP required to reach level i+1 (index 0 is the level-1 start).
|
|
LEVEL_XP = [0, 30, 70, 140, 250, 400, 600, 850, 1150, 1500]
|
|
# Stat grants applied when advancing FROM level (i+1) -> (i+2); index i.
|
|
LEVEL_HP_GAIN = [10, 10, 10, 10, 15, 15, 15, 15, 20]
|
|
LEVEL_POWER_GAIN = [1, 1, 1, 1, 2, 2, 2, 2, 3]
|
|
|
|
PLAYER_BASE = {
|
|
"hp": 50,
|
|
"max_hp": 50,
|
|
"power": 4,
|
|
"armor": 0,
|
|
"accuracy": 5,
|
|
"evasion": 2,
|
|
"crit_chance": 0.10,
|
|
"speed": 1,
|
|
}
|
|
|
|
COLORS = {
|
|
# terrain
|
|
"wall_visible": (60, 60, 70),
|
|
"wall_explored": (30, 30, 35),
|
|
"floor_visible": (40, 35, 30),
|
|
"floor_explored": (20, 18, 15),
|
|
# actors
|
|
"player": (255, 255, 255),
|
|
"rat": (150, 100, 50), # brown
|
|
"goblin": (70, 180, 80), # green
|
|
"skeleton_archer": (210, 210, 210), # white-gray
|
|
"orc_warrior": (140, 40, 40), # dark red
|
|
"wraith": (160, 90, 210), # translucent purple
|
|
"green_slime": (100, 220, 100), # bright green
|
|
"small_slime": (130, 230, 130),
|
|
"ancient_dragon": (235, 50, 50), # bright red
|
|
# items
|
|
"weapon": (225, 205, 90), # yellow
|
|
"armor_item": (90, 120, 225), # blue
|
|
"potion": (225, 70, 70), # red
|
|
"scroll": (90, 205, 225), # cyan
|
|
"stairs": (240, 220, 60), # bright yellow
|
|
}
|
|
|
|
ROOM_MIN_W = 4
|
|
ROOM_MIN_H = 4
|
|
ROOM_MAX_W = 10
|
|
ROOM_MAX_H = 8
|
|
|
|
# BSP recursive-split count range.
|
|
BSP_MIN_SPLITS = 5
|
|
BSP_MAX_SPLITS = 8
|
|
|
|
# Smallest leaf dimension allowed; guarantees a room fits with a margin.
|
|
LEAF_MIN_W = 7
|
|
LEAF_MIN_H = 6
|
|
|
|
# Per-floor spawn ranges: floor_index -> (enemy_min, enemy_max, item_min, item_max).
|
|
SPAWN_TABLE = {
|
|
0: (3, 4, 2, 3),
|
|
1: (3, 4, 2, 3),
|
|
2: (4, 6, 2, 3),
|
|
3: (4, 6, 2, 3),
|
|
4: (5, 7, 3, 4),
|
|
5: (5, 7, 3, 4),
|
|
6: (6, 8, 3, 4),
|
|
7: (6, 8, 3, 4),
|
|
8: (7, 9, 4, 5),
|
|
9: (0, 0, 2, 2), # boss arena: no enemies, two healing potions
|
|
}
|