śĪ‹UOż’›      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQ R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j klmnopq r s t u v w x y z { | } ~  €‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ”¢£¤„¦§Ø©Ŗ«¬­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž’      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ  ‘ ’ “ ” • – —!˜!™!š!›!œ!!ž!Ÿ! !”!¢!£!¤!„"¦"§"Ø"©"Ŗ"«"¬#­#®#Æ#°#±#²#³#“#µ#¶#·#ø#¹#ŗ#»#¼#½#¾#æ#Ą#Į#Ā#Ć#Ä#Å$Ę$Ē$Č$É$Ź$Ė$Ģ$Ķ$Ī$Ļ%Š%Ń&Ņ&Ó&Ō&Õ&Ö&×&Ų&Ł&Ś&Ū'Ü'Ż'Ž'ß'ą'į'ā'ć'ä'å'ę'ē'č'é(ź(ė(ģ(ķ(ī(ļ(š)ń)ņ)ó)ō)õ)ö)÷)ų)ł)ś)ū)ü)ż)ž)’)))))))))) ) ) ) ) ))***************** *!*"*#*$*%*&*'*(*)***+*,*-*.*/*0+1+2+3,4,5,6,7,8,9,:,;,<,=,>,?,@,A,B,C,D,E,F,G,H,I,J,K,L-M-N-O-P-Q-R-S-T-U-V-W.X.Y.Z.[.\.].^._.`.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.{.|.}/~//€//‚/ƒ/„/…/†/‡/ˆ0‰0Š0‹0Œ00Ž000‘0’0“0”0•0–0—0˜0™0š0›0œ00ž0Ÿ0 0”0¢0£0¤0„0¦0§0Ø0©0Ŗ0«0¬0­0®0Æ0°0±0²0³0“0µ0¶0·0ø0¹0ŗ0»0¼0½0¾1æ1Ą1Į1Ā2Ć3Ä3Å3Ę3Ē3Č3É3Ź3Ė3Ģ3Ķ3Ī3Ļ3Š3Ń3Ņ3Ó3Ō3Õ3Ö3×3Ų3Ł3Ś3Ū3Ü3Ż3Ž3ß3ą4į4ā4ć4ä4å4ę4ē4č4é4ź4ė4ģ5ķ5ī5ļ5š5ń5ņ5ó5ō5õ5ö5÷5ų6ł6ś6ū6ü6ż6ž6’7888888889 9 9 9 9 9999999999999999999 9!9"9#9$9%9&9'9(:):*:+:,:-;.;/;0;1;2;3;4;5;6;7;8;9;:;;;<;=;>;?;@;A<B<C<D<E<F<G<H<I<J<K<L<M<N<O<P<Q<R<S<T<U<V<W=X=Y=Z=[=\=]=^=_=`=a=b=c=d=e=f=g=h=i=j=k=l=m=n=o=p=q=r=s=t=u=v>w>x?y?z?{?|?}?~??€??‚?ƒ?„?…?†?‡?ˆ?‰?Š?‹?Œ??Ž???‘?’?“?”?•@–@—A˜B™BšCE Safe-Inferred$Queues implemented with two stacks. "Create a new empty mutable queue. Check if the queue is empty. $Remove all but the last written non-Nothing element of the queue. Try reading a queue. Return Nothing if empty. )Write to the queue. Faster than reading.      Safe-Inferred 2Text attributes: foreground and backgroud colors. foreground colour backgroud color *Colours supported by the major frontends. #4The default colours, to optimize attribute setting. $4The default colours, to optimize attribute setting. %6The default attribute, to optimize attribute setting. &BA helper for the terminal frontends that display bright via bold. 'IDue to the limitation of the curses library used in the curses frontend, # only these are legal backgrounds. (ATranslationg to heavily modified Linux console color RGB values. ›2For reference, the original Linux console colors. > Good old retro feel and more useful than xterm (e.g. brown). #  !"#$%&'(›œž  !"#$%&'("! #$&'(%  "! #$%&'(›œžNone )The type of item flavours. Ÿ0should the colour description be fancy or plain  the colour of the flavour *&Turn a colour set into a flavour set. +&Turn a colour set into a flavour set. , Colour sets. - Colour sets. . Colour sets. /#The standard full set of flavours. 0-Get the underlying base colour of a flavour. 1&Construct the full name of a flavour. ”7Human-readable names, for item colors. The simple set. ¢6Human-readable names, for item colors. The fancy set. )£Ÿ *+,-./01”¢¤ )*+,-./01 )*+,-./01 )£Ÿ *+,-./01”¢¤D Safe-Inferred „¦§Ø©Ŗ«¬­®Æ¦«¬­®Æ „¦§Ø©Ŗ«¬­®Æ Safe-Inferred2(Speed in meters per 1 million seconds (m/Ms).  Actors at normal speed (2 m/s) take one time turn (0.5 s)  to move one tile (1 m by 1 m). 3(Game time in ticks. The time dimension. 8 One tick is 1 microsecond (one millionth of a second),  one turn is 0.5 s. 46Start of the game time, or zero lenght time interval. °AThe smallest unit of time. Do not export, because the proportion . of turn to tick is an implementation detail. G The significance of this detail is only that it determines resolution  of the time dimension. 5:At least once per clip all moves are resolved and a frame  or a frame delay is generated. 1 Currently one clip is 0.1 s, but it may change, 5 and the code should not depend on this fixed value. 60One turn is 0.5 s. The code may depend on that.  Actors at normal speed (2 m/0s) take one turn to move one tile (1 m by 1 m). ±(This many turns fit in a single second. ²8This many ticks fits in a single second. Do not export, 7Time addition. 8?How many time intervals of the latter kind fits in an interval  of the former kind. 9<Negate a time interval. Can be used to subtract from a time % or to reverse the ordering on time. :Scale time by an Int scalar value. ;<Represent the main 10 thresholds of a time range by digits, + given the total length of the time range. ³$Number of seconds in a kilo-second. <%Constructor for content definitions. =Normal speed (2 m//s) that suffices to move one tile in one turn. >Scale speed by an Int scalar value. ?FThe number of time ticks it takes to walk 1 meter at the given speed. @>Distance in meters (so also in tiles, given the chess metric) 8 traveled in a given time by a body with a given speed. A5Calculate projectile speed from item weight in grams  and speed bonus in percents.  See  ;https://github.com/kosmikus/LambdaHack/wiki/Item-statistics. BBCalculate maximum range in meters of a projectile from its speed.  See  ;https://github.com/kosmikus/LambdaHack/wiki/Item-statistics. B With this formula, each projectile flies for exactly one second, 0 that is 2 turns, and then drops to the ground. < Dividing and multiplying by 2 ensures both turns of flight  cover the same distance. 2“3µ4°56±²789:;³<=>?@AB¶·23456789:;<=>?@AB3456789:;2<=>?@AB2“3µ4°56±²789:;³<=>?@AB¶·NoneC6For each group that the kind belongs to, denoted by a Text name H in the first component of a pair, the second component of a pair shows * how common the kind is within the group. DALevel bounds. TODO: query terminal size instead and scroll view. EInteger division, rounding up. F breturn b a = [a | b]CDEFCDEFDECFCDEFNone G@Faction properties that are fixed for a given kind of factions. I a symbol Jshort description Kfrequency within groups L!Ai to use for the selected actor MAi to use for idle actors N%initially in war with these factions O%initially allied with these factions PDNo specific possible problems for the content of this kind, so far, N so the validation function always returns the empty list of offending kinds. GHIJKLMNOP GHIJKLMNOP GHIJKLMNOPGHIJKLMNOP NoneQAThe general type of a particular game content, e.g., item kinds. S"symbol, e.g., to print on the map T"name, e.g., to show to the player Ufrequency within groups V*validate and catch some offenders, if any W%all the defined content of this type QRSTUVWQRSTUVWQRSTUVWQRSTUVW NoneX*The choice of a fence type for the place. Y2skip the fence and fill all with the place proper Z,leave an empty floor space around the place [(put a solid wall fence around the place \CA method of filling the whole area by transforming a given corner. ]8tile separately and symmetrically quarters of the place ^7fill symmetrically 4 corners and stretch their borders _9reflect every other corner, overlapping 1 row and column `EParameters for the generation of small areas within a dungeon level. b a symbol cshort description dfrequency within groups e,how to fill whole place based on the corner f-whether to fence the place with solid border g)plan of the top-left corner of the place hIFilter a list of kinds, passing through only the incorrect ones, if any. BVerify that the top-left corner map is rectangular and not empty. XYZ[\]^_`abcdefghXYZ[\]^_`abcdefgh`abcdefg\_^]X[ZYhX[ZY\_^]`abcdefgh Noneø#Serialize, compress and save data. 8 Note that LBS.writeFile opens the file in binary mode. i6Serialize, compress and save data with an EOF marker.  The OK? is used as an EOF marker to ensure any apparent problems with 0 corrupted files are reported to the user ASAP. ¹)Read and decompress the serialized data. ŗ'Read, decompress and deserialize data. j:Read, decompress and deserialize data with an EOF marker.  The OK: EOF marker ensures any easily detectable file corruption 9 is discovered and reported before the function returns. øi¹ŗjijijøi¹ŗjNonekBIf the condition fails, display the value blamed for the failure.  Used as in $ assert (c /= 0 `blame` c) $ 10 / c lLike »), but shows the source location and also 7 the value to blame for the failure. To be used as in: D assert `failure` ((x1, y1), (x2, y2), "designate a vertical line") mLike EF:, but if the predicate fails, blame all the list elements < and especially those for which it fails. To be used as in: / assert (allB (>= 0) [yf, xf, y1, x1, y2, x2]) nICheck that the value returned from a monad action satisfies a predicate. < Reports source location and the suspects. Drops the value. oLVerifies that the returned value is true (respectively, false). Used as in: K open newValve >>= assert `trueM` (newValve, "is already opened, not new") pLVerifies that the returned value is true (respectively, false). Used as in: K open newValve >>= assert `trueM` (newValve, "is already opened, not new") klmnopklmnopklmnopklmnop Noneq'2D points in cartesian representation. s*Spacial dimension for points and vectors. t*Spacial dimension for points and vectors. uHA list of all points on a straight vertical or straight horizontal line 3 between two points. Fails if no such line exists. vESort the sequence of two points, in the derived lexicographic order. ¼See  Bhttp://roguebasin.roguelikedevelopment.org/index.php/Digital_lines. w Bresenham'3s line algorithm generalized to arbitrary starting eps  (eps? value of 0 gives the standard BLA). Includes the source point 0 and goes through the target point to infinity. qrstu½v¼w¾qrstuvwtsqruvw qrstu½v¼w¾ Nonex(2D vectors in cartesian representation. zShift a point by a vector. {4Vectors of all unit moves in the chessboard metric, ! clockwise, starting north-west. |IVectors of all cardinal direction unit moves, clockwise, starting north. }1The lenght of a vector in the chessboard metric,  where diagonal moves cost 1. ~&Squared euclidean length of a vector. Reverse an arbirary vector. xyz{|}~xyz{|}~xyz{|}~xyz{|}~None €=The type of areas. The bottom left and the top right points. >All (8 at most) closest neighbours of a point within an area. ‚IAll (4 at most) cardinal direction neighbours of a point within an area. ƒ(Checks that a point belongs to an area. „HSort the corners of an area so that the bottom left is the first point. …GDivide uniformly a larger area into the given number of smaller areas. † Checks if it'#s an area with at least one field. ‡ Checks if it'"s an area with exactly one field. ˆEEnlarge (or shrink) the given area on all fours sides by the amount. €limit the search to this area location to find neighbours of ‚limit the search to this area location to find neighbours of ƒ„…†‡ˆ €‚ƒ„…†‡ˆ €‚ƒ„…†‡ˆ €‚ƒ„…†‡ˆNone ‰1The area left to be scanned, delimited by edges. Š1An edge (comprising of a line and a convex hull)  of the area to be scanned. ‹-Convex hull represented as a list of points. ŒStraight line between points. HRotated and translated coordinates of 2D points, so that the points fit M in a single quadrant area (e, g., quadrant I for Permissive FOV, hence both E coordinates positive; adjacent diagonal halves of quadrant I and II % for Digital FOV, hence y positive). E The special coordinates are written using the standard mathematical < coordinate setup, where quadrant I, with x and y positive,  is on the upper right. <Progress along an arc with a constant distance from (0, 0). 5Distance from the (0, 0) point where FOV originates. ‘EMaximal element of a non-empty list. Prefers elements from the rear, : which is essential for PFOV, to avoid ill-defined lines. ’CCheck if the line from the second point to the first is more steep B than the line from the third point to the first. This is related C to the formal notion of gradient (or angle), but hacked wrt signs L to work fast in this particular setup. Returns True for ill-defined lines. “IExtends a convex hull of bumps with a new bump. Nothing needs to be done E if the new bump already lies within the hull. The first argument is  typically ’6, optionally negated, applied to the second argument. ‰Š‹ŒŽ‘’“a comparison function a new bump to consider -a convex hull of bumps represented as a list ‰Š‹ŒŽ‘’“ ŽŒ‹Š‰‘’“ ‰Š‹ŒŽ‘’“None”!Calculates the list of tiles, in Bump# coordinates, visible from (0, 0),  within the given sight range. •=Create a line from two points. Debug: check if well-defined. –Compare steepness of (p1, f) and (p2, f). C Debug: Verify that the results of 2 independent checks are equal. —DThe X coordinate, represented as a fraction, of the intersection of @ a given line and the line of diagonals of diamonds at distance  d from (0, 0). ˜Debug functions for DFOV: FDebug: calculate steeper for DFOV in another way and compare results. ™6Debug: check is a view border line for DFOV is legal. ”visiblity radius clear tile predicate •–—˜™”•–—˜™”•–—˜™”•–—˜™Noneš!Calculates the list of tiles, in Bump# coordinates, visible from (0, 0). ›=Create a line from two points. Debug: check if well-defined. œCompare steepness of (p1, f) and (p2, f). C Debug: Verify that the results of 2 independent checks are equal. DThe Y coordinate, represented as a fraction, of the intersection of ? a given line and the line of diagonals of squares at distance  d from (0, 0). žDebug functions for PFOV: FDebug: calculate steeper for PFOV in another way and compare results. Ÿ,Debug: checks postconditions of borderLine. šclear tile predicate ›œžŸš›œžŸš›œžŸš›œžŸNone IThe area left to be scanned, delimited by fractions of the original arc.  Interval (0, 1)8 means the whole 45 degrees arc of the processed octant  is to be scanned. ”BRotated and translated coordinates of 2D points, so that they fit ! in the same single octant area. ¢!Calculates the list of tiles, in SBump# coordinates, visible from (0, 0).  ”¢clear tile predicate !the current distance from (0, 0) the current interval to scan æĄ ”¢” ¢ ”¢æĄNone£IA screenful of text lines. When displayed, they are trimmed, not wrapped < and any lines below the lower screen edge are not visible. ¤The history of reports. „=The type of a set of messages to show at the screen at once. ¦The type of a single message. §BRe-exported English phrase creation functions, applied to default  irregular word sets. ØBRe-exported English phrase creation functions, applied to default  irregular word sets. ©The "press something to see more" mark. Ŗ"The confirmation request message. «IAdd spaces at the message end, for display overlayed over the level map. - Also trims (does not wrap!) too long lines. ¬Empty set of messages. ­&Test if the set of messages is empty. ®'Construct a singleton set of messages. Æ"Add message to the end of report. °3Split a messages into chunks that fit in one line. G We assume the width of the messages line is the same as of level map. ±2Render a report as a (possibly very long) string. ĮCSplit a string into lines. Avoids ending the line with a character D other than whitespace or punctuation. Space characters are removed 2 from hte start, but never from the end of lines. ²Empty history of reports. ³*Construct a singleton history of reports. “=Render history as many lines of text, wrapping if necessary. µ/Add a report to history, handling repetitions. ¶1Take the given prefix of reports from a history. ·7Split an overlay into overlays that fit on the screen. ø7Returns a function that looks up the characters in the D string by location. Takes the width and height of the display plus F the string. Returns also the message to print at the top and bottom. £¤Ā„Ʀ§Ø©Ŗ«¬­®Æ°±ÄĮŲ³“µ¶·øĘĒČ£¤„¦§Ø©Ŗ«¬­®Æ°±²³“µ¶·ø§Ø¦©Ŗ«„¬­®Æ°±¤²³µ“¶£·ø£¤Ā„Ʀ§Ø©Ŗ«¬­®Æ°±ÄĮŲ³“µ¶·øĘĒČNone ¹>The type of locations on the 2D level map, heavily optimized. DWe represent the (level map on the) screen as a linear framebuffer,  where Point is an Int% offset counted from the first cell. ? We do bounds check for the X size whenever we convert between % representations and each subsequent > array access performs another check, effectively for Y size. # After dungeon is generated (using PointXY, not Point),  and converted to the Point! representation, points are used K mainly as keys and not constructed often, so the performance will improve ' due to smaller save files, the use of IntMap and cheaper array indexing, " including cheaper bounds checks.  We don' t define Point# as a newtype to avoid the trouble  with using EnumMap in place of IntMap, etc. ŗ3Print a point as a tuple of cartesian coordinates. »)Conversion from cartesian coordinates to Point. ÉConversion from Point to cartesian coordinates. ¼+The top-left corner location of the level. ½:The distance between two points in the chessboard metric. ¾2Checks whether two points are adjacent on the map + (horizontally, vertically or diagonally). æCReturns the 8, or less, surrounding locations of a given location. ĄEReturns the 4, or less, surrounding locations in cardinal directions  from a given location. Į(Checks that a point belongs to an area. Ā>Calculate the displacement vector from a location to another. Ć Bresenham'3s line algorithm generalized to arbitrary starting eps  (eps% value of 0 gives the standard BLA). : Skips the source point and goes through the second point ! to the edge of the level. GIves Nothing if the points are equal. ¹ŗ»ɼ½¾æĄĮĀĆ ¹ŗ»¼½¾æĄĮĀĆ ¹»ŗ¼½¾æĄĮĀĆ ¹ŗ»ɼ½¾æĄĮĀĆNone Ä?Animation is a list of frame modifications to play one by one, G where each modification if a map from locations to level map symbols. Å7The data sufficent to draw a single game screen frame. Ē$content of the screen, line by line Č!an extra line to show at the top É$an extra line to show at the bottom Ź,Render animations on top of a screen frame. ĖHAttack animation. A part of it also reused for self-damage and healing. Ģ"Attack that hits through a block. ĶAttack that is blocked. Ī%Death animation for an organic body. Ļ2Swap-places animation, both hostile and friendly. ÄŹÅĘĒČÉŹĖĢĶĖĢĶĪĻĪ %ÄÅĘĒČÉŹĖĢĶĪĻ% ÅĘĒČÉÄŹĖĢĶĪĻ ÄŹÅĘĒČÉŹĖĢĶĖĢĶĪĻĪNoneŠ=2D vectors represented as offsets in the linear framebuffer  indexed by ¹. 5A newtype is used to prevent mixing up the type with Point itself. I Note that the offset representations of a vector is usually not unique. H E.g., for vectors of length 1 in the chessboard metric, used to denote D geographical directions, the representations are pairwise distinct ; if and only if the level width and height are at least 3. Ń3Converts a vector in cartesian representation into Vector. Ņ9Tells if a vector has length 1 in the chessboard metric. Ļ8Converts a unit vector in cartesian representation into Vector. Š4Converts a unit vector in the offset representation 9 into the cartesian representation. Arbitrary vectors can't be  converted uniquely. ÓTranslate a point by a vector. JParticularly simple and fast implementation in the linear representation. ŌGTranslate a point by a vector, but only if the result fits in an area. Õ;Vectors of all unit moves, clockwise, starting north-west. Ö;Vectors of all unit moves, clockwise, starting north-west,  parameterized by level width. ×5Squared euclidean distance between two unit vectors. Ų6Checks whether a unit vector is a diagonal direction,  as opposed to cardinal. ŁReverse an arbirary vector. ŃCGiven a vector of arbitrary non-zero length, produce a unit vector ? that points in the same direction (in the chessboard metric). H Of several equally good directions it picks one of those that visually E (in the euclidean metric) maximally align with the original vector. ŚFGiven two distinct locations, determine the direction (a unit vector) @ in which one should move from the first in order to get closer F to the second. Ignores obstacles. Of several equally good directions @ (in the chessboard metric) it picks one of those that visually C (in the euclidean metric) maximally align with the vector between  the two points.. Ū*A vector from a point to another. We have  - shift loc1 (displacement loc1 loc2) == loc2 JParticularly simple and fast implementation in the linear representation. Ü,A list of vectors between a list of points. Ż2A list of points that a list of vectors leads to. ŠŅŃÓŅĻŠÓŌÕÖ×ŲŁŃŚŪÜŻŌŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŠŃÓŌÕÖŅ×ŲŁŚŪÜŻŠŅŃÓŅĻŠÓŌÕÖ×ŲŁŃŚŪÜŻŌNone Ž+Our own encoding of modifiers. Incomplete. į1Frontend-independent datatype to represent keys. ā,an unknown key, registered to warn the user ća single printable character ä4a keypad key for a character (digits and operators) ó$Show a key with a modifier, if any. õ3Configurable event handler for the direction keys. 0 Used for directed commands such as close door. ö'Binding of both sets of movement keys. ÷FTranslate key from a GTK string description to our internal key type. @ To be used, in particular, for the command bindings and macros  in the config file. %ŽßąįāćäåęēčéźėģķīļšńņÕóÖ×ŲōŁŚŪÜŻõö÷ŽßŽßąįāćäåęēčéźėģķīļšńņóōõö÷įņńšļīķģėźéčēęåäćāõōö÷ŽąßóŽąßįņńšļīķģėźéčēęåäćāÕóÖ×ŲōŁŚŪÜŻõö÷ŽßNoneų,Fully typed contents of the UI config file. /Fully typed contents of the rules config file. Field Of View scanning mode. )only feeling out adjacent tiles by touch "digital FOV with the given radius permissive FOV restrictive shadow casting !ųłśūüżž’     ąįāųłśūüżž’          ųłśūüżž’ų łśūüżž’      ąįāGNone9No session data needs to be maintained by this frontend. The name of the frontend. BStarts the main program loop using the frontend input and output. 'Output to the screen via the frontend. Input key via the frontend. $Display a prompt, wait for any key. frontend session data the screen frame to draw ććNoneNone !The frequency distribution type. "short description for debug, etc. #give acces to raw frequency values )Uniform discrete frequency distribution.  1Takes a name and a list of frequencies and items " into the frequency distribution. !,Scale frequecy distribution, multiplying it ! by a positive integer constant. ")Change the description of the frequency. #7Randomly choose an item according to the distribution. $-Test if the frequency distribution is empty. ä !"#$åęē  !"#$  !"#$ ä !"#$åęēNone%Fractional chance. &5Dice for parameters scaled with current level depth. C To the result of rolling the first set of dice we add the second, I scaled in proportion to current depth divided by maximal dungeon depth. '=Dice for rolling a pair of integer parameters pertaining to, 5 respectively, the X and Y cartesian 2D coordinates. )Dice: 1d7, 3d3, 1d0, etc.   RollDice a b represents a rolls of b -sided die. +7The monad of computations with random generator state. ,@Get a random object within a range with a uniform distribution. -2Get any element of a list with equal probability. .6Gen an element according to a frequency distribution. /Roll a single die. 0Roll dice and sum the results. 1Maximal value of dice. 2Minimal value of dice. 3Mean value of dice. 4Roll the two sets of dice. 5+Roll dice scaled with current level depth. C Note that at the first level, the scaled dice are always ignored. 65Roll dice scaled with current level depth and return True $ if the results if greater than 50. 7 Generate a RollDeep' that always gives a constant integer. 8Maximal value of scaled dice. 9Give True/, with probability determined by the fraction. %&'()*+,-./0123456789čé%&'()*+,-./0123456789+,-./)*0123'(4&5678%9%&'()*+,-./0123456789čéNone:>All possible effects, some of them parameterized or dependent , on outside coefficients, e.g., item power. FLSuffix to append to a basic content name, if the content causes the effect. GJHow much AI benefits from applying the effect. Multipllied by item power. H Negative means harm to the enemy when thrown at him. Effects with zero  benefit won'0t ever be used, neither actively nor passively. :;<=>?@ABCDEFG:;<=>?@ABCDEFG:EDCBA@?>=<;FG: EDCBA@?>=<;FGNoneHLAll possible terrain tile features, some of them parameterized or dependent ; on outside coefficients, e.g., on the tile secrecy value. I4discovering the secret will require this many turns J,used for visible paths throughout the level K$is a (not hidden) door, stair, etc. L(items and stairs can be generated there M'sustains the effect continuously, TODO Nis lit with an ambient shine Oactors can see through Pactors can walk through Q4transitions to any tile of the group when triggered R!causes the effect when triggered Striggered when the tile's secrecy becomes zero Ttriggered by closing Utriggered by opening Vtriggered by descending Wtriggered by ascending HIJKLMNOPQRSTUVWHIJKLMNOPQRSTUVWHWVUTSRQPONMLKJIHWVUTSRQPONMLKJINoneX(The type of kinds of terrain tiles. See Tile.hs for explanation ( of the absence of a corresponding type Tile that would hold + particular concrete tiles in the dungeon. Z map symbol [short description \frequency within groups ] map color ^map color when not in FOV _ properties `IFilter a list of kinds, passing through only the incorrect ones, if any. LIf tiles look the same on the map, the description should be the same, too. J Otherwise, the player has to inspect manually all the tiles of that kind 8 to see if any is special. This is a part of a stronger < but less precise property that tiles that look the same can't be = distinguished by player actions (but may behave differently 0 wrt dungeon generation, AI preferences, etc.). XYZ[\]^_` XYZ[\]^_` XYZ[\]^_`XYZ[\]^_`Nonea3The type of game rule sets and assorted game data. @For now the rules are immutable througout the game, so there is  no type Rule' to hold any changing parameters, just RuleKind  for the fixed set. F However, in the future, if the rules can get changed during gameplay B based on data mining of player behaviour, we may add such a type  and then RuleKind3 will become just a starting template, analogously  as for the other content. The  raccessible$ field holds a predicate that tells 2 whether one location is accessible from another. 9 Precondition: the two locations are next to each other. c a symbol dshort description efrequency within groups gthe title of the game hthe path to data files ithe version of the game jsymbols of melee weapons k symbols of items AI can project l#the default game rules config file m$the default UI settings config file n the ASCII art for the Main Menu o'Validates the ASCII art format (TODO). źA dummy instance of the ė' class, to satisfy general requirments  about content. We won'2t have many rule sets and they contain functions, 1 so defining a proper instance is not practical. abcdefghijklmnoźabcdefghijklmnoabcdefghijklmnoa bcdefghijklmnoźNonepIAbstract syntax of player commands. The type is abstract, but the values I are created outside this module via the Read class (from config file) . Œ7Major commands land on the first page of command help. @Time cosuming commands are marked as such in help and cannot be C invoked in targeting mode on a remote level (level different than " the level of the selected hero). Ž Description of player commands. pqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽpqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ'pˆ‡…„ƒ‚€~}|{zyxwvutsrq‰Š‹‰Š‹‰Š†‰Š†ŒŽp#ˆ‡…„ƒ‚€~}|{zyxwvutsrq‰Š‹‰Š‹‰Š†‰Š†ŒŽ None6Bindings and other information about player commands. ‘binding keys to commands ’ macro map “!major, most often used, commands ”&direction keys for moving and running •!map from cmds to their main keys –5Produce a set of help screens from the key bindings. ‘’“”•ģ–‘’“”•–‘’“”•–‘’“”•ģ–!None —:Item properties that are fixed for a given kind of items. ™ map symbol š generic name ›frequency within groups œpossible flavours the effect when activated žcreated in that quantify Ÿcreated with that power  *the verb for applying and possibly combat ”the verb for projecting ¢weight in grams £)percentage bonus or malus to throw speed ¤DNo specific possible problems for the content of this kind, so far, N so the validation function always returns the empty list of offending kinds. —˜™š›œžŸ ”¢£¤—˜™š›œžŸ ”¢£¤—˜™š›œžŸ ”¢£¤— ˜™š›œžŸ ”¢£¤"None „5The coordinates of consecutive fields of a corridor. ķ3The choice of horizontal and vertical orientation. ¦$Pick a random point within an area. §4Create a random room according to given parameters. Ø/Create a void room, i.e., a single point area. ©HPick a subset of connections between adjacent areas within a grid until B there is only one connected component in the graph of all areas. ŖFPick a single random connection between adjacent areas within a grid. ī7Create a corridor, either horizontal or vertical, with A a possible intermediate part that is in the opposite direction. «+Try to connect two places with a corridor. H Choose entrances at least 4 tiles distant from the edges, if possible. „ķļš¦§ minimum size )the containing area, not the room itself Ø$the area in which to pick the point ©ńŖī$orientation of the starting section starting point  ending point +the area containing the intermediate point "straight sections of the corridor «„¦§Ø©Ŗ«¦§Ø©Ŗ„« „ķšļ¦§Ø©ńŖī«#None¬1Parameters for the generation of dungeon levels. ® a symbol Æshort description °frequency within groups ±X size of the whole cave ²Y size of the whole cave ³%the dimensions of the grid of places “minimal size of places µthe chance a place is dark ¶"a proportion of extra connections ·#the chance of not creating a place ø%extra places, may overlap except two ¹ minimal distance between stairs ŗ#the chance of a door in an opening »if there's a door, is it open? ¼if not open, is it hidden? ½ the number of items in the cave ¾!the default cave tile group name æ"the cave corridor tile group name Ąthe filler wall group name Į'the dark place plan legend ground name Ā&the lit place plan legend ground name Ćthe hidden tiles ground name ÄIFilter a list of kinds, passing through only the incorrect ones, if any. ECatch caves with not enough space for all the places. Check the size ; of the cave descriptions to make sure they fit on screen. ¬­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆĬ­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆĬ­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆĬ­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄ$None Å7A strategy is a choice of (non-empty) frequency tables  of possible actions. ĒFStrategy where only the actions from the given single frequency table  can be picked. Č9Strategy with the actions from both argument strategies,  with original frequencies. É!Strategy with no actions at all. Ź!Conditionally accepted strategy. Ė@Strategy with all actions not satisfying the predicate removed. F The remaining actions keep their original relative frequency values. Ģ7When better choices are towards the start of the list, - this is the best frequency of the strategy. ĶBOverwrite the description of all frequencies within the strategy. ĪLike ņ+, but pick a name of the single frequency. óEStrategy is a monad. TODO: Can we write this as a monad transformer? ÅōõöĘĒČÉŹĖĢĶĪ÷ó ÅĘĒČÉŹĖĢĶĪ ÅĘĒČÉŹĖĢĶĪ ÅōõöĘĒČÉŹĖĢĶĪ÷ó%NoneĻPush a frame or a single frame'%s worth of delay to the frame queue. ŠCDisplay a prompt, wait for any of the specified keys (for any key, > if the list is empty). Repeat if an unexpected key received. ĻŠĻŠĻŠĻŠ& Safe-Inferred ŃIAll possible AI actor abilities. AI chooses among these when considering J the next action to perform. The ability descriptions refer to the target 7 that any actor picks each turn, depending on the actor's characteristics  and his environment. Ņ1wander around, meleeing any opponents on the way Ó1chase the target, ignoring any actors on the way Ō8use items, if target opponent visible, some of the time Õ>attack the visible target opponent at range, some of the time Ö!gather items, if no foes visible × melee target Ųflee if almost dead Łheal if almost dead Ś6move along a set path, if any, meleeing any opponents ŃŅÓŌÕÖ×ŲŁŚ ŃŅÓŌÕÖ×ŲŁŚ ŃŚŁŲ×ÖÕŌÓŅŃ ŚŁŲ×ÖÕŌÓŅ'None Ū<Actor properties that are fixed for a given kind of actors. Ż map symbol Žshort description ßfrequency within groups ą map color įnatural speed in m/s āencodes initial and maximal hp ć can it see? äcan it smell? å intelligence ę#number of turns to regenerate 1 HP ēthe set of supported abilities čIFilter a list of kinds, passing through only the incorrect ones, if any. :Make sure actor kinds can be told apart on the level map. ŪÜŻŽßąįāćäåęēčŪÜŻŽßąįāćäåęēčŪÜŻŽßąįāćäåęēčŪ ÜŻŽßąįāćäåęēč(NoneéCStrategy properties that are fixed for a given kind of strategies. ė a symbol ģshort description ķfrequency within groups ī-abilities to pick from in roughly that order ļDNo specific possible problems for the content of this kind, so far, N so the validation function always returns the empty list of offending kinds. éźėģķīļéźėģķīļéźėģķīļéźėģķīļ)Noneš;Arrays of content identifiers pointing to the content type c, * where the identifiers are represented as Word8  (and so content of type c! can have at most 256 elements).  The arrays are indexed by type i!, e.g., a dungeon tile location. ń5Operations for all content types, gathered together. ū+Content operations for the content of type a. ż&the symbol of a content element at id ž$the name of a content element at id ’ the content element at given id the id of the unique member of  a singleton content group &pick a random id belonging to a group  and satisfying a predicate "fold over all content elements of a !bounds of identifiers of content a auxiliary speedup components :Type family for auxiliary data structures for speeding up  content operations. )Content identifiers for the content type c. #Create content operations for type a from definition of content  of type a. 0The standard ruleset used for level operations.  "Content identifiers array lookup.  IConstruct a content identifiers array updated with the association list.  <Create a content identifiers array from a list of elements.  =Create a content identifiers array from an association list.  "Content identifiers array bounds. "Fold left strictly over an array. $šųńņóōõö÷ųłśūüżž’ł     śūü"šńņóōõö÷ųłśūüżž’żž’     ūüżž’ńņóōõö÷ųłśš     šųń ņóōõö÷ųłśū üżž’ł     śūü*None!The type of na actor target. /target current position of the cursor; default /target the list of locations one after another target a given location ,target an actor with its last seen location .A unique identifier of an actor in a dungeon. 8Actor properties that are changing throughout the game. ( If they are dublets of properties from  ActorKind, ; they are usually modified temporarily, but tend to return  to the original value from  ActorKind over time. E.g., HP. the kind of the actor individual map symbol individual name individual map color individual speed current hit points "direction and distance of running !target for ranged attacks and AI current location  next inventory letter !absolute time of next action ""last bracing expires at this time ##to which faction the actor belongs $"is a projectile? (shorthand only, # ^ this can be deduced from bkind) %=Find a hero name in the config file, or create a stock name. &AChance that a new monster is generated. Currently depends on the F number of monsters already present, and on the level. In the future, H the strength of the character and the strength of the monsters present F could further influence the chance, and the chance could also affect G which monster is generated. How many and which monsters are generated < will also depend on the cave kind used to build the level. ')The part of speech describing the actor. (IA template for a new non-projectile actor. The initial target is invalid  to force a reset ASAP. )*Increment current hit points of an actor. *5Access actor speed, individual or, otherwise, stock. +,Add time taken by a single step at the actor's current speed. ,1Whether an actor is braced for combat this turn. -1Checks for the presence of actors in a location. ) Does not check if the tile is walkable. .The unique kind of heroes. / The unique kind of projectiles. ;An invalid target, with an actor that is not on any level. $ !"#$%&'()*+,-./! !"#$%&'()*+,-./!%&' !"#$()+,-./* !"#$%&'()*+,-./+None )The content of the configuration file. It' s parsed < in a case sensitive way (unlike by default in ConfigFile). 8Read a player configuration file and use it to override 0 options from a default config. Currently we can't unset options, 7 only override. The default config, passed in argument  configDefault, I is expected to come from a default configuration file included via CPP. * The player configuration comes from file cfile. FPersonal data directory for the game. Depends on the OS and the game, $ e.g., for LambdaHack under Linux it's ~/ .LambdaHack/. 0+Dumps the current configuration to a file. KSimplified setting of an option in a given section. Overwriting forbidden. ,Gets a random generator from the config or, ? if not present, generates one and updates the config with it. ;Switches all names to case sensitive (unlike by default in  the  ConfigFile( library) and wraps in the constructor.  "In case of corruption, just fail.  5A simplified access to an option in a given section, I with simple error reporting (no internal errors are caught nor hidden). , If there is no such option, gives Nothing.  3Simplified access to an option in a given section. % Fails if the option is not present.  JAn association list corresponding to a section. Fails if no such section. 1FRead and parse rules config file and supplement it with random seeds. 2Read and parse UI config file.  0config name of the generator     12012120 0    12,None3)Flavours assigned to items in this game. 4&The type of already discovered items. 58Game items in inventories or strewn around the dungeon. 7kind of the item 8power of the item 9inventory symbol :inventory count ;Generate an item. <Represent an item on the map. =0Price an item, taking count into consideration. ?Assigns flavours to item kinds. Assures no flavor is repeated, 3 except for items with only one permitted flavour. >;Randomly chooses flavour for all item kinds for this game. @+Assigns a letter to an item, for inclusion 0 in the inventory of a hero. Takes a remembered  letter and a starting letter. E6Adds an item to a list of items, joining equal items.  Also returns the joined item. &Removes an item from a list of items. I Takes an equality function (i.e., by letter or ny kind) as an argument. "Finds an item in a list of items. #3456789:;<=>?@ABCDEFGHIJK3456789:;<=>?@ABCDEFGHIJK56789:;<=IJKEHFG@DABC3?>43456789:;<=>?@ABCDEFGHIJK-None L>The last time a hero left a smell in a given tile. To be used ! by monsters that hunt by smell. M5The time interval needed to discover a given secret, 3 e.g., a hidden terrain tile, e.g., a hidden door. N+Whether a tile kind has the given feature. O6Whether a tile kind has all features of the first set  and no features of the second. PAWhether a tile kind (specified by its id) has the given feature. Q&Whether a tile does not block vision.  Essential for efficiency of FOV, hence tabulated. R"Whether a tile is lit on its own.  Essential for efficiency of  Perception, hence tabulated. S=Whether a tile can be explored, possibly yielding a treasure ; or a hidden message. We exclude doors and hidden features 8 (TODO: and features created by actors, e.g., dug out). TThe player can' t tell one tile from the other. UThe player can'%t tell if the tile is hidden or not. LMNOPQRSTUV LMNOPQRSTUV MLNOPQRSTUV LMNOPQRSTUV.None%W#A single, inhabited dungeon level. Yall actors on the level Zitems belonging to actors [width of the level \height of the level ]smells ^secrecy values _items on the ground ` map tiles aremembered map tiles b!level description for the player c'debug information from cave generation d%destination of the (up, down) stairs e'date of the last activity on the level ftotal number of clear tiles g#number of clear tiles already seen hTile kinds on the map. i/Actual and remembered item lists on map tiles. j$Current secrecy value on map tiles. kCurrent smell on map tiles. l6Items carried by actors, indexed by actor identifier. m6All actors on the level, indexed by actor identifier. n"Update the hero and monster maps. o.Update the hero items and monster items maps. pUpdate the smell map. q$Update the items on the ground map. r*Update the tile and remembered tile maps. s*Update the tile and remembered tile maps. t8Place all items on the list at a location on the level. u7Query for actual and remembered tile kinds on the map. v7Query for actual and remembered tile kinds on the map. w5Query for actual and remembered items on the ground. x5Query for actual and remembered items on the ground. y7Check whether one location is accessible from another, . using the formula from the standard ruleset. zACheck whether the location contains a door of secrecy lower than k ; and that can be opened according to the standard ruleset. {:Find a random location on the map satisfying a predicate. |4Try to find a random location on the map satisfying , the conjunction of the list of predicates. 4 If the premitted number of attempts is not enough, A try again the same number of times without the first predicate, E then without the first two, etc., until only one predicate remains, . at which point try as many times, as needed. 'WXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|the number of tries look up in this map predicates to satisfy &WXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|&mlkjihWXYZ[\]^_`abcdefgnopqrstuvwxyz{|WXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|/None }:The complete dungeon is a map from level names to levels. ~3Level ids are, for now, ordered linearly by depth. Depth of a level. €!Default level for a given depth. :Create a dungeon from a list of levels and maximum depth. ' The depth is only a danger indicator; * there may potentially be multiple levels  with the same depth. ‚/Association list corresponding to the dungeon. = Starts at the supplied level id (usually the current level) < to try to speed up the searches and keep the dungeon lazy. ƒ Adjust the level at a given id. „ Adjust the level at a given id. … Find a level with the given id. †*Try to look up a level with the given id. ‡Maximum depth of the dungeon. }~ €‚ƒ„…†‡!" }~€‚ƒ„…†‡ ~€}‚ƒ„…†‡ }~ €‚ƒ„…†‡!"0None*ŒCurrent result of the game. 'the player quits and starts a new game Žthe player won game is supended ,the player lost the game on the given level ‘%Current targeting cursor parameters. “targeting mode ” cursor level •cursor coordinates –$the level current player resides on —$a parameter of the tgt digital line ˜&Current targeting mode of the player. ™8the mode was entered (and will be exited) automatically š/the player requested targeting mode explicitly ›not in targeting mode œ;The state of a single game that can be saved and restored.  It'?s completely disregarded and reset when a new game is started. @ In practice, we maintain some extra state (DungeonPerception),  but it'Cs only temporary, existing for a single turn and then invalidated. ž'represents the player-controlled actor Ÿ'cursor location and level to return to   association of flavour to items ”(items (kinds) that have been discovered ¢all dungeon levels £ identifier of the current level ¤stores next actor index „current random generator ¦ this game'!s config (including initial RNG) §)last command unexpectedly took some time Øcause of game end/exit © our faction Ŗdebugging mode «9The diary contains all the player data that carries over @ from game to game, even across playing sessions. That includes < the last message, previous messages and otherwise recorded J history of past games. This can be extended with other data and used for G calculating player achievements, unlocking advanced game features and D for general data mining, e.g., augmenting AI or procedural content  generation. Æ)Get current level from the dungeon data. °(Get current time from the dungeon data. ±Initial player diary. ²Initial game state. ³'Update cursor parameters within state. “Update time within state. µ&Update item discoveries within state. ¶ Update level data within state. ·"Update dungeon data within state. ŗ(The part of speech describing the item. ? If cheating is allowed, full identity of the item is revealed ; together with its flavour (e.g. at the game over screen). »(The part of speech describing the item. ½FProduces a textual description of the terrain and items at an already 0 explored location. Mute for unknown locations. 8 The detailed variant is for use in the targeting mode. <ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ”¢£¤„¦§Ø©Ŗ«¬­®Æ°±²#³“µ¶·ø¹ŗ»¼½ game content  detailed? can be seen right now?  game state current level location to describe an extra sentence to print $%&'(6ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ”¢£¤„¦§Ø©Ŗ«¬­®Æ°±²³“µ¶·ø¹ŗ»¼½6œžŸ ”¢£¤„¦§Ø©Ŗ˜›š™‘’“”•–—ŒŽÆ°²³“µ¶·«¬­®±½ŗ»¼ˆ‰Š‹ø¹ˆ‰Š‹ŒŽ‘’“”•–—˜›š™œžŸ ”¢£¤„¦§Ø©Ŗ«¬­®Æ°±²#³“µ¶·ø¹ŗ»¼½$%&'(1None)>Save a simple serialized version of the current player diary. ¾7Save a simple serialized version of the current state. 3 Protected by a lock to avoid corrupting the file. */Try to create a directory. Hide errors due to, : e.g., insufficient permissions, because the game can run ( in the current directory just as well. +1Try to copy over data files. Hide errors due to, : e.g., insufficient permissions, because the game can run " without data files just as well. æDRestore a saved game, if it exists. Initialize directory structure,  if needed. ĄGSave the diary and a backup of the save game file, in case of crashes. ? This is only a backup, so no problem is the game is shut down " before saving finishes, so we don't wait on the mvar. However, ? if a previous save is already in progress, we skip this save. Į=Remove the backup of the savegame and save the player diary. ; Should be called before any non-error exit from the game. 0 Sometimes the backup file does not exist and it's OK.  We don'9t bother reporting any other removal exceptions, either, 4 because the backup file is relatively unimportant. N We wait on the mvar, because saving the diary at game shutdown is important. ),¾*+æĄĮ¾æĄĮ¾æĮĄ),¾*+æĄĮ2None-)The list of scores, in decreasing order. .CA single score record. Records are ordered in the highscore table, M from the best to the worst, in lexicographic ordering wrt the fields below. / the score 0*game time spent (negated, so less better) 1#date of the last game interruption 2 reason of the game interruption 3JShow a single high score, from the given ranking in the high score table. 4Empty score table 5;Save a simple serialized version of the high scores table. 6?Read the high scores table. Return the empty table if no file. 7EInsert a new score into the table, Return new table and the ranking. 8+Show a screenful of the high scores table. @ Parameter height is the number of (3-line) scores to be shown. 99Produce a couple of renderings of the high scores table. Ā-Take care of saving a new score to the table + and return a list of messages to display. -.:/0123456789Āthe config file  whether to write or only render  the total score. not halved yet game time spent #date of the last game interruption  reason of the game interruption ;ĀĀ -.:/0123456789Ā;3NoneĆ6Checks whether an actor identifier represents a hero. Ä6Checks whether an actor identifier represents a hero. ÅHow long until an actor's smell vanishes from a tile. Ę6Finds an actor body on any level. Fails if not found. <BTries to finds an actor body satisfying a predicate on any level. ÉCThe list of actors and their levels for all heroes in the dungeon. Ģ Calculate the location of player' s target. Ķ5Checks if the actor is present on the current level. C The order of argument here and in other functions is set to allow  b <- gets (memActor a) Ī<Gets actor body from the current level. Error if not found. Ļ Gets actor':s items from the current level. Empty list, if not found. Š7Removes the actor, if present, from the current level. Ń Add actor to the current level. Ņ)Removes a player from the current level. ŲJFinds an actor at a location on the current level. Perception irrelevant. ŁCalculate loot')s worth for heroes on the current level. ÜECreate a new hero on the current level, close to the given location. ŻGCreate a set of initial heroes on the current level, at location ploc. Ž7Create a new monster in the level, at a given position % and with a given actor kind and HP. ß8Create a projectile actor containing the given missile. "ĆÄÅĘ<ĒČÉŹĖ=ĢĶĪĻŠŃŅÓŌÕÖ>×Ų?@ŁŚŪÜŻŽßĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßĆÄĒĘŁÅŻŅÉŲŠÜŽĖŃŌĶĪŹÕĻČŪÖ×ߌĢÓ"ĆÄÅĘ<ĒČÉŹĖ=ĢĶĪĻŠŃŅÓŌÕÖ>×Ų?@ŁŚŪÜŻŽß4None ąEThe map of tile kinds in a place (and generally anywhere in a cave). L The map is sparse. The default tile that eventually fills the empty spaces 2 is specified in the cave kind specification with  cdefaultTile. į6The parameters of a place. Most are immutable and set ( at the time when a place is generated. éFor  CAlternate( tiling, require the place be comprised = of an even number of whole corners, with exactly one square 5 overlap between consecutive coners and no trimming. J For other tiling methods, check that the area is large enough for tiling < the corner twice in each direction, with a possible one row/column overlap. A4Modify available room area according to fence type. ź-Given a few parameters, roll and construct a į datastructure + and fill a cave section acccording to it. BFRoll a legend of a place plan: a map from plan symbols to tile kinds. ė<Construct a fence around an area, with the given tile kind. C@Construct a place of the given kind, with the given fence tile. D#Create a place by tiling patterns. ąįāćäåęēčéthe area to fill the place kind to construct Aźthe game content current cave kind fence tile, if fence hollow current level depth maximum depth interior area of the place BėCthe place parameters the place kind  the legend Dthe area to fill the place kind to construct E ąįāćäåęēčéźė ąįāćäåęēčéėź ąįāćäåęēčéAźBėCDE5None ģ6The type of caves (not yet inhabited dungeon levels). īthe kind of the cave ļtile kinds in the cave šsecrecy strength of cave tiles ństarting items in the cave ņ!debug information about the cave óplaces generated in the cave ōAThe map of starting items in tiles of a cave. The map is sparse. + Unspecified tiles have no starting items. õ9The map of starting secrecy strength of tiles in a cave. B The map is sparse. Unspecified tiles have secrecy strength of 0. ö!The map of tile kinds in a cave. L The map is sparse. The default tile that eventually fills the empty spaces 2 is specified in the cave kind specification with  cdefaultTile. ÷@Cave generation by an algorithm inspired by the original Rogue, ģķīļšńņóōõö÷content definitions depth of the level to generate maximum depth of the dungeon  cave kind to use for generation FGHIJK ģķīļšńņóōõö÷ öõōģķīļšńņó÷ ģķīļšńņóōõö÷FGHIJK6Noneų1Freshly generated and not yet populated dungeon. śstarting level for the party ū starting location for the party ü level maps L.Create a level from a cave, from a cave kind. ż%Generate the dungeon for a new game. žACompute the level identifier and starting location on the level,  after a level change. ųłśūüMNOPQLRSżž game state jump this many levels 6target level and the location of its receiving stairs ųłśūüżžųłśūüżž ųłśūüMNOPQLRSżž7None’@Perform a full scan for a given location. Returns the locations < that are currently in the field of view. The Field of View M algorithm to use, passed in the second argument, is set in the config file. ’%tile content, determines clear tiles scanning mode location of the spectacor the map that is scanned ’’’8None AThe type representing the perception of all actors on the level. CNote: Heroes share visibility and only have separate reachability. G The pplayer field must be void on all levels except where he resides. C Right now, the field is used only for player-controlled monsters. DThe type representing the perception for all levels in the dungeon. /The set of tiles visible by at least one hero. +For debug only: the set of tiles reachable 1 (would be visible if lit) by at least one hero. ?Check whether a location is within the visually reachable area - of the given actor (disregarding lighting). L Defaults to false if the actor is not player-controlled (monster or hero). =Check whether an actor is within the visually reachable area - of the given actor (disregarding lighting). / Not quite correct if FOV not symmetric (e.g., Shadow). : Defaults to false if neither actor is player-controlled. T"Whether a monster can see a hero (False if the target has D no perceptions, e.g., not a hero or a hero without perception, due K to being spawned on the same turn by a monster and then seen by another). ; An approximation, to avoid computing FOV for the monster. 4Whether an actor can see another. An approximation. 5Calculate the perception of all actors on the level. U5Calculate the perception of all actors on the level. VGA location can be directly lit by an ambient shine or a weak, portable A light source, e.g,, carried by a hero. (Only lights of radius 0  are considered for now and it'!s assumed they do not reveal hero' s position. E TODO: change this to be radius 1 noctovision and introduce stronger : light sources that show more but make the hero visible.)  A location is visible if it'$s reachable and either directly lit @ or adjacent to one that is at once directly lit and reachable. ' The last condition approximates being 4 on the same side of obstacles as the light source. I The approximation is not exact for multiple heroes, but the discrepancy F can be attributed to deduction based on combined vague visual hints,  e.g., if I don'0t see the reachable light seen by another hero, = there must be a wall in-between. Stray rays indicate doors, ( moving shadows indicate monsters, etc. WFReachable are all fields on an unblocked path from the hero position.  The player'.s own position is considred reachable by him. XYZ[\]^_`aTUVbWXYZ[\]^_`aTUVbW9None ;The information that is constant across a playing session, 7 including many consecutive games in a single session, L but is completely disregarded and reset when a new playing session starts.  frontend session information   game content  binding of keys to commands  the UI config for this session 7Actions and screen frames, including delays, resulting  from performing the actions. AActions of player-controlled characters and of any other actors. ,The type of the function inside any action.  (Separated from the Action/ type to document each argument with haddock.) c:Invokes the action continuation on the provided argument. d3Distributes the session and shutdown continuation,  threads the state and diary. =Run an action, with a given session, state and diary, in the IO monad. 8Update the cached perception for the given computation. Get the current perception. 5Return the value with an empty set of screen frames. 6Return the trivial value with a single frame to show. As the when monad operation, but on type ActionFrame (). /Inject action into actions with screen frames. Get the frontend session. Get the content operations. Get the key binding. %Get the config from the config file. DReset the state and resume from the last backup point, i.e., invoke  the failure continuation. Abort with the given message. 8Abort and print the given msg if the condition is true.  1Abort and conditionally print the fixed message. !BSet the current exception handler. First argument is the handler, 4 second is the computation the handler scopes over. "@Take a handler and a computation. If the computation fails, the 9 handler is invoked and then the computation is retried. #6Try the given computation and silently catch failure. $Get the current diary. %%Add a message to the current report. &.Wipe out and set a new value for the history. '5Wipe out and set a new value for the current report. (     efsession setup data cached perception  continuation failure/reset continuation current state current diary cd !"#$%&'ghij       !"#$%&'       !"#$%&'!     efcd !"#$%&'ghij:None(Color mode for the display. )black+white only *normal, with full colours +<Draw the whole screen: level map, status area and, at most, 3 a single page overlay of text divided into lines. ,6Render animations on top of the current screen frame. ()*+,()*+,(*)+,(*)+,;None-:Set the current exception handler. Apart of executing it, = draw and pass along a frame with the abort message, if any. .6Store current report in the history and reset report. /Wait for a player command. 0-Display frame and wait for a player command. k=Ignore unexpected kestrokes until a SPACE or ESC is pressed. 1,A series of confirmations for all overlays. lA yes-no confirmation. 2Display a msg with a more. prompt. Return value indicates if the player  tried to cancel/escape. 3 Print a yes/!no question and return the player's answer. Use black ! and white colours to turn player's attention to the choice. 40Print a msg and several overlays, one per page. ) All frames require confirmations. Raise abort if the player presses ESC. 50Print a msg and several overlays, one per page. D The last frame does not expect a confirmation and so does not show $ the invitation to press some keys. 6>Print a prompt and an overlay and wait for a player keypress. H If many overlays, scroll screenfuls with SPACE. Do not wrap screenfuls  (in some menus ?6 cycles views, so the user can restart from the top). 7Push a frame or a single frame'%s worth of delay to the frame queue. 8?Draw the current level. The prompt is displayed, but not added ; to history. The prompt is appended to the current message E and only the first screenful of the resulting overlay is displayed. mBDraw the current level. The prompt and the overlay are displayed, I but not added to history. The prompt is appended to the current message 5 and only the first line of the result is displayed. ( The overlay starts on the second line. 9?Initialize perception, etc., display level and run the action. n?Push the frame depicting the current level to the frame queue. A Only one screenful of the report is shown, the rest is ignored. :Update heroes memory. ;5Update heroes memory at the given list of locations. <GSave the diary and a backup of the save game file, in case of crashes. See Ą. =6Dumps the current game rules configuration to a file. o:Handle current score and display it with the high scores. > Aborts if display of the scores was interrupted by the user. +Warning: scores are shown during the game, E so we should be careful not to leak secret information through them G (e.g., the nature of the items through the total worth of inventory). >&Continue or restart or exit the game. ?9Wire together content, the definitions of game commands, * config and a high-level startup function B to form the starting game session. Evaluate to check for errors, + in particular verify content consistency. C Then create the starting game config from the default config file 6 and initialize the engine with the starting session. pECompute and insert auxiliary optimized components into game content, 3 to be used in time-critical sections of the code. q2Either restore a saved game, or setup a new game.  Then call the main game loop. @ Debugging. -./0k1lr2345678m9n:;<=o>stu?pq@( !"#$%-./0123456789:;<=>?@(- !"#$%./0123456789:;<=>?@-./0k1lr2345678m9n:;<=o>stu?pq@<NoneASentences such as "Dog barks loudly." BGInvoke pseudo-random computation with the generator kept in the state. C;Update actor stats. Works for actors on other levels, too. D&Update player-controlled actor stats. EJThe source actor affects the target actor, with a given effect and power. < The second argument is verbosity of the resulting message. A Both actors are on the current level and can be the same actor. F The first bool result indicates if the effect was spectacular enough F for the actors to identify it (and the item that caused it, if any). H The second bool tells if the effect was seen by or affected the party. FAThe boolean part of the result says if the ation was interesting 6 and the string part describes how the target reacted  (not what the source did). JChange level and reset it'+s time and update the times of all actors.  The player may be added to lactor of the new level only after  this operation is executed. KThe player leaves the dungeon. L>The source actor affects the target actor, with a given item. 4 If the event is seen, the item may get identified. M#Make the item known to the player. NBMake the actor controlled by the player. Switch level, if needed. D False, if nothing to do. Should only be invoked as a direct result 8 of a player action or the selected player actor death. OFocus on the hero being wounded displacedetc. RHRemove dead heroes (or dead dominated monsters). Check if game is over. ? For now we only check the selected hero and at current level, ' but if poison, etc. is implemented, we'd need to check all heroes  on any level. S4End game, showing the ending screens, if requested. T7Create a list of item names, split into many overlays. V;Perform look around in the current location of the cursor. ABCDEFGHIJKLMNOPQRSTUVABCDEFGHIJKLMNOPQRSTUVABCDEFGHIJKLMNOPQRSTUVABCDEFGHIJKLMNOPQRSTUV=None].Guess and report why the bump command failed. ^0Player tries to trigger a tile using a feature. _4Perform the action specified for the tile in case it' s triggered. `5Ask for a direction and trigger a tile, if possible. a5Player tries to trigger a tile in a given direction. b#Player tries to trigger the tile he's standing on. cEAn actor opens a door: player (hero or controlled monster) or enemy. d:Change the displayed level in targeting mode to (at most) C k levels shallower. Enters targeting mode, if not already in one. fGSwitches current hero to the next hero on the level, if any, wrapping. % We cycle through at most 10 heroes (@ , 1--9). gASwitches current hero to the previous hero in the whole dungeon, 7 if any, wrapping. We cycle through at most 10 heroes (@ , 1--9). hSearch for hidden doors. i8This function performs a move (or attack) by any actor, 0 i.e., it can handle monsters, heroes and both. jBResolves the result of an actor moving into another. Usually this C involves melee attack, but with two heroes it just changes focus. G Actors on blocked locations can be attacked without any restrictions. + For instance, an actor embedded in a wall , can be attacked from an adjacent position. ? This function is analogous to projectGroupItem, but for melee  and not using up the weapon. kDResolves the result of an actor running (not walking) into another. 6 This involves switching positions of the two actors. l9Create a new monster in the level, at a random position. mGenerate a monster, possibly. n<Possibly regenerate HP for all actors on the current level. oDisplay command help. pDisplay the main menu. sEAdd new smell traces to the level. Only humans leave a strong scent. tUpdate the wait/ block count. u(Player waits a turn (and blocks, etc.). WXYZ[\]^_`abcdefghiallow attacks? who' s moving? in which direction? jklmnopqrstuWXYZ[\]^_`abcdefghijklmnopqrstuWXYZ[\]^_`abcdefghijklmnopqrstuWXYZ[\]^_`abcdefghijklmnopqrstu>None v=Player running mode, determined from the nearby cave layout. w dead end x'a single corridor, turning here or not ya hub of separate corridors z)open space, in particular the T crossing v?Start running in the given direction and with the given number C of tiles already traversed (usually 0). The first turn of running > succeeds much more often than subsequent turns, because most D of the disturbances are ignored, since the player is aware of them & and still explicitly requests a run. {FDetermine the running mode. For corridors, pick the running direction I trying to explore all corners, by prefering cardinal to diagonal moves. |ICheck for disturbances to running such as newly visible items, monsters. wFThis function implements the actual logic of running. It checks if we @ have to stop running because something interesting cropped up, ; it ajusts the direction given by the vector if we reached  a corridor'9s corner (we never change direction except in corridors) 3 and it increments the counter of traversed tiles. vwxyzv{|wvwvwvzyxwv{|w?None|Display inventory }8Let the player choose any item with a given group name. I Note that this does not guarantee the chosen item belongs to the group, ( as the player can override the choice. ƒAStart the monster targeting mode. Cycle between monster targets. „KStart the floor targeting mode or reset the cursor location to the player. ….Set, activate and display cursor information. † Tweak the eps* parameter of the targeting digital line. ‡;End targeting mode, accepting the current location or not. ‰=Cancel something, e.g., targeting mode, resetting the cursor B to the position of the player. Chosen target is not invalidated. ŠEAccept something, e.g., targeting mode, keeping cursor where it was. < Or perform the default action, if nothing needs accepting. ‹5Clear current messages, show the next screen if any. ŒDrop a single item. ŽRemove given item from an actor's inventory or floor. H TODO: this is subtly wrong: if identical items are on the floor and in J inventory, the floor one will be chosen, regardless of player intention. E TODO: right now it ugly hacks (with the ploc) around removing items  of dead heros/5monsters. The subtle incorrectness helps here a lot, C because items of dead heroes land on the floor, so we use them up 9 in inventory, but remove them after use from the floor. ?Remove given item from the given location. Tell if successful. “5Let the player choose any item from a list of items. ”5Let the player choose a single, preferably suitable,  item from a list of items. xyz{|}all objects in question name of the group accepted item symbols prompt *how to refer to the collection of objects ~.actor applying the item (is on current level) how the applying is called the item to be applied €.actor projecting the item (is on current lvl) "target location of the projectile how the projecting is called the item to be projected ‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“prompt all items in question (how to refer to the collection of items ”prompt message !which items to consider suitable how to describe suitable items all items in question (how to refer to the collection of items xyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“x{zy”x{zy|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”@None}1The semantics of player commands in terms of the Action monad. •8The associaction of commands to keys defined in config. –CThe list of semantics and other info for all commands from config. ~=If in targeting mode, check if the current level is the same = as player level and refuse performing the action otherwise. }•–~•–•–}•–~ANone—9Binding of keys to movement and other standard commands, 1 as well as commands defined in the config file. — game config concrete binding ———BNone˜9AI proposes possible targets for the actor. Never empty. ™AI strategy based on actor'0s sight, smell, intelligence, etc. Never empty. € A strategy to always just wait. A strategy to always just die. ‚Strategy for dumb missiles. ƒ;AI finds interesting moves in the absense of visible foes. G This strategy can be null (e.g., if the actor is blocked by friends). ˜™„€‚…†‡ˆƒ‰Š˜™˜™ ˜™„€‚…†‡ˆƒ‰ŠCNoneš<Start a clip (a part of a turn for which one or more frames 0 will be generated). Do whatever has to be done = every fixed number of time units, e.g., monster generation. D Run the player and other actors moves. Eventually advance the time  and repeat. ‹3Perform moves for individual actors not controlled , by the player, as long as there are actors A with the next move time less than or equal to the current time. ; Some very fast actors may move many times a clip and then A we introduce subclips and produce many frames per clip to avoid E jerky movement. Otherwise we push exactly one frame or frame delay. Œ%Handle the move of a single monster. Handle the move of the hero. ŽHDetermine and process the next player command. The argument is the last ' abort message due to running, if any. 7Advance (or rewind) the move time for the given actor. š‹-the start time of current subclip, exclusive ŒŽššš‹ŒŽHIJKLMKLNKLOPQRSTUVVWXYYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘‘’“”•–—˜™ š š › œ  ž Ÿ   ” ¢ £ ¤ „ ¦ § Ø Ø © Ŗ « ¬ ­ ® Æ ° ±²³“µ¶· ø ø ¹ ŗ » ¼ ½ ¾ ¾ æ Ą Į Ā Ć ÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽŁŚŪÜŻŽßąŁįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž’      !"#$%&'()*+,-./01234556789:;<=>?@ABBCDEFGHIJKLMNOPGQGRGSGTGUGVWXYZ[\]^_`abbccdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘‘’“”•–—˜™™š›œžŸ ”¢£¤„¦§Ø©Ŗ«āˆ¬­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆ Ä Ä Å Ę Ē Č É Ź!Ė!Ė!Ģ!Ķ!Ī!Ļ!Š!Ń!Ņ!Ó!Ō!Õ!Ö!×"Ų"Ł"Ś"Ū"Ü"Ż"Ž#ß#ß#ą#į#ā#ć#ä#å#ę#ē#č#é#ź#ė#ģ#ķ#ī#ļ#š#ń#ņ#ó#ō#õ#ö$÷$ų$ł$ś$ū$ü$ż$ž$’$%%&&&&&&ø&& &}& ' ' ' ' ''''''''''((((((()))) )!)")#)$)%)&)')()()))*)+),)-).)/)0)1)2)3)4)5)6)7)8)9):*;*<*=*>*?*@*A*A*B*C*D*E*F*G*H*I*J*K*L*M*N*O*P*Q*R*S*T*U*V*W*X*Y*Z+[+\+],^,_,`,`,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u-v-w-x-y-z-{-|-}-~--€...‚.ƒ.„.….†.‡.ˆ.‰.Š.‹.Œ..Ž...‘.’.“.”.•.–.—.˜.™.š.›.œ..ž.Ÿ. .”.¢.£.¤.„/¦/§/Ø/©/Ŗ/«/¬/­/5/®/Æ0°0°0±0²0³0“0µ0¶0·0ø0ø0¹0ŗ0»0¼0½0¾0æ0Ą0Į0Ā0Ā0Ć0Ä0Å0Ę0Ē0Č0É0Ź0Ė0Ģ0Ķ0Ī0Ļ0Š0Š0Ń0Ņ0Ó0Ō0Õ0Ö0×0Ų0Ł0Ś0Ū0Ü0Ż0Ž0ß0ą0į1ā1ć1ä1å2ę3ē3č3é3ź3ė3ģ3ķ3ī3ļ3š3ń3ņ3ó3ō3õ3ö3÷3ų3ł3ś3ū3ü3ż3ž3’33334444444 4 4 4 4 4555555555555666666678 8!8"8#8$8%8&8'9(9(9)9*9+9,9-9.9/909192939495969798999:9;9<9=9>9?9@9A9B9C9D9E9F:G:H:I:J:K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z;ä;[;\;];^<_<`<a<b<c<d<e<f<g<h<i<j<k<l<m<n<o<p<q<r<s<t=u=v=w=x=y=z={=|=}=~==€==‚=ƒ=„=…=†=‡=ˆ=‰=Š=‹=Œ==Ž===‘=’=“>”>•?–?—?˜?™?š?›?œ??ž?Ÿ? ?”?¢?£?¤?„?¦?§?Ø?©?Ŗ?«?¬?­?®?Æ?°?±?²@³@“AµB¶B·Cø¹ŗ»¼½¾æĄsĮDĀDĆDÄDÅDĘDĒDČDÉDŹDĖDĢĶĪĻŠ|}ŃŅ Ó Ō ÕHÖ× Ų Ł ŚŪÜŻāćŽßąįāćäåęēčéź ėģķīļšńņóōõö÷ųłśG4Wūüżž’H """""HI $ $÷$ $ $ ))2))))))***++++++++++ ++!+"+#+$,%,&,',(,),*,+,,,-,..//¦/0/1/2/3/405060708090:1;1<1=1>2?2@2A2B2C2D2E2F2G2H2I2J2K2@2L3M3N3O3P3Q4R4S4T4U4V5W5X5Y5Z5[5\6]6^6_6`6a6b6c6d8e8f8g8h8 8i8j8k8l8l8m8n8n8o8p9q9r9.9s9t9u9v9w;x;y;z;{;|;};~;;€;;‚>ƒ>„>…>†>‡>ˆ>‰@Š@‹AŒBBŽBBB‘B’B“B”B•B–B—C˜C™CšC›CœLambdaHack-0.2.6.5Game.LambdaHack.Utils.AssertGame.LambdaHack.MsgGame.LambdaHack.Utils.LQueueGame.LambdaHack.ColorGame.LambdaHack.FlavourGame.LambdaHack.TimeGame.LambdaHack.Misc#Game.LambdaHack.Content.FactionKindGame.LambdaHack.CDefs!Game.LambdaHack.Content.PlaceKindGame.LambdaHack.Utils.FileGame.LambdaHack.PointXYGame.LambdaHack.VectorXYGame.LambdaHack.AreaGame.LambdaHack.FOV.CommonGame.LambdaHack.FOV.DigitalGame.LambdaHack.FOV.PermissiveGame.LambdaHack.FOV.ShadowGame.LambdaHack.PointGame.LambdaHack.AnimationGame.LambdaHack.VectorGame.LambdaHack.KeyGame.LambdaHack.Config&Game.LambdaHack.Action.Frontend.ChosenGame.LambdaHack.Utils.FrequencyGame.LambdaHack.RandomGame.LambdaHack.EffectGame.LambdaHack.Feature Game.LambdaHack.Content.TileKind Game.LambdaHack.Content.RuleKindGame.LambdaHack.CommandGame.LambdaHack.Binding Game.LambdaHack.Content.ItemKindGame.LambdaHack.AreaRnd Game.LambdaHack.Content.CaveKindGame.LambdaHack.StrategyGame.LambdaHack.Action.FrontendGame.LambdaHack.Ability!Game.LambdaHack.Content.ActorKind$Game.LambdaHack.Content.StrategyKindGame.LambdaHack.KindGame.LambdaHack.ActorGame.LambdaHack.Action.ConfigIOGame.LambdaHack.ItemGame.LambdaHack.TileGame.LambdaHack.LevelGame.LambdaHack.DungeonGame.LambdaHack.StateGame.LambdaHack.Action.Save Game.LambdaHack.Action.HighScoreGame.LambdaHack.ActorStateGame.LambdaHack.PlaceGame.LambdaHack.CaveGame.LambdaHack.DungeonStateGame.LambdaHack.FOVGame.LambdaHack.Perception!Game.LambdaHack.Action.ActionLiftGame.LambdaHack.DrawGame.LambdaHack.ActionGame.LambdaHack.EffectActionGame.LambdaHack.ActionsGame.LambdaHack.RunningGame.LambdaHack.ItemActionGame.LambdaHack.CommandActionGame.LambdaHack.BindingActionGame.LambdaHack.StrategyActionGame.LambdaHack.TurnPaths_LambdaHackListall#Game.LambdaHack.Action.Frontend.StdbaseGHC.Baseassertminimorph-0.1.4.0NLP.Minimorph.UtilshowT<+><>LQueue newLQueue nullLQueue trimLQueue tryReadLQueue writeLQueueAttrCharacAttracCharAttrfgbgColorBrWhiteBrCyan BrMagentaBrBlueBrYellowBrGreenBrRedBrBlackWhiteCyanMagentaBlueBrownGreenRedBlackdefBGdefFG defaultAttrisBrightlegalBG colorToRGBFlavourzipPlainzipFancydarkCol brightColstdColstdFlavflavourToColor flavourToNameSpeedTimetimeZerotimeCliptimeTurntimeAddtimeFit timeNegate timeScale timeToDigittoSpeed speedNormal speedScale ticksPerMetertraveledspeedFromWeightrangeFromSpeedFreqsnormalLevelBounddivUpbreturn FactionKindfsymbolfnameffreq fAiSelectedfAiIdlefenemyfally fvalidateCDefs getSymbolgetNamegetFreqvalidatecontentFenceFNoneFFloorFWallCoverCReflectCStretch CAlternate PlaceKindpsymbolpnamepfreqpcoverpfenceptopLeft pvalidate encodeEOFstrictDecodeEOFblamefailureallBcheckMtrueMfalseMPointXYYXfromTo sortPointXYblaXYVectorXYshiftXYmovesXYmovesCardinalXY chessDistXYeuclidDistSqXYnegXYArea vicinityXYvicinityCardinalXYinsideXY normalizeAreagrid validArea trivialAreaexpand EdgeIntervalEdge ConvexHullLineBumpBProgressDistancemaximalsteeperaddHullscandlinedsteeper intersect debugSteeper debugLineIntervalSBumpOverlayHistoryReportMsg makePhrase makeSentencemoreMsgyesnoMsgpadMsg emptyReport nullReportsingletonReportaddMsg splitReport renderReport emptyHistorysingletonHistory renderHistory addReport takeHistory splitOverlaystringByLocationPoint showPointtoPointorigin chessDistadjacentvicinityvicinityCardinalinsidedisplacementXYZbla Animation SingleFramesfLevelsfTopsfBottom rederAnim twirlSplashblockHit blockMiss deathBody swapPlacesVectortoVectorisUnitshift shiftBoundedmoves movesWidth euclidDistSqdiagonalnegtowards displacement displacePath shiftPathModifier NoModifierControlKeyUnknownCharKPHomeBeginEndDownUpRightLeftPgDnPgUpBackTabTabSpaceReturnEscshowKM dirAllMoveKey handleDir moveBinding keyTranslateConfigUIconfigCommandsconfigAppDataDirconfigDiaryFileconfigSaveFile configBkpFileconfigScoresFileconfigRulesCfgFileconfigUICfgFileconfigHeroNames configMacros configFontconfigHistoryMaxConfigconfigSelfString configCaves configDepth configFovModeconfigSmellTimeout configBaseHPconfigExtraHeroesconfigFirstDeathEnds configFactionFovModeBlindDigital PermissiveShadowFrontendSession frontendNamestartupdisplay nextEventpromptGetAnyKey Frequency nameFrequency runFrequency uniformFreqtoFreq scaleFreq renameFreqrollFreqnullFreqChanceRollDeep RollDiceXYRollDiceRndrandomRoneOf frequencyrollrollDicemaxDiceminDicemeanDice rollDiceXYrollDeep chanceDeep intToDeepmaxDeepchanceEffectDescendAscend Searching Regeneration ApplyPerfume SummonEnemy SummonFriendDominateWoundHealNoEffecteffectToSuffixeffectToBenefitFeatureSecretPathExitBoringAuraLitClearWalkableChangeToCauseHiddenClosableOpenable Descendable AscendableTileKindtsymboltnametfreqtcolortcolor2tfeature tvalidateRuleKindrsymbolrnamerfreq raccessiblertitlerpathsDataFile rpathsVersion ritemMelee ritemProjectrcfgRulesDefault rcfgUIDefault rmainMenuArt ruvalidateCmdHelpHeroBack HeroCycleCfgDumpAcceptCancelEpsIncr TgtAscendTgtEnemyTgtFloor InventoryGameSave GameRestartGameExitWaitDropPickup TriggerTile TriggerDirfeatureProjectApplyverbobjectsymsmajorCmdtimedCmdcmdDescriptionBindingkcmdkmacrokmajorkdirkrevMapkeyHelpItemKindisymbolinameifreqiflavourieffecticountipower iverbApply iverbProjectiweightitoThrow ivalidateCorridorxyInAreamkRoom mkVoidRoom connectGridrandomConnection connectPlacesCaveKindcsymbolcnamecfreqcxsizecysizecgrid cminPlaceSize cdarkChance cauxConnects cvoidChance cnonVoidMin cminStairDist cdoorChance copenChance chiddenChancecitemNum cdefaultTile ccorridorTile cfillerTilecdarkLegendTileclitLegendTile chiddenTile cvalidateStrategy nullStrategy liftFrequency.|reject.=>only bestVariantrenameStrategyreturN displayFrame promptGetKeyAbilityWanderChaseToolsRangedMeleeFleeTrack ActorKindasymbolanameafreqacoloraspeedahpasightasmellaiqaregenacanDo avalidate StrategyKindssymbolsnamesfreq sabilities svalidateArrayCOpscoactorcocavecofactcoitemcoplacecorulecostratcotileOpsosymbolonameokind ouniqGroupopick ofoldrWithKeyoboundsospeedupSpeedupId createOps stdRuleset!// listArrayarraybounds foldlArrayTargetTCursorTPathTLocTEnemyActorIdActorbkindbsymbolbnamebcolorbspeedbhpbdirbtargetblocbletterbtimebwaitbfactionbproj findHeroNamemonsterGenChance partActortemplateaddHp actorSpeedtimeAddFromSpeedbraced unoccupied heroKindIdprojectileKindIddump mkConfigRules mkConfigUI FlavourMap DiscoveriesItemjkindjpowerjletterjcountnewItemviewItem itemPricedungeonFlavourMap getFlavour assignLettercmpLetterMaybe maxLetter letterRange letterLabeljoinItemequalItemIdentityremoveItemByIdentityremoveItemByLetterstrongestSearchstrongestSwordstrongestRegen SmellTime SecretTimekindHasFeaturekindHas hasFeatureisClearisLit isExplorablesimilar canBeHiddenspeedupLevellactorlinvlxsizelysizelsmelllsecretlitemlmaplrmapldesclmetalstairsltimelclearlseenTileMapItemMap SecretMapSmellMapInvDict ActorDictupdateActorDict updateInv updateSmell updateIMap updateLMap updateLRMap dropItemsAtat rememberAtatI rememberAtI accessibleopenablefindLoc findLocTryDungeonLevelId levelNumber levelDefaultfromList currentFirstadjust mapDungeonlookupdepth DebugMode smarkVision somniscientStatusRestartVictorCampingKilledCursor ctargetingclocLn clocation creturnLncepsTgtModeTgtAuto TgtExplicitTgtOffStatesplayerscursorsflavoursdiscosdungeonslidscountersrandomsconfig stakeTimesquitsfactionsdebugDiarysreportshistoryslevelstime defaultDiary defaultState updateCursor updateTimeupdateDiscoveries updateLevel updateDungeoncycleMarkVisiontoggleOmniscient partItemCheatpartItem partItemNWslookAt saveGameFile restoreGame saveGameBkprmBkpSaveDiaryregister isProjectileisAHero smellTimeoutfindActorAnyLevel getPlayerBody getPlayerItemallHeroesAnyLevelupdateAnyActorBodyupdateAnyActorItem targetToLocmemActorgetActor getActorItem deleteActor insertActor deletePlayer hostileAssocsheroList hostileList dangerousList factionList locToActorcalculateTotal foesAdjacent tryFindHeroKaddHero initialHeroes addMonster addProjectile TileMapXYPlaceqkindqareaqseenqlegend qsolidFence qhollowFence placeValid buildPlace buildFenceCavedkinddmapdsecretditemdmetadplaces ItemMapXY SecretMapXY buildCave FreshDungeon entryLevelentryLoc freshDungeongeneratewhereTofullscan PerceptionDungeonPerception totalVisibledebugTotalReachableactorReachesLocactorReachesActoractorSeesActordungeonPerceptionSessionsfsscopssbinding sconfigUI ActionFrameAction ActionFunliftIO handlerToIOwithPerception getPerception returnNoFrame returnFrame whenFrameinFramegetFrontendSessiongetCOps getBinding getConfigUIabort abortWith abortIfWith neverMindtryWithtryRepeatedlyWith tryIgnoregetDiarymsgAdd historyResetmsgReset ColorModeColorBW ColorFulldrawanimate tryWithFrame recordHistory getKeyCommandgetKeyFrameCommandgetOverConfirm displayMore displayYesNodisplayOverAbortdisplayOverlaysdisplayChoiceUIdisplayFramePush drawPrompt startClipremember rememberListdumpCfg endOrLoop startFrontenddebug actorVerb rndToActionupdateAnyActorupdatePlayerBodyeffectToActioneff nullEffect squashActor effLvlGoUp switchLevel fleeDungeonitemEffectActiondiscover selectPlayer focusIfOurs summonHeroessummonMonsterscheckPartyDeathgameOver itemOverlay stopRunningdoLookgameSavegameExit gameRestart moveCursormove ifRunning guessBumpbumpTile triggerTileplayerTriggerDir playerBumpDirplayerTriggerTile actorOpenDoor tgtAscend heroesAfterPl cycleHero backCycleHerosearch moveOrAttackactorAttackActor actorRunActor rollMonstergenerateMonsterregenerateLevelHP displayHelpdisplayMainMenudisplayHistory dumpConfigaddSmell setWaitBlock waitBlockrun continueRunItemDialogStateIAll ISuitableINone inventory getGroupItemapplyGroupItemplayerApplyGroupItemprojectGroupItemplayerProjectGroupItemplayerProjectGI targetMonster targetFloor setCursorepsIncr endTargetingendTargetingMsg cancelCurrent acceptCurrent clearCurrentdropItemremoveOnlyFromInventoryremoveFromInventory removeFromLocactorPickupItem pickupItemallObjectsName getAnyItemgetItem configCmds semanticsCmds stdBindingtargetStrategystrategy handleTurn _olorToRGB$fBinaryAttrChar $fBinaryAttr $fBinaryColor fancyName baseColorcolorToPlainNamecolorToFancyName$fBinaryFlavourcatchIOversionbindirlibdirdatadir libexecdir getBinDir getLibDir getDataDir getLibexecDirgetDataFileName _timeTick turnsInSecond_ticksInSecondsInMs $fBinarySpeed $fBinaryTime encodeDatastrictReadSerializedstrictDecodeDataGHC.Errerror balancedWordfromTo1 $fShowPointXYdownBiasupBias splitTextrenderRepetition splitText'$fBinaryHistory$fBinaryReport $fBinaryText fromPointblank coloredSymbol mzipPairs$fMonoidAnimationtoDirfromDir normalizeisUnitXY$fBinaryVectorshowKey dirViChar dirViMoveKey dirMoveKey dirViRunKey dirRunKey _dirAllRunKeydirNums dirHeroKey $fShowKey $fBinaryKey$fBinaryConfigUI$fBinaryConfig$fBinaryFovMode$fFunctorFrequency$fMonadPlusFrequency$fMonadFrequency$fReadRollDice$fShowRollDice$fShowRuleKindGHC.ShowShowcoImageHV mkCorridorVertHoriz connectGrid'return$fMonadStrategy runStrategynormalizeStrategy$fMonadPlusStrategy $fBinaryArray $fShowCOps $fBinaryId TileSpeedup isClearTabisLitTab invalidTarget$fBinaryTarget $fBinaryActorCPmkConfig appDataDirset getSetGentoCP forceEither getOptiongetgetItems overrideCPparseConfigRules parseConfigUI$fShowCProllFlavourMap removeItemByfindItem itemLetter cmpLettermaxBy mergeLetterequalItemLetter strongestItem $fBinaryItem $fBinaryLeveldungeonLevelMap dungeonDepth LambdaCave$fBinaryDungeon$fBinaryLevelIddefaultDebugMode$fBinaryStatus$fBinaryCursor$fBinaryTgtMode $fBinaryState $fBinaryDiary saveDiary tryCreateDirtryCopyDataFilessaveLock ScoreTable ScoreRecordpointsnegTimedatestatus showScoreemptysaverestore insertPos showTable slideshow$fBinaryScoreRecord tryFindActorupdateAnyLevel factionAssocs locToActors nearbyFreeLoc expandFenceolegenddigPlace tilePlace $fBinaryPlace rollSecrettrigger digCorridorspassable mapToHidden mergeCorridor buildLevelconvertTileMapsunknownTileMap mapToIMap rollItems placeStairsmatchGenerator findGeneratormonsterSeesHerolevelPerceptioncomputeVisiblecomputeReachablepplayerpheroesptotalPerceptionVisiblepvisiblePerceptionReachable preachable isVisible returnAction bindAction runAction$fMonadStateStateAction$fFunctorAction $fMonadAction $fShowAction getConfirmgetYesNo drawOverlay displayPush handleScores speedupCopsstart promptAdd restartGame gameResetgameResetActionRunMode RunDeadEnd RunCorridorRunHubRunOpenrunModerunDisturbance cmdAction checkCursor heroSelection waitBlockNowdieNowtrack moveStrategy dirToActionpickupmelee rangedFreq toolsFreqchasewander handleActorshandleAI handlePlayer playerCommand advanceTime