Skip to content

Commit

Permalink
Delete old mayhem weathers
Browse files Browse the repository at this point in the history
  • Loading branch information
ShivaD173 committed Oct 5, 2024
1 parent c865ffa commit f9ba424
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 252 deletions.
215 changes: 0 additions & 215 deletions data/conditions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -653,221 +653,6 @@ export const Conditions: import('../sim/dex-conditions').ConditionDataTable = {
this.add('-weather', 'none');
},
},
locusts: {
name: 'Locusts',
effectType: 'Weather',
duration: 5,
onModifyAtkPriority: 5,
onModifyAtk(atk, attacker, defender, move) {
if (move.type === 'Bug' && attacker.hp <= attacker.maxhp / 3) {
this.debug('Swarm boost');
return this.chainModify(1.5);
}
},
onModifySpAPriority: 5,
onModifySpA(atk, attacker, defender, move) {
if (move.type === 'Bug' && attacker.hp <= attacker.maxhp / 3) {
this.debug('Swarm boost');
return this.chainModify(1.5);
}
},
onFieldStart(field, source, effect) {
if (effect?.effectType === 'Ability') {
this.add('-weather', 'Locusts', '[from] ability: ' + effect.name, '[of] ' + source);
} else {
this.add('-weather', 'Locusts');
}
},
onFieldResidualOrder: 1,
onFieldResidual() {
this.add('-weather', 'Locusts', '[upkeep]');
this.eachEvent('Weather');
},
onWeather(target) {
this.damage(target.baseMaxhp / 16);
},
onFieldEnd() {
this.add('-weather', 'none');
},
},
acidrain: {
name: 'AcidRain',
effectType: 'Weather',
duration: 5,
onSourceDamagingHit(damage, target, source, move) {
// Despite not being a secondary, Shield Dust / Covert Cloak block Toxic Chain's effect
if (target.hasAbility('shielddust') || target.hasItem('covertcloak')) return;
if (this.randomChance(3, 10)) {
target.trySetStatus('tox', source);
}
},
onFieldStart(field, source, effect) {
if (effect?.effectType === 'Ability') {
this.add('-weather', 'AcidRain', '[from] ability: ' + effect.name, '[of] ' + source);
} else {
this.add('-weather', 'AcidRain');
}
},
onFieldResidualOrder: 1,
onFieldResidual() {
this.add('-weather', 'AcidRain', '[upkeep]');
this.eachEvent('Weather');
},
onWeather(target) {
this.damage(target.baseMaxhp / 16);
},
onFieldEnd() {
this.add('-weather', 'none');
},
},
twilightzone: {
name: 'TwilightZone',
effectType: 'Weather',
duration: 5,
onFieldStart(field, source, effect) {
if (effect?.effectType === 'Ability') {
this.add('-weather', 'TwilightZone', '[from] ability: ' + effect.name, '[of] ' + source);
} else {
this.add('-weather', 'TwilightZone');
}
},
onFieldResidualOrder: 1,
onFieldResidual() {
this.add('-weather', 'TwilightZone', '[upkeep]');
this.eachEvent('Weather');
},
onBasePower(basePower, attacker, defender, move) {
let fallen = Math.min(attacker.side.totalFainted, 3);
if (attacker.hasType("Ghost")) {
fallen = 3;
}
if (fallen) {
const powMod = [4096, 4506, 4915, 5325, 5734, 6144];
return this.chainModify([powMod[fallen], 4096]);
}
},
onFieldEnd() {
this.add('-weather', 'none');
},
},
loveintheair: {
name: 'LoveInTheAir',
effectType: 'Weather',
duration: 5,
onSetStatus(status, target, source, effect) {
if (!target.isGrounded() || target.isSemiInvulnerable()) return;
if (effect && ((effect as Move).status || effect.id === 'yawn')) {
this.add('-activate', target, 'move: Misty Terrain');
}
return false;
},
onTryAddVolatile(status, target, source, effect) {
if (!target.isGrounded() || target.isSemiInvulnerable()) return;
if (status.id === 'confusion') {
if (effect.effectType === 'Move' && !effect.secondaries) this.add('-activate', target, 'move: Misty Terrain');
return null;
}
},
onAccuracy(accuracy, target, source, move) {
if (move.type === "Fairy") {
return true;
}
},
onFieldStart(field, source, effect) {
if (effect?.effectType === 'Ability') {
this.add('-weather', 'LoveInTheAir', '[from] ability: ' + effect.name, '[of] ' + source);
} else {
this.add('-weather', 'LoveInTheAir');
}
},
onFieldResidualOrder: 1,
onFieldResidual() {
this.add('-weather', 'LoveInTheAir', '[upkeep]');
this.eachEvent('Weather');
},
onFieldEnd() {
this.add('-weather', 'none');
},
},
pollen: {
name: 'Pollen',
effectType: 'Weather',
duration: 5,
onBasePower(basePower, attacker, defender, move) {
if (move.type === 'Grass') {
return this.chainModify([5325, 4096]);
}
},
onWeather(target) {
this.heal(target.baseMaxhp / 16, target, target);
},
onFieldStart(field, source, effect) {
if (effect?.effectType === 'Ability') {
this.add('-weather', 'Pollen', '[from] ability: ' + effect.name, '[of] ' + source);
} else {
this.add('-weather', 'Pollen');
}
},
onFieldResidualOrder: 1,
onFieldResidual() {
this.add('-weather', 'Pollen', '[upkeep]');
this.eachEvent('Weather');
},
onAccuracy(accuracy, target, source, move) {
if (move.flags["powder"]) {
return true;
}
},
onFieldEnd() {
this.add('-weather', 'none');
},
},
stellarstorm: {
name: 'StellarStorm',
effectType: 'Weather',
duration: 5,
onEffectivenessPriority: -1,
onEffectiveness(typeMod, target, type, move) {
if (target?.terastallized) {
this.add('-fieldactivate', 'Stellar Storm');
return 1;
}
},
onFieldStart(field, source, effect) {
this.add('-weather', 'StellarStorm', '[from] ability: ' + effect.name, '[of] ' + source);
},
onFieldResidualOrder: 1,
onFieldResidual() {
this.add('-weather', 'StellarStorm', '[upkeep]');
this.eachEvent('Weather');
},
onFieldEnd() {
this.add('-weather', 'none');
},
},
darkness: {
name: 'Darkness',
effectType: 'Weather',
duration: 5,
onModifyAccuracyPriority: 9,
onModifyAccuracy(accuracy, target, source, move) {
if (!source.hasType('Dark')) {
if (typeof accuracy !== 'number') return;
return this.chainModify([3277, 4096]);
}
},
onFieldStart(field, source, effect) {
this.add('-weather', 'Darkness', '[from] ability: ' + effect.name, '[of] ' + source);
},
onFieldResidualOrder: 1,
onFieldResidual() {
this.add('-weather', 'Darkness', '[upkeep]');
this.eachEvent('Weather');
},
onFieldEnd() {
this.add('-weather', 'none');
},
},
sandstorm: {
name: 'Sandstorm',
effectType: 'Weather',
Expand Down
9 changes: 3 additions & 6 deletions data/text/abilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2494,8 +2494,8 @@ export const AbilitiesText: {[id: IDEntry]: AbilityText} = {
},
onslaughtcore: {
name: "Onslaught Core",
desc: "User uses Confusion on opposite Pokemon on switch in.",
shortDesc: "User uses Confusion on opposite Pokemon on switch in.",
desc: "User uses Confusion (30bp, 25% recoil) on opposite Pokemon on switch in.",
shortDesc: "User uses Confusion (30bp, 25% recoil) on opposite Pokemon on switch in.",
},
barriercore: {
name: "Barrier Core",
Expand Down Expand Up @@ -2533,10 +2533,7 @@ export const AbilitiesText: {[id: IDEntry]: AbilityText} = {
},
serenegracidea: {
name: "Serene Grace",
desc: "This Pokemon's moves have their secondary effect chance doubled. This effect stacks with the Rainbow effect, except for secondary effects that cause the target to flinch.",
desc: "This Pokemon's moves have their secondary effect chance 2.5x. This effect stacks with the Rainbow effect, except for secondary effects that cause the target to flinch.",
shortDesc: "This Pokemon's moves have their secondary effect chance 2.5x.",
gen4: {
desc: "This Pokemon's moves have their secondary effect chance 2.5x.",
},
},
};
30 changes: 0 additions & 30 deletions data/text/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,36 +326,6 @@ export const DefaultText: {[id: IDEntry]: DefaultText} = {
block: " The mysterious strong winds blow on regardless!",
},

// new ones

locusts: {
weatherName: "Locusts",
start: " A swarm started!",
end: " The swarm subsided.",
upkeep: " (The swarm is raging.)",
damage: " [POKEMON] is barraged by the locusts!",
},
acidrain: {
weatherName: "Acid Rain",
start: " An acid rain started!",
end: " The acid rain stopped.",
upkeep: " (Acid Rain continues to fall.)",
damage: " [POKEMON] is corroded by the acid!",
},
stellarstorm: {
weatherName: "Stellar Storm",
start: " The weather turned Stellar!",
end: " The lights have faded.",
activate: " The storm powered up the attack!",
upkeep: " (The storm continues.)",
},
darkness: {
weatherName: "Darkness",
start: " The field went dark!",
end: " The lights are back on!",
upkeep: " (The dark continues.)",
},

// terrain
electricterrain: {
start: " An electric current ran across the battlefield!",
Expand Down
1 change: 0 additions & 1 deletion data/typechart.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export const TypeChart: import('../sim/dex-data').TypeDataTable = {
bug: {
damageTaken: {
locusts: 3,
Bug: 0,
Dark: 0,
Dragon: 0,
Expand Down

0 comments on commit f9ba424

Please sign in to comment.