mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-21 07:42:25 +02:00
Fix expected hit count for pop-bomb like moves
Accuracy is now properly divided by 100
This commit is contained in:
parent
2a8c9e4af5
commit
fb2e1267a9
@ -2397,10 +2397,12 @@ export class MultiHitAttr extends MoveAttr {
|
|||||||
if (ignoreAcc || move.accuracy === -1) {
|
if (ignoreAcc || move.accuracy === -1) {
|
||||||
return expectedHits;
|
return expectedHits;
|
||||||
}
|
}
|
||||||
|
const acc = move.accuracy / 100;
|
||||||
if (move.hasFlag(MoveFlags.CHECK_ALL_HITS) && !maxMultiHit) {
|
if (move.hasFlag(MoveFlags.CHECK_ALL_HITS) && !maxMultiHit) {
|
||||||
return Math.pow(move.accuracy, expectedHits);
|
// N.B. No moves should be the _2_TO_5 variant have the CHECK_ALL_HITS flag.
|
||||||
|
return acc * (1 - Math.pow(acc, expectedHits)) / (1 - acc);
|
||||||
}
|
}
|
||||||
return expectedHits *= move.accuracy / 100;
|
return expectedHits *= acc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user