Skip to content

Commit

Permalink
Fix Tera Shell (#9968)
Browse files Browse the repository at this point in the history
  • Loading branch information
Karthik99999 authored Dec 16, 2023
1 parent d1c77c9 commit 2238bf6
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions data/abilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4672,19 +4672,17 @@ export const Abilities: {[abilityid: string]: AbilityData} = {
terashell: {
// TODO figure out if this only works on Terapagos
onEffectiveness(typeMod, target, type, move) {
if (this.effectState.resisted) return -1; // all hits of multi-hit move should be not very effective
if (!target || move.category === 'Status') return;
if (!target.runImmunity(move.type)) return; // immunity has priority
if (target.abilityState.resisted) return -1; // all hits of multi-hit move should be not very effective
if (target.hp < target.maxhp) return;

this.add('-activate', target, 'ability: Tera Shell');
target.abilityState.resisted = true;
this.effectState.resisted = true;
return -1;
},
onAfterMoveSecondary(target, source, move) {
if (target.abilityState.resisted) {
delete target.abilityState.resisted;
}
onAnyAfterMove() {
this.effectState.resisted = false;
},
isBreakable: true,
name: "Tera Shell",
Expand Down

0 comments on commit 2238bf6

Please sign in to comment.