Added JSDocs comments to DoubleBattleChancePreventerModifierType

This commit is contained in:
sophie 2024-05-19 18:21:33 -04:00 committed by GitHub
parent 619e7fbb7c
commit d088779926
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -407,11 +407,21 @@ export class DoubleBattleChanceBoosterModifierType extends ModifierType {
}
}
/**
* Class representing a ModifierType for a Modifier that prevents Double Battles from occurring.
* @extends ModifierType
*/
export class DoubleBattleChancePreventerModifierType extends ModifierType {
public battleCount: integer;
/**
* Instantiates the ModifierType
* @param {string} localeKey - Used to grab the appropriate language texts
* @param {string} iconImage - Used to grab the appropriate icon
* @param {integer} battleCount - Represents how long the modifier should exist for
*/
constructor(localeKey: string, iconImage: string, battleCount: integer) {
super(localeKey, iconImage, (_type, _args) => new Modifiers.DoubleBattleChancePreventerModifier(this, this.battleCount), 'lure');
super(localeKey, iconImage, (_type, _args) => new Modifiers.DoubleBattleChancePreventerModifier(this, this.battleCount), 'repel');
this.battleCount = battleCount;
}
@ -1767,4 +1777,4 @@ export function getLuckString(luckValue: integer): string {
export function getLuckTextTint(luckValue: integer): integer {
const modifierTier = luckValue ? luckValue > 2 ? luckValue > 5 ? luckValue > 9 ? luckValue > 11 ? ModifierTier.LUXURY : ModifierTier.MASTER : ModifierTier.ROGUE : ModifierTier.ULTRA : ModifierTier.GREAT : ModifierTier.COMMON;
return getModifierTierTextTint(modifierTier);
}
}