[doc] add doc for handleBossSegmentCleared

This commit is contained in:
MokaStitcher 2024-09-20 21:04:00 +02:00
parent 2ad6b792df
commit 5a9b673554

View File

@ -4749,6 +4749,13 @@ export class EnemyPokemon extends Pokemon {
return true;
}
/**
* Go through a boss' health segments and give stats boosts for each newly cleared segment
* The base boost is 1 to a random stat that's not already maxed out per broken shield
* For Pokemon with 3 health segments or more, breaking the last shield gives +2 instead
* For Pokemon with 5 health segments or more, breaking the last two shields give +2 each
* @param segmentIndex index of the segment to get down to (0 = no shield left, 1 = 1 shield left, etc.)
*/
handleBossSegmentCleared(segmentIndex: integer): void {
while (this.bossSegmentIndex > 0 && segmentIndex - 1 < this.bossSegmentIndex) {
// Filter out already maxed out stat stages and weigh the rest based on existing stats