Clean up unused imports & Consistency

This commit is contained in:
kd8lvt 2024-04-09 17:38:48 -04:00
parent 8a4f9138e6
commit 5d1bbfa0ed
2 changed files with 6 additions and 10 deletions

View File

@ -531,7 +531,7 @@ export class PostDefendCritStatChangeAbAttr extends PostDefendAbAttr {
} }
export class PostDefendContactDamageAbAttr extends PostDefendAbAttr { export class PostDefendContactDamageAbAttr extends PostDefendAbAttr {
protected damageRatio: integer; private damageRatio: integer;
constructor(damageRatio: integer) { constructor(damageRatio: integer) {
super(); super();
@ -1562,20 +1562,13 @@ export class PostFaintAbAttr extends AbAttr {
applyPostFaint(pokemon: Pokemon, attacker: Pokemon, move: PokemonMove, hitResult: HitResult, args: any[]): boolean { applyPostFaint(pokemon: Pokemon, attacker: Pokemon, move: PokemonMove, hitResult: HitResult, args: any[]): boolean {
return false; return false;
} }
getTriggerMessage(pokemon: Pokemon, ...args: any[]): string {
return `${pokemon.name}${(pokemon.name.endsWith('s')?`'`:`'s`)} ${pokemon.getAbility().name} hurt\nits attacker!`
}
} }
export class PostFaintContactDamageAbAttr extends PostFaintAbAttr { export class PostFaintContactDamageAbAttr extends PostFaintAbAttr {
damageRatio: integer; private damageRatio: integer;
constructor(damageRatio: integer) { constructor(damageRatio: integer) {
super(); super();
this.damageRatio = damageRatio; this.damageRatio = damageRatio;
this.addCondition((pokemon: Pokemon)=>{
return pokemon.isFainted(false);
});
} }
applyPostFaint(pokemon: Pokemon, attacker: Pokemon, move: PokemonMove, hitResult: HitResult, args: any[]): boolean { applyPostFaint(pokemon: Pokemon, attacker: Pokemon, move: PokemonMove, hitResult: HitResult, args: any[]): boolean {
@ -1585,6 +1578,10 @@ export class PostFaintContactDamageAbAttr extends PostFaintAbAttr {
} }
return false; return false;
} }
getTriggerMessage(pokemon: Pokemon, ...args: any[]): string {
return `${pokemon.name}${(pokemon.name.endsWith('s')?`'`:`'s`)} ${pokemon.getAbility().name} hurt\nits attacker!`
}
} }
export class RedirectMoveAbAttr extends AbAttr { export class RedirectMoveAbAttr extends AbAttr {

View File

@ -56,7 +56,6 @@ import { SaveSlotUiMode } from "./ui/save-slot-select-ui-handler";
import { fetchDailyRunSeed, getDailyRunStarters } from "./data/daily-run"; import { fetchDailyRunSeed, getDailyRunStarters } from "./data/daily-run";
import { GameModes, gameModes } from "./game-mode"; import { GameModes, gameModes } from "./game-mode";
import { getPokemonSpecies, speciesStarters } from "./data/pokemon-species"; import { getPokemonSpecies, speciesStarters } from "./data/pokemon-species";
import { getPositionOfLineAndCharacter } from "typescript";
export class LoginPhase extends Phase { export class LoginPhase extends Phase {
private showText: boolean; private showText: boolean;