[% FILTER null %] [%# prints a compacted TM name %] [% MACRO tm_short_name(tm) BLOCK %] [% IF tm > 100 %]H[% tm - 100 %][% ELSE %][% tm | format('%02d') %][% END %] [% END %] [%# creates a link for a type name %] [% MACRO type_name(type, nolink) BLOCK %][% IF TypeData.$type AND NOT nolink %][% END %][% type %][% IF TypeData.$type AND NOT nolink %][% END %][% END %] [% move_header = BLOCK %] Move Type Dmg PP Power Acc.* Pri. Description [% END %] [%# creates most of the columns in the move table %] [% MACRO move_cells(move_id) BLOCK %] [% type = MoveData.$move_id.type %] [% type_bg = (type == '?????') ? 'none' : type %] [% power = MoveData.$move_id.power %] [% kind = MoveData.$move_id.kind %] [% IF power == 1 %] [% power = 'varies' %] [% ELSIF power == 0 %] [% power = '--' %] [% END %] [% MoveData.$move_id.name %] [% IF type == '?????' %] ????? [% ELSE %] [% type_name(type) %] [% END %] [% MoveData.$move_id.class %] [% MoveData.$move_id.pp %] [% power %] [% MoveData.$move_id.accuracy %]% [% MoveData.$move_id.priority || '' %] [% MoveData.$move_id.short_description %] [%+ END %] [% contest_header = BLOCK %] Move Type Appeal Jam Contest effect [% END %] [%# creates most of the columns in the move table %] [% MACRO contest_cells(move) BLOCK %] [% move_id = move.id %] [% power = MoveData.$move_id.power %] [% kind = MoveData.$move_id.kind %] [% IF power < 2 %] [% FOREACH flag IN PowerLabels %] [% IF kind.match(flag.pattern); power = flag.label; LAST; END %] [% END %] [% SET power = '?! (error!)' IF !power %] [% END %] [% MoveData.$move_id.name %] [% move.contest_type %] [% move.contest.appeal %] [% FOR x IN [ 1 .. move.contest.appeal ] %] [% this.contest.appeal %] [% END %] [% move.contest.jam %] [% FOR x IN [ 1 .. move.contest.jam ] %] [% this.contest.jam %] [% END %] [% move.contest.effect %] [%+ END %] [% pokemon_header = BLOCK %] Height Weight Type Gender Egg groups Abilities HP Atk Def SpA SpD Spd Avg [% END %] [%# same but for pokemon table; requires a full row though since we don't cache all this %] [% MACRO pokemon_cells(pokemon) BLOCK %] [% height_imperial(pokemon.height) %] [% weight_imperial(pokemon.weight) %] [% type_name(pokemon.type1) %] [% type_name(pokemon.type2) IF pokemon.type2 %] [% gender_text(pokemon.gender_rate, 1) %] [% FOREACH b IN pokemon.breeds %] [% BreedingGroups.${b.breed} %] [% '
' UNLESS loop.last %] [% END %] [% FOREACH a IN pokemon.pokemon_abilities %] [% a.ability.name %] [% '
' UNLESS loop.last %] [% END %] [% stat_avg = 0 %] [% FOREACH column IN StatColumns %] [% pokemon.$column %] [% stat_avg = stat_avg + pokemon.$column %] [% END %] [% stat_avg / 6 | format('%.01f') %] [%+ END %] [% MACRO item_sprite(item_name, big) BLOCK %] [% IF ( matches = item_name.match('^(TM|HM)(\d\d)$') ) %] [% tm_num = matches.1 %] [% SET tm_num = tm_num + 100 IF matches.0 == 'HM' %] [% item_file = matches.0 _ "-" _ MoveData.${TMs.3.$tm_num}.type | lower %] [% ELSE %] [% matches.join %] [% item_file = item_name.replace(' ', '-').replace('[^-a-zA-Z0-9]', '') | lower %] [% END -%] [%- END %] [%# n.b.: this takes the structure returned from EncSet->simplest_method %] [% MACRO simple_method_cells(simple_method) BLOCK %] [% simple_method.level.0 %][% IF simple_method.level.0 != simple_method.level.1; ' - '; simple_method.level.1; END %] [% category = simple_method.category %] [% FOR hashref IN simple_method.rarities %] [% FOR bucket IN hashref.buckets %] [% SWITCH category %] [% CASE 'time' %][% bucket | ucfirst %] [% CASE 'swarm' %]Swarm [% CASE 'water' %][% bucket %] [% CASE 'pokeradar' %]Poké Radar [% CASE 'dualslot' %][% Icons.$bucket %] [% END %] [% ' ' %] [% END %] [% hashref.rarity %]% [% '; ' UNLESS loop.last %] [% END %] [% END %] [% END %]