Changeset 193

Show
Ignore:
Timestamp:
06/01/07 00:15:29 (18 months ago)
Author:
eevee
Message:

Wrote a page on stat mechanics.
Marginal UI improvements to IV calculator, plus instructions.

Location:
veekun/trunk
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • veekun/trunk/lib/Vee/Controller/Dex/Utils.pm

    r168 r193  
    284284    pokemon => { type => 'text' }, 
    285285    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 ], }, 
    287287}; 
    288288 
    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.", }; 
     289for 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.", }; 
    292293} 
    293294 
  • veekun/trunk/site_options.yml

    r140 r193  
    3636      - text: Diamond and Pearl FAQ 
    3737        url: /dex/dp/faq 
     38      - text: Stats 
     39        url: /dex/mechanics/stats 
    3840      - text: Natures 
    3941        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> 
    23 
    34<form action="[% c.req.base; c.req.path %]" method="GET"> 
     
    1819    <td class="vbar" rowspan="7"></td> 
    1920    <th class="base">Base</td> 
    20     <th class="nature">Nature</td> 
    2121    <th class="possible-stats">Stat Range</th> 
     22    <td class="vbar" rowspan="7"></td> 
    2223    <th class="possible-ivs">Possible IVs</th> 
    2324    <th class="iv-graph">IV Graph</th> 
     
    2627[% color = 1 %] 
    2728[% 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 %] 
    2837<tr class="color[% color %]"> 
    29     <th class="stat-name">[% StatNames.$s %]</th> 
     38    <th class="stat-name[% nature_class %]">[% StatNames.$s %]</th> 
    3039    <td class="stat">[% form.get_tag( StatColumns.$s ) %]</td> 
    3140    <td class="stat">[% form.get_tag( "${StatColumns.$s}_ev" ) %]</td> 
    3241[%     IF form.submitted %] 
    3342    <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> 
    4244    [%         IF iv_ranges.$s.min >= 0 %] 
    4345    <td class="possible-ivs">[% iv_ranges.$s.min %][% IF iv_ranges.$s.min != iv_ranges.$s.max %] - [% iv_ranges.$s.max %][% END %]</td> 
     
    4850    </td> 
    4951[%         ELSE %] 
    50     <td colspan="2">Impossible stat</td> 
     52    <td colspan="2">Impossible</td> 
    5153[%         END %] 
    5254[%     END %] 
     
    6264</form> 
    6365 
     66<h1>Instructions and Notes</h1> 
     67<p>First of all, the calculator <em>will not work</em> if you have trained your Pok&eacute;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&eacute;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&eacute;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&eacute;mon's stats.  These are the stats the Pok&eacute;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&eacute;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&eacute;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&eacute;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&eacute;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&eacute;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&eacute;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  
    118118.dex-pokemon { width: auto; } 
    119119 
     120/* generic not-100% table */ 
     121.dex-squished { width: auto; } 
     122 
    120123/* natures table */ 
    121124.dex-natures { width: auto; } 
     
    155158  table.dex-statcalc .iv-cell { height: 1em; width: 0.5em; float: left; } 
    156159 
     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  
    1212img { vertical-align: middle; } 
    1313.total { clear: both; } 
     14 
     15p, li, dd { line-height: 150%; } 
    1416 
    1517.color1 { background: [% glass_background(content_fill) %]; } 
     
    133135/* def. list with terms next to defs */ 
    134136dl.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; } 
    136138  dl.compact dt img { vertical-align: middle; } 
    137139  dl.compact dt:after { content: ':'; } 
    138140  dl.compact:after, 
    139141  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; } 
    141143  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; } 
    142147 
    143148/* lists */