Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
More diffs.
- To: crossfire (at) ifi.uio.no
- Subject: More diffs.
- From: Moonchilde <>
- Date: Tue, 29 Sep 1992 21:41:46 -0400 (EDT)
- Sender: "Joseph L. Traub" <>
The following patches were created of of 0.87.8
They fix the following problems
If a player was wearing a negative food ring, he starved slowly. This seemed
like it should be a positive feature as it lets a high hp player try to find
food. It was a simple problem of rearranging a sign.
If a player had a zero stat and saved, when the character was restored, a
'random' value would appear in that stat slot.. The solution is to zero
the stat slots before the read_object() in check_login().
The patch also provides an alternative food use method for those who don't
like the fact that high HP characters burned food like crazy. This alternative
is #ifdeffed.
--JT
--------------------------cut here---------------------------
*** main.c.old Mon Sep 28 22:46:43 1992
--- main.c Tue Sep 29 21:30:03 1992
***************
*** 291,297 ****
strcpy(buf1,"grind");
strcpy(buf2," to dust");
} else {
! strcpy(buf1,"shread");
strcpy(buf2," to pieces");
}
messages.msg1=buf1,messages.msg2=buf2;
--- 291,297 ----
strcpy(buf1,"grind");
strcpy(buf2," to dust");
} else {
! strcpy(buf1,"shred");
strcpy(buf2," to pieces");
}
messages.msg1=buf1,messages.msg2=buf2;
***************
*** 1227,1238 ****
char buf[MAX_BUF];
object *tmp;
int last_food=op->stats.food;
int gen_hp=(op->contr->gen_hp+1)*op->stats.maxhp;
int gen_sp=(op->contr->gen_sp+1)*op->stats.maxsp;
if(!op->state&&op->contr->golem==NULL&&--op->last_sp<0) {
! if(op->stats.sp<op->stats.maxsp)
! op->stats.sp++,op->stats.food--;
op->last_sp=2000/(gen_sp<20 ? 30 : gen_sp+10);
for(tmp=op->inv;tmp!=NULL;tmp=tmp->below)
if((tmp->type==ARMOUR||tmp->type==HELMET||tmp->type==BOOTS||
--- 1227,1246 ----
char buf[MAX_BUF];
object *tmp;
int last_food=op->stats.food;
+ #ifdef SLOW_FOOD_USE
+ int gen_hp=(op->contr->gen_hp+1);
+ int to_heal = gen_hp + op->stats.maxhp/50;
+ int can_heal = (op->stats.hp==op->stats.maxhp ? 0 : 1);
+ #else
int gen_hp=(op->contr->gen_hp+1)*op->stats.maxhp;
+ #endif
int gen_sp=(op->contr->gen_sp+1)*op->stats.maxsp;
if(!op->state&&op->contr->golem==NULL&&--op->last_sp<0) {
! if(op->stats.sp<op->stats.maxsp) {
! op->stats.sp++;
! op->stats.food--;
! }
op->last_sp=2000/(gen_sp<20 ? 30 : gen_sp+10);
for(tmp=op->inv;tmp!=NULL;tmp=tmp->below)
if((tmp->type==ARMOUR||tmp->type==HELMET||tmp->type==BOOTS||
***************
*** 1240,1258 ****
op->last_sp+=ARMOUR_SPELLS(tmp);
}
if(!op->state&&--op->last_heal<0) {
! if(op->stats.hp<op->stats.maxhp)
! op->stats.hp++,op->stats.food--;
op->last_heal=1200/(gen_hp<20 ? 30 : gen_hp+10);
op->stats.food--;
if(op->contr->digestion<0)
op->stats.food+=op->contr->digestion;
else if(op->contr->digestion>0&&RANDOM()%op->contr->digestion)
! op->stats.food=last_food;
}
! if(op->contr->digestion<0)
!
! while(op->stats.food<0&&op->stats.hp>0)
! op->stats.food++,op->stats.hp--;
if (!op->state&&!IS_WIZ(op)&&(op->stats.hp<0||op->stats.food<0)) {
if(op->stats.food<0) {
--- 1248,1286 ----
op->last_sp+=ARMOUR_SPELLS(tmp);
}
if(!op->state&&--op->last_heal<0) {
! if(op->stats.hp<op->stats.maxhp) {
! #ifdef SLOW_FOOD_USE
! op->stats.hp += to_heal;
! if(op->stats.hp > op->stats.maxhp) {
! to_heal -= (op->stats.hp - op->stats.maxhp);
! op->stats.hp = op->stats.maxhp;
! }
! op->stats.food -= to_heal;
! #else
! op->stats.hp++;
! op->stats.food--;
! #endif
! }
! #ifdef SLOW_FOOD_USE
! op->last_heal=1200/(30+20*(gen_hp-1));
! #else
op->last_heal=1200/(gen_hp<20 ? 30 : gen_hp+10);
+ #endif
op->stats.food--;
if(op->contr->digestion<0)
op->stats.food+=op->contr->digestion;
else if(op->contr->digestion>0&&RANDOM()%op->contr->digestion)
! #ifdef SLOW_FOOD_USE
! op->stats.food=last_food-(can_heal ? to_heal/2 : 0);
! #else
! op->stats.food=last_food;
! #endif
}
! if(op->contr->digestion>0)
! while(op->stats.food<0&&op->stats.hp>0) {
! op->stats.food+=op->contr->digestion;
! op->stats.hp--;
! }
if (!op->state&&!IS_WIZ(op)&&(op->stats.hp<0||op->stats.food<0)) {
if(op->stats.food<0) {
*** config.h.old Tue Sep 29 21:30:11 1992
--- config.h Tue Sep 29 21:34:35 1992
***************
*** 42,47 ****
--- 42,59 ----
/* #define SPEED_GAME */
/*
+ * USE_SLOW_FOOD changes the way that food is eaten by a player. With it
+ * undefined, a person with a lot of hp eats food very very quickly, and
+ * thus penalizes a player who has a good con. The modification works as
+ * follows. Every 'heal_tick', a player will eat 1 food, plus one food for
+ * every hitpoint healed plus one food for every spell point healed. In
+ * addition, an extra food will be eaten for every + on a ring of regeneration
+ * and a ring of regeneration will cause heal_ticks to occur faster.
+ * a ring of slow digestion will work the same.
+ */
+ #define USE_SLOW_FOOD
+
+ /*
* LOS means Line Of Sight. If defined, players can't see through walls.
* That adds a lot to the game, especially if you have claustrophobia 8)
* It will be the standard from this version and the future, especially since
***************
*** 51,57 ****
* very slow, you can try to undefine it.
*/
! #define USE_LOS
/*
* Swap stats allows players to swap the values for their stats around
--- 63,69 ----
* very slow, you can try to undefine it.
*/
! /* #define USE_LOS */
/*
* Swap stats allows players to swap the values for their stats around
***************
*** 61,67 ****
* Bugs:
*/
! #define USE_SWAP_STATS
/*
--- 73,79 ----
* Bugs:
*/
! /* #define USE_SWAP_STATS */
/*
*** login.c.old Tue Sep 29 21:21:13 1992
--- login.c Tue Sep 29 21:23:55 1992
***************
*** 218,223 ****
--- 218,238 ----
strcpy(op->contr->pushstring[pushk++],cp1);
}
}
+ /* we MUST clear the stats structure here, so that if a stat was
+ zero when it was saved, it will be restored as a zero */
+ op->stats.Str = 0;
+ op->stats.Dex= 0;
+ op->stats.Con= 0;
+ op->stats.Wis= 0;
+ op->stats.Cha= 0;
+ op->stats.Int= 0;
+ op->stats.hp = 0;
+ op->stats.maxhp = 0;
+ op->stats.sp = 0;
+ op->stats.maxsp = 0;
+ op->stats.exp = 0;
+ op->stats.food = 0;
+ op->stats.dam = 0;
load_object(fp,op);
m=ready_map(first_map_level,0);
i=find_free_spot(NULL,m,m->startx,m->starty,0,SIZEOFFREE);
-------------------------------------------------------------------------
Practice random kindness and senseless acts of beauty --Anonymous
Argue for your limitations and sure enough they're yours --Richard Bach
Isn't humanity egocentric? Whenever we talk, we say "Here's my two cents
worth," but we only offer "a penny for your thoughts." --
Moonchilde/Amythyst/JT Traub ---