Skip to content

Commit

Permalink
Merge branch 'smogon:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas-Meijer authored Jul 11, 2024
2 parents 7e7285d + a87b63b commit 57f4a67
Show file tree
Hide file tree
Showing 263 changed files with 18,849 additions and 4,865 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Staff
- Andrew Werner [HoeenHero] - Development
- Annika L. [Annika] - Development
- Chris Monsanto [chaos] - Development, Sysadmin
- Kris Johnson [Kris] - Development
- Kris Johnson [dhelmise] - Development
- Leonard Craft III [DaWoblefet] - Research (game mechanics)
- Mathieu Dias-Martins [Marty-D] - Research (game mechanics), Development
- Mia A [Mia] - Development
Expand Down
1,104 changes: 596 additions & 508 deletions config/formats.ts

Large diffs are not rendered by default.

25 changes: 21 additions & 4 deletions data/abilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Ratings and how they work:
*/

export const Abilities: {[abilityid: string]: AbilityData} = {
export const Abilities: import('../sim/dex-abilities').AbilityDataTable = {
noability: {
isNonstandard: "Past",
flags: {},
Expand Down Expand Up @@ -260,6 +260,12 @@ export const Abilities: {[abilityid: string]: AbilityData} = {
this.add('-ability', pokemon, 'Unnerve');
this.effectState.unnerved = true;
},
onStart(pokemon) {
if (this.effectState.unnerved) return;
this.add('-ability', pokemon, 'As One');
this.add('-ability', pokemon, 'Unnerve');
this.effectState.unnerved = true;
},
onEnd() {
this.effectState.unnerved = false;
},
Expand All @@ -282,6 +288,12 @@ export const Abilities: {[abilityid: string]: AbilityData} = {
this.add('-ability', pokemon, 'Unnerve');
this.effectState.unnerved = true;
},
onStart(pokemon) {
if (this.effectState.unnerved) return;
this.add('-ability', pokemon, 'As One');
this.add('-ability', pokemon, 'Unnerve');
this.effectState.unnerved = true;
},
onEnd() {
this.effectState.unnerved = false;
},
Expand Down Expand Up @@ -2259,7 +2271,7 @@ export const Abilities: {[abilityid: string]: AbilityData} = {
libero: {
onPrepareHit(source, target, move) {
if (this.effectState.libero) return;
if (move.hasBounced || move.flags['futuremove'] || move.sourceEffect === 'snatch') return;
if (move.hasBounced || move.flags['futuremove'] || move.sourceEffect === 'snatch' || move.callsMove) return;
const type = move.type;
if (type && type !== '???' && source.getTypes().join() !== type) {
if (!source.setType(type)) return;
Expand Down Expand Up @@ -3403,7 +3415,7 @@ export const Abilities: {[abilityid: string]: AbilityData} = {
protean: {
onPrepareHit(source, target, move) {
if (this.effectState.protean) return;
if (move.hasBounced || move.flags['futuremove'] || move.sourceEffect === 'snatch') return;
if (move.hasBounced || move.flags['futuremove'] || move.sourceEffect === 'snatch' || move.callsMove) return;
const type = move.type;
if (type && type !== '???' && source.getTypes().join() !== type) {
if (!source.setType(type)) return;
Expand Down Expand Up @@ -4231,6 +4243,11 @@ export const Abilities: {[abilityid: string]: AbilityData} = {
onStart(target) {
this.add('-start', target, 'ability: Slow Start');
},
onResidual(pokemon) {
if (!pokemon.activeTurns) {
this.effectState.duration += 1;
}
},
onModifyAtkPriority: 5,
onModifyAtk(atk, pokemon) {
return this.chainModify(0.5);
Expand Down Expand Up @@ -4851,7 +4868,7 @@ export const Abilities: {[abilityid: string]: AbilityData} = {
onEffectiveness(typeMod, target, type, move) {
if (!target || target.species.name !== 'Terapagos-Terastal') return;
if (this.effectState.resisted) return -1; // all hits of multi-hit move should be not very effective
if (move.category === 'Status') return;
if (move.category === 'Status' || move.id === 'struggle') return;
if (!target.runImmunity(move.type)) return; // immunity has priority
if (target.hp < target.maxhp) return;

Expand Down
Loading

0 comments on commit 57f4a67

Please sign in to comment.