mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 07:52:17 +02:00
fix nits
This commit is contained in:
parent
a43678db11
commit
1fa97e3615
@ -2410,8 +2410,8 @@ export class PostSummonFormChangeByWeatherAbAttr extends PostSummonAbAttr {
|
|||||||
* @returns whether the form change was triggered
|
* @returns whether the form change was triggered
|
||||||
*/
|
*/
|
||||||
applyPostSummon(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean {
|
applyPostSummon(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): boolean {
|
||||||
const isCastformWithForecast = pokemon.species.speciesId === Species.CASTFORM && this.ability === Abilities.FORECAST;
|
const isCastformWithForecast = (pokemon.species.speciesId === Species.CASTFORM && this.ability === Abilities.FORECAST);
|
||||||
const isCherrimWithFlowerGift = pokemon.species.speciesId === Species.CHERRIM && this.ability === Abilities.FLOWER_GIFT;
|
const isCherrimWithFlowerGift = (pokemon.species.speciesId === Species.CHERRIM && this.ability === Abilities.FLOWER_GIFT);
|
||||||
|
|
||||||
if (isCastformWithForecast || isCherrimWithFlowerGift) {
|
if (isCastformWithForecast || isCherrimWithFlowerGift) {
|
||||||
if (simulated) {
|
if (simulated) {
|
||||||
@ -3110,8 +3110,8 @@ export class PostWeatherChangeFormChangeAbAttr extends PostWeatherChangeAbAttr {
|
|||||||
* @returns whether the form change was triggered
|
* @returns whether the form change was triggered
|
||||||
*/
|
*/
|
||||||
applyPostWeatherChange(pokemon: Pokemon, passive: boolean, simulated: boolean, weather: WeatherType, args: any[]): boolean {
|
applyPostWeatherChange(pokemon: Pokemon, passive: boolean, simulated: boolean, weather: WeatherType, args: any[]): boolean {
|
||||||
const isCastformWithForecast = pokemon.species.speciesId === Species.CASTFORM && this.ability === Abilities.FORECAST;
|
const isCastformWithForecast = (pokemon.species.speciesId === Species.CASTFORM && this.ability === Abilities.FORECAST);
|
||||||
const isCherrimWithFlowerGift = pokemon.species.speciesId === Species.CHERRIM && this.ability === Abilities.FLOWER_GIFT;
|
const isCherrimWithFlowerGift = (pokemon.species.speciesId === Species.CHERRIM && this.ability === Abilities.FLOWER_GIFT);
|
||||||
|
|
||||||
if (isCastformWithForecast || isCherrimWithFlowerGift) {
|
if (isCastformWithForecast || isCherrimWithFlowerGift) {
|
||||||
if (simulated) {
|
if (simulated) {
|
||||||
@ -4710,8 +4710,8 @@ function setAbilityRevealed(pokemon: Pokemon): void {
|
|||||||
*/
|
*/
|
||||||
function getPokemonWithWeatherBasedForms(scene: BattleScene) {
|
function getPokemonWithWeatherBasedForms(scene: BattleScene) {
|
||||||
return scene.getField(true).filter(p =>
|
return scene.getField(true).filter(p =>
|
||||||
p.hasAbility(Abilities.FORECAST) && p.species.speciesId === Species.CASTFORM
|
(p.hasAbility(Abilities.FORECAST) && p.species.speciesId === Species.CASTFORM)
|
||||||
|| p.hasAbility(Abilities.FLOWER_GIFT) && p.species.speciesId === Species.CHERRIM
|
|| (p.hasAbility(Abilities.FLOWER_GIFT) && p.species.speciesId === Species.CHERRIM)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -339,8 +339,8 @@ export class Arena {
|
|||||||
*/
|
*/
|
||||||
triggerWeatherBasedFormChanges(): void {
|
triggerWeatherBasedFormChanges(): void {
|
||||||
this.scene.getField(true).forEach( p => {
|
this.scene.getField(true).forEach( p => {
|
||||||
const isCastformWithForecast = p.hasAbility(Abilities.FORECAST) && p.species.speciesId === Species.CASTFORM;
|
const isCastformWithForecast = (p.hasAbility(Abilities.FORECAST) && p.species.speciesId === Species.CASTFORM);
|
||||||
const isCherrimWithFlowerGift = p.hasAbility(Abilities.FLOWER_GIFT) && p.species.speciesId === Species.CHERRIM;
|
const isCherrimWithFlowerGift = (p.hasAbility(Abilities.FLOWER_GIFT) && p.species.speciesId === Species.CHERRIM);
|
||||||
|
|
||||||
if (isCastformWithForecast || isCherrimWithFlowerGift) {
|
if (isCastformWithForecast || isCherrimWithFlowerGift) {
|
||||||
new ShowAbilityPhase(this.scene, p.getBattlerIndex());
|
new ShowAbilityPhase(this.scene, p.getBattlerIndex());
|
||||||
@ -354,8 +354,8 @@ export class Arena {
|
|||||||
*/
|
*/
|
||||||
triggerWeatherBasedFormChangesToNormal(): void {
|
triggerWeatherBasedFormChangesToNormal(): void {
|
||||||
this.scene.getField(true).forEach( p => {
|
this.scene.getField(true).forEach( p => {
|
||||||
const isCastformWithForecast = p.hasAbility(Abilities.FORECAST, false, true) && p.species.speciesId === Species.CASTFORM;
|
const isCastformWithForecast = (p.hasAbility(Abilities.FORECAST, false, true) && p.species.speciesId === Species.CASTFORM);
|
||||||
const isCherrimWithFlowerGift = p.hasAbility(Abilities.FLOWER_GIFT, false, true) && p.species.speciesId === Species.CHERRIM;
|
const isCherrimWithFlowerGift = (p.hasAbility(Abilities.FLOWER_GIFT, false, true) && p.species.speciesId === Species.CHERRIM);
|
||||||
|
|
||||||
if (isCastformWithForecast || isCherrimWithFlowerGift) {
|
if (isCastformWithForecast || isCherrimWithFlowerGift) {
|
||||||
new ShowAbilityPhase(this.scene, p.getBattlerIndex());
|
new ShowAbilityPhase(this.scene, p.getBattlerIndex());
|
||||||
|
Loading…
Reference in New Issue
Block a user