Fix some bugs and add factory bg
After Width: | Height: | Size: 858 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 713 B |
After Width: | Height: | Size: 596 B |
After Width: | Height: | Size: 756 B |
After Width: | Height: | Size: 634 B |
|
@ -2194,7 +2194,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"filename": "lum_berry,png",
|
"filename": "lum_berry",
|
||||||
"rotated": false,
|
"rotated": false,
|
||||||
"trimmed": true,
|
"trimmed": true,
|
||||||
"sourceSize": {
|
"sourceSize": {
|
||||||
|
|
Before Width: | Height: | Size: 256 B After Width: | Height: | Size: 256 B |
|
@ -316,8 +316,6 @@ export function getBiomeKey(biome: Biome): string {
|
||||||
return 'wasteland';
|
return 'wasteland';
|
||||||
case Biome.POWER_PLANT:
|
case Biome.POWER_PLANT:
|
||||||
return 'ruins';
|
return 'ruins';
|
||||||
case Biome.FACTORY:
|
|
||||||
return 'wasteland';
|
|
||||||
case Biome.END:
|
case Biome.END:
|
||||||
return 'wasteland';
|
return 'wasteland';
|
||||||
}
|
}
|
||||||
|
@ -337,6 +335,7 @@ export function getBiomeHasProps(biomeType: Biome): boolean {
|
||||||
case Biome.MEADOW:
|
case Biome.MEADOW:
|
||||||
case Biome.VOLCANO:
|
case Biome.VOLCANO:
|
||||||
case Biome.GRAVEYARD:
|
case Biome.GRAVEYARD:
|
||||||
|
case Biome.FACTORY:
|
||||||
case Biome.WASTELAND:
|
case Biome.WASTELAND:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -738,26 +738,17 @@ export class TurnInitPhase extends FieldPhase {
|
||||||
start() {
|
start() {
|
||||||
super.start();
|
super.start();
|
||||||
|
|
||||||
this.scene.getPlayerField().forEach(playerPokemon => {
|
this.scene.getField().forEach((pokemon, i) => {
|
||||||
if (playerPokemon.isActive())
|
if (pokemon?.isActive()) {
|
||||||
this.scene.currentBattle.addParticipant(playerPokemon);
|
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.scene.pushPhase(new TurnStartPhase(this.scene));
|
||||||
|
|
||||||
this.end();
|
this.end();
|
||||||
|
@ -2392,7 +2383,10 @@ export class AttemptRunPhase extends PokemonPhase {
|
||||||
ease: 'Sine.easeIn'
|
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 BattleEndPhase(this.scene));
|
||||||
this.scene.pushPhase(new NewBattlePhase(this.scene));
|
this.scene.pushPhase(new NewBattlePhase(this.scene));
|
||||||
|
|
|
@ -1224,7 +1224,7 @@ export function initAbilities() {
|
||||||
new Ability(Abilities.FLAME_BODY, "Flame Body", "Contact with the POKéMON may burn the attacker.", 3)
|
new Ability(Abilities.FLAME_BODY, "Flame Body", "Contact with the POKéMON may burn the attacker.", 3)
|
||||||
.attr(PostDefendContactApplyStatusEffectAbAttr, 30, StatusEffect.BURN),
|
.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)
|
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.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.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)
|
new Ability(Abilities.HUGE_POWER, "Huge Power", "Raises the POKéMON's ATTACK stat.", 3)
|
||||||
|
|
|
@ -225,6 +225,12 @@ export class DoubleBattleChanceBoosterModifier extends LapsingPersistentModifier
|
||||||
super(type, battlesLeft, stackCount);
|
super(type, battlesLeft, stackCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
match(modifier: Modifier): boolean {
|
||||||
|
if (modifier instanceof DoubleBattleChanceBoosterModifier)
|
||||||
|
return (modifier as DoubleBattleChanceBoosterModifier).battlesLeft === this.battlesLeft;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
clone(): TempBattleStatBoosterModifier {
|
clone(): TempBattleStatBoosterModifier {
|
||||||
return new TempBattleStatBoosterModifier(this.type as ModifierTypes.TempBattleStatBoosterModifierType, this.battlesLeft, this.stackCount);
|
return new TempBattleStatBoosterModifier(this.type as ModifierTypes.TempBattleStatBoosterModifierType, this.battlesLeft, this.stackCount);
|
||||||
}
|
}
|
||||||
|
@ -250,6 +256,13 @@ export class TempBattleStatBoosterModifier extends LapsingPersistentModifier {
|
||||||
this.tempBattleStat = tempBattleStat;
|
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 {
|
clone(): TempBattleStatBoosterModifier {
|
||||||
return new TempBattleStatBoosterModifier(this.type as ModifierTypes.TempBattleStatBoosterModifierType, this.tempBattleStat, this.battlesLeft, this.stackCount);
|
return new TempBattleStatBoosterModifier(this.type as ModifierTypes.TempBattleStatBoosterModifierType, this.tempBattleStat, this.battlesLeft, this.stackCount);
|
||||||
}
|
}
|
||||||
|
|