Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
NOT_PERMADEATH patch.
- To: crossfire (at) ifi.uio.no
- Subject: NOT_PERMADEATH patch.
- From: Charles Henrich <>
- Date: Fri, 9 Apr 93 11:29:11 EDT
Well my players and I have gotten too irritated at dying and losing everything
because of a stupid party member opening doors on dragons, or by doing
something inadvertantly... Soo, I decided to make death more paletable. With
this patch #define'd death no longer kills you permanently. Instead, you (and
your items) are whisked back to the start town, where you instantly lose 20% of
your experience, and one of your stats permanently. Although this sounds
painless, it isnt! 20% of a million or more is LOTS, and HURTS! In any case,
here's the changes if your interested:
Charles Henrich Michigan State University
*** player.c Thu Apr 8 05:50:46 1993
--- player.new Fri Apr 9 11:23:18 1993
***************
*** 1483,1488 ****
--- 1483,1616 ----
}
else
sprintf(buf,"%s died.",op->name);
+
+ #ifdef NOT_PERMADEATH
+ /****************************************************************************/
+ /* Patch: NOT_PERMADEATH Author: Charles Henrich */
+ /* Email: Date : April 9, 1993 */
+ /* */
+ /* Purpose: This patch changes death from being a permanent, very painful */
+ /* thing, to a painful, but survivable thing. More mudlike in */
+ /* nature. With this patch defined, when a player dies, they will */
+ /* permanently lose one point off of a random stat, as well as */
+ /* losing 20% of their experience points. Then they are whisked */
+ /* to the start map. Although this sounds very nice here, it is */
+ /* still REAL painful to die, 20% of a million is alot! */
+ /* */
+ /****************************************************************************/
+
+ /**************************************/
+ /* */
+ /* Pick a stat, and steal on pt from */
+ /* it... */
+ /* */
+ /**************************************/
+
+ switch(RANDOM()%6)
+ {
+ case 0:
+ {
+ if(op->stats.Dex > 1) op->stats.Dex--;
+ op->contr->orig_stats.Dex=op->stats.Dex;
+ break;
+ }
+
+ case 1:
+ {
+ if(op->stats.Con > 1) op->stats.Con--;
+ op->contr->orig_stats.Con=op->stats.Con;
+ break;
+ }
+
+ case 2:
+ {
+ if(op->stats.Int > 1) op->stats.Int--;
+ op->contr->orig_stats.Int=op->stats.Int;
+ break;
+ }
+
+ case 3:
+ {
+ if(op->stats.Cha > 1) op->stats.Cha--;
+ op->contr->orig_stats.Cha=op->stats.Cha;
+ break;
+ }
+
+ case 4:
+ {
+ if(op->stats.Str > 1) op->stats.Str--;
+ op->contr->orig_stats.Str=op->stats.Str;
+ break;
+ }
+ case 5:
+ {
+ if(op->stats.Wis > 1) op->stats.Wis--;
+ op->contr->orig_stats.Wis=op->stats.Wis;
+ break;
+ }
+ }
+
+ tmp=arch_to_object(find_archetype("gravestone"));
+
+ /**************************************/
+ /* */
+ /* Lets make up a gravestone to put */
+ /* here... We put experience lost on */
+ /* it for kicks.... */
+ /* */
+ /**************************************/
+
+ sprintf(buf,"%s's gravestone",op->name);
+ tmp->name=add_string(buf);
+ sprintf(buf,"RIP\nHere rests the hero %s the %s,\n"
+ "who lost %d experience when killed\n"
+ "by %s.\n",
+ op->name, op->contr->title, (int)(op->stats.exp * 0.20),
+ op->contr->killer);
+ tmp->msg = add_string(buf);
+ tmp->x=op->x,tmp->y=op->y;
+ insert_ob_in_map(tmp,op->map);
+
+ /**************************************/
+ /* */
+ /* Move the player to the beginning */
+ /* map.... */
+ /* */
+ /**************************************/
+
+ tmp=get_object();
+ EXIT_LEVEL(tmp) = first_map_level;
+ EXIT_X(tmp) = -1;
+ EXIT_Y(tmp) = -1;
+ enter_exit(op,tmp);
+ free_object(tmp);
+
+ /**************************************/
+ /* */
+ /* Subtract the experience points, */
+ /* if we died cause of food, give us */
+ /* food, and reset HP's... */
+ /* */
+ /**************************************/
+
+ add_exp(op, (op->stats.exp * -0.20));
+ if(op->stats.food < 0) op->stats.food = 500;
+ op->stats.hp = op->stats.maxhp;
+
+ /**************************************/
+ /* */
+ /* Repaint the characters inv, and */
+ /* stats, and show a nasty message ;) */
+ /* */
+ /**************************************/
+
+ draw_stats(op);
+ draw_all_inventory(op);
+ draw_info(op,"!!!!! YOU HAVE DIED, (HE HE HE :) !!!!!");
+ info_flush();
+ return;
+ #endif
+
#ifdef SIMPLE_PARTY_SYSTEM
op->contr->party_number=(-1);
#endif /* SIMPLE_PARTY_SYSTEM */