}
return `<div class="progress-bar" id="${id}" style="background: linear-gradient(to right, ${opts.startingColor}, ${opts.endingColor} ${percent}%, transparent ${percent}%, transparent)"
-title="${percent}% - ${current}/${max}">${current}/${max} - ${percent}</div>`;
+title="${percent}% - ${current}/${max}">${current}/${max} - ${percent}%</div>`;
}
export function renderPlayerBar(player: Player, inventory: EquippedItemDetails[]): string {
}
export function maxHp(constitution: number, playerLevel: number): number {
- return Math.ceil((constitution + (playerLevel * 1.3)) * 1.7);
+ return Math.ceil((constitution * 1.7) + (playerLevel * 1.3));
}
export function expToLevel(level: number): number {