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);
|
this.scoreText.setVisible(this.gameMode.isDaily);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateAndShowText(duration: integer): void {
|
updateAndShowText(duration: integer, isDaily?: boolean): void {
|
||||||
const labels = [ this.luckLabelText, this.luckText ];
|
const labels = [ this.luckLabelText, this.luckText ];
|
||||||
labels.forEach(t => t.setAlpha(0));
|
labels.forEach(t => t.setAlpha(0));
|
||||||
const luckValue = getPartyLuckValue(this.getParty());
|
const luckValue = getPartyLuckValue(this.getParty());
|
||||||
|
@ -1565,7 +1565,7 @@ export default class BattleScene extends SceneBase {
|
||||||
duration: duration,
|
duration: duration,
|
||||||
alpha: 1,
|
alpha: 1,
|
||||||
onComplete: () => {
|
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 { Moves } from "#enums/moves";
|
||||||
import { Species } from "#enums/species";
|
import { Species } from "#enums/species";
|
||||||
import { getPokemonNameWithAffix } from "#app/messages.js";
|
import { getPokemonNameWithAffix } from "#app/messages.js";
|
||||||
|
import { GameModes } from "#app/game-mode.js";
|
||||||
|
|
||||||
const outputModifierData = false;
|
const outputModifierData = false;
|
||||||
const useMaxWeightForOutput = false;
|
const useMaxWeightForOutput = false;
|
||||||
|
@ -2221,6 +2222,9 @@ export class ModifierTypeOption {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getPartyLuckValue(party: Pokemon[]): integer {
|
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())
|
const luck = Phaser.Math.Clamp(party.map(p => p.isFainted() ? 0 : p.getLuck())
|
||||||
.reduce((total: integer, value: integer) => total += value, 0), 0, 14);
|
.reduce((total: integer, value: integer) => total += value, 0), 0, 14);
|
||||||
return luck || 0;
|
return luck || 0;
|
||||||
|
|
|
@ -13,6 +13,7 @@ import * as Utils from "./../utils";
|
||||||
import Overrides from "#app/overrides";
|
import Overrides from "#app/overrides";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import { ShopCursorTarget } from "#app/enums/shop-cursor-target";
|
import { ShopCursorTarget } from "#app/enums/shop-cursor-target";
|
||||||
|
import { GameModes } from "#app/game-mode.js";
|
||||||
|
|
||||||
export const SHOP_OPTIONS_ROW_LIMIT = 6;
|
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 */
|
/* 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.showShopOverlay(750 * this.scene.gameSpeed);
|
||||||
this.scene.updateAndShowText(750);
|
this.scene.updateAndShowText(750, this.scene.gameMode.modeId == GameModes.DAILY);
|
||||||
this.scene.updateBiomeWaveText();
|
this.scene.updateBiomeWaveText();
|
||||||
this.scene.updateMoneyText();
|
this.scene.updateMoneyText();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue