rolled back pr 166

This commit is contained in:
Luc 2024-04-18 19:51:07 -04:00
parent 5463d7b859
commit cbcafe82d1
2 changed files with 97 additions and 71 deletions

View File

@ -12,7 +12,7 @@ import * as Utils from "../utils";
import { WeatherType } from "./weather";
import { ArenaTagSide, ArenaTrapTag } from "./arena-tag";
import { ArenaTagType } from "./enums/arena-tag-type";
import { UnswappableAbilityAbAttr, UncopiableAbilityAbAttr, UnsuppressableAbilityAbAttr, NoTransformAbilityAbAttr, BlockRecoilDamageAttr, BlockOneHitKOAbAttr, IgnoreContactAbAttr, MaxMultiHitAbAttr, applyAbAttrs, BlockNonDirectDamageAbAttr, applyPreSwitchOutAbAttrs, PreSwitchOutAbAttr, applyPostDefendAbAttrs, PostDefendContactApplyStatusEffectAbAttr } from "./ability";
import { UnswappableAbilityAbAttr, UncopiableAbilityAbAttr, UnsuppressableAbilityAbAttr, NoTransformAbilityAbAttr, BlockRecoilDamageAttr, BlockOneHitKOAbAttr, IgnoreContactAbAttr, MaxMultiHitAbAttr, applyAbAttrs, BlockNonDirectDamageAbAttr, applyPreSwitchOutAbAttrs, PreSwitchOutAbAttr, applyPostDefendAbAttrs, PostDefendContactApplyStatusEffectAbAttr, MoveAbilityBypassAbAttr } from "./ability";
import { Abilities } from "./enums/abilities";
import { allAbilities } from './ability';
import { PokemonHeldItemModifier } from "../modifier/modifier";
@ -68,7 +68,8 @@ export enum MoveFlags {
POWDER_MOVE = 2048,
DANCE_MOVE = 4096,
WIND_MOVE = 8192,
TRIAGE_MOVE = 16384
TRIAGE_MOVE = 16384,
IGNORE_ABILITIES = 32768
}
type MoveConditionFunc = (user: Pokemon, target: Pokemon, move: Move) => boolean;
@ -286,12 +287,24 @@ export default class Move {
return this;
}
ignoresAbilities(ignoresAbilities?: boolean): this {
this.setFlag(MoveFlags.IGNORE_ABILITIES, ignoresAbilities);
return this;
}
checkFlag(flag: MoveFlags, user: Pokemon, target: Pokemon): boolean {
switch (flag) {
case MoveFlags.MAKES_CONTACT:
if (user.hasAbilityWithAttr(IgnoreContactAbAttr))
return false;
break;
case MoveFlags.IGNORE_ABILITIES:
if (user.hasAbilityWithAttr(MoveAbilityBypassAbAttr)) {
const abilityEffectsIgnored = new Utils.BooleanHolder(false);
applyAbAttrs(MoveAbilityBypassAbAttr, user, abilityEffectsIgnored, this);
if (abilityEffectsIgnored.value)
return true;
}
}
return !!(this.flags & flag);
@ -1422,7 +1435,7 @@ export class HalfHpStatMaxAttr extends StatChangeAttr {
user.scene.damageNumberHandler.add(user, damage);
user.updateInfo().then(() => {
const ret = super.apply(user, target, move, args);
user.scene.queueMessage(getPokemonMessage(user, ` cut its own hp\nand maximized its ${getBattleStatName(this.stats[0])}!`));
user.scene.queueMessage(getPokemonMessage(user, ` cut its own HP\nand maximized its ${getBattleStatName(this.stats[0])}!`));
resolve(ret);
});
});
@ -1461,6 +1474,24 @@ export class CutHpStatBoostAttr extends StatChangeAttr {
}
}
export class CopyStatsAttr extends MoveEffectAttr {
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
if (!super.apply(user, target, move, args))
return false;
for (let s = 0; s < target.summonData.battleStats.length; s++)
user.summonData.battleStats[s] = target.summonData.battleStats[s];
if (target.getTag(BattlerTagType.CRIT_BOOST))
user.addTag(BattlerTagType.CRIT_BOOST, 0, move.id);
else
user.removeTag(BattlerTagType.CRIT_BOOST);
target.scene.queueMessage(getPokemonMessage(user, 'copied\n') + getPokemonMessage(target, `'s stat changes!`));
return true;
}
}
export class InvertStatsAttr extends MoveEffectAttr {
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
if (!super.apply(user, target, move, args))
@ -1475,6 +1506,20 @@ export class InvertStatsAttr extends MoveEffectAttr {
}
}
export class ResetStatsAttr extends MoveEffectAttr {
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
if (!super.apply(user, target, move, args))
return false;
for (let s = 0; s < target.summonData.battleStats.length; s++)
target.summonData.battleStats[s] = 0;
target.scene.queueMessage(getPokemonMessage(target, `'s stat changes\nwere eliminated!`));
return true;
}
}
export class HpSplitAttr extends MoveEffectAttr {
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): Promise<boolean> {
return new Promise(resolve => {
@ -2174,28 +2219,6 @@ export class HiddenPowerTypeAttr extends VariableMoveTypeAttr {
}
}
export class MatchUserTypeAttr extends VariableMoveTypeAttr {
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
const type = (args[0] as Utils.IntegerHolder);
const userTypes = user.getTypes(true);
console.log(userTypes)
if(userTypes && userTypes.length > 0 && userTypes.includes(Type.STELLAR)) { // will not change to stellar type
const nonTeraTypes = user.getTypes();
type.value = nonTeraTypes[0];
return true;
}
else if (userTypes && userTypes.length > 0) {
type.value = userTypes[0];
return true;
}
else
return false;
}
}
export class VariableMoveTypeMultiplierAttr extends MoveAttr {
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
return false;
@ -2436,6 +2459,7 @@ export class AddBattlerTagAttr extends MoveEffectAttr {
case BattlerTagType.SAND_TOMB:
case BattlerTagType.MAGMA_STORM:
case BattlerTagType.THUNDER_CAGE:
case BattlerTagType.INFESTATION:
return -3;
case BattlerTagType.ENCORE:
return -2;
@ -2698,7 +2722,7 @@ export class ForceSwitchOutAttr extends MoveEffectAttr {
private batonPass: boolean;
constructor(user?: boolean, batonPass?: boolean) {
super(false, MoveEffectTrigger.HIT, true);
super(false, MoveEffectTrigger.POST_APPLY, true);
this.user = !!user;
this.batonPass = !!batonPass;
}
@ -2905,7 +2929,7 @@ export class RandomMovesetMoveAttr extends OverrideMoveEffectAttr {
: moveTargets.targets.indexOf(target.getBattlerIndex()) > -1
? [ target.getBattlerIndex() ]
: [ moveTargets.targets[user.randSeedInt(moveTargets.targets.length)] ];
user.getMoveQueue().push({ move: move.moveId, targets: targets, ignorePP: this.enemyMoveset });
user.getMoveQueue().push({ move: move.moveId, targets: targets, ignorePP: true });
user.scene.unshiftPhase(new MovePhase(user.scene, user, targets, moveset[moveIndex], true));
return true;
}
@ -3809,7 +3833,7 @@ export function initMoves() {
.target(MoveTarget.USER_SIDE),
new StatusMove(Moves.HAZE, Type.ICE, -1, 30, -1, 0, 1)
.target(MoveTarget.BOTH_SIDES)
.unimplemented(),
.attr(ResetStatsAttr),
new StatusMove(Moves.REFLECT, Type.PSYCHIC, -1, 20, -1, 0, 1)
.attr(AddArenaTagAttr, ArenaTagType.REFLECT, 5, true)
.target(MoveTarget.USER_SIDE),
@ -4060,7 +4084,6 @@ export function initMoves() {
.target(MoveTarget.RANDOM_NEAR_ENEMY),
new StatusMove(Moves.SANDSTORM, Type.ROCK, -1, 10, -1, 0, 2)
.attr(WeatherChangeAttr, WeatherType.SANDSTORM)
.windMove()
.target(MoveTarget.BOTH_SIDES),
new AttackMove(Moves.GIGA_DRAIN, Type.GRASS, MoveCategory.SPECIAL, 75, 100, 10, -1, 0, 2)
.attr(HitHealAttr)
@ -4094,7 +4117,8 @@ export function initMoves() {
new SelfStatusMove(Moves.SLEEP_TALK, Type.NORMAL, -1, 10, -1, 0, 2)
.attr(BypassSleepAttr)
.attr(RandomMovesetMoveAttr)
.condition((user, target, move) => user.status?.effect === StatusEffect.SLEEP),
.condition((user, target, move) => user.status?.effect === StatusEffect.SLEEP)
.ignoresVirtual(),
new StatusMove(Moves.HEAL_BELL, Type.NORMAL, -1, 5, -1, 0, 2)
.soundBased()
.target(MoveTarget.USER_AND_ALLIES)
@ -4138,7 +4162,18 @@ export function initMoves() {
.partial(),
new AttackMove(Moves.RAPID_SPIN, Type.NORMAL, MoveCategory.PHYSICAL, 50, 100, 40, 100, 0, 2)
.attr(StatChangeAttr, BattleStat.SPD, 1, true)
.attr(RemoveBattlerTagAttr, [ BattlerTagType.BIND, BattlerTagType.WRAP, BattlerTagType.FIRE_SPIN, BattlerTagType.WHIRLPOOL, BattlerTagType.CLAMP, BattlerTagType.SAND_TOMB, BattlerTagType.MAGMA_STORM, BattlerTagType.THUNDER_CAGE, BattlerTagType.SEEDED ], true)
.attr(RemoveBattlerTagAttr, [
BattlerTagType.BIND,
BattlerTagType.WRAP,
BattlerTagType.FIRE_SPIN,
BattlerTagType.WHIRLPOOL,
BattlerTagType.CLAMP,
BattlerTagType.SAND_TOMB,
BattlerTagType.MAGMA_STORM,
BattlerTagType.THUNDER_CAGE,
BattlerTagType.SEEDED,
BattlerTagType.INFESTATION
], true)
.partial(),
new StatusMove(Moves.SWEET_SCENT, Type.NORMAL, 100, 20, -1, 0, 2)
.attr(StatChangeAttr, BattleStat.EVA, -1)
@ -4179,7 +4214,7 @@ export function initMoves() {
.attr(CounterDamageAttr, (move: Move) => move.category === MoveCategory.SPECIAL, 2)
.target(MoveTarget.ATTACKER),
new StatusMove(Moves.PSYCH_UP, Type.NORMAL, -1, 10, -1, 0, 2)
.unimplemented(),
.attr(CopyStatsAttr),
new AttackMove(Moves.EXTREME_SPEED, Type.NORMAL, MoveCategory.PHYSICAL, 80, 100, 5, -1, 2, 2),
new AttackMove(Moves.ANCIENT_POWER, Type.ROCK, MoveCategory.SPECIAL, 60, 100, 5, 10, 0, 2)
.attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.DEF, BattleStat.SPATK, BattleStat.SPDEF, BattleStat.SPD ], 1, true),
@ -4246,7 +4281,7 @@ export function initMoves() {
.ignoresVirtual(),
new SelfStatusMove(Moves.CHARGE, Type.ELECTRIC, -1, 20, -1, 0, 3)
.attr(StatChangeAttr, BattleStat.SPDEF, 1, true)
.partial(),
.attr(AddBattlerTagAttr, BattlerTagType.CHARGED, true, true),
new StatusMove(Moves.TAUNT, Type.DARK, 100, 20, -1, 0, 3)
.unimplemented(),
new StatusMove(Moves.HELPING_HAND, Type.NORMAL, -1, 20, -1, 5, 3)
@ -4466,7 +4501,7 @@ export function initMoves() {
.attr(ConfuseAttr)
.pulseMove(),
new AttackMove(Moves.DOOM_DESIRE, Type.STEEL, MoveCategory.SPECIAL, 140, 100, 5, -1, 0, 3)
.attr(DelayedAttackAttr, ArenaTagType.DOOM_DESIRE, ChargeAnim.DOOM_DESIRE_CHARGING, 'chose\nDOOM DESIRE as its destiny!'),
.attr(DelayedAttackAttr, ArenaTagType.DOOM_DESIRE, ChargeAnim.DOOM_DESIRE_CHARGING, 'chose\nDoom Desire as its destiny!'),
new AttackMove(Moves.PSYCHO_BOOST, Type.PSYCHIC, MoveCategory.SPECIAL, 140, 90, 5, 100, 0, 3)
.attr(StatChangeAttr, BattleStat.SPATK, -2, true),
new SelfStatusMove(Moves.ROOST, Type.FLYING, -1, 5, -1, 0, 4)
@ -4513,7 +4548,7 @@ export function initMoves() {
.makesContact(false)
.target(MoveTarget.ATTACKER),
new AttackMove(Moves.U_TURN, Type.BUG, MoveCategory.PHYSICAL, 70, 100, 20, -1, 0, 4)
.attr(ForceSwitchOutAttr, true),
.attr(ForceSwitchOutAttr, true, false),
new AttackMove(Moves.CLOSE_COMBAT, Type.FIGHTING, MoveCategory.PHYSICAL, 120, 100, 5, 100, 0, 4)
.attr(StatChangeAttr, [ BattleStat.DEF, BattleStat.SPDEF ], -1, true),
new AttackMove(Moves.PAYBACK, Type.DARK, MoveCategory.PHYSICAL, 50, 100, 10, -1, 0, 4)
@ -4860,7 +4895,7 @@ export function initMoves() {
new AttackMove(Moves.CHIP_AWAY, Type.NORMAL, MoveCategory.PHYSICAL, 70, 100, 20, -1, 0, 5)
.attr(IgnoreOpponentStatChangesAttr),
new AttackMove(Moves.CLEAR_SMOG, Type.POISON, MoveCategory.SPECIAL, 50, -1, 15, -1, 0, 5)
.partial(),
.attr(ResetStatsAttr),
new AttackMove(Moves.STORED_POWER, Type.PSYCHIC, MoveCategory.SPECIAL, 20, 100, 10, -1, 0, 5)
.attr(StatChangeCountPowerAttr),
new StatusMove(Moves.QUICK_GUARD, Type.FIGHTING, -1, 15, -1, 3, 5)
@ -4917,7 +4952,7 @@ export function initMoves() {
new AttackMove(Moves.GRASS_PLEDGE, Type.GRASS, MoveCategory.SPECIAL, 80, 100, 10, -1, 0, 5)
.partial(),
new AttackMove(Moves.VOLT_SWITCH, Type.ELECTRIC, MoveCategory.SPECIAL, 70, 100, 20, -1, 0, 5)
.attr(ForceSwitchOutAttr, true),
.attr(ForceSwitchOutAttr, true, false),
new AttackMove(Moves.STRUGGLE_BUG, Type.BUG, MoveCategory.SPECIAL, 50, 100, 20, 100, 0, 5)
.attr(StatChangeAttr, BattleStat.SPATK, -1)
.target(MoveTarget.ALL_NEAR_ENEMIES),
@ -5063,7 +5098,7 @@ export function initMoves() {
.target(MoveTarget.ALL_NEAR_ENEMIES),
new StatusMove(Moves.PARTING_SHOT, Type.DARK, 100, 20, 100, 0, 6)
.attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.SPATK ], -1)
.attr(ForceSwitchOutAttr, true)
.attr(ForceSwitchOutAttr, true, false)
.soundBased(),
new StatusMove(Moves.TOPSY_TURVY, Type.DARK, -1, 20, -1, 0, 6)
.attr(InvertStatsAttr),
@ -5157,7 +5192,7 @@ export function initMoves() {
.attr(SurviveDamageAttr),
new AttackMove(Moves.INFESTATION, Type.BUG, MoveCategory.SPECIAL, 20, 100, 20, 100, 0, 6)
.makesContact()
.partial(),
.attr(TrapAttr, BattlerTagType.INFESTATION),
new AttackMove(Moves.POWER_UP_PUNCH, Type.FIGHTING, MoveCategory.PHYSICAL, 40, 100, 20, 100, 0, 6)
.attr(StatChangeAttr, BattleStat.ATK, 1, true)
.punchingMove(),
@ -5344,7 +5379,7 @@ export function initMoves() {
.unimplemented(),
new AttackMove(Moves.REVELATION_DANCE, Type.NORMAL, MoveCategory.SPECIAL, 90, 100, 15, -1, 0, 7)
.danceMove()
.attr(MatchUserTypeAttr),
.partial(),
new AttackMove(Moves.CORE_ENFORCER, Type.DRAGON, MoveCategory.SPECIAL, 100, 100, 10, -1, 0, 7)
.target(MoveTarget.ALL_NEAR_ENEMIES)
.unimplemented(),
@ -5410,8 +5445,10 @@ export function initMoves() {
new AttackMove(Moves.SPECTRAL_THIEF, Type.GHOST, MoveCategory.PHYSICAL, 90, 100, 10, -1, 0, 7)
.partial(),
new AttackMove(Moves.SUNSTEEL_STRIKE, Type.STEEL, MoveCategory.PHYSICAL, 100, 100, 5, -1, 0, 7)
.ignoresAbilities()
.partial(),
new AttackMove(Moves.MOONGEIST_BEAM, Type.GHOST, MoveCategory.SPECIAL, 100, 100, 5, -1, 0, 7)
.ignoresAbilities()
.partial(),
new StatusMove(Moves.TEARFUL_LOOK, Type.NORMAL, -1, 20, 100, 0, 7)
.attr(StatChangeAttr, BattleStat.ATK, -1)
@ -5434,15 +5471,16 @@ export function initMoves() {
.partial(),
new AttackMove(Moves.PHOTON_GEYSER, Type.PSYCHIC, MoveCategory.SPECIAL, 100, 100, 5, -1, 0, 7)
.attr(PhotonGeyserCategoryAttr)
.ignoresAbilities()
.partial(),
/* Unused */
new AttackMove(Moves.LIGHT_THAT_BURNS_THE_SKY, Type.PSYCHIC, MoveCategory.SPECIAL, 200, -1, 1, -1, 0, 7)
.attr(PhotonGeyserCategoryAttr)
.partial(),
.ignoresAbilities(),
new AttackMove(Moves.SEARING_SUNRAZE_SMASH, Type.STEEL, MoveCategory.PHYSICAL, 200, -1, 1, -1, 0, 7)
.partial(),
.ignoresAbilities(),
new AttackMove(Moves.MENACING_MOONRAZE_MAELSTROM, Type.GHOST, MoveCategory.SPECIAL, 200, -1, 1, -1, 0, 7)
.partial(),
.ignoresAbilities(),
new AttackMove(Moves.LETS_SNUGGLE_FOREVER, Type.FAIRY, MoveCategory.PHYSICAL, 190, -1, 1, -1, 0, 7)
.partial(),
new AttackMove(Moves.SPLINTERED_STORMSHARDS, Type.ROCK, MoveCategory.PHYSICAL, 190, -1, 1, -1, 0, 7)
@ -5476,7 +5514,7 @@ export function initMoves() {
new AttackMove(Moves.SAPPY_SEED, Type.GRASS, MoveCategory.PHYSICAL, 100, 90, 10, 100, 0, 7)
.attr(AddBattlerTagAttr, BattlerTagType.SEEDED),
new AttackMove(Moves.FREEZY_FROST, Type.ICE, MoveCategory.SPECIAL, 100, 90, 10, -1, 0, 7)
.partial(),
.attr(ResetStatsAttr),
new AttackMove(Moves.SPARKLY_SWIRL, Type.FAIRY, MoveCategory.SPECIAL, 120, 85, 5, -1, 0, 7)
.partial(),
new AttackMove(Moves.VEEVEE_VOLLEY, Type.NORMAL, MoveCategory.PHYSICAL, -1, -1, 20, -1, 0, 7)
@ -5687,7 +5725,7 @@ export function initMoves() {
.attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.DEF ], 1)
.target(MoveTarget.NEAR_ALLY),
new AttackMove(Moves.FLIP_TURN, Type.WATER, MoveCategory.PHYSICAL, 60, 100, 20, -1, 0, 8)
.attr(ForceSwitchOutAttr, true),
.attr(ForceSwitchOutAttr, true, false),
new AttackMove(Moves.TRIPLE_AXEL, Type.ICE, MoveCategory.PHYSICAL, 20, 90, 10, -1, 0, 8)
.attr(MultiHitAttr, MultiHitType._3_INCR)
.attr(MissEffectAttr, (user: Pokemon, move: Move) => {
@ -5952,7 +5990,18 @@ export function initMoves() {
new AttackMove(Moves.TRIPLE_DIVE, Type.WATER, MoveCategory.PHYSICAL, 30, 95, 10, -1, 0, 9)
.attr(MultiHitAttr, MultiHitType._3),
new AttackMove(Moves.MORTAL_SPIN, Type.POISON, MoveCategory.PHYSICAL, 30, 100, 15, 100, 0, 9)
.attr(LapseBattlerTagAttr, [ BattlerTagType.BIND, BattlerTagType.WRAP, BattlerTagType.FIRE_SPIN, BattlerTagType.WHIRLPOOL, BattlerTagType.CLAMP, BattlerTagType.SAND_TOMB, BattlerTagType.MAGMA_STORM, BattlerTagType.THUNDER_CAGE, BattlerTagType.SEEDED ], true)
.attr(LapseBattlerTagAttr, [
BattlerTagType.BIND,
BattlerTagType.WRAP,
BattlerTagType.FIRE_SPIN,
BattlerTagType.WHIRLPOOL,
BattlerTagType.CLAMP,
BattlerTagType.SAND_TOMB,
BattlerTagType.MAGMA_STORM,
BattlerTagType.THUNDER_CAGE,
BattlerTagType.SEEDED,
BattlerTagType.INFESTATION
], true)
.attr(StatusEffectAttr, StatusEffect.POISON)
.target(MoveTarget.ALL_NEAR_ENEMIES),
new StatusMove(Moves.DOODLE, Type.NORMAL, 100, 10, -1, 0, 9)
@ -6117,4 +6166,4 @@ export function initMoves() {
new AttackMove(Moves.MALIGNANT_CHAIN, Type.POISON, MoveCategory.SPECIAL, 100, 100, 5, 50, 0, 9)
.attr(StatusEffectAttr, StatusEffect.TOXIC)
);
}
}

View File

@ -18,8 +18,7 @@ export enum Type {
DRAGON,
DARK,
FAIRY,
STELLAR,
TYPELESS
STELLAR
};
export type TypeDamageMultiplier = 0 | 0.25 | 0.5 | 1 | 2 | 4;
@ -46,7 +45,6 @@ export function getTypeDamageMultiplier(attackType: integer, defType: integer):
case Type.DRAGON:
case Type.DARK:
case Type.FAIRY:
case Type.TYPELESS:
return 1;
case Type.GHOST:
default:
@ -70,7 +68,6 @@ export function getTypeDamageMultiplier(attackType: integer, defType: integer):
case Type.ELECTRIC:
case Type.ICE:
case Type.DRAGON:
case Type.TYPELESS:
return 1;
case Type.ROCK:
case Type.BUG:
@ -96,7 +93,6 @@ export function getTypeDamageMultiplier(attackType: integer, defType: integer):
case Type.DRAGON:
case Type.DARK:
case Type.FAIRY:
case Type.TYPELESS:
return 1;
case Type.FIGHTING:
case Type.BUG:
@ -122,7 +118,6 @@ export function getTypeDamageMultiplier(attackType: integer, defType: integer):
case Type.ICE:
case Type.DRAGON:
case Type.DARK:
case Type.TYPELESS:
return 1;
case Type.FIGHTING:
case Type.POISON:
@ -151,7 +146,6 @@ export function getTypeDamageMultiplier(attackType: integer, defType: integer):
case Type.DRAGON:
case Type.DARK:
case Type.FAIRY:
case Type.TYPELESS:
return 1;
case Type.POISON:
case Type.ROCK:
@ -177,7 +171,6 @@ export function getTypeDamageMultiplier(attackType: integer, defType: integer):
case Type.DRAGON:
case Type.DARK:
case Type.FAIRY:
case Type.TYPELESS:
return 1;
case Type.NORMAL:
case Type.FLYING:
@ -205,7 +198,6 @@ export function getTypeDamageMultiplier(attackType: integer, defType: integer):
case Type.DRAGON:
case Type.DARK:
case Type.FAIRY:
case Type.TYPELESS:
return 1;
case Type.FIGHTING:
case Type.GROUND:
@ -231,7 +223,6 @@ export function getTypeDamageMultiplier(attackType: integer, defType: integer):
case Type.ICE:
case Type.DRAGON:
case Type.FAIRY:
case Type.TYPELESS:
return 1;
case Type.POISON:
case Type.BUG:
@ -251,7 +242,6 @@ export function getTypeDamageMultiplier(attackType: integer, defType: integer):
case Type.WATER:
case Type.ELECTRIC:
case Type.DARK:
case Type.TYPELESS:
return 1;
case Type.NORMAL:
case Type.FLYING:
@ -283,7 +273,6 @@ export function getTypeDamageMultiplier(attackType: integer, defType: integer):
case Type.PSYCHIC:
case Type.DRAGON:
case Type.DARK:
case Type.TYPELESS:
return 1;
case Type.BUG:
case Type.STEEL:
@ -312,7 +301,6 @@ export function getTypeDamageMultiplier(attackType: integer, defType: integer):
case Type.DRAGON:
case Type.DARK:
case Type.FAIRY:
case Type.TYPELESS:
return 1;
case Type.STEEL:
case Type.FIRE:
@ -339,7 +327,6 @@ export function getTypeDamageMultiplier(attackType: integer, defType: integer):
case Type.DRAGON:
case Type.DARK:
case Type.FAIRY:
case Type.TYPELESS:
return 1;
case Type.GROUND:
case Type.WATER:
@ -367,7 +354,6 @@ export function getTypeDamageMultiplier(attackType: integer, defType: integer):
case Type.DRAGON:
case Type.DARK:
case Type.FAIRY:
case Type.TYPELESS:
return 1;
case Type.FLYING:
case Type.STEEL:
@ -395,7 +381,6 @@ export function getTypeDamageMultiplier(attackType: integer, defType: integer):
case Type.ICE:
case Type.DRAGON:
case Type.FAIRY:
case Type.TYPELESS:
return 1;
case Type.FIGHTING:
case Type.PSYCHIC:
@ -423,7 +408,6 @@ export function getTypeDamageMultiplier(attackType: integer, defType: integer):
case Type.DRAGON:
case Type.DARK:
case Type.FAIRY:
case Type.TYPELESS:
return 1;
case Type.ICE:
return 0.5;
@ -447,7 +431,6 @@ export function getTypeDamageMultiplier(attackType: integer, defType: integer):
case Type.STEEL:
case Type.PSYCHIC:
case Type.DARK:
case Type.TYPELESS:
return 1;
case Type.FIRE:
case Type.WATER:
@ -475,7 +458,6 @@ export function getTypeDamageMultiplier(attackType: integer, defType: integer):
case Type.ELECTRIC:
case Type.ICE:
case Type.DRAGON:
case Type.TYPELESS:
return 1;
case Type.GHOST:
case Type.DARK:
@ -501,7 +483,6 @@ export function getTypeDamageMultiplier(attackType: integer, defType: integer):
case Type.PSYCHIC:
case Type.ICE:
case Type.FAIRY:
case Type.TYPELESS:
return 1;
case Type.FIGHTING:
case Type.BUG:
@ -513,8 +494,6 @@ export function getTypeDamageMultiplier(attackType: integer, defType: integer):
}
case Type.STELLAR:
return 1;
case Type.TYPELESS:
return 1;
}
}
@ -558,8 +537,6 @@ export function getTypeRgb(type: Type): [ integer, integer, integer ] {
return [ 232, 136, 200 ];
case Type.STELLAR:
return [ 255, 255, 255 ];
case Type.TYPELESS:
return [ 104, 160, 144 ];
default:
return [ 0, 0, 0 ];
}