Skip to content

Commit

Permalink
Weather button fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TerraPrograms committed Nov 10, 2023
1 parent a4753ed commit 3ded1d6
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 44 deletions.
4 changes: 2 additions & 2 deletions calc/src/test/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ export function tests(...args: any[]) {
let type: 'skip' | 'only' | undefined = undefined;
if (typeof args[1] !== 'number') {
from = 1;
to = 8;
to = 9;
fn = args[1];
type = args[2];
} else if (typeof args[2] !== 'number') {
from = args[1] as I.GenerationNum ?? 1;
to = 8;
to = 9;
fn = args[2];
type = args[3];
} else {
Expand Down
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): "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 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 | 30 | 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): "Electric" | "Fire" | "Water" | "Ice" | undefined;
export declare function getTechnoBlast(item: string): "Fire" | "Water" | "Electric" | "Ice" | undefined;
export declare function getMultiAttack(item: string): TypeName | undefined;
4 changes: 2 additions & 2 deletions dist/calc/test/helper.js

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

14 changes: 2 additions & 12 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -775,18 +775,6 @@ <h5>OHKO Colors</h5>
<hr class="gen-specific g6 g7 g8 g9" />
<div aria-labelledby="selectWeatherInstruction" role="radiogroup">
<span class="visually-hidden" id="selectWeatherInstruction">Select the current weather condition.</span>
<div class="gen-specific g3 g4 g5 g6 g7 g8 hide" style="width: 22.2em; margin: 5px auto;" title="Select the current weather condition.">
<input class="visually-hidden calc-trigger" type="radio" name="weather" value="" id="clear" checked="checked" />
<label class="btn btn-small btn-left" for="clear">None</label>
<input class="visually-hidden calc-trigger" type="radio" name="weather" value="Sun" id="sun" />
<label class="btn btn-small btn-mid" for="sun">Sun</label>
<input class="visually-hidden calc-trigger" type="radio" name="weather" value="Rain" id="rain" />
<label class="btn btn-small btn-mid" for="rain">Rain</label>
<input class="visually-hidden calc-trigger" type="radio" name="weather" value="Sand" id="sand" />
<label class="btn btn-small btn-mid" for="sand">Sand</label>
<input class="visually-hidden calc-trigger" type="radio" name="weather" value="Hail" id="hail" />
<label class="btn btn-small btn-right" for="hail">Hail</label>
</div>
<div class="gen-specific g9" style="width: 22.2em; margin: 5px auto;" title="Select the current weather condition.">
<input class="visually-hidden calc-trigger" type="radio" name="weather" value="" id="clear" checked="checked" />
<label class="btn btn-small btn-left" for="clear">None</label>
Expand All @@ -798,6 +786,8 @@ <h5>OHKO Colors</h5>
<label class="btn btn-small btn-mid" for="sand">Sand</label>
<input class="visually-hidden calc-trigger" type="radio" name="weather" value="Snow" id="snow" />
<label class="btn btn-small btn-right" for="snow">Snow</label>
<input class="visually-hidden calc-trigger" type="radio" name="weather" value="Hail" id="hail" />
<label class="btn btn-small btn-right" for="hail">Hail</label>
</div>
<div class="gen-specific g6 g7 g8 g9" title="Select the current weather condition.">
<input class="visually-hidden calc-trigger" type="radio" name="weather" value="Harsh Sunshine" id="harsh-sunshine" />
Expand Down
14 changes: 2 additions & 12 deletions dist/index.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -775,18 +775,6 @@ <h5>OHKO Colors</h5>
<hr class="gen-specific g6 g7 g8 g9" />
<div aria-labelledby="selectWeatherInstruction" role="radiogroup">
<span class="visually-hidden" id="selectWeatherInstruction">Select the current weather condition.</span>
<div class="gen-specific g3 g4 g5 g6 g7 g8 hide" style="width: 22.2em; margin: 5px auto;" title="Select the current weather condition.">
<input class="visually-hidden calc-trigger" type="radio" name="weather" value="" id="clear" checked="checked" />
<label class="btn btn-small btn-left" for="clear">None</label>
<input class="visually-hidden calc-trigger" type="radio" name="weather" value="Sun" id="sun" />
<label class="btn btn-small btn-mid" for="sun">Sun</label>
<input class="visually-hidden calc-trigger" type="radio" name="weather" value="Rain" id="rain" />
<label class="btn btn-small btn-mid" for="rain">Rain</label>
<input class="visually-hidden calc-trigger" type="radio" name="weather" value="Sand" id="sand" />
<label class="btn btn-small btn-mid" for="sand">Sand</label>
<input class="visually-hidden calc-trigger" type="radio" name="weather" value="Hail" id="hail" />
<label class="btn btn-small btn-right" for="hail">Hail</label>
</div>
<div class="gen-specific g9" style="width: 22.2em; margin: 5px auto;" title="Select the current weather condition.">
<input class="visually-hidden calc-trigger" type="radio" name="weather" value="" id="clear" checked="checked" />
<label class="btn btn-small btn-left" for="clear">None</label>
Expand All @@ -798,6 +786,8 @@ <h5>OHKO Colors</h5>
<label class="btn btn-small btn-mid" for="sand">Sand</label>
<input class="visually-hidden calc-trigger" type="radio" name="weather" value="Snow" id="snow" />
<label class="btn btn-small btn-right" for="snow">Snow</label>
<input class="visually-hidden calc-trigger" type="radio" name="weather" value="Hail" id="hail" />
<label class="btn btn-small btn-right" for="hail">Hail</label>
</div>
<div class="gen-specific g6 g7 g8 g9" title="Select the current weather condition.">
<input class="visually-hidden calc-trigger" type="radio" name="weather" value="Harsh Sunshine" id="harsh-sunshine" />
Expand Down
14 changes: 2 additions & 12 deletions src/index.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -775,18 +775,6 @@ <h5>OHKO Colors</h5>
<hr class="gen-specific g6 g7 g8 g9" />
<div aria-labelledby="selectWeatherInstruction" role="radiogroup">
<span class="visually-hidden" id="selectWeatherInstruction">Select the current weather condition.</span>
<div class="gen-specific g3 g4 g5 g6 g7 g8 hide" style="width: 22.2em; margin: 5px auto;" title="Select the current weather condition.">
<input class="visually-hidden calc-trigger" type="radio" name="weather" value="" id="clear" checked="checked" />
<label class="btn btn-small btn-left" for="clear">None</label>
<input class="visually-hidden calc-trigger" type="radio" name="weather" value="Sun" id="sun" />
<label class="btn btn-small btn-mid" for="sun">Sun</label>
<input class="visually-hidden calc-trigger" type="radio" name="weather" value="Rain" id="rain" />
<label class="btn btn-small btn-mid" for="rain">Rain</label>
<input class="visually-hidden calc-trigger" type="radio" name="weather" value="Sand" id="sand" />
<label class="btn btn-small btn-mid" for="sand">Sand</label>
<input class="visually-hidden calc-trigger" type="radio" name="weather" value="Hail" id="hail" />
<label class="btn btn-small btn-right" for="hail">Hail</label>
</div>
<div class="gen-specific g9" style="width: 22.2em; margin: 5px auto;" title="Select the current weather condition.">
<input class="visually-hidden calc-trigger" type="radio" name="weather" value="" id="clear" checked="checked" />
<label class="btn btn-small btn-left" for="clear">None</label>
Expand All @@ -798,6 +786,8 @@ <h5>OHKO Colors</h5>
<label class="btn btn-small btn-mid" for="sand">Sand</label>
<input class="visually-hidden calc-trigger" type="radio" name="weather" value="Snow" id="snow" />
<label class="btn btn-small btn-right" for="snow">Snow</label>
<input class="visually-hidden calc-trigger" type="radio" name="weather" value="Hail" id="hail" />
<label class="btn btn-small btn-right" for="hail">Hail</label>
</div>
<div class="gen-specific g6 g7 g8 g9" title="Select the current weather condition.">
<input class="visually-hidden calc-trigger" type="radio" name="weather" value="Harsh Sunshine" id="harsh-sunshine" />
Expand Down

0 comments on commit 3ded1d6

Please sign in to comment.