updated multi-hit condition)

pull/783/head
DustinLin 2024-05-12 13:22:41 -04:00
parent 65c59102a7
commit 1782a18459
1 changed files with 1 additions and 1 deletions

View File

@ -1648,7 +1648,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
// case when multi hit move killed early, then queue how many hits were made before // case when multi hit move killed early, then queue how many hits were made before
// eg: bullet seed 1 shots, double-slap 1 shots, // eg: bullet seed 1 shots, double-slap 1 shots,
// note that simply looking at this.turnData.attacksReceived doesn't work for double battles // note that simply looking at this.turnData.attacksReceived doesn't work for double battles
if (this.isFainted() && source.turnData.hitsLeft > 0){ if (this.isFainted() && source.turnData.hitsLeft > 1){
console.log(`${this.name} fainted: they received this many hits: ${this.turnData.attacksReceived.length}`); console.log(`${this.name} fainted: they received this many hits: ${this.turnData.attacksReceived.length}`);
// off by one from decrement, test more // off by one from decrement, test more
const hitsTotal = source.turnData.hitCount - Math.max(source.turnData.hitsLeft, 0) + 1; const hitsTotal = source.turnData.hitCount - Math.max(source.turnData.hitsLeft, 0) + 1;