Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

recent small hack




	Hi, 
		I just wanted to say two things about the recent hack
	by srin9340@nova.gmi.edu (Akshay Srinivasan):

	1) I think it is *very* needed. Last night I an a compatriot 
	when down into the Dragon caves and must have pounded on the
	Ancient Red Dragons for over an hour with out killing one (I 
	mean we must have unloaded the kitchen sink on one of them 
	ala tag team for about 1/2 an hour with no apparent result!!!).
	Seeing how well one is doing against a creature would be 
	a great time saver (or life saver depending on how one is doing :)

	2) I would suggest a slightly different wording of the code. I 
	mean this is supposed to be for all creatures.. not everything
	you can fight has "a naval" for instance. The following stuff
	shows the modifications I made to make the code more "monster
	generic". 

						b.t.


from here to end is attack.diff
----------------------------- CUT HERE -----------------------------------
36a37,40
> #ifdef AKS_HACKS
> char *aks_opstate(object *);
> #endif
> 
215a220,253
> #ifdef AKS_HACKS
> char *aks_opstate(object *op) {
> 	static char aks_msg[MAX_BUF];
> 	float aks_calc=0;
> 
> 	aks_calc = (float)op->stats.hp/(float)op->stats.maxhp;
> 
> 	if ((aks_calc==NULL) || (aks_calc<=0) || (aks_calc>1) || (QUERY_FLAG(op,FLAG_GENERATOR)) || (QUERY_FLAG(op,FLAG_TEAR_DOWN)))
> 		aks_msg[0]='\0';
> 	else if (aks_calc < 0.1)
> 		strcpy(aks_msg,"trails a river of crimson and wails pathetically.");
> 	else if (aks_calc < 0.2)
> 		strcpy(aks_msg,"screams in agony.");
> 	else if (aks_calc < 0.3)
> 		strcpy(aks_msg,"bellows in pain from your blow.");
> 	else if (aks_calc < 0.4)
> 		strcpy(aks_msg,"grunts and groans with each move.");
> 	else if (aks_calc < 0.5)
> 		strcpy(aks_msg,"grunts and groans a bit.");
> 	else if (aks_calc < 0.6)
> 		strcpy(aks_msg,"has several wounds all over.");
> 	else if (aks_calc < 0.7)
> 		strcpy(aks_msg,"is starting to suffer a bit.");
> 	else if (aks_calc < 0.8)
> 		strcpy(aks_msg,"has a few nicks here and there.");
> 	else if (aks_calc < 0.9)
> 		strcpy(aks_msg,"is in decent shape.");
> 	else if (aks_calc <= 1.0)
> 		strcpy(aks_msg,"is in mint condition.");
> 
> 	return(aks_msg);
> }
> #endif	
> 
226a265,267
> #ifdef AKS_HACKS
>   char aks_buf[MAX_BUF],*aks_msg;
> #endif
227a269,272
> #ifdef AKS_HACKS
>   aks_msg = '\0';
> #endif
> 
317a363,366
> #ifdef AKS_HACKS
>   aks_msg=aks_opstate(op);
> #endif
> 
353a403,408
> #ifdef AKS_HACKS
>     if(aks_msg[0]!='\0') {
>        sprintf(aks_buf,"The %s %s",op_name,aks_msg);
>        draw_info(hitter,aks_buf);
>     }
> #endif
360a416,421
> #ifdef AKS_HACKS
>     if(aks_msg[0]!='\0') {
>         sprintf(aks_buf,"The %s %s",op_name,aks_msg);
>         draw_info(hitter->owner,aks_buf);
>      }
> #endif