Refactor codebase
This commit is contained in:
62
src/core/config/GameConfig.ts
Normal file
62
src/core/config/GameConfig.ts
Normal file
@@ -0,0 +1,62 @@
|
||||
export const GAME_CONFIG = {
|
||||
player: {
|
||||
initialStats: { maxHp: 20, hp: 20, attack: 5, defense: 2 },
|
||||
speed: 100,
|
||||
viewRadius: 8
|
||||
},
|
||||
|
||||
map: {
|
||||
width: 60,
|
||||
height: 40,
|
||||
minRooms: 8,
|
||||
maxRooms: 13,
|
||||
roomMinWidth: 5,
|
||||
roomMaxWidth: 12,
|
||||
roomMinHeight: 4,
|
||||
roomMaxHeight: 10
|
||||
},
|
||||
|
||||
enemy: {
|
||||
baseHpPerLevel: 2,
|
||||
baseHp: 8,
|
||||
baseAttack: 3,
|
||||
attackPerTwoLevels: 1,
|
||||
minSpeed: 80,
|
||||
maxSpeed: 130,
|
||||
maxDefense: 2,
|
||||
baseCountPerLevel: 1,
|
||||
baseCount: 3,
|
||||
randomBonus: 4
|
||||
},
|
||||
|
||||
rendering: {
|
||||
tileSize: 24,
|
||||
cameraZoom: 2,
|
||||
wallColor: 0x2b2b2b,
|
||||
floorColor: 0x161616,
|
||||
exitColor: 0xffd166,
|
||||
playerColor: 0x66ff66,
|
||||
enemyColor: 0xff6666,
|
||||
pathPreviewColor: 0x3355ff,
|
||||
fogAlphaFloor: 0.15,
|
||||
fogAlphaWall: 0.35,
|
||||
visibleMinAlpha: 0.35,
|
||||
visibleMaxAlpha: 1.0,
|
||||
visibleStrengthFactor: 0.65
|
||||
},
|
||||
|
||||
ui: {
|
||||
minimapPanelWidth: 340,
|
||||
minimapPanelHeight: 220,
|
||||
minimapPadding: 20,
|
||||
menuPanelWidth: 340,
|
||||
menuPanelHeight: 220
|
||||
},
|
||||
|
||||
gameplay: {
|
||||
energyThreshold: 100,
|
||||
actionCost: 100
|
||||
}
|
||||
} as const;
|
||||
|
||||
export type GameConfig = typeof GAME_CONFIG;
|
||||
Reference in New Issue
Block a user