Disable Luck in Daily Runs
If the Game Mode is Daily Run, the player's Luck is set to 0, and the Luck value is hidden.
This commit is contained in:
parent
f8478aa79b
commit
02e9273f97
|
@ -1549,7 +1549,7 @@ export default class BattleScene extends SceneBase {
|
|||
this.scoreText.setVisible(this.gameMode.isDaily);
|
||||
}
|
||||
|
||||
updateAndShowText(duration: integer): void {
|
||||
updateAndShowText(duration: integer, isDaily?: boolean): void {
|
||||
const labels = [ this.luckLabelText, this.luckText ];
|
||||
labels.forEach(t => t.setAlpha(0));
|
||||
const luckValue = getPartyLuckValue(this.getParty());
|
||||
|
@ -1565,7 +1565,7 @@ export default class BattleScene extends SceneBase {
|
|||
duration: duration,
|
||||
alpha: 1,
|
||||
onComplete: () => {
|
||||
labels.forEach(t => t.setVisible(true));
|
||||
labels.forEach(t => t.setVisible(!isDaily));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@ import { BerryType } from "#enums/berry-type";
|
|||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import { getPokemonNameWithAffix } from "#app/messages.js";
|
||||
import { GameModes } from "#app/game-mode.js";
|
||||
|
||||
const outputModifierData = false;
|
||||
const useMaxWeightForOutput = false;
|
||||
|
@ -2221,6 +2222,9 @@ export class ModifierTypeOption {
|
|||
}
|
||||
|
||||
export function getPartyLuckValue(party: Pokemon[]): integer {
|
||||
if (party[0].scene.gameMode.modeId == GameModes.DAILY) {
|
||||
return 0
|
||||
}
|
||||
const luck = Phaser.Math.Clamp(party.map(p => p.isFainted() ? 0 : p.getLuck())
|
||||
.reduce((total: integer, value: integer) => total += value, 0), 0, 14);
|
||||
return luck || 0;
|
||||
|
|
|
@ -13,6 +13,7 @@ import * as Utils from "./../utils";
|
|||
import Overrides from "#app/overrides";
|
||||
import i18next from "i18next";
|
||||
import { ShopCursorTarget } from "#app/enums/shop-cursor-target";
|
||||
import { GameModes } from "#app/game-mode.js";
|
||||
|
||||
export const SHOP_OPTIONS_ROW_LIMIT = 6;
|
||||
|
||||
|
@ -200,7 +201,7 @@ export default class ModifierSelectUiHandler extends AwaitableUiHandler {
|
|||
|
||||
/* Multiplies the appearance duration by the speed parameter so that it is always constant, and avoids "flashbangs" at game speed x5 */
|
||||
this.scene.showShopOverlay(750 * this.scene.gameSpeed);
|
||||
this.scene.updateAndShowText(750);
|
||||
this.scene.updateAndShowText(750, this.scene.gameMode.modeId == GameModes.DAILY);
|
||||
this.scene.updateBiomeWaveText();
|
||||
this.scene.updateMoneyText();
|
||||
|
||||
|
|
Loading…
Reference in New Issue