mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-30 21:42:20 +02:00
Merge branch 'beta' into override-chain
This commit is contained in:
commit
ff6833d8cc
@ -78,10 +78,15 @@ export class FaintPhase extends PokemonPhase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** In case the current pokemon was just switched in, make sure it is counted as participating in the combat */
|
/**
|
||||||
|
* In case the current pokemon was just switched in, make sure it is counted as participating in the combat.
|
||||||
|
* For EXP_SHARE purposes, if the current pokemon faints as the combat ends and it was the ONLY player pokemon
|
||||||
|
* involved in combat, it needs to be counted as a participant so the other party pokemon can get their EXP,
|
||||||
|
* so the fainted pokemon has been included.
|
||||||
|
*/
|
||||||
for (const pokemon of globalScene.getPlayerField()) {
|
for (const pokemon of globalScene.getPlayerField()) {
|
||||||
if (pokemon?.isActive(true) && pokemon.isPlayer()) {
|
if (pokemon?.isActive() || pokemon?.isFainted()) {
|
||||||
globalScene.currentBattle.addParticipant(pokemon as PlayerPokemon);
|
globalScene.currentBattle.addParticipant(pokemon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,10 +108,12 @@ export default class AbstractSettingsUiHandler extends MessageUiHandler {
|
|||||||
|
|
||||||
this.reloadSettings = this.settings.filter(s => s?.requireReload);
|
this.reloadSettings = this.settings.filter(s => s?.requireReload);
|
||||||
|
|
||||||
|
let anyReloadRequired = false;
|
||||||
this.settings.forEach((setting, s) => {
|
this.settings.forEach((setting, s) => {
|
||||||
let settingName = setting.label;
|
let settingName = setting.label;
|
||||||
if (setting?.requireReload) {
|
if (setting?.requireReload) {
|
||||||
settingName += ` (${i18next.t("settings:requireReload")})`;
|
settingName += "*";
|
||||||
|
anyReloadRequired = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.settingLabels[s] = addTextObject(8, 28 + s * 16, settingName, TextStyle.SETTINGS_LABEL);
|
this.settingLabels[s] = addTextObject(8, 28 + s * 16, settingName, TextStyle.SETTINGS_LABEL);
|
||||||
@ -187,6 +189,14 @@ export default class AbstractSettingsUiHandler extends MessageUiHandler {
|
|||||||
this.settingsContainer.add(iconAction);
|
this.settingsContainer.add(iconAction);
|
||||||
this.settingsContainer.add(iconCancel);
|
this.settingsContainer.add(iconCancel);
|
||||||
this.settingsContainer.add(actionText);
|
this.settingsContainer.add(actionText);
|
||||||
|
// Only add the ReloadRequired text on pages that have settings that require a reload.
|
||||||
|
if (anyReloadRequired) {
|
||||||
|
const reloadRequired = addTextObject(0, 0, `*${i18next.t("settings:requireReload")}`, TextStyle.SETTINGS_LABEL)
|
||||||
|
.setOrigin(0, 0.15)
|
||||||
|
.setPositionRelative(actionsBg, 6, 0)
|
||||||
|
.setY(actionText.y);
|
||||||
|
this.settingsContainer.add(reloadRequired);
|
||||||
|
}
|
||||||
this.settingsContainer.add(cancelText);
|
this.settingsContainer.add(cancelText);
|
||||||
this.settingsContainer.add(this.messageBoxContainer);
|
this.settingsContainer.add(this.messageBoxContainer);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user