Skip to content

Commit

Permalink
Searchable Flags
Browse files Browse the repository at this point in the history
  • Loading branch information
ShivaD173 committed Aug 20, 2023
1 parent a7e6632 commit c94cbb3
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
4 changes: 2 additions & 2 deletions build-tools/build-indexes
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ function requireNoCache(pathSpec) {
index = index.concat(Object.keys(Dex.data.Items).map(x => x + ' item'));
index = index.concat(Object.keys(Dex.data.Abilities).map(x => x + ' ability'));
index = index.concat(Object.keys(Dex.data.TypeChart).map(x => toID(x) + ' type'));
index = index.concat(['physical', 'special', 'status'].map(x => toID(x) + ' category'));
index = index.concat(['physical', 'special', 'status', 'bite', 'bullet', 'contact', 'dance', 'powder', 'pulse', 'punch', 'slicing', 'sound', 'wind'].map(x => toID(x) + ' category'));
index = index.concat(['monster', 'water1', 'bug', 'flying', 'field', 'fairy', 'grass', 'humanlike', 'water3', 'mineral', 'amorphous', 'water2', 'ditto', 'dragon', 'undiscovered'].map(x => toID(x) + ' egggroup'));
index = index.concat(['ou', 'uu', 'ru', 'nu', 'pu', 'lc', 'nfe', 'uber', 'uubl', 'rubl', 'nubl', 'publ', 'cap', 'caplc', 'capnfe'].map(x => toID(x) + ' tier'));
index = index.concat(['ou', 'uu', 'ru', 'nu', 'pu', 'lc', 'nfe', 'uber', 'uubl', 'rubl', 'nubl', 'publ', 'zu', 'su', '6u', '7u', '8u', '9u', '10u', '11u', 'cap', 'caplc', 'capnfe'].map(x => toID(x) + ' tier'));

let BattleArticleTitles = {};

Expand Down
3 changes: 3 additions & 0 deletions src/battle-animations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1772,6 +1772,9 @@ export class PokemonSprite extends Sprite {
embargo: ['Embargo', 'bad'],
ingrain: ['Ingrain', 'good'],
aquaring: ['Aqua Ring', 'good'],
quarry: ['Quarry', 'good'],
icerink: ['Ice Rink', 'good'],
smeltery: ['Smeltery', 'good'],
stockpile1: ['Stockpile', 'good'],
stockpile2: ['Stockpile×2', 'good'],
stockpile3: ['Stockpile×3', 'good'],
Expand Down
7 changes: 6 additions & 1 deletion src/battle-dex-search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1680,7 +1680,12 @@ class BattleMoveSearch extends BattleTypedSearch<'move'> {
if (move.type !== value) return false;
break;
case 'category':
if (move.category !== value) return false;
if (value in ['Physical', 'Special', 'Status']) {
if (move.category !== value) return false;
}
else {
if (!move.flags.hasOwnProperty(value.toLowerCase())) return false;
}
break;
case 'pokemon':
if (!this.canLearn(value as ID, move.id)) return false;
Expand Down
3 changes: 3 additions & 0 deletions src/battle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2605,6 +2605,9 @@ export class Battle {
this.scene.resultAnim(poke, 'Ingrained', 'good');
break;
case 'aquaring':
case 'quarry':
case 'icerink':
case 'smeltery':
this.scene.resultAnim(poke, 'Aqua Ring', 'good');
break;
case 'stockpile1':
Expand Down
3 changes: 2 additions & 1 deletion testclient.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@
<h3><button class="closebutton" tabindex="-1" aria-label="Close"><i class="fa fa-times-circle"></i></button><button class="minimizebutton" tabindex="-1" aria-label="Minimize"><i class="fa fa-minus-circle"></i></button>Latest News</h3>
<div class="pm-log" style="max-height:none">
<div class="newsentry"><h4>VGC Plat</h4><p>Welcome to the VGC Plat server! The VGC Plat format is under Custom Formats. All Gen 9 Mechanics (except tera) including snow and all items are implemented. Ping StaraptorOP on discord if you find any bugs.</p><p>&mdash;<strong>Star</strong> <small class="date">on Jan 14, 2023</small></p></div>
<div class="newsentry"><h4>Lower Tiers</h4><p>RBY, GSC, ADV, DPP, BW, ORAS, and USUM Lower tiers are new tiers created from following VR rankings. We also have SV SubzeroUsed(SU) following usage stats. Ping StaraptorOP on discord if you find any bugs.</p><p>&mdash;<strong>Star</strong> <small class="date">on Jul 28, 2023</small></p></div>
<div class="newsentry"><h4>Lower Tiers</h4><p>SU (Subzero Used), the tier below ZU, now exists for every generation! RBY, GSC, ADV, DPP, and BW also have additional lower tiers(7U - 11U) created from VR rankings.</p><p>&mdash;<strong>Star</strong> <small class="date">on Aug 20, 2023</small></p></div>
<div class="newsentry"><h4>Replay Server</h4><p>We now have a replay server at <a href="http://73.191.22.186:8001/replays/">73.191.22.186:8001/replays/</a>. Special thanks to Madamadam for helping me set this up. All matches are autosaved, and the link should be provided at the end of each game. <strong>If you don't want your match to be saved and accessible to all, select "Don't Allow Spectators" when challenging.</strong></a></p><p>&mdash;<strong>Star</strong> <small class="date">on Apr 17, 2023</small></p></div>
<div class="newsentry"><h4>Stats</h4><p>Find Stats at <a href="http://73.191.22.186:8001/Stats/">73.191.22.186:8001/stats/</a>. Find usage stats, leads, movesets, and exportable showdown sets.</p><p>&mdash;<strong>Star</strong> <small class="date">on Aug 20, 2023</small></p></div>
</div>
</div>
</div>
Expand Down

0 comments on commit c94cbb3

Please sign in to comment.