Shopkeeper now buys stuff for 60% of the price
Yes-no dialog works (in shop, at least) during chat
Merge git://github.com/zokier/todd-zok
Merge git://github.com/zokier/todd-zok
Dead players leave corpses, player stumble upon them and rob them

* Corpses are left on the dungeon level where the player died
* If there's = 1 corpse, it's automatically found
* if there's > 1 corpses, a random corpse if ound
* If the corpse has no money, nothing is displayed
* If the corpse has money, display an event, get the money, update database so the corpse has no money anymore

misc:
	* removed an old TODO -msg from dailybot
backspace implementation, works like charm
input:
	* cursor now visible
	* backspace is not jumping

TODO:
fix a bug when backspace starts jumping:
Write "§stuff" to input and press backspace repeatedly, you see the cursor going wild
backspace now working with multibyte chars
Graveyard for showing highscores
	* checking for corpses now a random event, not automatic
	* check_corpses code beautification
	* graveyard contains the corpses that have been found (LOC_DEAD_GRAVEYARD)
	* TODO: what about corpses still rotting? Bards sing about lost heroes?
	* TODO: loots corpses with 0 money, maybe change the text?
Small bugfixes and improvements:
	* Bartender willie now updates stamina to 100, increase money by 100 and sets health to max_health
	* Enter new partyid: visible cursor set to input_win instead of log_win (after ncurs_log_sysmsg)
	* View stats ('v') can now be done anywhere in the game, it doesn't need to be an option in Location
return to town, run and going to dungeons work differently
	* ac_dungeons and ac_return_to_town are wrappers that take the player up or down dungeon levels
	* "Run" in lower levels don't take directly to town
	* town = dungeon_lvl 0, dungeon entrance = lvl 1 and so on
	* problem: dungeon entrance text (Beware of bugs) doesn't make sense coming from dungeon level 2 -> level 1
Fainting - code works in theory but not tested in practise
	* when player receives elemental imbalance, fainting occurs
	* game over for the day (playing = false)
	* dailybot recognizes LOC_FAINTED

TODO:
	* don't allow players to return to game when LOC_FAINTED
	* make out dailybot rules for fixing elemental balances
		* max_elem like in health / max_health ??
		* stamina recovery when fainted?
	* what happens to the player? do they stay in the dungeons, are they carried out, what?

misc: is "fainted" proper english?
Elemental bonus based on time of day

If character skill damage type matches the element "in charge" of that 4-hour period,
character gets a bonus of skill->damage / 2 (TODO: balance).

The cycle is as follows
03-07 metal
07-11 earth
11-15 fire (first time)
15-19 water
19-23 fire (second time)
23-03 wood

Balancing needs to be done, metal sucks because of the time, fire is there twice in the cycle
Party names

* A player doesn't join a party at startup
* Parties now have names. When gathering a party, a name is asked
* View stats displays the name
	* View stats displays "Not in a party" if a player hasn't joined a party

TODO:
	* partyid should be automatically assigned, not by the user
	* when joining a party, display a list of existing parties
Parties: list, join, gather new

Parties are now done in the databas, see README for new table parties.

What works:
Tavern -> Gather a party

What doesn't:
* When forming a new party the player should quit the previous one
* Tavern -> Join (does nothing)
* Tavern -> List parties only displays the first party member (will be fixed once Join works)
Parties: list parties / join a party

HERE BE DRAGONS - very ugly code ahead

List parties:
	* lists party id (for debugging), party name and members
	* TODO
		* prettify the listing
		* combine the two ugly database commands into one (= prettify code)
Join a party:
	* player is shown a listing of parties _that have available spaces to join_
	* player can't join a party if player already is in that party
	* when a player joins a party, the first available slot (NULL slot) is occupied

TODO:
	* Quit party
	* code cleanup
		* in join party, struct tempstuff COULD JUST BE A Character??
		* database stuff (mentioned above)

Other:
listselect:
	* werase(command_win) now in listselect
parties: data is loaded at startup

what works:
	player partyid and party name are loaded

what doesn't:
	characters: &player would be easy, but how to deal with the other 2 players?
	Should we make a character party_member1 and party_member2?
	This one depends on the multiplayer implementation

assumptions:
	Query always loads the first party where a player is joined,
	because it's assumed that player can only join one party at a time (isn't the case at the moment)
dailybot --reset now resets all databases

* Use dailybot --reset to quickly reset the database -> reset the game
* Also use it to setup the database before the game is run for the first time
	* no need to fill the database manually
* TODO:
When the game is setup with dailybot --reset, we get the following (nonfatal) error message:

ToDD-DAILYBOT[12851]: Postgres init error: ERROR:  relation "player_logins" does not exist
LINE 1: select id from player_logins where name = $1;

We should get rid of this.
database reset alter schema permission fix
parties: leave, list & join now work perfectly (except for...)

everything works, apparently bug free:

leave party:
        * leaves current party
	* TODO: when last player leaves a party, delete it

list parties:
        * lists current parties, properly format if more than 1 player

join party:
        * cannot join if you're already in a party
        * joins selected party

commit includes a lot of code modifications and  simplifications.

NEW FILE: src/party.c
parties: when the last player leaves the party, the party will be destroyed.