Skip to content

Commit

Permalink
Merge pull request #38 from Rezzo64/main
Browse files Browse the repository at this point in the history
readd substitute placeholder sprites
  • Loading branch information
Rezzo64 authored Jan 25, 2024
2 parents 9ab1b45 + 01746a3 commit 52634c8
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions play.pokemonshowdown.com/src/battle-dex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,7 @@ const Dex = new class implements ModdedDex {

pokeballs: string[] | null = null;

//TODO we might want to move this to something like data/petmods
readonly modResourcePrefix = 'https://raw.githubusercontent.com/scoopapa/dh2/master/data/mods/';
readonly modResourcePrefix = 'https://media.githubusercontent.com/media/scoopapa/DH2/main/data/mods/';


resourcePrefix = (() => {
Expand Down Expand Up @@ -740,15 +739,14 @@ const Dex = new class implements ModdedDex {
spriteData.h *= 1.5;
spriteData.y += -11;
}
// Placeholder sprites for Pet Mods Fakemons with no sprite data
// window.modsprites[modSpriteId]: checks if it has custom sprite data.
// window.BattlePokemonSprites[modSpriteId]: checks if it is a real Pokemon.
// if (!window.ModSprites[modSpriteId] && !window.BattlePokemonSprites[modSpriteId] && pokemon !== 'substitute') {
// spriteData = Dex.getSpriteData('substitute', spriteData.isFrontSprite, {
// gen: options.gen,
// mod: options.mod,
// });
// }
if (window.BattlePokemonSprites) {
if (!window.ModSprites[modSpriteId] && !window.BattlePokemonSprites[modSpriteId] && pokemon !== 'substitute') {
spriteData = Dex.getSpriteData('substitute', spriteData.isFrontSprite, {
gen: options.gen,
mod: options.mod,
});
}
}
return spriteData;
}

Expand Down

0 comments on commit 52634c8

Please sign in to comment.