-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstants.ts
More file actions
81 lines (72 loc) · 2.74 KB
/
constants.ts
File metadata and controls
81 lines (72 loc) · 2.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
export const CANVAS_WIDTH = 1280;
export const CANVAS_HEIGHT = 720;
export const PLAYER_SPEED = 4;
export const PLAYER_RADIUS = 12;
export const PLAYER_COLOR = '#3b82f6'; // Blue-500
export const BULLET_SPEED = 10;
export const ENEMY_SPAWN_RATE = 120; // Frames
export const DASH_SPEED = 12;
export const DASH_DURATION = 10; // Frames (~160ms)
export const DASH_COOLDOWN = 60; // Frames (1s)
export const BOSS_HP_BASE = 80;
export const COLORS = {
PLAYER: '#3b82f6',
ENEMY_MELEE: '#ef4444', // Red-500
ENEMY_RANGED: '#f97316', // Orange-500
ENEMY_DASHER: '#06b6d4', // Cyan-500 (Fast)
ENEMY_SHOTGUNNER: '#7c2d12', // Brown-900 (Heavy)
ENEMY_KAMIKAZE: '#be123c', // Rose-700 (Explosive)
BOSS: '#9333ea', // Purple-600
BULLET_PLAYER: '#fbbf24', // Amber-400
BULLET_ENEMY: '#dc2626', // Red-600
WALL: '#374151', // Gray-700
WALL_TOP: '#4b5563', // Gray-600
FLOOR: '#1f2937',
PARTICLE: '#ffffff',
FRAGMENT: '#10b981', // Emerald-500
CRIT: '#facc15', // Yellow-400
WEAPON_GLOW: '#6366f1', // Indigo
PORTAL: '#a855f7', // Purple-500
TRAP: '#7f1d1d', // Red-900 (Spikes)
CRATE: '#92400e', // Amber-800
CRATE_BORDER: '#b45309' // Amber-700
};
export const WEAPON_TEMPLATES = {
PISTOL: {
name: 'Rusty Pistol',
stats: { damage: 2, cooldown: 25, speed: 9, spread: 0.05, count: 1, range: 60, piercing: false },
color: '#9ca3af' // Gray
},
SHOTGUN: {
name: 'Boomstick',
stats: { damage: 1.5, cooldown: 55, speed: 10, spread: 0.4, count: 5, range: 30, piercing: false },
color: '#ef4444' // Red
},
SMG: {
name: 'Uzi',
stats: { damage: 1, cooldown: 6, speed: 11, spread: 0.25, count: 1, range: 45, piercing: false },
color: '#facc15' // Yellow
},
SNIPER: {
name: 'Railgun',
stats: { damage: 12, cooldown: 70, speed: 22, spread: 0.0, count: 1, range: 120, piercing: true },
color: '#10b981' // Green
},
RIFLE: {
name: 'Assault Rifle',
stats: { damage: 3, cooldown: 12, speed: 14, spread: 0.08, count: 1, range: 80, piercing: false },
color: '#3b82f6' // Blue
},
LASER: {
name: 'Proto Laser',
stats: { damage: 4, cooldown: 35, speed: 25, spread: 0, count: 1, range: 100, piercing: true },
color: '#06b6d4' // Cyan
}
};
export const UPGRADE_CONFIG = {
[ 'DAMAGE' ]: { base: 0, increment: 1, max: 10, costBase: 5, costMult: 2, name: "Damage" },
[ 'FIRE_RATE' ]: { base: 0, increment: 0.1, max: 8, costBase: 5, costMult: 3, name: "Fire Rate" }, // % reduction
[ 'MULTISHOT' ]: { base: 0, increment: 1, max: 3, costBase: 30, costMult: 15, name: "Multishot" },
[ 'CRIT_CHANCE' ]: { base: 0.05, increment: 0.05, max: 10, costBase: 8, costMult: 4, name: "Crit %" },
[ 'BULLET_SPEED' ]: { base: 0, increment: 1, max: 5, costBase: 5, costMult: 2, name: "Velocity" },
};