fix point bug

This commit is contained in:
sora233
2021-09-03 16:44:52 +08:00
committed by 神戸小鳥
parent bb830fa313
commit 5191569e3e
2 changed files with 8 additions and 3 deletions

2
.gitignore vendored
View File

@@ -104,3 +104,5 @@ dist
.tern-port .tern-port
utils/xlsxTransform-* utils/xlsxTransform-*
/.idea

View File

@@ -166,7 +166,7 @@ class App{
freshTotal(); freshTotal();
} }
btnAdd.click(()=>{ btnAdd.click(()=>{
if(total() == this.#totalMax) { if(total() >= this.#totalMax) {
this.hint('没用可分配的点数了'); this.hint('没用可分配的点数了');
return; return;
} }
@@ -223,9 +223,12 @@ class App{
propertyPage propertyPage
.find('#start') .find('#start')
.click(()=>{ .click(()=>{
if(total()!=this.#totalMax) { if(total() < this.#totalMax) {
this.hint(`你还有${this.#totalMax-total()}属性点没有分配完`); this.hint(`你还有${this.#totalMax-total()}属性点没有分配完`);
return; return;
} else if (total() > this.#totalMax) {
this.hint(`你多使用了${total() - this.#totalMax}属性点`);
return;
} }
this.#life.restart({ this.#life.restart({
CHR: groups.CHR.get(), CHR: groups.CHR.get(),