mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-26 17:29:30 +02:00
Change shiny luck
Disabling shiny luck now only disables your starters' shiny luck Changed wording for the logger in some places
This commit is contained in:
parent
62cb10159a
commit
789df4467d
@ -564,6 +564,7 @@ export default class PokemonSpecies extends PokemonSpeciesForm implements Locali
|
||||
public genderDiffs: boolean;
|
||||
public canChangeForm: boolean;
|
||||
public forms: PokemonForm[];
|
||||
public luckOverride: integer;
|
||||
|
||||
constructor(id: Species, generation: integer, subLegendary: boolean, legendary: boolean, mythical: boolean, species: string,
|
||||
type1: Type, type2: Type, height: number, weight: number, ability1: Abilities, ability2: Abilities, abilityHidden: Abilities,
|
||||
|
@ -826,7 +826,18 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
}
|
||||
|
||||
getLuck(): integer {
|
||||
return this.luck + (this.isFusion() ? this.fusionLuck : 0);
|
||||
var L1 = this.luck
|
||||
var L2 = 0
|
||||
if (this.species.luckOverride) {
|
||||
L1 = this.species.luckOverride
|
||||
}
|
||||
if (this.isFusion()) {
|
||||
L2 = this.fusionLuck
|
||||
if (this.fusionSpecies.luckOverride) {
|
||||
L2 = this.fusionSpecies.luckOverride
|
||||
}
|
||||
}
|
||||
return L1 + L2;
|
||||
}
|
||||
|
||||
isFusion(): boolean {
|
||||
|
@ -2082,7 +2082,7 @@ function getNewModifierTypeOption(party: Pokemon[], poolType: ModifierPoolType,
|
||||
if (player && tierValue) {
|
||||
var partyLuckValue = getPartyLuckValue(party);
|
||||
if (scene) {
|
||||
if (scene.gameMode.modeId == GameModes.DAILY && scene.disableDailyShinies) {
|
||||
if (scene.gameMode.modeId == GameModes.DAILY && scene.disableDailyShinies && false) {
|
||||
partyLuckValue = 0
|
||||
}
|
||||
}
|
||||
@ -2110,9 +2110,9 @@ function getNewModifierTypeOption(party: Pokemon[], poolType: ModifierPoolType,
|
||||
} else if (upgradeCount === undefined && player) {
|
||||
upgradeCount = 0;
|
||||
if (tier < ModifierTier.MASTER) {
|
||||
var partyShinyCount = party.filter(p => p.isShiny() && !p.isFainted()).length;
|
||||
var partyShinyCount = party.filter(p => p.isShiny() && !p.isFainted() && (!this.scene.disableDailyShinies || p.species.luckOverride != 0)).length;
|
||||
if (scene) {
|
||||
if (scene.gameMode.modeId == GameModes.DAILY && scene.disableDailyShinies) {
|
||||
if (scene.gameMode.modeId == GameModes.DAILY && scene.disableDailyShinies && false) {
|
||||
partyShinyCount = 0
|
||||
}
|
||||
}
|
||||
|
@ -3193,12 +3193,7 @@ export class TurnStartPhase extends FieldPhase {
|
||||
//this.scene.unshiftPhase(new AttemptCapturePhase(this.scene, turnCommand.targets[0] % 2, turnCommand.cursor));
|
||||
break;
|
||||
case Command.POKEMON:
|
||||
if (this.scene.currentBattle.double) {
|
||||
LoggerTools.Actions[pokemon.getBattlerIndex()] = ((turnCommand.args[0] as boolean) ? "Baton" : "Switch") + " " + LoggerTools.playerPokeName(this.scene, pokemon) + " to " + LoggerTools.playerPokeName(this.scene, turnCommand.cursor)
|
||||
} else {
|
||||
//LoggerTools.Actions[pokemon.getBattlerIndex()] = ((turnCommand.args[0] as boolean) ? "Baton" : "Switch") + " " + LoggerTools.playerPokeName(this.scene, pokemon) + " to " + LoggerTools.playerPokeName(this.scene, turnCommand.cursor)
|
||||
LoggerTools.Actions[pokemon.getBattlerIndex()] = ((turnCommand.args[0] as boolean) ? "Baton" : "Switch") + " to " + LoggerTools.playerPokeName(this.scene, turnCommand.cursor)
|
||||
}
|
||||
LoggerTools.Actions[pokemon.getBattlerIndex()] = ((turnCommand.args[0] as boolean) ? "Baton" : "Switch")
|
||||
break;
|
||||
case Command.RUN:
|
||||
LoggerTools.Actions[pokemon.getBattlerIndex()] = "Run"
|
||||
@ -3385,7 +3380,7 @@ export class TurnStartPhase extends FieldPhase {
|
||||
|
||||
if (LoggerTools.Actions.length > 1 && (LoggerTools.Actions[0] == "" || LoggerTools.Actions[0] == undefined || LoggerTools.Actions[0] == null))
|
||||
LoggerTools.Actions.shift() // If the left slot isn't doing anything, delete its entry
|
||||
LoggerTools.logActions(this.scene, this.scene.currentBattle.waveIndex, LoggerTools.Actions.join(" | "))
|
||||
LoggerTools.logActions(this.scene, this.scene.currentBattle.waveIndex, LoggerTools.Actions.join(" & "))
|
||||
LoggerTools.logEnemyAction(this.scene, this.scene.currentBattle.waveIndex, LoggerTools.EnemyActions.join(" | "))
|
||||
|
||||
this.end();
|
||||
@ -5682,7 +5677,9 @@ export class SwitchPhase extends BattlePhase {
|
||||
LoggerTools.logActions(this.scene, this.scene.currentBattle.waveIndex, "Pre-switch " + (option == PartyOption.PASS_BATON ? "+ Baton" : "") + " " + LoggerTools.playerPokeName(this.scene, fieldIndex) + " to " + LoggerTools.playerPokeName(this.scene, slotIndex))
|
||||
}
|
||||
if (LoggerTools.isFaintSwitch.value) {
|
||||
LoggerTools.logActions(this.scene, this.scene.currentBattle.waveIndex, (option == PartyOption.PASS_BATON ? "Baton" : "Send") + " out " + LoggerTools.playerPokeName(this.scene, slotIndex))
|
||||
LoggerTools.logActions(this.scene, this.scene.currentBattle.waveIndex, (option == PartyOption.PASS_BATON ? "Baton" : "Send") + " in " + LoggerTools.playerPokeName(this.scene, slotIndex))
|
||||
} else {
|
||||
LoggerTools.Actions[this.scene.getParty()[fieldIndex].getBattlerIndex()] += " to " + LoggerTools.playerPokeName(this.scene, slotIndex)
|
||||
}
|
||||
this.scene.unshiftPhase(new SwitchSummonPhase(this.scene, fieldIndex, slotIndex, this.doReturn, option === PartyOption.PASS_BATON));
|
||||
}
|
||||
|
@ -2593,6 +2593,9 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
this.starterSelectCallback = null;
|
||||
originalStarterSelectCallback(new Array(this.starterGens.length).fill(0).map(function (_, i) {
|
||||
const starterSpecies = thisObj.genSpecies[thisObj.starterGens[i]][thisObj.starterCursors[i]];
|
||||
if (this.scene.disableDailyShinies) {
|
||||
starterSpecies.luckOverride = 0;
|
||||
}
|
||||
return {
|
||||
species: starterSpecies,
|
||||
dexAttr: thisObj.starterAttr[i],
|
||||
|
@ -721,7 +721,7 @@ export default class SummaryUiHandler extends UiHandler {
|
||||
luckLabelText.setOrigin(0, 0);
|
||||
profileContainer.add(luckLabelText);
|
||||
|
||||
const luckText = addTextObject(this.scene, 141 + luckLabelText.displayWidth + 2, 28, this.pokemon.getLuck().toString(), TextStyle.SUMMARY);
|
||||
const luckText = addTextObject(this.scene, 141 + luckLabelText.displayWidth + 2, 28, this.pokemon.species.luckOverride ? `(${this.pokemon.species.luckOverride.toString()})` : this.pokemon.getLuck().toString(), TextStyle.SUMMARY);
|
||||
luckText.setOrigin(0, 0);
|
||||
luckText.setTint(getVariantTint((Math.min(this.pokemon.getLuck() - 1, 2)) as Variant));
|
||||
profileContainer.add(luckText);
|
||||
|
Loading…
Reference in New Issue
Block a user