mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
refactor: Extract constants into constants file
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
import {
|
||||
MAX_LEVEL,
|
||||
} from './constants';
|
||||
|
||||
/*
|
||||
------------------------------------------------------
|
||||
Level cap
|
||||
------------------------------------------------------
|
||||
*/
|
||||
|
||||
export const MAX_LEVEL = 100;
|
||||
|
||||
export function capByLevel (lvl) {
|
||||
if (lvl > MAX_LEVEL) {
|
||||
return MAX_LEVEL;
|
||||
@@ -14,22 +16,6 @@ export function capByLevel (lvl) {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
------------------------------------------------------
|
||||
Stats cap
|
||||
------------------------------------------------------
|
||||
*/
|
||||
|
||||
export const MAX_STAT_POINTS = MAX_LEVEL;
|
||||
|
||||
/*
|
||||
------------------------------------------------------
|
||||
Health cap
|
||||
------------------------------------------------------
|
||||
*/
|
||||
|
||||
export const MAX_HEALTH = 50;
|
||||
|
||||
/*
|
||||
------------------------------------------------------
|
||||
Scoring
|
||||
|
||||
Reference in New Issue
Block a user