Skip to content

Commit

Permalink
fix: kleavor soul dew fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TerraPrograms committed Sep 22, 2024
1 parent 51f3cc6 commit ee88b73
Show file tree
Hide file tree
Showing 18 changed files with 60 additions and 37 deletions.
2 changes: 1 addition & 1 deletion calc/src/data/moves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1892,7 +1892,7 @@ const XY_PATCH: {[name: string]: DeepPartial<MoveData>} = {
'Crafty Shield': {bp: 0, type: 'Fairy', priority: 3},
'Dazzling Gleam': {bp: 80, type: 'Fairy', target: 'allAdjacentFoes', category: 'Special'},
'Disarming Voice': {
bp: 40,
bp: 60,
type: 'Fairy',
isSound: true,
target: 'allAdjacentFoes',
Expand Down
2 changes: 1 addition & 1 deletion calc/src/data/species.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8864,7 +8864,7 @@ const PLA_PATCH: {[name: string]: DeepPartial<SpeciesData>} = {
},
Kleavor: {
types: ['Bug', 'Rock'],
bs: {hp: 70, at: 130, df: 95, sa: 45, sd: 75, sp: 85},
bs: {hp: 70, at: 135, df: 95, sa: 45, sd: 75, sp: 85},
weightkg: 89,
abilities: {0: 'Swarm'},
},
Expand Down
19 changes: 14 additions & 5 deletions calc/src/mechanics/gen789.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,13 @@ export function calculateBPModsSMSSSV(
) {
bpMods.push(4915);
desc.attackerItem = attacker.item;
} else if (

} else if (attacker.hasItem('Soul Dew') &&
attacker.named('Latios', 'Latias', 'Latios-Mega', 'Latias-Mega') &&
move.hasType('Psychic', 'Dragon')) {
bpMods.push(4915);
desc.attackerItem = attacker.item;
} else if (
(attacker.hasItem('Muscle Band') && move.category === 'Physical') ||
(attacker.hasItem('Wise Glasses') && move.category === 'Special')
) {
Expand Down Expand Up @@ -1328,8 +1334,7 @@ export function calculateAtModsSMSSSV(
// Choice Band/Scarf/Specs move lock and stat boosts are ignored during Dynamax (Anubis)
} else if (!move.isZ && !move.isMax &&
((attacker.hasItem('Choice Band') && move.category === 'Physical') ||
(attacker.hasItem('Choice Specs') && move.category === 'Special') ||
attacker.hasItem("Soul Dew") && move.category === 'Special' && attacker.named('Latios', 'Latias', 'Latios-Mega', 'Latias-Mega'))
(attacker.hasItem('Choice Specs') && move.category === 'Special'))
) {
atMods.push(6144);
desc.attackerItem = attacker.item;
Expand Down Expand Up @@ -1464,10 +1469,14 @@ export function calculateDfModsSMSSSV(

if ((defender.hasItem('Eviolite') &&
(defender.name === 'Dipplin' || gen.species.get(toID(defender.name))?.nfe)) ||
(!hitsPhysical && defender.hasItem('Assault Vest') )||
(defender.hasItem("Soul Dew") && move.category === 'Special' && defender.named('Latios', 'Latias', 'Latios-Mega', 'Latias-Mega'))) {
(!hitsPhysical && defender.hasItem('Assault Vest') )) {
dfMods.push(6144);
desc.defenderItem = defender.item;
} else if (
(defender.hasItem('Soul Dew') && defender.named('Latios', 'Latias', 'Latios-Mega', 'Latias-Mega') && !hitsPhysical)
) {
dfMods.push(4915);
desc.defenderItem = defender.item;
} else if (
(defender.hasItem('Metal Powder') && defender.named('Ditto') && hitsPhysical) ||
(defender.hasItem('Deep Sea Scale') && defender.named('Clamperl') && !hitsPhysical)
Expand Down
2 changes: 1 addition & 1 deletion data/moves.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion data/species.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/calc/data/moves.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/calc/data/production.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/calc/data/species.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions dist/calc/items.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { Generation, TypeName, StatID } from './data/interface';
export declare const SEED_BOOSTED_STAT: {
[item: string]: StatID;
};
export declare function getItemBoostType(item: string | undefined): "Normal" | "Fighting" | "Flying" | "Poison" | "Ground" | "Rock" | "Bug" | "Ghost" | "Steel" | "Fire" | "Water" | "Grass" | "Electric" | "Psychic" | "Ice" | "Dragon" | "Dark" | "Fairy" | undefined;
export declare function getBerryResistType(berry: string | undefined): "Normal" | "Fighting" | "Flying" | "Poison" | "Ground" | "Rock" | "Bug" | "Ghost" | "Steel" | "Fire" | "Water" | "Grass" | "Electric" | "Psychic" | "Ice" | "Dragon" | "Dark" | "Fairy" | undefined;
export declare function getFlingPower(item?: string): 0 | 100 | 10 | 40 | 20 | 50 | 80 | 60 | 130 | 85 | 110 | 95 | 90 | 70 | 30;
export declare function getItemBoostType(item: string | undefined): "Electric" | "Psychic" | "Normal" | "Fighting" | "Flying" | "Poison" | "Ground" | "Rock" | "Bug" | "Ghost" | "Steel" | "Fire" | "Water" | "Grass" | "Ice" | "Dragon" | "Dark" | "Fairy" | undefined;
export declare function getBerryResistType(berry: string | undefined): "Electric" | "Psychic" | "Normal" | "Fighting" | "Flying" | "Poison" | "Ground" | "Rock" | "Bug" | "Ghost" | "Steel" | "Fire" | "Water" | "Grass" | "Ice" | "Dragon" | "Dark" | "Fairy" | undefined;
export declare function getFlingPower(item?: string): 0 | 10 | 30 | 100 | 40 | 60 | 50 | 85 | 20 | 130 | 110 | 95 | 90 | 80 | 70;
export declare function getNaturalGift(gen: Generation, item: string): {
t: TypeName;
p: number;
};
export declare function getTechnoBlast(item: string): "Fire" | "Water" | "Electric" | "Ice" | undefined;
export declare function getTechnoBlast(item: string): "Electric" | "Fire" | "Water" | "Ice" | undefined;
export declare function getMultiAttack(item: string): TypeName | undefined;
16 changes: 12 additions & 4 deletions dist/calc/mechanics/gen789.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/calc/mechanics/gen789.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/calc/production.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/honkalculate.html
Original file line number Diff line number Diff line change
Expand Up @@ -882,8 +882,8 @@
</script>
<script type="text/javascript" src="./calc/util.js?8fa0c7ff"></script>
<script type="text/javascript" src="./calc/stats.js?9220179f"></script>
<script type="text/javascript" src="./calc/data/species.js?598102aa"></script>
<script type="text/javascript" src="./js/data/sets/gen9.js?7a1c8efe"></script>
<script type="text/javascript" src="./calc/data/species.js?8ba054bf"></script>
<script type="text/javascript" src="./js/data/sets/gen9.js?baf3f707"></script>
<script type="text/javascript" src="./js/data/sets/gen8.js?ecf43658"></script>
<script type="text/javascript" src="./js/data/sets/gen7.js?78168bde"></script>
<script type="text/javascript" src="./js/data/sets/gen6.js?2219279f"></script>
Expand All @@ -895,15 +895,15 @@
<script type="text/javascript" src="./calc/data/types.js?6b065b89"></script>
<script type="text/javascript" src="./calc/data/natures.js?04f00dc5"></script>
<script type="text/javascript" src="./calc/data/abilities.js?ed14e933"></script>
<script type="text/javascript" src="./calc/data/moves.js?dcc37d07"></script>
<script type="text/javascript" src="./calc/data/moves.js?9aa5a9bc"></script>
<script type="text/javascript" src="./calc/data/items.js?6bfb4498"></script>
<script type="text/javascript" src="./calc/data/index.js?083d2bc9"></script>
<script type="text/javascript" src="./calc/move.js?48331ad1"></script>
<script type="text/javascript" src="./calc/pokemon.js?ea90f3ad"></script>
<script type="text/javascript" src="./calc/field.js?b0fd6c59"></script>
<script type="text/javascript" src="./calc/items.js?3cbea98f"></script>
<script type="text/javascript" src="./calc/mechanics/util.js?7d958cae"></script>
<script type="text/javascript" src="./calc/mechanics/gen789.js?9d921166"></script>
<script type="text/javascript" src="./calc/mechanics/gen789.js?74506d05"></script>
<script type="text/javascript" src="./calc/mechanics/gen56.js?326e578d"></script>
<script type="text/javascript" src="./calc/mechanics/gen4.js?7d2b7674"></script>
<script type="text/javascript" src="./calc/mechanics/gen3.js?2fa3d6a1"></script>
Expand Down
8 changes: 4 additions & 4 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1673,8 +1673,8 @@ <h5>OHKO Colors</h5>
</script>
<script type="text/javascript" src="./calc/util.js?8fa0c7ff"></script>
<script type="text/javascript" src="./calc/stats.js?9220179f"></script>
<script type="text/javascript" src="./calc/data/species.js?598102aa"></script>
<script type="text/javascript" src="./js/data/sets/gen9.js?7a1c8efe"></script>
<script type="text/javascript" src="./calc/data/species.js?8ba054bf"></script>
<script type="text/javascript" src="./js/data/sets/gen9.js?baf3f707"></script>
<script type="text/javascript" src="./js/data/sets/gen8.js?ecf43658"></script>
<script type="text/javascript" src="./js/data/sets/gen7.js?78168bde"></script>
<script type="text/javascript" src="./js/data/sets/gen6.js?2219279f"></script>
Expand All @@ -1686,15 +1686,15 @@ <h5>OHKO Colors</h5>
<script type="text/javascript" src="./calc/data/types.js?6b065b89"></script>
<script type="text/javascript" src="./calc/data/natures.js?04f00dc5"></script>
<script type="text/javascript" src="./calc/data/abilities.js?ed14e933"></script>
<script type="text/javascript" src="./calc/data/moves.js?dcc37d07"></script>
<script type="text/javascript" src="./calc/data/moves.js?9aa5a9bc"></script>
<script type="text/javascript" src="./calc/data/items.js?6bfb4498"></script>
<script type="text/javascript" src="./calc/data/index.js?083d2bc9"></script>
<script type="text/javascript" src="./calc/move.js?48331ad1"></script>
<script type="text/javascript" src="./calc/pokemon.js?ea90f3ad"></script>
<script type="text/javascript" src="./calc/field.js?b0fd6c59"></script>
<script type="text/javascript" src="./calc/items.js?3cbea98f"></script>
<script type="text/javascript" src="./calc/mechanics/util.js?7d958cae"></script>
<script type="text/javascript" src="./calc/mechanics/gen789.js?9d921166"></script>
<script type="text/javascript" src="./calc/mechanics/gen789.js?74506d05"></script>
<script type="text/javascript" src="./calc/mechanics/gen56.js?326e578d"></script>
<script type="text/javascript" src="./calc/mechanics/gen4.js?7d2b7674"></script>
<script type="text/javascript" src="./calc/mechanics/gen3.js?2fa3d6a1"></script>
Expand Down
2 changes: 1 addition & 1 deletion dist/js/data/sets/gen9.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/randoms.html
Original file line number Diff line number Diff line change
Expand Up @@ -1537,7 +1537,7 @@
</script>
<script type="text/javascript" src="./calc/util.js?8fa0c7ff"></script>
<script type="text/javascript" src="./calc/stats.js?9220179f"></script>
<script type="text/javascript" src="./calc/data/species.js?598102aa"></script>
<script type="text/javascript" src="./calc/data/species.js?8ba054bf"></script>
<script type="text/javascript" src="https://data.pkmn.cc/randbats/js/gen9randombattle.js?"></script>
<script type="text/javascript" src="https://data.pkmn.cc/randbats/js/gen8randombattle.js?"></script>
<script type="text/javascript" src="https://data.pkmn.cc/randbats/js/gen7randombattle.js?"></script>
Expand All @@ -1550,15 +1550,15 @@
<script type="text/javascript" src="./calc/data/types.js?6b065b89"></script>
<script type="text/javascript" src="./calc/data/natures.js?04f00dc5"></script>
<script type="text/javascript" src="./calc/data/abilities.js?ed14e933"></script>
<script type="text/javascript" src="./calc/data/moves.js?dcc37d07"></script>
<script type="text/javascript" src="./calc/data/moves.js?9aa5a9bc"></script>
<script type="text/javascript" src="./calc/data/items.js?6bfb4498"></script>
<script type="text/javascript" src="./calc/data/index.js?083d2bc9"></script>
<script type="text/javascript" src="./calc/move.js?48331ad1"></script>
<script type="text/javascript" src="./calc/pokemon.js?ea90f3ad"></script>
<script type="text/javascript" src="./calc/field.js?b0fd6c59"></script>
<script type="text/javascript" src="./calc/items.js?3cbea98f"></script>
<script type="text/javascript" src="./calc/mechanics/util.js?7d958cae"></script>
<script type="text/javascript" src="./calc/mechanics/gen789.js?9d921166"></script>
<script type="text/javascript" src="./calc/mechanics/gen789.js?74506d05"></script>
<script type="text/javascript" src="./calc/mechanics/gen56.js?326e578d"></script>
<script type="text/javascript" src="./calc/mechanics/gen4.js?7d2b7674"></script>
<script type="text/javascript" src="./calc/mechanics/gen3.js?2fa3d6a1"></script>
Expand Down
12 changes: 8 additions & 4 deletions mechanics/gen789.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/js/data/sets/gen9.js

Large diffs are not rendered by default.

0 comments on commit ee88b73

Please sign in to comment.