Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The big, ugly, pending pull request #11

Closed
wants to merge 240 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
240 commits
Select commit Hold shift + click to select a range
cbb5b67
multiple heroes: a hero now carries his personal number with him
Mikolaj Jan 22, 2011
05a0949
multiple heroes: a number of heroes possible on each level
Mikolaj Jan 22, 2011
8152f6f
multiple heroes: help text for hero selection keys
Mikolaj Jan 22, 2011
b048766
multiple heroes: prepare keys for hero selection commands
Mikolaj Jan 22, 2011
c4fcdc8
the current target and look mode fields (see issue 28)
Mikolaj Jan 24, 2011
f473230
multiple heroes: a few tweaks around the type of heroes on a level
Mikolaj Jan 24, 2011
76af3b0
allow player to change levels freely in look mode
Mikolaj Jan 24, 2011
de7f68b
enable the look mode
Mikolaj Jan 25, 2011
b28dc42
fix a typo that breaks savegames and TODO about another bug
Mikolaj Jan 25, 2011
8959e49
mutiple heroes: Tab cycles among heroes on a level
Mikolaj Jan 26, 2011
7bd9ccf
tweaks and comments, mostly about TODOs for actions
Mikolaj Jan 26, 2011
be4f887
multiple heroes: spawn the number of heroes specified in config
Mikolaj Jan 26, 2011
0417f4f
vty support status update: vty maintainer OK with numpad number keys
Mikolaj Jan 29, 2011
4e1f146
multiple heroes: Tab cycles heroes also in look mode
Mikolaj Jan 30, 2011
6d9a881
multiple heroes: monsters chase closest heroes on the level
Mikolaj Jan 30, 2011
4b4d2cb
fix of a bug caused by config file options being case insensitive
Mikolaj Jan 30, 2011
adc3f4f
multiple heroes: monster attacks any hero correctly; infrastructure c…
Mikolaj Jan 30, 2011
7f861f6
switch config file behaviour to case sensitive and rename options
Mikolaj Jan 30, 2011
de20d76
change datatype of look mode from a tuple to a record
Mikolaj Jan 31, 2011
081101a
code naming convention: "player" is the currently selected hero
Mikolaj Jan 31, 2011
96a3f1e
all heroes on level now displayed; player in reverse video
Mikolaj Jan 31, 2011
de46aad
fix issue #9 on kosmikus' fork (High score table, number of steps)
Mikolaj Jan 31, 2011
4f4fa31
fix issue #8 on kosmikus' fork (High score table, boolean flags)
Mikolaj Feb 4, 2011
790861c
fix monsters unable to attack selected hero
Mikolaj Feb 4, 2011
e9b28ba
all heroes (not only the player) regenrate at once
Mikolaj Feb 5, 2011
f4f946c
changing hero selection takes no time now
Mikolaj Feb 5, 2011
088a0a5
the loot of all heroes on the current level now counts for the winnin…
Mikolaj Feb 5, 2011
e1914e0
say which hero selected, instead of the boring fixed message
Mikolaj Feb 5, 2011
ad8ac60
add '*' and '?' to the list of confimation keys
Mikolaj Feb 5, 2011
1e2783c
fix a bug with case sensitivity of config; harden code
Mikolaj Feb 6, 2011
0340098
fix a bug where gold can't be dropped under GTK (other frontends are OK)
Mikolaj Feb 6, 2011
dfe2cf3
bumping into a hero switches selection to him
Mikolaj Feb 6, 2011
f459fa1
on levels with no heroes monsters now chase each other
Mikolaj Feb 7, 2011
a82badc
fix a bug (regression) where monsters can't open secret doors
Mikolaj Feb 8, 2011
780d118
heroes can now be selected with number keys (top row of keyboard)
Mikolaj Feb 12, 2011
11f89ad
refactor hero selection code; surprisingly small now
Mikolaj Feb 12, 2011
8dfc54d
simplify and corret lvlswitch
Mikolaj Feb 13, 2011
d2b94b6
highlight the look mode cursor
Mikolaj Feb 13, 2011
12c64d4
illustrate issue #31 with TODO comments
Mikolaj Feb 13, 2011
4083fc2
movement in look mode advances the cursor and describes terrain
Mikolaj Feb 13, 2011
7211356
in look mode, describe only terrain explored by the player
Mikolaj Feb 13, 2011
bf87826
close #29 (Naming convention for player/hero/party)
Mikolaj Feb 14, 2011
5a717ec
in look mode, don't focus on hero unless level changed
Mikolaj Feb 14, 2011
e6ade65
some extra banter when exiting the program
Mikolaj Feb 14, 2011
a25dcbb
debug for keys; update about the vty keypad patch; misc fixes
Mikolaj Feb 19, 2011
8d82c19
killed actors (monsters and heroes) now drop loot uniformly
Mikolaj Feb 22, 2011
4426842
misc tweaks
Mikolaj Feb 22, 2011
34135ef
implement and set as default: game does not end util at least one her…
Mikolaj Feb 22, 2011
540f1f2
monster and hero death now handled right after damage dealt
Mikolaj Feb 22, 2011
61eef35
ultra-hack: default config file gets included in the binary
Mikolaj Mar 1, 2011
304b824
level layout config options more readable and now mandatory
Mikolaj Mar 1, 2011
eff038a
big fixes to do with look mode and level switching
Mikolaj Mar 1, 2011
89b1bdb
default config now underlies config from savefile and from user confi…
Mikolaj Mar 1, 2011
447b0fc
defaults no longer needed when querying config
Mikolaj Mar 1, 2011
208fc62
add a command to dump current configuration; close #30
Mikolaj Mar 2, 2011
a9cc93d
config file now always has to specify savegame and highscore paths
Mikolaj Mar 2, 2011
59e1577
make some parameters configurable, as requested in TODOs
Mikolaj Mar 2, 2011
0cd6f38
running into a monster or hero switches positions
Mikolaj Mar 2, 2011
910adb1
simplify moveOrAttack by assuming one moster per tile
Mikolaj Mar 3, 2011
a754ad3
factor out the moveOrAttack code dealing with 2 actors
Mikolaj Mar 3, 2011
6c92870
faster, deterministic and better looking extra heroes placement
Mikolaj Mar 3, 2011
d1449bd
balance multi-hero mode a bit better
Mikolaj Mar 3, 2011
b524686
looking at terrain tiles now also mentions monsters
Mikolaj Mar 3, 2011
4288992
disallow use of some commands when in look mode on a remote level
Mikolaj Mar 3, 2011
e1082a4
a mock-up of all the commands of the targeting mode
Mikolaj Mar 4, 2011
fe3a4f2
implement the basic targeting mode commands; close #28
Mikolaj Mar 4, 2011
6572e30
refactor attack code to show a problem with actor representation
Mikolaj Mar 5, 2011
b73debe
simplify the Target type
Mikolaj Mar 6, 2011
8164ccb
drastically simplify targeting mode; no more accept/cancel
Mikolaj Mar 6, 2011
9f11d75
cursor is now permanent, though visible only in targeting mode
Mikolaj Mar 6, 2011
984fc45
cursor no longer taken as argument for Actions
Mikolaj Mar 6, 2011
e0443f0
rename the fields of Cursor
Mikolaj Mar 6, 2011
7620e9b
tweaks to variable names and UI messages for targeting
Mikolaj Mar 6, 2011
d0c1b04
a few changes and a bit of refactoring of targeting
Mikolaj Mar 6, 2011
41125e8
rename the Monster/Hero type to Movable
Mikolaj Mar 7, 2011
f1c674f
simplified the monsterGenChance formula; more monsters at deep levels…
Mikolaj Mar 7, 2011
8fb5d5a
add the (AHero n) form of actor; unused yet
Mikolaj Mar 7, 2011
60cf479
bugfix: forbid closing a door with a hero inside
Mikolaj Mar 7, 2011
d8f271a
use AHero to avoid duplicating state in combat; close #34
Mikolaj Mar 8, 2011
5c58cf0
style: change all foldl to foldl'
Mikolaj Mar 9, 2011
aba4fc2
gut out Actor module, to avoid cyclic dependencies later
Mikolaj Mar 9, 2011
49e12bd
the splayer field of state is now an actor; close #34 (again)
Mikolaj Mar 10, 2011
85d26dd
heroes now have names intead of numbers
Mikolaj Mar 10, 2011
3d3ac7a
more cleanup: Actors instead of Ints, etc.
Mikolaj Mar 11, 2011
5c8defa
bugfix: heroes no longer obscured by the targeting cursor
Mikolaj Mar 11, 2011
734ef8a
nontrivial default names for the first few heroes; configurable
Mikolaj Mar 12, 2011
05ab163
death message includes the name of the actor
Mikolaj Mar 12, 2011
b880066
asdfasdf
Mikolaj Mar 12, 2011
50f88bf
clean-up complete; operations on current level and all levels separated
Mikolaj Mar 12, 2011
8937a50
target is now an actor, not a number; close #34 (yet again)
Mikolaj Mar 13, 2011
6097568
monsters stored on intmap, not time-sorted list; close #34 (for the l…
Mikolaj Mar 13, 2011
0940258
add darts as dungeon items, a bit more rare than swords
Mikolaj Mar 14, 2011
477519c
implement the simplest variant of shooting darts
Mikolaj Mar 14, 2011
b1e07d2
bugfix: cycle heroes was off by one
Mikolaj Mar 14, 2011
c330edb
bugfix: game laoding was broken for darts
Mikolaj Mar 16, 2011
4abe663
aiming a wand at a monster puts it under player control
Mikolaj Mar 16, 2011
c244d18
moved a comment to the issue on the vty github page
Mikolaj Mar 19, 2011
0ff2010
fix cycling among monsters and heroes
Mikolaj Mar 19, 2011
ad8af59
bugfix: correctly calculate the actor at a target location
Mikolaj Mar 19, 2011
70bdc0c
if target monster not visible, don't fire at all
Mikolaj Mar 19, 2011
fde611f
bugfix: off by 1, when cycling heroes
Mikolaj Mar 19, 2011
ccfe246
rewrite the cursor and location targetting modes
Mikolaj Mar 19, 2011
5f4a91c
add the cursor level field
Mikolaj Mar 20, 2011
02f6a6e
add checks of target validity
Mikolaj Mar 20, 2011
f46dafe
highlight player, even if he's a monster
Mikolaj Mar 20, 2011
1f87418
backup savegames in case of computer hardware malfunction
Mikolaj Mar 20, 2011
f436888
generalize Hero to Movable in many places to handle player-controlled…
Mikolaj Mar 20, 2011
54d27e3
remove the Hero and Monster types
Mikolaj Mar 20, 2011
254a878
move time management to particular actions
Mikolaj Mar 21, 2011
b13c7e7
move most of Monster.hs to Movable.hs and Hero.hs
Mikolaj Mar 21, 2011
753e2b7
move hero creation code to HeroState.hs
Mikolaj Mar 21, 2011
6a58b4d
Moved Actor type, rearranged some modules.
kosmikus Jan 24, 2011
dc34ab7
move dungeon setup code to DungeonState.hs
Mikolaj Mar 21, 2011
ff6b65d
fix highlighting in terminal frontends
Mikolaj Mar 21, 2011
41800b4
add per-hero perception; unused
Mikolaj Mar 21, 2011
23ad4e2
helper functions for actors
Mikolaj Mar 22, 2011
b39b854
use multiple perception to determine if a monster sees a particular hero
Mikolaj Mar 22, 2011
d178c1d
don't target and fire at actors others can see/reach, but you can't
Mikolaj Mar 22, 2011
2edcc2c
player-controlled monster perceives, too; close #31
Mikolaj Mar 22, 2011
5eca39e
prevent a player-controlled monster from tageting itself
Mikolaj Mar 22, 2011
a6f9199
enable 16 colors and emulate them in gtk with the Linux console set
Mikolaj Mar 22, 2011
82dbed4
replace setBold with explicit bright color selection
Mikolaj Mar 22, 2011
db72379
hack vty to display bright colors by abusing the bold attribute
Mikolaj Mar 23, 2011
15c0482
rewrite color handling in curses
Mikolaj Mar 23, 2011
f4fa77e
rewrite color usage everywhere
Mikolaj Mar 23, 2011
d0e9837
remove savefile if corrupted (but backup first)
Mikolaj Mar 23, 2011
cf8765a
all monster type data is now in one place
Mikolaj Mar 23, 2011
2eb1d33
move the State argument to the rear, to work well with gets
Mikolaj Mar 23, 2011
592c183
a quick fix to increase display spead
Mikolaj Mar 23, 2011
fb4db25
simplify color management even more
Mikolaj Mar 23, 2011
1822170
clean-up of Display2.hs
Mikolaj Mar 24, 2011
11dea08
indicate LOS and light with colors; close #24
Mikolaj Mar 24, 2011
83c6b31
move Dungeon type to Dungeon.hs
Mikolaj Mar 24, 2011
f65ed2f
move functions from Level.hs to Geometry.hs and others
Mikolaj Mar 24, 2011
6ead362
move functions from Level.hs to a newly created GeometryRnd.hs
Mikolaj Mar 24, 2011
18003aa
split Level.hs into halves, the other one called Terrain.hs
Mikolaj Mar 24, 2011
61fa355
half of the display frontend no longer accessible outside
Mikolaj Mar 24, 2011
b551293
move a few functions from Display.hs to Keys.hs; assorted tweaks
Mikolaj Mar 24, 2011
db79784
rename a file and a few types to avoid confusion
Mikolaj Mar 25, 2011
729c0ac
refactor dungeon and movable creation
Mikolaj Mar 25, 2011
5dd6b46
new heroes can now easily be generated mid-game
Mikolaj Mar 25, 2011
3efa011
fix and extend HP regeneration
Mikolaj Mar 25, 2011
4e344cc
split Item in two, the half containing item definitions is ItemKind
Mikolaj Mar 25, 2011
f618512
gather all properties of an item in its definition; close #11 (almost)
Mikolaj Mar 26, 2011
d700b77
tweak colors for readability
Mikolaj Mar 26, 2011
0e2905a
rename Attr.hs to Color.hs
Mikolaj Mar 26, 2011
c5c829a
26 flavours ought to be enough for anybody
Mikolaj Mar 26, 2011
7be79d7
create a separate file for in-game effects
Mikolaj Mar 27, 2011
20a0752
potions now work via effects
Mikolaj Mar 27, 2011
0ec2133
in look mode, differentiate between "look" and "remember"
Mikolaj Mar 27, 2011
fa9bc38
give newly spawned monsters and heroes fresh indexes
Mikolaj Mar 27, 2011
52119d6
all physical damage now done through effects
Mikolaj Mar 27, 2011
c26a3d8
wand of domination now works through effects
Mikolaj Mar 27, 2011
2ace9a4
add 2 scrolls
Mikolaj Mar 27, 2011
d700898
move the implementation of Effects to a separate file
Mikolaj Mar 27, 2011
337d9c4
add potion of wounding
Mikolaj Mar 28, 2011
cd77a31
improve item UI a bit
Mikolaj Mar 28, 2011
45cf165
split ItemAction.hs off of Actions.hs
Mikolaj Mar 28, 2011
98af482
refactor ItemAction.hs
Mikolaj Mar 28, 2011
a345406
various UI tweaks
Mikolaj Mar 29, 2011
50ed98f
monsters now discover traitors if adjacent
Mikolaj Mar 29, 2011
273aa66
a bugfix and a few tweaks to items and effects
Mikolaj Mar 29, 2011
4d00940
potion of water was boring; tweaked
Mikolaj Mar 29, 2011
8dabd75
prevent free monster moves after domination; second part
Mikolaj Mar 29, 2011
f9d3c84
changes and additions to dice rolls for items
Mikolaj Mar 29, 2011
f799aa1
blind monsters don't see, but can smell; even under player domination
Mikolaj Mar 29, 2011
cf184ec
only gold and gems count for score
Mikolaj Mar 29, 2011
bd7a498
merge the V and R commands
Mikolaj Mar 30, 2011
e194de9
change the probability scaled by level to a more intuitive formula
Mikolaj Mar 30, 2011
899ffb3
add some magical jewelery
Mikolaj Mar 30, 2011
6a8b25f
fix a minor bug in item pickup
Mikolaj Mar 30, 2011
c529e07
reindent and comment ItemAction.hs before extending it
Mikolaj Mar 30, 2011
e55bb95
add item choice '_' that picks the first item on the floor
Mikolaj Mar 31, 2011
a8a3c43
fix messages and removing items from a dead hero's inventory
Mikolaj Mar 31, 2011
c28d014
speed up the gtk frontend
Mikolaj Apr 1, 2011
14ff83f
implement macros (only single mappings, for now)
Mikolaj Apr 1, 2011
e2bc759
mark important choices by turning the screen black and white
Mikolaj Apr 2, 2011
389ffd5
fully evaluate macros to catch errors in their definitions early
Mikolaj Apr 2, 2011
810d6ee
for in-game help override default keybindings with player aliases
Mikolaj Apr 5, 2011
e0ef25f
simplify the frontend interface even more
Mikolaj Apr 5, 2011
5d5900b
a TODO to have multi-char macros
Mikolaj Apr 5, 2011
c89bea5
avoid useless recomputation of the display function in gtk frontend
Mikolaj Apr 5, 2011
1413f3e
dramatic speedup of the gtk frontend
Mikolaj Apr 5, 2011
c32a171
a bytestring optimization of the gtk frontend
Mikolaj Apr 5, 2011
61f4c69
unify eyes and noses
Mikolaj Apr 6, 2011
302d666
bugfix: monster in shadow couldn't see heroes
Mikolaj Apr 6, 2011
e95f561
refactor strategy calculations
Mikolaj Apr 7, 2011
c2286dc
intelligent monsters move even more steady
Mikolaj Apr 7, 2011
a9a016b
strategy now contains actions, not dirs
Mikolaj Apr 7, 2011
3d69f3e
refactor strategies: pickup not an empty move any more
Mikolaj Apr 7, 2011
b3b5fb2
let monsters target heroes and prefer their targets
Mikolaj Apr 7, 2011
ea4a7e1
bugfix: nose was too common; wrongly copied from old format
Mikolaj Apr 8, 2011
6a595a9
add "last seen at" field to enemy target
Mikolaj Apr 8, 2011
4c364f8
unify strategy targetting for heroes and for traitor monsters
Mikolaj Apr 8, 2011
0c8d8a9
let monsters push through actors if chasing a target
Mikolaj Apr 8, 2011
e4e6055
simplify debug commands now that time is advanced manually
Mikolaj Apr 8, 2011
4dfcb34
improve target reset and guard commands that can use items from the f…
Mikolaj Apr 8, 2011
52ecc02
focus on summoned heroes and let a dying monster emit a dramatic yell
Mikolaj Apr 8, 2011
da2aa2e
generalize item usage functions to arbitrary actors
Mikolaj Apr 9, 2011
66e9f55
let monsters apply and throw items sometimes
Mikolaj Apr 9, 2011
d6f80aa
bugfix: I was not saving some messages to history
Mikolaj Apr 9, 2011
e9a9cd4
let applied items be always cosumed, to prevent AI loops
Mikolaj Apr 9, 2011
a8b32f4
bugfix: fast monsters desynchronized the party by attacking not selec…
Mikolaj Apr 10, 2011
c3de966
help monsters find room exits and forbid turning around in corridors
Mikolaj Apr 10, 2011
4a6d667
overhaul combat messages
Mikolaj Apr 10, 2011
c042c22
make the default config file closer to its dumped form
Mikolaj Apr 10, 2011
bfc4d8f
bumping into walls searches surroundings; close #32
Mikolaj Apr 11, 2011
f0b24cf
update the manual wrt the game and the game wrt the manual
Mikolaj Apr 11, 2011
fbc50e6
change the floor item character from _ to -
Mikolaj Apr 11, 2011
2b0954a
limit search by bumping only to walls and when not running
Mikolaj Apr 11, 2011
4422943
little edits to manuals
Mikolaj Apr 12, 2011
71c7038
use the 'P' key in place of 'M'
Mikolaj Apr 13, 2011
fc550fc
do not let on a secret door position by disallowing search via bumping
Mikolaj Apr 17, 2011
e1d2492
drop individual items instead of whole stacks
Mikolaj Apr 17, 2011
4543a7f
the double mystery about potion of water wasn't as much fun as I expe…
Mikolaj Apr 18, 2011
3cd423e
abort some actions with an empty message
Mikolaj Apr 18, 2011
7ea7803
port to GHC 7.0
Mikolaj May 7, 2011
bd2ab29
secret doors now searchable; close #32
Mikolaj May 28, 2011
9c28d06
grammar fix: replacing "a" by "the" takes into account "an"
Mikolaj May 28, 2011
d7d8f0d
rebalance the frequency of some items
Mikolaj Jul 6, 2011
5fd0b2c
make the fast eye the monster focused on a single (not the closest) foe
Mikolaj Jul 6, 2011
5d1700f
don't let blind monsters panic and use items when player in LOS
Mikolaj Jul 6, 2011
f04d77d
let waiting take time for AI monsters; close #42
Mikolaj Jul 7, 2011
6183089
update the distributed high scores file
Mikolaj Jul 8, 2011
ca2847d
add LambdaHack.scores to the release files; see #7 on kosmikus/Lambda…
Mikolaj Jul 8, 2011
fc61c15
make the beneficial and interesting scroll more common
Mikolaj Jul 9, 2011
6222c10
fix a typo in README
Mikolaj Jul 14, 2011
d0ae836
update the playing docs after kosmikus' playtesting
Mikolaj Jul 23, 2011
e696d1f
let monsters benefit from rings of searching, as per PLAYING.markdown
Mikolaj Jul 23, 2011
7801da1
fix the bug when a hero could descend stairs and land on occupied tile
Mikolaj Jul 24, 2011
3c5bf22
explain the ~/.LambdaHack directory
Mikolaj Jul 24, 2011
fc9c44a
make the credits blurb warmer
Mikolaj Jul 26, 2011
c3b0c2e
improve remarks about and inside the config file
Mikolaj Jul 27, 2011
990be33
make the config and other files more game-independent
Mikolaj Jul 27, 2011
6c5c971
make the config and other files maximally game-independent
Mikolaj Jul 27, 2011
7f19be2
rename the main Haskell file to Main.hs, to ease forking
Mikolaj Jul 27, 2011
9cfe372
improve the playing manual
Mikolaj Aug 4, 2011
a03cc33
make ghc 7.3 happy
Mikolaj Aug 4, 2011
2fe2852
revert a part of "abort some actions with an empty message"
Mikolaj Aug 4, 2011
b0e8c02
readd the deprecated syntax for quasiquotes, for 6.12.3 compatibility
Mikolaj Aug 4, 2011
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,4 +1,4 @@
LambdaHack.save
save
dist/
*~
*.swp
Expand Down
3 changes: 2 additions & 1 deletion CREDITS
@@ -1,4 +1,5 @@
Developers who have contributed significantly to LambdaHack:
All kinds of contributions to LambdaHack are gratefully welcome!
Some of the contributors are listed below, in chronological order.

