mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-07 17:02:16 +02:00
Change ignoreOverride
to bypassSummonData
This commit is contained in:
parent
89b0344a3f
commit
f54df49042
@ -676,11 +676,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the entire set of stats of the {@linkcode Pokemon}.
|
* Retrieves the entire set of stats of the {@linkcode Pokemon}.
|
||||||
* @param ignoreOverride prefer actual stats (`true` by default) or in-battle overriden stats (`false`)
|
* @param bypassSummonData prefer actual stats (`true` by default) or in-battle overriden stats (`false`)
|
||||||
* @returns the numeric values of the {@linkcode Pokemon}'s stats
|
* @returns the numeric values of the {@linkcode Pokemon}'s stats
|
||||||
*/
|
*/
|
||||||
getStats(ignoreOverride: boolean = true): number[] {
|
getStats(bypassSummonData: boolean = true): number[] {
|
||||||
if (!ignoreOverride && this.summonData?.stats) {
|
if (!bypassSummonData && this.summonData?.stats) {
|
||||||
return this.summonData.stats;
|
return this.summonData.stats;
|
||||||
}
|
}
|
||||||
return this.stats;
|
return this.stats;
|
||||||
@ -689,11 +689,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
/**
|
/**
|
||||||
* Retrieves the corresponding {@linkcode PermanentStat} of the {@linkcode Pokemon}.
|
* Retrieves the corresponding {@linkcode PermanentStat} of the {@linkcode Pokemon}.
|
||||||
* @param stat the desired {@linkcode PermanentStat}
|
* @param stat the desired {@linkcode PermanentStat}
|
||||||
* @param ignoreOverride prefer actual stats (`true` by default) or in-battle overridden stats (`false`)
|
* @param bypassSummonData prefer actual stats (`true` by default) or in-battle overridden stats (`false`)
|
||||||
* @returns the numeric value of the desired {@linkcode Stat}
|
* @returns the numeric value of the desired {@linkcode Stat}
|
||||||
*/
|
*/
|
||||||
getStat(stat: PermanentStat, ignoreOverride: boolean = true): number {
|
getStat(stat: PermanentStat, bypassSummonData: boolean = true): number {
|
||||||
if (!ignoreOverride && this.summonData && (this.summonData.stats[stat] !== 0)) {
|
if (!bypassSummonData && this.summonData && (this.summonData.stats[stat] !== 0)) {
|
||||||
return this.summonData.stats[stat];
|
return this.summonData.stats[stat];
|
||||||
}
|
}
|
||||||
return this.stats[stat];
|
return this.stats[stat];
|
||||||
@ -705,11 +705,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
* Note that this does nothing if {@linkcode value} is less than 0.
|
* Note that this does nothing if {@linkcode value} is less than 0.
|
||||||
* @param stat the desired {@linkcode PermanentStat} to be overwritten
|
* @param stat the desired {@linkcode PermanentStat} to be overwritten
|
||||||
* @param value the desired numeric value
|
* @param value the desired numeric value
|
||||||
* @param ignoreOverride write to actual stats (`true` by default) or in-battle overridden stats (`false`)
|
* @param bypassSummonData write to actual stats (`true` by default) or in-battle overridden stats (`false`)
|
||||||
*/
|
*/
|
||||||
setStat(stat: PermanentStat, value: number, ignoreOverride: boolean = true): void {
|
setStat(stat: PermanentStat, value: number, bypassSummonData: boolean = true): void {
|
||||||
if (value >= 0) {
|
if (value >= 0) {
|
||||||
if (!ignoreOverride && this.summonData) {
|
if (!bypassSummonData && this.summonData) {
|
||||||
this.summonData.stats[stat] = value;
|
this.summonData.stats[stat] = value;
|
||||||
} else {
|
} else {
|
||||||
this.stats[stat] = value;
|
this.stats[stat] = value;
|
||||||
|
Loading…
Reference in New Issue
Block a user