Changeset 193
- Timestamp:
- 06/01/07 00:15:29 (18 months ago)
- Location:
- veekun/trunk
- Files:
-
- 5 modified
-
lib/Vee/Controller/Dex/Utils.pm (modified) (1 diff)
-
site_options.yml (modified) (1 diff)
-
templates/dex/utils/iv.tt (modified) (5 diffs)
-
templates/style/dex.tt (modified) (2 diffs)
-
templates/style/global.tt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
veekun/trunk/lib/Vee/Controller/Dex/Utils.pm
r168 r193 284 284 pokemon => { type => 'text' }, 285 285 level => { type => 'text' }, 286 nature => { type => 'select', options => [ ['ignore' => 'Ignore'], map [ $_ => ucfirst $_ ], keys %Natures ], },286 nature => { type => 'select', options => [ ['ignore' => 'Ignore'], map [ $_ => ucfirst $_ ], sort keys %Natures ], }, 287 287 }; 288 288 289 for my $stat (@StatColumns) { 290 $iv_fields->{ $stat } = { type => 'text', maxlength => 3, title => "Enter your Pokemon's calculated stat.", }; 291 $iv_fields->{ $stat . '_ev' } = { type => 'text', maxlength => 3, title => "Enter your Pokemon's effort value; this is 0 if it was just caught.", }; 289 for my $s (0 .. $#StatColumns) { 290 my $stat = $StatColumns[$s]; 291 $iv_fields->{ $stat } = { type => 'text', maxlength => 3, tabindex => $s + 1, title => "Enter your Pokemon's calculated stat.", }; 292 $iv_fields->{ $stat . '_ev' } = { type => 'text', maxlength => 3, tabindex => $s + @StatColumns + 1, title => "Enter your Pokemon's effort value; this is 0 if it was just caught.", }; 292 293 } 293 294 -
veekun/trunk/site_options.yml
r140 r193 36 36 - text: Diamond and Pearl FAQ 37 37 url: /dex/dp/faq 38 - text: Stats 39 url: /dex/mechanics/stats 38 40 - text: Natures 39 41 url: /dex/mechanics/natures -
veekun/trunk/templates/dex/utils/iv.tt
r168 r193 1 <p>This is simple at the moment, just to get it out there.. since I kinda want to use it too. Better instructions for non-nerds and more functionality coming shortly.</p> 1 <h1>Calculator</h1> 2 <p>See below for instructions and hints.</p> 2 3 3 4 <form action="[% c.req.base; c.req.path %]" method="GET"> … … 18 19 <td class="vbar" rowspan="7"></td> 19 20 <th class="base">Base</td> 20 <th class="nature">Nature</td>21 21 <th class="possible-stats">Stat Range</th> 22 <td class="vbar" rowspan="7"></td> 22 23 <th class="possible-ivs">Possible IVs</th> 23 24 <th class="iv-graph">IV Graph</th> … … 26 27 [% color = 1 %] 27 28 [% FOR s IN [ 0 .. StatColumns.max ] %] 29 [% nature_class = '' %] 30 [% IF nature AND Natures.$nature %] 31 [% IF s == Natures.$nature.up %] 32 [% nature_class = ' typemod-25' %] 33 [% ELSIF s == Natures.$nature.down %] 34 [% nature_class = ' typemod-400' %] 35 [% END %] 36 [% END %] 28 37 <tr class="color[% color %]"> 29 <th class="stat-name ">[% StatNames.$s %]</th>38 <th class="stat-name[% nature_class %]">[% StatNames.$s %]</th> 30 39 <td class="stat">[% form.get_tag( StatColumns.$s ) %]</td> 31 40 <td class="stat">[% form.get_tag( "${StatColumns.$s}_ev" ) %]</td> 32 41 [% IF form.submitted %] 33 42 <td class="stat">[% pokemon.${StatColumns.$s} %]</td> 34 [% IF Natures.$nature AND s == Natures.$nature.up %] 35 <td class="nature typemod-25">+10%</td> 36 [% ELSIF Natures.$nature AND s == Natures.$nature.down %] 37 <td class="nature typemod-400">-10%</td> 38 [% ELSE %] 39 <td class="nature"></td> 40 [% END %] 41 <td class="possible-stats">[% possible_stats.$s %]</td> 43 <td class="possible-stats[% nature_class %]">[% possible_stats.$s %]</td> 42 44 [% IF iv_ranges.$s.min >= 0 %] 43 45 <td class="possible-ivs">[% iv_ranges.$s.min %][% IF iv_ranges.$s.min != iv_ranges.$s.max %] - [% iv_ranges.$s.max %][% END %]</td> … … 48 50 </td> 49 51 [% ELSE %] 50 <td colspan="2">Impossible stat</td>52 <td colspan="2">Impossible</td> 51 53 [% END %] 52 54 [% END %] … … 62 64 </form> 63 65 66 <h1>Instructions and Notes</h1> 67 <p>First of all, the calculator <em>will not work</em> if you have trained your Pokémon and not recorded its EVs. Training accumulates effort, and effort affects stats. No calculator can guess how much effort you have! Your only option at this point is to stuff your Pokémon full of EV-reducing Berries until you're sure it has none left. Read up on <a href="[% c.uri_for('/dex/mechanics/stats') %]">stat mechanics</a> for more.</p> 68 <p>If your Pokémon is very low-level and you can't get an exact figure, you have several options.</p> 69 <ul> 70 <li>The best option by far is to find a bored friend, enter a L100 wifi battle, then check the Pokémon's stats. These are the stats the Pokémon <em>would</em> have at level 100 -- complete with no EVs -- and the calculator will work fine on them.</li> 71 <li>Barring that, you can save your game, feed the Pokémon a few Rare Candies, check its stats, then reset. Rare Candy does not bestow any EVs, so it will not affect the calculations.</li> 72 <li>You may also simply train the Pokémon as usual, manually counting up the EVs it accumulates. The easiest way to do this is to give it an EXP Share (or switch it out) against a very high-level Pokémon, such as one from the Elite Four. It will most likely gain several levels but few enough EVs that they may not even affect its stats at all.</li> 73 </ul> 74 75 <h2>Columns</h2> 76 <dl class="compact"> 77 <dt>Base</dt> 78 <dd>The Pokémon's base stats, as determined by its species.</dd> 79 <dt>Stat Range</dt> 80 <dd>The range of possible stats this species of Pokémon can have at the given level with the given nature and EVs. A stat with a +10% nature boost will be highlighted green, whereas a stat with a -10% nature penalty will be highlighted red.</dd> 81 <dt>Possible IVs</st> 82 <dd>A range of possible IVs for your Pokémon; the lower the level, the more possibilities, so this range will usually be wider.</dd> 83 <dt>IV Graph</dt> 84 <dd>Visual display of the above range; the left end is 0 (red), and the right end is 31 (purple).</dd> 85 </dl> -
veekun/trunk/templates/style/dex.tt
r168 r193 118 118 .dex-pokemon { width: auto; } 119 119 120 /* generic not-100% table */ 121 .dex-squished { width: auto; } 122 120 123 /* natures table */ 121 124 .dex-natures { width: auto; } … … 155 158 table.dex-statcalc .iv-cell { height: 1em; width: 0.5em; float: left; } 156 159 160 .formula { width: 80%; text-align: center; margin: 0 auto; padding: 0.5em; font-size: 120%; font-family: monospace; border: 1px dotted [% header_border %]; background: [% tablerow_fill2 %]; } 161 .formula var { font-weight: bold; font-style: normal; padding: 0 0.25em; background: [% header_fill %]; } 162 -
veekun/trunk/templates/style/global.tt
r187 r193 12 12 img { vertical-align: middle; } 13 13 .total { clear: both; } 14 15 p, li, dd { line-height: 150%; } 14 16 15 17 .color1 { background: [% glass_background(content_fill) %]; } … … 133 135 /* def. list with terms next to defs */ 134 136 dl.compact { margin: 0.25em 0.5em; } 135 dl.compact dt { float: left; width: 10em; font-style: italic; }137 dl.compact dt { float: left; width: 9.75em; padding: 0.25em 0 0 0.25em; line-height: 150%; font-style: italic; position: relative; z-index: 2; } 136 138 dl.compact dt img { vertical-align: middle; } 137 139 dl.compact dt:after { content: ':'; } 138 140 dl.compact:after, 139 141 dl.compact dd:after { display: block; clear: left; content: 'v'; height: 1px; visibility: hidden; margin-top: -1px; } 140 dl.compact dd { margin: 0em 0 0.5em 10em; }142 dl.compact dd { padding: 0.25em 0 0.25em 10em; margin: 0; position: relative; z-index: 1; } 141 143 dl.compact dd.solo { margin-left: 2em; clear: left; } 144 dl.compact dd:hover, 145 dl.compact dt:hover + dd { background: [% glass_background(hover_verylight) %]; } 146 dl.compact dl.compact dd:hover { background: none; } 142 147 143 148 /* lists */
