Fix some bugs and add factory bg

pull/2/head
Flashfyre 2023-06-01 13:54:52 -04:00
parent 7e0974a6c2
commit 105b5cd510
12 changed files with 28 additions and 22 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 858 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 713 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 596 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 756 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 B

View File

@ -2194,7 +2194,7 @@
}
},
{
"filename": "lum_berry,png",
"filename": "lum_berry",
"rotated": false,
"trimmed": true,
"sourceSize": {

View File

Before

Width:  |  Height:  |  Size: 256 B

After

Width:  |  Height:  |  Size: 256 B

View File

@ -316,8 +316,6 @@ export function getBiomeKey(biome: Biome): string {
return 'wasteland';
case Biome.POWER_PLANT:
return 'ruins';
case Biome.FACTORY:
return 'wasteland';
case Biome.END:
return 'wasteland';
}
@ -337,6 +335,7 @@ export function getBiomeHasProps(biomeType: Biome): boolean {
case Biome.MEADOW:
case Biome.VOLCANO:
case Biome.GRAVEYARD:
case Biome.FACTORY:
case Biome.WASTELAND:
return true;
}

View File

@ -738,26 +738,17 @@ export class TurnInitPhase extends FieldPhase {
start() {
super.start();
this.scene.getPlayerField().forEach(playerPokemon => {
if (playerPokemon.isActive())
this.scene.currentBattle.addParticipant(playerPokemon);
this.scene.getField().forEach((pokemon, i) => {
if (pokemon?.isActive()) {
if (pokemon.isPlayer())
this.scene.currentBattle.addParticipant(pokemon as PlayerPokemon);
playerPokemon.resetTurnData();
pokemon.resetTurnData();
this.scene.pushPhase(pokemon.isPlayer() ? new CommandPhase(this.scene, i) : new EnemyCommandPhase(this.scene, i - BattlerIndex.ENEMY));
}
});
this.scene.getEnemyField().forEach(enemyPokemon => {
if (enemyPokemon.isActive())
enemyPokemon.resetTurnData()
});
const order = this.getOrder();
for (let o of order) {
if (o < BattlerIndex.ENEMY)
this.scene.pushPhase(new CommandPhase(this.scene, o));
else
this.scene.pushPhase(new EnemyCommandPhase(this.scene, o - BattlerIndex.ENEMY));
}
this.scene.pushPhase(new TurnStartPhase(this.scene));
this.end();
@ -2392,7 +2383,10 @@ export class AttemptRunPhase extends PokemonPhase {
ease: 'Sine.easeIn'
});
enemyField.forEach(enemyPokemon => enemyPokemon.hp = 0);
enemyField.forEach(enemyPokemon => {
enemyPokemon.hideInfo();
enemyPokemon.hp = 0;
});
this.scene.pushPhase(new BattleEndPhase(this.scene));
this.scene.pushPhase(new NewBattlePhase(this.scene));

View File

@ -1224,7 +1224,7 @@ export function initAbilities() {
new Ability(Abilities.FLAME_BODY, "Flame Body", "Contact with the POKéMON may burn the attacker.", 3)
.attr(PostDefendContactApplyStatusEffectAbAttr, 30, StatusEffect.BURN),
new Ability(Abilities.FLASH_FIRE, "Flash Fire", "It powers up FIRE-type moves if it's hit by one.", 3)
.attr(TypeImmunityAddBattlerTagAbAttr, Type.FIRE, 1, BattlerTagType.FIRE_BOOST, (pokemon: Pokemon) => !pokemon.status || pokemon.status.effect !== StatusEffect.FREEZE),
.attr(TypeImmunityAddBattlerTagAbAttr, Type.FIRE, BattlerTagType.FIRE_BOOST, 1, (pokemon: Pokemon) => !pokemon.status || pokemon.status.effect !== StatusEffect.FREEZE),
new Ability(Abilities.FORECAST, "Forecast (N)", "Castform transforms with the weather.", 3),
new Ability(Abilities.GUTS, "Guts (N)", "Boosts ATTACK if there is a status problem.", 3),
new Ability(Abilities.HUGE_POWER, "Huge Power", "Raises the POKéMON's ATTACK stat.", 3)

View File

@ -225,6 +225,12 @@ export class DoubleBattleChanceBoosterModifier extends LapsingPersistentModifier
super(type, battlesLeft, stackCount);
}
match(modifier: Modifier): boolean {
if (modifier instanceof DoubleBattleChanceBoosterModifier)
return (modifier as DoubleBattleChanceBoosterModifier).battlesLeft === this.battlesLeft;
return false;
}
clone(): TempBattleStatBoosterModifier {
return new TempBattleStatBoosterModifier(this.type as ModifierTypes.TempBattleStatBoosterModifierType, this.battlesLeft, this.stackCount);
}
@ -250,6 +256,13 @@ export class TempBattleStatBoosterModifier extends LapsingPersistentModifier {
this.tempBattleStat = tempBattleStat;
}
match(modifier: Modifier): boolean {
if (modifier instanceof TempBattleStatBoosterModifier)
return (modifier as TempBattleStatBoosterModifier).tempBattleStat === this.tempBattleStat
&& (modifier as TempBattleStatBoosterModifier).battlesLeft === this.battlesLeft;
return false;
}
clone(): TempBattleStatBoosterModifier {
return new TempBattleStatBoosterModifier(this.type as ModifierTypes.TempBattleStatBoosterModifierType, this.tempBattleStat, this.battlesLeft, this.stackCount);
}