mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 16:02:20 +02:00
Add retaliate double damage condition
This commit is contained in:
parent
219f227cab
commit
612b54188f
@ -65,6 +65,8 @@ export default class Battle {
|
||||
public lastUsedPokeball: PokeballType;
|
||||
public playerFaints: number; // The amount of times pokemon on the players side have fainted
|
||||
public enemyFaints: number; // The amount of times pokemon on the enemies side have fainted
|
||||
public turnsSincePlayerFaints: number; // The amount of turns after pokemon on the players side have fainted
|
||||
public turnsSinceEnemyFaints: number; // The amount of turns after pokemon on the players side have fainted
|
||||
|
||||
private rngCounter: integer = 0;
|
||||
|
||||
@ -93,6 +95,8 @@ export default class Battle {
|
||||
this.lastUsedPokeball = null;
|
||||
this.playerFaints = 0;
|
||||
this.enemyFaints = 0;
|
||||
this.turnsSincePlayerFaints = -1;
|
||||
this.turnsSinceEnemyFaints = -1;
|
||||
}
|
||||
|
||||
private initBattleSpec(): void {
|
||||
@ -144,6 +148,13 @@ export default class Battle {
|
||||
this.turn++;
|
||||
this.turnCommands = Object.fromEntries(Utils.getEnumValues(BattlerIndex).map(bt => [ bt, null ]));
|
||||
this.battleSeedState = null;
|
||||
|
||||
if (this.turnsSincePlayerFaints > -1 && this.turnsSincePlayerFaints < 10) {
|
||||
this.turnsSincePlayerFaints++;
|
||||
}
|
||||
if (this.turnsSinceEnemyFaints > -1 && this.turnsSinceEnemyFaints < 10) {
|
||||
this.turnsSinceEnemyFaints++;
|
||||
}
|
||||
}
|
||||
|
||||
addParticipant(playerPokemon: PlayerPokemon): void {
|
||||
|
@ -6546,7 +6546,7 @@ export function initMoves() {
|
||||
new StatusMove(Moves.REFLECT_TYPE, Type.NORMAL, -1, 15, -1, 0, 5)
|
||||
.attr(CopyTypeAttr),
|
||||
new AttackMove(Moves.RETALIATE, Type.NORMAL, MoveCategory.PHYSICAL, 70, 100, 5, -1, 0, 5)
|
||||
.partial(),
|
||||
.attr(MovePowerMultiplierAttr, (user, target, move) => (user.scene.currentBattle.turnsSincePlayerFaints === 1 && user instanceof PlayerPokemon || user.scene.currentBattle.turnsSinceEnemyFaints === 1 && user instanceof EnemyPokemon) ? 2 : 1),
|
||||
new AttackMove(Moves.FINAL_GAMBIT, Type.FIGHTING, MoveCategory.SPECIAL, -1, 100, 5, -1, 0, 5)
|
||||
.attr(UserHpDamageAttr)
|
||||
.attr(SacrificialAttrOnHit),
|
||||
|
@ -38,13 +38,13 @@ export const IMMEDIATE_HATCH_EGGS_OVERRIDE: boolean = false;
|
||||
// default 1000
|
||||
export const STARTING_MONEY_OVERRIDE: integer = 0;
|
||||
export const POKEBALL_OVERRIDE: { active: boolean, pokeballs: PokeballCounts } = {
|
||||
active: false,
|
||||
active: true,
|
||||
pokeballs: {
|
||||
[PokeballType.POKEBALL]: 5,
|
||||
[PokeballType.GREAT_BALL]: 0,
|
||||
[PokeballType.ULTRA_BALL]: 0,
|
||||
[PokeballType.ROGUE_BALL]: 0,
|
||||
[PokeballType.MASTER_BALL]: 0,
|
||||
[PokeballType.MASTER_BALL]: 50,
|
||||
}
|
||||
};
|
||||
|
||||
@ -53,21 +53,21 @@ export const POKEBALL_OVERRIDE: { active: boolean, pokeballs: PokeballCounts } =
|
||||
*/
|
||||
|
||||
// forms can be found in pokemon-species.ts
|
||||
export const STARTER_FORM_OVERRIDE: integer = 0;
|
||||
export const STARTER_FORM_OVERRIDE: integer = 60;
|
||||
// default 5 or 20 for Daily
|
||||
export const STARTING_LEVEL_OVERRIDE: integer = 0;
|
||||
export const STARTING_LEVEL_OVERRIDE: integer = 60;
|
||||
/**
|
||||
* SPECIES OVERRIDE
|
||||
* will only apply to the first starter in your party or each enemy pokemon
|
||||
* default is 0 to not override
|
||||
* @example SPECIES_OVERRIDE = Species.Bulbasaur;
|
||||
*/
|
||||
export const STARTER_SPECIES_OVERRIDE: Species | integer = 0;
|
||||
export const STARTER_SPECIES_OVERRIDE: Species | integer = Species.COBALION;
|
||||
export const ABILITY_OVERRIDE: Abilities = Abilities.NONE;
|
||||
export const PASSIVE_ABILITY_OVERRIDE: Abilities = Abilities.NONE;
|
||||
export const STATUS_OVERRIDE: StatusEffect = StatusEffect.NONE;
|
||||
export const GENDER_OVERRIDE: Gender = null;
|
||||
export const MOVESET_OVERRIDE: Array<Moves> = [];
|
||||
export const MOVESET_OVERRIDE: Array<Moves> = [Moves.RETALIATE];
|
||||
export const SHINY_OVERRIDE: boolean = false;
|
||||
export const VARIANT_OVERRIDE: Variant = 0;
|
||||
|
||||
@ -75,13 +75,13 @@ export const VARIANT_OVERRIDE: Variant = 0;
|
||||
* OPPONENT / ENEMY OVERRIDES
|
||||
*/
|
||||
|
||||
export const OPP_SPECIES_OVERRIDE: Species | integer = 0;
|
||||
export const OPP_LEVEL_OVERRIDE: number = 0;
|
||||
export const OPP_SPECIES_OVERRIDE: Species | integer = Species.ENTEI;
|
||||
export const OPP_LEVEL_OVERRIDE: number = 50;
|
||||
export const OPP_ABILITY_OVERRIDE: Abilities = Abilities.NONE;
|
||||
export const OPP_PASSIVE_ABILITY_OVERRIDE = Abilities.NONE;
|
||||
export const OPP_STATUS_OVERRIDE: StatusEffect = StatusEffect.NONE;
|
||||
export const OPP_GENDER_OVERRIDE: Gender = null;
|
||||
export const OPP_MOVESET_OVERRIDE: Array<Moves> = [];
|
||||
export const OPP_MOVESET_OVERRIDE: Array<Moves> = [Moves.BLAZING_TORQUE];
|
||||
export const OPP_SHINY_OVERRIDE: boolean = false;
|
||||
export const OPP_VARIANT_OVERRIDE: Variant = 0;
|
||||
|
||||
@ -108,5 +108,5 @@ interface ModifierOverride {
|
||||
export const STARTING_MODIFIER_OVERRIDE: Array<ModifierOverride> = [];
|
||||
export const OPP_MODIFIER_OVERRIDE: Array<ModifierOverride> = [];
|
||||
|
||||
export const STARTING_HELD_ITEMS_OVERRIDE: Array<ModifierOverride> = [];
|
||||
export const OPP_HELD_ITEMS_OVERRIDE: Array<ModifierOverride> = [];
|
||||
export const STARTING_HELD_ITEMS_OVERRIDE: Array<ModifierOverride> = [{name:"BERRY", count:2, type: BerryType.LUM}];
|
||||
export const OPP_HELD_ITEMS_OVERRIDE: Array<ModifierOverride> = [{name:"BERRY", count:2, type: BerryType.LUM}];
|
||||
|
@ -3518,8 +3518,10 @@ export class FaintPhase extends PokemonPhase {
|
||||
// Track total times pokemon have been KO'd for supreme overlord/last respects
|
||||
if (pokemon.isPlayer()) {
|
||||
this.scene.currentBattle.playerFaints += 1;
|
||||
this.scene.currentBattle.turnsSincePlayerFaints = 0;
|
||||
} else {
|
||||
this.scene.currentBattle.enemyFaints += 1;
|
||||
this.scene.currentBattle.turnsSinceEnemyFaints = 0;
|
||||
}
|
||||
|
||||
this.scene.queueMessage(getPokemonMessage(pokemon, " fainted!"), null, true);
|
||||
|
Loading…
Reference in New Issue
Block a user