style: enlarge escape key regardless of omni-presence
[sheet.git] / nethack.plp
1 <(common.inc.plp)><:
2
3 Html({
4         title => 'nethack cheat sheet',
5         version => 'v1.1',
6         description => [
7                 "Keyboard overview sheet for the Nethack console RPG game,",
8                 "describing the default controls.",
9         ],
10         keywords => [qw'
11                 nethack rogue game control controls sheet reference overview keyboard
12         '],
13         charset => $sign{charset},
14         stylesheet => [qw'light dark circus mono red terse'],
15         keys => 1,
16 });
17
18 :>
19 <h1>NetHack cheat sheet</h1>
20
21 <h2>normal gameplay</h2>
22
23 <ul id="rows">
24
25 <:
26 use Shiar_Sheet::Keyboard 2;
27 my $info = do 'nethack.eng.inc.pl' or die $@;
28 $info->{def} = do 'nethack.inc.pl';
29 my $keys = Shiar_Sheet::Keyboard->new($info);
30 $_->{"\e"} = ['me mode'] for values %{ $info->{def} };
31         # static reset button, even though it's not (officially) in the game
32 $keys->map($get{map}) or undef $get{map};
33 $keys->print_rows($get{rows} || '4321-421', [3,2,1,0]);
34 :>
35 </ul>
36
37 <hr>
38
39 <div class="help">
40         <div class="left">
41                 <dl class="legend legend-types">
42                 <dt class="pm">direction
43                         <dd>Direction to move to or target a command (<:= $sign{motion} :>).
44                 <dt class="po">move
45                         <dd>Other character movement.
46                 <dt class="co">act
47                         <dd>Direct action command: takes a turn.
48                 <dt class="mi">info
49                         <dd>Informational command: shows/does something without ending the turn.
50                 <dt class="mo">invertory
51                         <dd>Display invertory menu.
52                 <dt class="mv">menu
53                         <dd>Enters some other menu.
54                 </dl>
55         </div>
56
57         <div class="right">
58                 <dl class="legend legend-options">
59                 <dt>key<:= $sign{arg} :>
60                         <dd>Commands with a dot need at least one argument afterwards.
61                 <dt>key<:= $sign{argi} :>
62                         <dd>Asks for an inventory item.
63                 <dt>key<:= $sign{argm} :>
64                         <dd>Requires a direction afterwards.
65                 </dl>
66
67                 <ul class="legend legend-set">
68                 <li>keyboard <strong>map</strong> is
69                         <:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
70                 <li><strong>ascii</strong> mode is
71                         <:= defined $sign{-ascii} && 'forced ' :><em><:=
72                                 $sign{-ascii} ? 'on' : 'off' :></em>
73                 <li><strong>keys</strong> are
74                         <em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
75                                 !exists $get{keys} && ' by default' :>
76                 <li>default <strong>style</strong> is
77                         <:= defined $get{style} && 'set to ' :><em><:= $style :></em>
78                 </ul>
79         </div>
80 </div>
81