Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ShivaD173 committed Dec 2, 2024
2 parents 2e07435 + 565a057 commit e6763f2
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 9 deletions.
2 changes: 1 addition & 1 deletion play.pokemonshowdown.com/js/client-mainmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
options.noMinimize = options.noMinimize || false;

this.$pmBox[options.append ? 'append' : 'prepend']('<div class="pm-window ' + options.cssClass + '" ' + options.attributes + '><h3><button class="closebutton" tabindex="-1" aria-label="Close"><i class="fa fa-times-circle"></i></button>' + (!options.noMinimize ? '<button class="minimizebutton" tabindex="-1" aria-label="Minimize"><i class="fa fa-minus-circle"></i></button>' : '') + options.title + '</h3><div class="pm-log" style="overflow:visible;height:' + (typeof options.height === 'number' ? options.height + 'px' : options.height) + ';' + (parseInt(options.height, 10) ? 'max-height:none' : (options.maxHeight ? 'max-height:' + (typeof options.maxHeight === 'number' ? options.maxHeight + 'px' : options.maxHeight) : '')) + '">' +
options.html +
BattleLog.sanitizeHTML(options.html) +
'</div></div>');
},

Expand Down
4 changes: 2 additions & 2 deletions play.pokemonshowdown.com/js/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ Storage.bg = {
break;
case 'waterfall':
hues = ["119.31034482758622,37.66233766233767%", "184.36363636363635,23.012552301255226%", "108.92307692307692,37.14285714285714%", "70.34482758620689,20.567375886524818%", "98.39999999999998,36.76470588235296%", "140,38.18181818181818%"];
attrib = '<a href="https://yilx.deviantart.com/art/Irie-372292729" target="_blank" class="subtle">"Irie" <small>background by Samuel Teo</small></a>';
attrib = '<a href="https://x.com/Yilxaevum" target="_blank" class="subtle">"Irie" <small>background by Samuel Teo</small></a>';
break;
case 'shaymin':
hues = ["39.000000000000064,21.7391304347826%", "170.00000000000003,2.380952380952378%", "157.5,11.88118811881188%", "174.78260869565216,12.041884816753928%", "185.00000000000003,12.76595744680851%", "20,5.660377358490567%"];
attrib = '<a href="http://cargocollective.com/bluep" target="_blank" class="subtle">"Shaymin" <small>background by Daniel Kong</small></a>';
break;
case 'charizards':
hues = ["37.159090909090914,74.57627118644066%", "10.874999999999998,70.79646017699115%", "179.51612903225808,52.10084033613446%", "20.833333333333336,36.73469387755102%", "192.3076923076923,80.41237113402063%", "210,29.629629629629633%"];
attrib = '<a href="https://seiryuuden.deviantart.com/art/The-Ultimate-Mega-Showdown-Charizards-414587079" target="_blank" class="subtle">"Charizards" <small>background by Jessica Valencia</small></a>';
attrib = '<a href="https://lit.link/en/seiryuuden" target="_blank" class="subtle">"Charizards" <small>background by Jessica Valencia</small></a>';
break;
case 'psday':
hues = ["24.705882352941174,25.37313432835821%", "260.4651162790697,59.44700460829492%", "165.3191489361702,46.07843137254901%", "16.363636363636367,42.63565891472869%", "259.04761904761904,34.05405405405405%", "24.705882352941174,25.37313432835821%"];
Expand Down
1 change: 1 addition & 0 deletions play.pokemonshowdown.com/src/battle-dex-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,7 @@ const BattlePokemonIconIndexes: {[id: string]: number} = {
scattervein: 1512 + 72,
cresceidon: 1512 + 73,
chuggalong: 1512 + 74,
shox: 1512 + 75,
};

const BattlePokemonIconIndexesLeft: {[id: string]: number} = {
Expand Down
2 changes: 1 addition & 1 deletion play.pokemonshowdown.com/src/battle-dex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ const Dex = new class implements ModdedDex {
let top = Math.floor(num / 12) * 30;
let left = (num % 12) * 40;
let fainted = ((pokemon as Pokemon | ServerPokemon)?.fainted ? `;opacity:.3;filter:grayscale(100%) brightness(.5)` : ``);
return `background:transparent url(${Dex.resourcePrefix}sprites/pokemonicons-sheet.png?v16) no-repeat scroll -${left}px -${top}px${fainted}`;
return `background:transparent url(${Dex.resourcePrefix}sprites/pokemonicons-sheet.png?v17) no-repeat scroll -${left}px -${top}px${fainted}`;
}

getTeambuilderSpriteData(pokemon: any, gen: number = 0): TeambuilderSpriteData {
Expand Down
20 changes: 19 additions & 1 deletion play.pokemonshowdown.com/src/battle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2240,6 +2240,20 @@ export class Battle {
let item = Dex.items.get(args[2]);
let effect = Dex.getEffect(kwArgs.from);
let ofpoke = this.getPokemon(kwArgs.of);
if (!poke) {
if (effect.id === 'frisk') {
const possibleTargets = ofpoke!.side.foe.active.filter(p => p !== null);
if (possibleTargets.length === 1) {
poke = possibleTargets[0]!;
} else {
this.activateAbility(ofpoke!, "Frisk");
this.log(args, kwArgs);
break;
}
} else {
throw new Error('No Pokemon in -item message');
}
}
poke.item = item.name;
poke.itemEffect = '';
poke.removeVolatile('airballoon' as ID);
Expand Down Expand Up @@ -2529,16 +2543,20 @@ export class Battle {
case '-terastallize': {
let poke = this.getPokemon(args[1])!;
let type = Dex.types.get(args[2]).name;
let lockForme = false;
poke.removeVolatile('typeadd' as ID);
poke.teraType = type;
poke.terastallized = type;
poke.details += `, tera:${type}`;
poke.searchid += `, tera:${type}`;
if (poke.speciesForme.startsWith("Morpeko")) {
lockForme = true;
poke.speciesForme = poke.getSpeciesForme();
poke.details = poke.details.replace("Morpeko", poke.speciesForme);
poke.searchid = `${poke.ident}|${poke.details}`;
delete poke.volatiles['formechange'];
}
this.scene.animTransform(poke, true);
this.scene.animTransform(poke, true, lockForme);
this.scene.resetStatbar(poke);
this.log(args, kwArgs);
break;
Expand Down
4 changes: 2 additions & 2 deletions play.pokemonshowdown.com/src/client-core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ const PSBackground = new class extends PSStreamModel {
"140,38.18181818181818%",
];
attrib = {
url: 'https://yilx.deviantart.com/art/Irie-372292729',
url: 'https://x.com/Yilxaevum',
title: 'Irie',
artist: 'Samuel Teo',
};
Expand Down Expand Up @@ -303,7 +303,7 @@ const PSBackground = new class extends PSStreamModel {
"210,29.629629629629633%",
];
attrib = {
url: 'https://seiryuuden.deviantart.com/art/The-Ultimate-Mega-Showdown-Charizards-414587079',
url: 'https://lit.link/en/seiryuuden',
title: 'Charizards',
artist: 'Jessica Valencia',
};
Expand Down
4 changes: 2 additions & 2 deletions pokemonshowdown.com/credits.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@

<ul>
<li><p><a href="http://cargocollective.com/bluep" target="_blank" class="subtle"><strong>Daniel Kong</strong></a> <small>&ndash; Art (Shaymin background)</small></p></li>
<li><p><a href="http://seiryuuden.deviantart.com/" target="_blank" class="subtle"><strong>Jessica Valencia</strong> [seiryuuden]</a> <small>&ndash; Art (Charizards background)</small></p></li>
<li><p><a href="https://lit.link/en/seiryuuden" target="_blank" class="subtle"><strong>Jessica Valencia</strong> [seiryuuden]</a> <small>&ndash; Art (Charizards background)</small></p></li>
<li><p><a href="http://kyle-dove.deviantart.com/" target="_blank" class="subtle"><strong>Kyle Dove</strong></a> <small>&ndash; Art (battle backdrops)</small></p></li>
<li><p><a href="http://vtas.deviantart.com/" target="_blank" class="subtle"><strong>Vivian Zou</strong> [Vtas]</a> <small>&ndash; Art (Horizon background)</small></p></li>
<li><p><strong>Samuel Teo</strong> [Yilx] <small>&ndash; Art (Waterfall background)</small></p></li>
<li><p><a href="https://x.com/Yilxaevum" target="_blank" class="subtle"><strong>Samuel Teo</strong> [Yilx]</a> <small>&ndash; Art (Waterfall background)</small></p></li>
<li><p><a href="http://quanyails.deviantart.com/" target="_blank" class="subtle">[<strong>Quanyails</strong>]</a> <small>&ndash; Art (Ocean background)</small></p></li>
<li><p><a href="http://smogon.com/forums/threads/3486712/" target="_blank" class="subtle"><strong>X/Y</strong></a> and <a href="http://www.smogon.com/forums/threads/3577711/" target="_blank" class="subtle"><strong>Sun/Moon Sprite Projects</strong></a> led by <strong>Ian Clail</strong> [Layell]<small>&ndash; Sprites</small></p></li>
<li><p><a href="http://www.smogon.com/forums/threads/3577711/" target="_blank" class="subtle"><strong>Sun/Moon</strong></a> and <a href="https://www.smogon.com/forums/threads/3647722/" target="_blank" class="subtle"><strong>Sword/Shield Sprite Projects</strong></a> led by [<strong>leparagon</strong>] <small>&ndash; Sprites</small></p></li>
Expand Down
4 changes: 4 additions & 0 deletions pokemonshowdown.com/news/manage.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ function saveNews() {
$summary = str_replace("[/url]", '</a>', $summary);
$summary = str_replace("[b]", '<strong>', $summary);
$summary = str_replace("[/b]", '</strong>', $summary);
$summary = preg_replace('/\[psicon (pokemon|item|type|category)="([^\]]+)"\]/', '<psicon $1="$2" />', $summary);
$summary = preg_replace('/\[psicon (pokemon|item|type|category)=([^\]]+)\]/', '<psicon $1="$2" />', $summary);
$summary = '<p>'.$summary.'</p>';

$newsCache[$topic_id]['summary_html'] = $summary;
Expand All @@ -88,6 +90,8 @@ function saveNews() {
$details = str_replace("[/url]", '</a>', $details);
$details = str_replace("[b]", '<strong>', $details);
$details = str_replace("[/b]", '</strong>', $details);
$details = preg_replace('/\[psicon (pokemon|item|type|category)="([^\]]+)"\]/', '<psicon $1="$2" />', $details);
$details = preg_replace('/\[psicon (pokemon|item|type|category)=([^\]]+)\]/', '<psicon $1="$2" />', $details);
$details = '<p>'.$details.'</p>';
$newsCache[$topic_id]['details_html'] = $details;
} else {
Expand Down

0 comments on commit e6763f2

Please sign in to comment.