Home
/
sketchy-heroes.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
proc-gen equipment drops from monsters can be picked up
[sketchy-heroes.git]
/
src
/
public
/
app
/
sections
/
overview.ts
diff --git
a/src/public/app/sections/overview.ts
b/src/public/app/sections/overview.ts
index b80ab9c53366199bff23c458c8dca8d7a1937328..b9b69534e48eacbeae932090a75e066e763855fb 100644
(file)
--- a/
src/public/app/sections/overview.ts
+++ b/
src/public/app/sections/overview.ts
@@
-2,6
+2,7
@@
import {Player} from "@prisma/client";
import $ from 'jquery';
import {maxExp, maxHp, maxStamina} from "../../../formulas";
import {progressBar} from "../components";
import $ from 'jquery';
import {maxExp, maxHp, maxStamina} from "../../../formulas";
import {progressBar} from "../components";
+import {hasStaminaAgain, outOfStamina} from "../dom";
function renderStatText(id: string, value: number, incrementable: boolean) {
$(`#${id} .text`).html(value.toString());
function renderStatText(id: string, value: number, incrementable: boolean) {
$(`#${id} .text`).html(value.toString());
@@
-38,4
+39,11
@@
export function playerOverview(player: Player) {
$('#exp .progress-bar-wrapper').html(progressBar(player.exp, maxExp(player.level), {
color: 'info'
}));
$('#exp .progress-bar-wrapper').html(progressBar(player.exp, maxExp(player.level), {
color: 'info'
}));
+
+ if(player.stamina <= 0) {
+ outOfStamina();
+ }
+ else {
+ hasStaminaAgain();
+ }
}
}