mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-17 13:52:18 +02:00
don't set color to white, just leave it unchanged
This commit is contained in:
parent
7f9db11543
commit
ecdca52cd1
@ -1440,7 +1440,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
return 'lightblue';
|
||||
}
|
||||
|
||||
return 'white';
|
||||
return undefined;
|
||||
}
|
||||
|
||||
toggleStats(visible: boolean): void {
|
||||
|
@ -234,7 +234,9 @@ export default class FightUiHandler extends UiHandler {
|
||||
if (stab) moveText.setFontStyle('bold');
|
||||
|
||||
const moveColors = moveEffectivenessList.sort((a, b) => b - a).map((effectiveness) => this.getMoveColor(effectiveness));
|
||||
moveText.setColor(moveColors[0]);
|
||||
const color = moveColors[0];
|
||||
|
||||
if (color !== undefined) moveText.setColor(color);
|
||||
}
|
||||
|
||||
private getMoveEffectivenessText(moveEffectiveness?: TypeDamageMultiplier): string {
|
||||
@ -242,7 +244,7 @@ export default class FightUiHandler extends UiHandler {
|
||||
return ` ${moveEffectiveness}x`;
|
||||
}
|
||||
|
||||
private getMoveColor(moveEffectiveness?: TypeDamageMultiplier): string {
|
||||
private getMoveColor(moveEffectiveness?: TypeDamageMultiplier): string | undefined {
|
||||
switch (moveEffectiveness) {
|
||||
case 0:
|
||||
return 'black';
|
||||
@ -260,7 +262,7 @@ export default class FightUiHandler extends UiHandler {
|
||||
return 'darkgreen';
|
||||
}
|
||||
|
||||
return 'white';
|
||||
return undefined;
|
||||
}
|
||||
|
||||
clear() {
|
||||
|
Loading…
Reference in New Issue
Block a user