mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 23:42:18 +02:00
Address kev's review comments
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
parent
4abe3ea566
commit
970f6841db
@ -264,7 +264,8 @@ export default abstract class BattleInfo extends Phaser.GameObjects.Container {
|
|||||||
.on("pointerout", () => globalScene.ui.hideTooltip());
|
.on("pointerout", () => globalScene.ui.hideTooltip());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Called by {@linkcode initInfo} to initialize the shiny icon
|
/**
|
||||||
|
* Called by {@linkcode initInfo} to initialize the shiny icon
|
||||||
* @param pokemon - The pokemon object attached to this battle info
|
* @param pokemon - The pokemon object attached to this battle info
|
||||||
* @param baseXOffset - The x offset to use for the shiny icon
|
* @param baseXOffset - The x offset to use for the shiny icon
|
||||||
* @param doubleShiny - Whether the pokemon is shiny and its fusion species is also shiny
|
* @param doubleShiny - Whether the pokemon is shiny and its fusion species is also shiny
|
||||||
@ -379,9 +380,10 @@ export default abstract class BattleInfo extends Phaser.GameObjects.Container {
|
|||||||
}
|
}
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
getTextureName(): string {
|
/**
|
||||||
return `pbinfo_${this.player ? "player" : "enemy"}${!this.player && this.boss ? "_boss" : this.mini ? "_mini" : ""}`;
|
* Return the texture name of the battle info box
|
||||||
}
|
*/
|
||||||
|
abstract getTextureName(): string;
|
||||||
|
|
||||||
setMini(_mini: boolean): void {}
|
setMini(_mini: boolean): void {}
|
||||||
|
|
||||||
@ -424,7 +426,7 @@ export default abstract class BattleInfo extends Phaser.GameObjects.Container {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Update the pokemon name inside the container ,*/
|
/** Update the pokemon name inside the container */
|
||||||
protected updateName(name: string): boolean {
|
protected updateName(name: string): boolean {
|
||||||
if (this.lastName === name) {
|
if (this.lastName === name) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -27,6 +27,10 @@ export class EnemyBattleInfo extends BattleInfo {
|
|||||||
return [Stat.HP, Stat.ATK, Stat.DEF, Stat.SPATK, Stat.SPDEF, Stat.ACC, Stat.EVA, Stat.SPD];
|
return [Stat.HP, Stat.ATK, Stat.DEF, Stat.SPATK, Stat.SPDEF, Stat.ACC, Stat.EVA, Stat.SPD];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override getTextureName(): string {
|
||||||
|
return this.boss ? "pbinfo_enemy_boss_mini" : "pbinfo_enemy_mini";
|
||||||
|
}
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super(140, -141, false);
|
super(140, -141, false);
|
||||||
|
|
||||||
|
@ -12,6 +12,11 @@ export class PlayerBattleInfo extends BattleInfo {
|
|||||||
override get statOrder(): Stat[] {
|
override get statOrder(): Stat[] {
|
||||||
return [Stat.ATK, Stat.DEF, Stat.SPATK, Stat.SPDEF, Stat.ACC, Stat.EVA, Stat.SPD];
|
return [Stat.ATK, Stat.DEF, Stat.SPATK, Stat.SPDEF, Stat.ACC, Stat.EVA, Stat.SPD];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override getTextureName(): string {
|
||||||
|
return this.mini ? "pbinfo_player_mini" : "pbinfo_player";
|
||||||
|
}
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super(Math.floor(globalScene.game.canvas.width / 6) - 10, -72, true);
|
super(Math.floor(globalScene.game.canvas.width / 6) - 10, -72, true);
|
||||||
|
|
||||||
@ -55,6 +60,7 @@ export class PlayerBattleInfo extends BattleInfo {
|
|||||||
|
|
||||||
this.statValuesContainer.setPosition(8, 7);
|
this.statValuesContainer.setPosition(8, 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
override setMini(mini: boolean): void {
|
override setMini(mini: boolean): void {
|
||||||
if (this.mini === mini) {
|
if (this.mini === mini) {
|
||||||
return;
|
return;
|
||||||
@ -166,7 +172,9 @@ export class PlayerBattleInfo extends BattleInfo {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Updates the info on the info bar.
|
/**
|
||||||
|
* Updates the info on the info bar.
|
||||||
|
*
|
||||||
* In addition to performing all the steps of {@linkcode BattleInfo.updateInfo},
|
* In addition to performing all the steps of {@linkcode BattleInfo.updateInfo},
|
||||||
* it also updates the EXP Bar
|
* it also updates the EXP Bar
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user