Skip to content

Commit

Permalink
[FIX] Status issue when missing or not first effect
Browse files Browse the repository at this point in the history
  • Loading branch information
Wano-k committed Sep 28, 2023
1 parent 6211499 commit 97e4f51
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/Datas/Base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ abstract class Base {
throw new Error();
}
let v = list[id];
console.log(v)
if (Utils.isUndefined(v)) {
Platform.showErrorMessage(errorMessage === "" ? (Base
.STRING_ERROR_GET_1 + (isID ? "ID": "index") + " " + Utils
Expand Down
13 changes: 10 additions & 3 deletions src/System/Effect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ class Effect extends Base {
battler = targets[i];
target = battler.player;
miss = false;
crit = false;
precision = Interpreter.evaluate(this.statusPrecisionFormula
.getValue(), { user: user, target: battler.player });
id = this.statusID.getValue();
Expand All @@ -221,6 +220,12 @@ class Effect extends Base {
battler.tempIsDamagesMiss = miss;
}
}
default: {
for (const battler of targets) {
battler.tempIsDamagesMiss = null;
battler.tempIsDamagesCritical = null;
}
}
}
}

Expand Down Expand Up @@ -416,6 +421,8 @@ class Effect extends Base {
battler.isDamagesCritical = false;
battler.lastStatus = null;
battler.lastStatusHealed = null;
battler.tempIsDamagesMiss = null;
battler.tempIsDamagesCritical = null;
continue;
} else {
this.canSkip = false;
Expand Down Expand Up @@ -452,9 +459,9 @@ class Effect extends Base {
battler.isDamagesMiss = miss;
battler.isDamagesCritical = false;
}
battler.tempIsDamagesMiss = null;
battler.tempIsDamagesCritical = null;
}
battler.tempIsDamagesMiss = null;
battler.tempIsDamagesCritical = null;
result = true;
break;
}
Expand Down

0 comments on commit 97e4f51

Please sign in to comment.