fix color not going back to white when new opponent is sent

This commit is contained in:
Yentis 2024-05-18 10:31:32 +02:00
parent 76954a29e1
commit 5dce35600e
2 changed files with 4 additions and 4 deletions

View File

@ -1430,7 +1430,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
return 'lightblue';
}
return undefined;
return 'white';
}
toggleStats(visible: boolean): void {

View File

@ -241,7 +241,7 @@ export default class FightUiHandler extends UiHandler {
return ` ${moveEffectiveness}x`;
}
private getMoveColor(moveEffectiveness?: TypeDamageMultiplier): string | undefined {
private getMoveColor(moveEffectiveness?: TypeDamageMultiplier): string {
switch (moveEffectiveness) {
case 0:
return 'black';
@ -251,6 +251,8 @@ export default class FightUiHandler extends UiHandler {
return 'red';
case 0.5:
return 'crimson';
case 1:
return 'white';
case 2:
return 'lightgreen';
case 4:
@ -258,8 +260,6 @@ export default class FightUiHandler extends UiHandler {
case 8:
return 'darkgreen';
}
return undefined;
}
clear() {