Add in mana and an asset viewer
This commit is contained in:
@@ -1,8 +1,18 @@
|
||||
export interface AnimationConfig {
|
||||
key: string;
|
||||
textureKey: string;
|
||||
frames: number[];
|
||||
frameRate: number;
|
||||
repeat: number;
|
||||
}
|
||||
|
||||
export const GAME_CONFIG = {
|
||||
player: {
|
||||
initialStats: {
|
||||
maxHp: 20,
|
||||
hp: 20,
|
||||
hp: 20,
|
||||
maxMana: 20,
|
||||
mana: 20,
|
||||
attack: 5,
|
||||
defense: 2,
|
||||
level: 1,
|
||||
@@ -29,8 +39,6 @@ export const GAME_CONFIG = {
|
||||
viewRadius: 8
|
||||
},
|
||||
|
||||
|
||||
|
||||
map: {
|
||||
width: 60,
|
||||
height: 40,
|
||||
@@ -72,12 +80,17 @@ export const GAME_CONFIG = {
|
||||
baseExpToNextLevel: 10,
|
||||
expMultiplier: 1.5,
|
||||
hpGainPerLevel: 5,
|
||||
manaGainPerLevel: 3,
|
||||
attackGainPerLevel: 1,
|
||||
statPointsPerLevel: 5,
|
||||
skillPointsPerLevel: 1
|
||||
},
|
||||
|
||||
|
||||
mana: {
|
||||
regenPerTurn: 2,
|
||||
regenInterval: 3 // Regenerate every 3 turns
|
||||
},
|
||||
|
||||
rendering: {
|
||||
tileSize: 16,
|
||||
cameraZoom: 2,
|
||||
@@ -97,7 +110,6 @@ export const GAME_CONFIG = {
|
||||
visibleStrengthFactor: 0.65
|
||||
},
|
||||
|
||||
|
||||
terrain: {
|
||||
empty: 1,
|
||||
wall: 4,
|
||||
@@ -126,11 +138,32 @@ export const GAME_CONFIG = {
|
||||
{ key: "rat", path: "assets/sprites/actors/enemies/rat.png", frameConfig: { frameWidth: 16, frameHeight: 15 } },
|
||||
{ key: "bat", path: "assets/sprites/actors/enemies/bat.png", frameConfig: { frameWidth: 15, frameHeight: 15 } },
|
||||
{ key: "dungeon", path: "assets/tilesets/dungeon.png", frameConfig: { frameWidth: 16, frameHeight: 16 } },
|
||||
{ key: "soldier.idle", path: "assets/sprites/actors/player/soldier/Idle.png", frameConfig: { frameWidth: 60, frameHeight: 75 } },
|
||||
],
|
||||
images: [
|
||||
{ key: "splash_bg", path: "assets/ui/splash_bg.png" }
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
animations: [
|
||||
// Warrior
|
||||
{ key: "warrior-idle", textureKey: "warrior", frames: [0, 0, 0, 1, 0, 0, 1, 1], frameRate: 2, repeat: -1 },
|
||||
{ key: "warrior-run", textureKey: "warrior", frames: [2, 3, 4, 5, 6, 7], frameRate: 15, repeat: -1 },
|
||||
{ key: "warrior-die", textureKey: "warrior", frames: [8, 9, 10, 11, 12], frameRate: 10, repeat: 0 },
|
||||
|
||||
// Rat
|
||||
{ key: "rat-idle", textureKey: "rat", frames: [0, 0, 0, 1], frameRate: 4, repeat: -1 },
|
||||
{ key: "rat-run", textureKey: "rat", frames: [6, 7, 8, 9, 10], frameRate: 10, repeat: -1 },
|
||||
{ key: "rat-die", textureKey: "rat", frames: [11, 12, 13, 14], frameRate: 10, repeat: 0 },
|
||||
|
||||
// Bat
|
||||
{ key: "bat-idle", textureKey: "bat", frames: [0, 1], frameRate: 8, repeat: -1 },
|
||||
{ key: "bat-run", textureKey: "bat", frames: [0, 1], frameRate: 12, repeat: -1 },
|
||||
{ key: "bat-die", textureKey: "bat", frames: [4, 5, 6], frameRate: 10, repeat: 0 },
|
||||
|
||||
// Soldier
|
||||
{ key: "soldier-idle", textureKey: "soldier.idle", frames: [0, 1, 2, 3, 4, 5, 6, 7], frameRate: 8, repeat: -1 },
|
||||
]
|
||||
} as const;
|
||||
|
||||
export type GameConfig = typeof GAME_CONFIG;
|
||||
|
||||
Reference in New Issue
Block a user