mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 15:32:18 +02:00
Fix Shaymin with Gracidea bug
Fix duplicate candy count key for local Add setting for gamepad support Fix for Shaymin unable to use Gracidea Changed Overrides
This commit is contained in:
parent
4057fbf846
commit
31f89dbc9a
@ -128,6 +128,7 @@ export default class BattleScene extends SceneBase {
|
|||||||
public moveAnimations: boolean = true;
|
public moveAnimations: boolean = true;
|
||||||
public hpBarSpeed: integer = 0;
|
public hpBarSpeed: integer = 0;
|
||||||
public fusionPaletteSwaps: boolean = true;
|
public fusionPaletteSwaps: boolean = true;
|
||||||
|
public gamepadSupport: boolean = true;
|
||||||
public enableTouchControls: boolean = false;
|
public enableTouchControls: boolean = false;
|
||||||
public enableVibration: boolean = false;
|
public enableVibration: boolean = false;
|
||||||
|
|
||||||
@ -1298,8 +1299,8 @@ export default class BattleScene extends SceneBase {
|
|||||||
* or not. It will only return true once, until the key is released and pressed down
|
* or not. It will only return true once, until the key is released and pressed down
|
||||||
* again.
|
* again.
|
||||||
*/
|
*/
|
||||||
gamepadButtonJustDown(button: Phaser.Input.Gamepad.Button) : boolean {
|
gamepadButtonJustDown(button: Phaser.Input.Gamepad.Button) : boolean {
|
||||||
if (!button)
|
if (!button || !this.gamepadSupport)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
let ret = false;
|
let ret = false;
|
||||||
|
@ -19,6 +19,7 @@ import { VoucherType, getVoucherTypeIcon, getVoucherTypeName } from '../system/v
|
|||||||
import { FormChangeItem, SpeciesFormChangeItemTrigger, pokemonFormChanges } from '../data/pokemon-forms';
|
import { FormChangeItem, SpeciesFormChangeItemTrigger, pokemonFormChanges } from '../data/pokemon-forms';
|
||||||
import { ModifierTier } from './modifier-tier';
|
import { ModifierTier } from './modifier-tier';
|
||||||
import { Nature, getNatureName, getNatureStatMultiplier } from '#app/data/nature';
|
import { Nature, getNatureName, getNatureStatMultiplier } from '#app/data/nature';
|
||||||
|
import { Species } from "../data/enums/species";
|
||||||
|
|
||||||
const outputModifierData = false;
|
const outputModifierData = false;
|
||||||
const useMaxWeightForOutput = false;
|
const useMaxWeightForOutput = false;
|
||||||
@ -556,6 +557,8 @@ export class FormChangeItemModifierType extends PokemonModifierType implements G
|
|||||||
if (pokemonFormChanges.hasOwnProperty(pokemon.species.speciesId) && !!pokemonFormChanges[pokemon.species.speciesId].find(fc => fc.trigger.hasTriggerType(SpeciesFormChangeItemTrigger)
|
if (pokemonFormChanges.hasOwnProperty(pokemon.species.speciesId) && !!pokemonFormChanges[pokemon.species.speciesId].find(fc => fc.trigger.hasTriggerType(SpeciesFormChangeItemTrigger)
|
||||||
&& (fc.trigger as SpeciesFormChangeItemTrigger).item === this.formChangeItem))
|
&& (fc.trigger as SpeciesFormChangeItemTrigger).item === this.formChangeItem))
|
||||||
return null;
|
return null;
|
||||||
|
else if (pokemon.species.speciesId === Species.SHAYMIN && formChangeItem === FormChangeItem.GRACIDEA) //allow Shaymin to accept Gracidea anytime
|
||||||
|
return null;
|
||||||
|
|
||||||
return PartyUiHandler.NoEffectMessage;
|
return PartyUiHandler.NoEffectMessage;
|
||||||
}, FormChangeItem[formChangeItem].toLowerCase());
|
}, FormChangeItem[formChangeItem].toLowerCase());
|
||||||
|
@ -184,7 +184,7 @@ const systemShortKeys = {
|
|||||||
ivs: '$i',
|
ivs: '$i',
|
||||||
moveset: '$m',
|
moveset: '$m',
|
||||||
eggMoves: '$em',
|
eggMoves: '$em',
|
||||||
candyCount: '$cc',
|
candyCount: '$x',
|
||||||
passive: '$p',
|
passive: '$p',
|
||||||
valueReduction: '$vr'
|
valueReduction: '$vr'
|
||||||
};
|
};
|
||||||
|
@ -19,6 +19,7 @@ export enum Setting {
|
|||||||
HP_Bar_Speed = "HP_BAR_SPEED",
|
HP_Bar_Speed = "HP_BAR_SPEED",
|
||||||
Fusion_Palette_Swaps = "FUSION_PALETTE_SWAPS",
|
Fusion_Palette_Swaps = "FUSION_PALETTE_SWAPS",
|
||||||
Player_Gender = "PLAYER_GENDER",
|
Player_Gender = "PLAYER_GENDER",
|
||||||
|
Gamepad_Support = "GAMEPAD_SUPPORT",
|
||||||
Touch_Controls = "TOUCH_CONTROLS",
|
Touch_Controls = "TOUCH_CONTROLS",
|
||||||
Vibration = "VIBRATION"
|
Vibration = "VIBRATION"
|
||||||
}
|
}
|
||||||
@ -47,6 +48,7 @@ export const settingOptions: SettingOptions = {
|
|||||||
[Setting.HP_Bar_Speed]: [ 'Normal', 'Fast', 'Faster', 'Instant' ],
|
[Setting.HP_Bar_Speed]: [ 'Normal', 'Fast', 'Faster', 'Instant' ],
|
||||||
[Setting.Fusion_Palette_Swaps]: [ 'Off', 'On' ],
|
[Setting.Fusion_Palette_Swaps]: [ 'Off', 'On' ],
|
||||||
[Setting.Player_Gender]: [ 'Boy', 'Girl' ],
|
[Setting.Player_Gender]: [ 'Boy', 'Girl' ],
|
||||||
|
[Setting.Gamepad_Support]: [ 'Auto', 'Disabled' ],
|
||||||
[Setting.Touch_Controls]: [ 'Auto', 'Disabled' ],
|
[Setting.Touch_Controls]: [ 'Auto', 'Disabled' ],
|
||||||
[Setting.Vibration]: [ 'Auto', 'Disabled' ]
|
[Setting.Vibration]: [ 'Auto', 'Disabled' ]
|
||||||
};
|
};
|
||||||
@ -130,6 +132,9 @@ export function setSetting(scene: BattleScene, setting: Setting, value: integer)
|
|||||||
} else
|
} else
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
case Setting.Gamepad_Support:
|
||||||
|
scene.gamepadSupport = settingOptions[setting][value] !== 'Disabled';
|
||||||
|
break;
|
||||||
case Setting.Touch_Controls:
|
case Setting.Touch_Controls:
|
||||||
scene.enableTouchControls = settingOptions[setting][value] !== 'Disabled' && hasTouchscreen();
|
scene.enableTouchControls = settingOptions[setting][value] !== 'Disabled' && hasTouchscreen();
|
||||||
const touchControls = document.getElementById('touchControls');
|
const touchControls = document.getElementById('touchControls');
|
||||||
|
Loading…
Reference in New Issue
Block a user