Andres Loeh
Mikolaj Konarski
30 changes: 18 additions & 12 deletions LambdaHack.cabal
Expand Up @@ -3,8 +3,9 @@ name: LambdaHack
version: 0.1.20110117
license: BSD3
license-file: LICENSE
tested-with: GHC==7.0.3
data-files: LICENSE, CREDITS, DESIGN.markdown, PLAYING.markdown,
README.markdown, LambdaHack.config.example
README.markdown, src/config.default, scores
author: Andres Loeh <mail@andres-loeh.de>
maintainer: Andres Loeh <mail@andres-loeh.de>
description: a small roguelike game
Expand All @@ -22,22 +23,27 @@ flag vty
default: False

executable LambdaHack
main-is: LambdaHack.hs
main-is: Main.hs
hs-source-dirs:src
other-modules: Actor, Action, Actions, Command, Display, Display2, Dungeon,
File, FOV, FOV.Common, FOV.Digital, FOV.Permissive, FOV.Shadow,
Frequency, Geometry, Item, ItemState,
Keys, Keybindings, LambdaHack, Level, LevelState, Message,
Monster, Perception, Random, Save, State, Strategy,
StrategyState, Turn, Version, HighScores, Config,
Grammar
build-depends: base >= 4 && <5, containers >= 0.1 && < 1,
other-modules: Action, Actions, Color, Command, Config, ConfigDefault,
Display, Dungeon, DungeonState, Effect, EffectAction, File,
FOV, FOV.Common, FOV.Digital, FOV.Permissive, FOV.Shadow,
Frequency, Geometry, GeometryRnd, Grammar,
HighScores, Item, ItemKind, ItemAction,
Keys, Keybindings, Level, LevelState,
Main, Message, MovableAdd, MovableKind, Movable, MovableState,
Multiline, Perception, Random,
Save, State, Strategy, StrategyState,
Turn, Terrain, Version
build-depends: base >= 4 && < 5, containers >= 0.1 && < 1,
binary >= 0.4 && < 1,
random >= 1 && < 2, zlib >= 0.4 && < 1,
bytestring >= 0.9 && < 1, directory >= 1 && < 2,
mtl >= 1.1 && < 3, old-time, ConfigFile >= 1.0.6 && < 2,
MissingH >= 1.1.0.3 && < 1.2, filepath >= 1.1.0.3 && < 1.2
extensions: CPP, FlexibleContexts
MissingH >= 1.1.0.3 && < 1.2, filepath >= 1.1.0.3 && < 2,
template-haskell >= 2.5
extensions: CPP, FlexibleContexts, QuasiQuotes, MultiParamTypeClasses,
RankNTypes, BangPatterns
if flag(curses) {
other-modules: Display.Curses
build-depends: hscurses >= 1.3 && < 2
Expand Down
25 changes: 0 additions & 25 deletions LambdaHack.config.example

This file was deleted.

Binary file removed LambdaHack.scores
Binary file not shown.
140 changes: 91 additions & 49 deletions PLAYING.markdown
@@ -1,58 +1,71 @@
Playing LambdaHack
==================

Playing the game consist of walking around the dungeon and bumping
into things (doors, monsters, treasure). Once the few basic command keys
and on-screen symbols are learned, mastery and enjoyment of the game
is the matter of tactical skill and literary imagination.
Playing LambdaHack involves walking around the dungeon,
alone or in a party of fearless adventurers, jumping between levels,
bumping into monsters, doors and walls, gathering magical treasure
and making creative use of it. The bloodthirsty monsters do the same,
intelligence allowing, while tirelessly chasing the noble heroes
by smell and night-sight.

To be honest, right now you need a lot of imagination, since the game
is very basic, though playable and winnable. Contributions welcome.
Once the few basic command keys and on-screen symbols are learned,
mastery and enjoyment of the game is the matter of tactical skill
and literary imagination. To be honest, you need a lot of imagination
right now, since the game is still quite basic, though playable and winnable.
Contributions welcome.


Dungeon
-------

The goal of the hero is to explore the dungeon from top to the very bottom
(and grab lots of shiny treasure and gear on the way).
The goal of the hero is to explore the dungeon, battle the horrors within,
gather as much gold and gems as possible, and escape to tell the tale.
The dungeon consists of 10 levels and each level consists of 80 by 21 tiles.
The basic tiles tiles are as follows:
The basic tiles are as follows.

dungeon terrain type on-screen symbol
floor .
wall (horizontal and vertical) - and |
pillar wall O
corridor #
stairs (up and down) < and >
closed door +
open door | and -
rock blank

The game world is persistent, i.e., every time the hero visits a level
during one game, the level should look the same.
The game world is persistent, i. e., every time a hero visits a level
during a single game, the level layout looks the same. Some items
aid in dungeon exploration, e.g., a ring of searching improves the speed
of finding hidden doors by heroes and monsters. The higher the magical
bonus displayed for this and other dungeon items, the more effective it is.
Only the best item carried in a hero's or monster's inventory counts.
You can throw the rest away, but beware that your adversaries may pick it up
and use it against you.


Keys
----

Here are a few keys you can use in the game:
Below are the basic default keys.

key command
. wait
< ascend a level
> descend a level
? display help
Q quit without saving
X save and exit the game
c close a door
d drop an object
g get an object
i display inventory
o open a door
s search for secret doors
o open a door (alternatively, you can bump into a door)
q quaff a potion
M display previous messages
S save and quit the game
Q quit without saving
. wait
, pick up an object
: look around
< ascend a level
> descend a level
r read a scroll
s search for secret doors (or you can bump into a wall)

One of the ways of moving throughout the level is with the vi text editor keys
(also known as "Rogue-like keys"):
(also known as "Rogue-like keys").

key command
k up
Expand All @@ -67,45 +80,74 @@ One of the ways of moving throughout the level is with the vi text editor keys
Pressing a capital letter corresponding to a direction key will have
the hero run in that direction until something interesting occurs.

It's also possible to move using the numerical keypad, with Shift for running
and the middle '5' key for resting. (If you are using the curses frontend,
It is also possible to move using the numerical keypad, with Shift for running
and the middle '5' key for waiting. (If you are using the curses frontend,
numerical keypad may not work correctly for terminals with broken terminfo,
e.g., gnome terminal tends to have problems, while xterm works fine.)
e.g., gnome terminal has problems, while xterm works fine.)

Below are also some debug and cheat keys. Use at your peril!
To make a distance attack, you need to set your target first.
The targeting commands are listed below, together with all the other
less common player commands.

key command
ESC cancel action
RET accept choice
TAB cycle among heroes on level
0--9 select a hero anywhere in the dungeon (gtk only)
* target monster
/ target location
D dump current configuration
P display previous messages
V display game version
a aim a wand
t throw a weapon

There are also some debug and cheat keys. Use at your peril!

key command
v display the version of the game
O toggle "omniscience"
I display level meta-data
R toggle smell display
T toggle level generation sequence
V toggle field of vision display
I inform about level meta-data
R rotate display modes
T cycle among level terrain generation stages


Monsters
--------

The hero is not alone in the dungeon. Monsters roam the game world, too.
Monsters inhabit specific locations on the game map, and can be seen
if the tile they are on can be seen by the hero.
Every monster gets a turn per move of the hero. Monster moves
are restricted in the same way as hero moves, i.e., they cannot move
into obstacles like walls or rock. Some monsters
ignore the hero, others chase him only when they see him
and the especially dangerous kind is able to smell the hero.

When the hero moves into a monster or a monster bumps into the hero,
combat occurs. Whenever combat occurs, the attacked party may lose some health.
If the hero dies, the game ends.
The hero is not alone in the dungeon. Monsters roam the dark caves
and crawl from damp holes day and night. While heroes pay attention
to all other party members and take moves sequentially, one after another,
monsters don't care about each other and all move at once,
sometimes brutally colliding by mistake.

When the hero bumps into a monster or a monster attacks the hero,
melee combat occurs. The best weapon carried by each opponent
is taken into account for calculating bonus damage. The total damage
the current hero can potentially inflict is displayed at the bottom
of the screen. The total damage potential of a monster may change
as it finds and picks up new weapons. Heroes and monsters running
into another (with the Shift key) do not inflict damage, but change places.
This gives the opponent a free blow, but can improve the tactical situation
or aid escape.

Throwing weapons at targets wounds them, consuming the weapon in the process.
You can target a monster with the '*' key from the top row or numpad.
You may throw any object in your possession
(press '*' for a non-standard choice) or on the floor (press '-'),
though only objects of a few kinds inflict any damage.
Whenever a monster or a hero hit points reach zero, the combatant dies.
When the last hero dies, the game ends.


On Winning and Dying
--------------------

If you happen to die, you are free to start again from the first level
of the dungeon, but all your treasure is gone and the dungeon will look
different this time.
You win the game if you escape the dungeon alive. Your score is
the sum of all gold you've plundered plus 100gp for each gem.
Only the loot in possession of the party members on level 1 counts
(the rest is considered MIA).

You win the game if you escape the dungeon alive with treasure and valuable
items --- the more the better!
If all heroes die, your score is halved and only the treasure carried
by the last standing hero counts. You are free to start again
from the first level of the dungeon, but all your wealth and items
are gone and the dungeon and it's treasure look differently.
15 changes: 15 additions & 0 deletions README.markdown
Expand Up @@ -2,6 +2,10 @@ LambdaHack
==========

LambdaHack is a small [roguelike] [1] game written in [Haskell] [2].
It is getting more and more configurable and aims to become a flexible
rouguelike engine, suitable for large and small dungeon crawling games
of arbitrary themes. In particular, we try to keep AI independent
of monster, item and terrain definitions.


Compilation and installation
Expand All @@ -23,6 +27,17 @@ or you may try one of the terminal frontends with
cabal install -fvty


Savegame directory
------------------

If you don't want LambdaHack to write to the current directory,
create a personal savegame directory (on Linux it's ~/.LambdaHack/).
and copy the scores file there. You may also want to
copy the configuration file src/config.default to
~/.LambdaHack/config and modify it, but be careful changing
gameplay options --- they can easily unbalance or break the game.


Further information
-------------------

Expand Down
Binary file added scores
Binary file not shown.