diff -r stone_soup-0.3.2-src-orig/docs/crawl_options.txt stone_soup-0.3.2-src/docs/crawl_options.txt
94a95,96
> 8-  Cheating.
> 
1293c1295
< ==============
---
> ==================
1498c1500
< ------------------
---
> ==================
1527a1530,1597
> 
> 
> 8-      Cheating
> ================
> 
> Certain options are *very* contrary to the spirit of Crawl.  They
> are available for those who want a very different (and less
> authentically roguelike) play experience.  Setting any of them flags
> any character you load with them in your .crawlrc as a cheater, and
> nasty messages to that effect will be printed in all high score
> lists and character dumps.
> 
> This whole set of options is disabled by default; ALLOW_CHEATING
> must be turned on in AppHdr.h at compile time.
> 
> cheating_monster_freq_div = 1
> 	If set to anything higher than 1, multiplies the frequency
> 	of monster spawning by that amount.  It's called _div for
> 	internal reasons.  The maximum effective value is 240, but
> 	anything above 20 or so is likely to present an
> 	insurmountable challenge.  Values between 1 and 20 or so
> 	make the game easier by allowing the player to rack up far
> 	more experience and collect more bodies for food.
>     
> cheating_no_death = false
> 	If set to true, the game's basic response to character death
> 	is to restore 1 hit point, and clear some things that are
> 	likely to instantly kill the character again (poison,
> 	disease, starvation, and paralysis).  A much more
> 	interesting gaming experience can be achieved by combining
> 	this option with some of the "Cheating Death Options" below,
> 	all of which require this option to be true to have any
> 	effect whatsoever.
> 
> 8-a     Cheating Death Options
> ------------------------------
> 
> cheating_death_back_to_start = false
> 	On death, the character is returned to the beginning of the
> 	dungeon if they are still descending.  If they've gotten the
> 	Orb and they are in the main dungeon, the are returned to
> 	the bottom-most level (this is *supposed* to be a penalty,
> 	you see).  In all other cases (i.e. have the Orb but aren't
> 	in a normal dungeon level) nothing happens.
> 
> cheating_death_heal = false
> 	Fully heals the character on death.
> 	
> cheating_death_fill_belly = false
> 	Fully fills the character's belly on death (i.e. character
> 	becomes Engorged).
> 
> cheating_death_lose_levels = 0
> 	The number of levels the character has drained from them as
> 	a penalty for death.  Note that when ascending with the Orb
> 	and with cheating_death_back_to_start turned on, this can
> 	lead to losing the levels and then being shunted back to
> 	level 27 of the main dungeon, which is A Bad Thing.
> 	
> cheating_death_lose_gold = false
> 	All gold is lost on death.
> 	
> cheating_death_lose_random_items = 0
> 	Lose this number of randomly selected items on death.
> 
> cheating_death_lose_wielded_item = false
> 	Lose the weapon you are wielding (presumably one of the most
> 	important items you have) on death.
diff -r stone_soup-0.3.2-src-orig/source/AppHdr.h stone_soup-0.3.2-src/source/AppHdr.h
348a349
> //
350a352,356
> // Allow cheating options.  Characters are tagged as cheaters in all
> // dumps and scores.
> //
> // #define ALLOW_CHEATING
> 
diff -r stone_soup-0.3.2-src-orig/source/chardump.cc stone_soup-0.3.2-src/source/chardump.cc
70a71
> static void sdump_special(dump_params &);
122a124
>     { "special",        sdump_special       },
347a350
>     sdump_special(par);
570a574,597
> static void sdump_special(dump_params &par)
> {
>     if( you.wizard )
>     {
>         par.text += "You were a *WIZARD*.\n";
>     }
> 
> #ifdef ALLOW_CHEATING
>     if( you.cheater )
>     {
>         par.text += "You were a damned dirty *CHEATER*";
> 	if( you.num_cheater_deaths )
> 	{
> 	    char tmp_quant[20];
> 	    par.text += " who cheated death ";
> 	    itoa( you.num_cheater_deaths, tmp_quant, 10 );
> 	    par.text += tmp_quant;
> 	    par.text += " time(s)";
> 	}
> 	par.text += ".\n";
>     }
> #endif
> }
> 
diff -r stone_soup-0.3.2-src-orig/source/externs.h stone_soup-0.3.2-src/source/externs.h
647a648,651
> #ifdef ALLOW_CHEATING
>   bool          cheater;              // true if player is using cheating options
>   unsigned char num_cheater_deaths;   // number of times the (cheating) player has died
> #endif
826a831,834
> #ifdef ALLOW_CHEATING
>     bool cheater;
>     unsigned num_cheater_deaths;
> #endif
1491a1500,1512
> #ifdef ALLOW_CHEATING
>     // CHEATING OPTIONS
>     unsigned	cheating_monster_freq_div;		// Make regular dungeon monster spawning this multiple more frequent
>     bool	cheating_no_death;			// "Death" gives back 1 HP
>     bool	cheating_death_back_to_start;		// "Death" teleports you back to the beginning of the dungeon
>     bool	cheating_death_heal;			// "Death" gives back all HP
>     bool	cheating_death_fill_belly;		// "Death" removes all hunger
>     unsigned	cheating_death_lose_levels;		// "Death" strips N experience levels
>     bool	cheating_death_lose_gold;		// "Death" strips all your gold
>     unsigned	cheating_death_lose_random_items;	// "Death" strips N random items
>     bool	cheating_death_lose_wielded_item;	// "Death" strips the weapon/item you are wielding (in addition to any random items)
> #endif
> 
diff -r stone_soup-0.3.2-src-orig/source/hiscores.cc stone_soup-0.3.2-src/source/hiscores.cc
533a534,537
> #ifdef ALLOW_CHEATING
>     cheater = se.cheater;
>     num_cheater_deaths = se.num_cheater_deaths;
> #endif
645a650,653
> #ifdef ALLOW_CHEATING
>     cheater = fields->int_field("cheater");
>     num_cheater_deaths = fields->int_field("num_cheater_deaths");
> #endif
697a706,713
> #ifdef ALLOW_CHEATING
>     if (cheater)
>     {
>         fields->add_field("cheater", "%d", cheater);
>         fields->add_field("num_cheater_deaths", "%d", num_cheater_deaths);
>     }
> #endif
>     
882a899,902
> #ifdef ALLOW_CHEATING
>     cheater = 0;
>     num_cheater_deaths = 0;
> #endif
999a1020,1025
> 
> #ifdef ALLOW_CHEATING
>     cheater = (you.cheater ? 1 : 0);
> 
>     num_cheater_deaths = you.num_cheater_deaths;
> #endif
1161a1188,1190
>     char cheating[20];
> 
>     sprintf( cheating, "" );
1178a1208,1219
> #ifdef ALLOW_CHEATING
>     if( cheater == 1 )
>     {
> 	if( num_cheater_deaths > 0 )
> 	{
> 	    sprintf( cheating, "C%dD", num_cheater_deaths);
> 	} else {
> 	    sprintf( cheating, "C" );
> 	}
>     }
> #endif
> 
1180,1181c1221,1223
<              "%8ld %-10s %s-%02d%s", points, scname.c_str(),
<              char_desc.c_str(), lvl, (wiz_mode == 1) ? "W" : "" );
---
>              "%8ld %-10s %s-%02d%s%s", points, scname.c_str(),
>              char_desc.c_str(), lvl, (wiz_mode == 1) ? "W" : "",
> 	     cheating );
1229a1272,1286
> #ifdef ALLOW_CHEATING
>     if( cheater == 1 )
>     {
> 	char cheating[20];
> 	if( num_cheater_deaths > 0 )
> 	{
> 	    sprintf( cheating, ") *CHEATER*, cheated death %d time(s)", num_cheater_deaths);
> 	} else {
> 	    sprintf( cheating, ") *CHEATER*" );
> 	}
> 	desc += cheating;
>     } else {
> 	desc += wiz_mode? ") *WIZ*" : ")";
>     }
> #else
1230a1288
> #endif
diff -r stone_soup-0.3.2-src-orig/source/hiscores.h stone_soup-0.3.2-src/source/hiscores.h
117a118,121
> #ifdef ALLOW_CHEATING
>     char        cheater;            // character cheated
>     char        num_cheater_deaths; // character cheated death
> #endif
diff -r stone_soup-0.3.2-src-orig/source/initfile.cc stone_soup-0.3.2-src/source/initfile.cc
735a736,748
> #ifdef ALLOW_CHEATING
>     // CHEATING OPTIONS
>     cheating_monster_freq_div = 1;
>     cheating_no_death = false;
>     cheating_death_back_to_start = false;
>     cheating_death_heal = false;
>     cheating_death_fill_belly = false;
>     cheating_death_lose_levels = 0;
>     cheating_death_lose_gold = false;
>     cheating_death_lose_random_items = 0;
>     cheating_death_lose_wielded_item = false;
> #endif
> 
2591a2605,2650
> #ifdef ALLOW_CHEATING
>     // CHEATING OPTIONS
>     else if (key == "cheating_monster_freq_div") {
>         cheating_monster_freq_div = atoi( field.c_str() );
>         if (cheating_monster_freq_div < 1)
>             cheating_monster_freq_div = 1;
>         if (cheating_monster_freq_div > 240)
>             cheating_monster_freq_div = 240;
> 	if (cheating_monster_freq_div != 1)
> 	    you.cheater = 1;
>     }
>     else if (key == "cheating_no_death") {
> 	cheating_no_death = read_bool(field, cheating_no_death);
> 	if (cheating_no_death)
> 	    you.cheater = 1;
>     }
>     // you.cheater isn't set for these next few options because
>     // none of the cheating_death options have effect unless
>     // cheating_no_death is true, and cheating_no_death sets
>     // you.cheat.
>     else if (key == "cheating_death_back_to_start") {
> 	cheating_death_back_to_start = read_bool(field, cheating_death_back_to_start);
>     }
>     else if (key == "cheating_death_heal") {
> 	cheating_death_heal = read_bool(field, cheating_death_heal);
>     }
>     else if (key == "cheating_death_fill_belly") {
> 	cheating_death_fill_belly = read_bool(field, cheating_death_fill_belly);
>     }
>     else if (key == "cheating_death_lose_gold") {
> 	cheating_death_lose_gold = read_bool(field, cheating_death_lose_gold);
>     }
>     else if (key == "cheating_death_lose_wielded_item") {
> 	cheating_death_lose_wielded_item = read_bool(field, cheating_death_lose_wielded_item);
>     }
>     else if (key == "cheating_death_lose_levels") {
>         cheating_death_lose_levels = atoi( field.c_str() );
>         if (cheating_death_lose_levels < 0)
>             cheating_death_lose_levels = 0;
>     }
>     else if (key == "cheating_death_lose_random_items") {
>         cheating_death_lose_random_items = atoi( field.c_str() );
>         if (cheating_death_lose_random_items < 0)
>             cheating_death_lose_random_items = 0;
>     }
> #endif
diff -r stone_soup-0.3.2-src-orig/source/makefile.dep stone_soup-0.3.2-src/source/makefile.dep
312,314c312,314
<   externs.h FixAry.h FixVec.h debug.h mpr.h chardump.h delay.h files.h \
<   hiscores.h invent.h menu.h format.h itemname.h itemprop.h items.h \
<   macro.h message.h misc.h mon-util.h monstuff.h notes.h player.h \
---
>   externs.h FixAry.h FixVec.h debug.h mpr.h chardump.h delay.h food.h \
>   files.h hiscores.h invent.h menu.h format.h itemname.h itemprop.h \
>   items.h macro.h message.h misc.h mon-util.h monstuff.h notes.h player.h \
316c316
<   tutorial.h view.h
---
>   tutorial.h view.h branch.h
diff -r stone_soup-0.3.2-src-orig/source/monplace.cc stone_soup-0.3.2-src/source/monplace.cc
191c191,195
<         && one_chance_in((you.char_direction == GDT_DESCENDING) ? 240 : 8))
---
> #ifdef ALLOW_CHEATING
>         && one_chance_in((you.char_direction == GDT_DESCENDING) ? (240 / Options.cheating_monster_freq_div) : 8))
> #else
>         && one_chance_in((you.char_direction == GDT_DESCENDING) ? (240) : 8))
> #endif
diff -r stone_soup-0.3.2-src-orig/source/ouch.cc stone_soup-0.3.2-src/source/ouch.cc
55a56
> #include "branch.h"
58a60
> #include "food.h"
813d814
< #ifdef WIZARD
817a819,966
> #ifdef ALLOW_CHEATING
> 	// CHEATING options; death cheating, in particular.
> 	if( you.cheater && Options.cheating_no_death )
> 	{
> 	    int old_level = you.your_level;
> 
> 	    mpr( "Your being a damned dirty cheater protects you from death!", MSGCH_DANGER );
> 	    // Increment the deaths count.
> 	    you.num_cheater_deaths++;
> 
> 	    // Give enough HP to be alive
> 	    if( you.hp <= 0 )
> 	    {
> 		set_hp(1, false);
> 	    }
> 	    // Give enough levels/XP to be alive
> 	    if( you.experience < 0 )
> 	    {
> 		you.experience = 0;
> 		you.experience_level = 1;
> 	    }
> 	    // This shouldn't actually happen, by the way
> 	    if( you.experience_level < 1 )
> 	    {
> 		you.experience = 0;
> 		you.experience_level = 1;
> 	    }
> 	    // Don't be completely starving
> 	    if( you.hunger < 2000 )
> 	    {
> 		set_hunger( 2000, true );
> 	    }
> 
> 	    // Clear things likely to kill the player instantly
> 	    reduce_poison_player( 1000 );
> 	    if( you.disease )
> 	    {
> 		you.disease=1;
> 		dec_disease_player();
> 	    }
> 	    if ( you.duration[DUR_PARALYSIS] > 0 )
> 	    {
> 		you.duration[DUR_PARALYSIS]=0;
> 		mpr( "You can move again.", MSGCH_DURATION);
> 	    }
> 
> 	    if( Options.cheating_death_heal )
> 	    {
> 		mpr( "Your being a damned dirty cheater restores your hit points!", MSGCH_DANGER );
> 		set_hp(you.hp_max, false);
> 	    }
> 
> 	    if( Options.cheating_death_fill_belly )
> 	    {
> 		mpr( "Your being a damned dirty cheater fills your belly!", MSGCH_DANGER );
> 		set_hunger( 12000, true );
> 	    }
> 
> 	    if( Options.cheating_death_lose_gold )
> 	    {
> 		mpr( "As a penalty for cheating death, you lose all your gold!", MSGCH_DANGER );
> 		you.gold = 0;
> 		you.redraw_gold = 1;
> 	    }
> 
> 	    if( Options.cheating_death_lose_wielded_item && you.equip[EQ_WEAPON] != -1 )
> 	    {
> 		mprf( MSGCH_DANGER, "As a penalty for cheating death, you lose your weapon, %s!", (you.inv[you.equip[EQ_WEAPON]]).name(DESC_NOCAP_A).c_str() );
> 		dec_inv_item_quantity( you.equip[EQ_WEAPON], 1 );
> 	    }
> 
> 	    for( unsigned i = 1; i <= Options.cheating_death_lose_levels; i++ )
> 	    {
> 		// Have to add a bit to deal with the grape jelly
> 		// ouch in lose_levels
> 		inc_hp( 4, true );
> 
> 		// Can't go below 1, because that would kill us
> 		// again, which would bring us back here...
> 		if( you.experience_level <= 1 )
> 		{
> 		    if( you.experience > 0 )
> 		    {
> 			mpr( "As a penalty for cheating death, you lose experience!", MSGCH_DANGER );
> 		    }
> 		    you.experience = 0;
> 		    you.experience_level = 1;
> 		}
> 		if( you.experience_level >= 2 )
> 		{
> 		    mpr( "As a penalty for cheating death, you lose a level of experience!", MSGCH_DANGER );
> 		    lose_level();
> 		}
> 
> 		// Take back the free stuff
> 		dec_max_hp(4);
> 		dec_hp(4, false, NULL);
> 	    }
> 
> 	    for( unsigned i = 1; i <= Options.cheating_death_lose_random_items; i++ )
> 	    {
> 		// Count the items, select a random number in that
> 		// range, then find that item and destroy it
> 		int num_items = inv_count();
> 		int delete_item = random2(num_items);
> 		int which_item = 0;
> 
> 		for (int j = 0; j < ENDOFPACK; ++j)
> 		{
> 		    if( is_valid_item(you.inv[j]) )
> 			which_item++;
> 		    if( which_item == delete_item )
> 		    {
> 			//mprf("You drop %s.", quant_name(you.inv[i], delay.parm2, DESC_NOCAP_A).c_str());
> 			mprf( MSGCH_DANGER, "As a penalty for cheating death, you lose %s!", you.inv[j].name(DESC_NOCAP_A).c_str() );
> 		    }
> 		}
> 	    }
> 
> 	    // Normal characters go back to the start
> 	    if( Options.cheating_death_back_to_start && you.char_direction != GDT_ASCENDING )
> 	    {
> 		mpr( "As a penalty (sort of) for cheating death, you are returned to the start of the dungeon!", MSGCH_DANGER );
> 		you.level_type = LEVEL_DUNGEON;
> 		you.where_are_you = BRANCH_MAIN_DUNGEON;
> 		you.your_level = -1;
> 		down_stairs( old_level, DNGN_STONE_STAIRS_DOWN_I );
> 	    }
> 	    // Characters on their way up go back to the end
> 	    if( Options.cheating_death_back_to_start && you.char_direction == GDT_ASCENDING )
> 	    {
> 		// -1 so we go down to the last level, -1 because
> 		// the main dungeon counts from 0
> 		you.level_type = LEVEL_DUNGEON;
> 		you.where_are_you = BRANCH_MAIN_DUNGEON;
> 		you.your_level = (your_branch().depth - 2);
> 		magic_mapping(1000, 100, true, true);
> 		mpr( "As a penalty for cheating death, you are returned to end of the dungeon!", MSGCH_DANGER );
> 		down_stairs( old_level, DNGN_STONE_STAIRS_DOWN_I );
> 	    }
> 
> 	    more();
> 
> 	    return;
> 	}
> #endif
> 
> #ifdef WIZARD
839d987
<     }
840a989
>     }
diff -r stone_soup-0.3.2-src-orig/source/player.cc stone_soup-0.3.2-src/source/player.cc
4842a4843,4847
> #ifdef ALLOW_CHEATING
>     cheater = false;
>     num_cheater_deaths = 0;
> #endif
> 
4992a4998,5001
> #ifdef ALLOW_CHEATING
>     cheater = rhs.cheater;
>     num_cheater_deaths = rhs.num_cheater_deaths;
> #endif
5015a5025,5032
> #ifdef ALLOW_CHEATING
>     if (cheater)
> 	desc << " (CHEATER)";
>     if (num_cheater_deaths)
> 	desc << " (has died " << num_cheater_deaths << " times)";
> #endif
> 
> 
diff -r stone_soup-0.3.2-src-orig/source/tags.cc stone_soup-0.3.2-src/source/tags.cc
914a915,918
> #ifdef ALLOW_CHEATING
>     marshallByte( th, you.cheater );
>     marshallByte( th, you.num_cheater_deaths );
> #endif
1254a1259,1262
> #ifdef ALLOW_CHEATING
>     you.cheater = unmarshallByte(th);
>     you.num_cheater_deaths = unmarshallByte(th);
> #endif
