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

New spell (Iron Wall)



Here is a patch that implements a new spell - Iron Wall. This creates an Earth
Wall next to the caster. This is useful if you want to rest for a while, or
block of areas. Also in this patch a small addition that makes the terminal 
beep when a character starts to get hungry. A result of starving too many times
when I didn't see that I was hungry.


*** define.h	Thu Jul 16 13:06:09 1992
--- ../define.h	Thu Jul 16 13:11:43 1992
***************
*** 131,137 ****
  
  #define NROFPFACES 7		/* How many player icons/classes there are */
  
! #define NROFSPELLS	8
  
  #define SP_BULLET	0
  #define SP_FIREBALL	1
--- 131,137 ----
  
  #define NROFPFACES 7		/* How many player icons/classes there are */
  
! #define NROFSPELLS	9
  
  #define SP_BULLET	0
  #define SP_FIREBALL	1
*** input.c	Thu Jul 16 13:06:16 1992
--- ../input.c	Thu Jul 16 13:11:48 1992
***************
*** 1158,1163 ****
--- 1158,1166 ----
        case 7:
          draw_info(op,"Switched to dimension door.");
          break;
+ 	  case 8:
+ 		draw_info(op,"Switched to Iron Wall.");
+ 		break;
        }
        draw_stats(op);
        break;
*** main.c	Thu Jul 16 13:06:22 1992
--- ../main.c	Thu Jul 16 13:11:55 1992
***************
*** 1038,1043 ****
--- 1038,1056 ----
        draw(op);
      }
      return;
+   case 8:  /* Iron Wall */	
+     if(!IS_WIZ(op)&&op->stats.sp<6) {
+       draw_info(op,"You don't have enough spellpoints.");
+       op->contr->count_left=0;
+       return;
+     }
+ 	if(!blocked(op->map,op->x+dx,op->y+dy)) {
+ 		put_item_on_map(op->map,MAP_EARTH,op->x+dx,op->y+dy);
+     	op->stats.sp-=6;
+     	draw_stats(op);
+ 		}
+ 	draw(op);
+ 	return;
    case 10: /* Thrown items */
      draw_info(op,"Throw is unimplemented as of now.");
      return;
*** xio.c	Thu Jul 16 13:06:36 1992
--- ../xio.c	Thu Jul 16 13:12:03 1992
***************
*** 454,462 ****
    if(pl->contr->last_value==-1||pl->contr->last_speed!=pl->speed||
       pl->stats.food!=pl->contr->last_stats.food) {
       flag[5]=1;
!      if(pl->stats.food<100&&(pl->stats.food&4))
         sprintf(buff[5],"Speed: %3.1f  Food: *%d* HUNGRY!",
                 pl->speed,pl->stats.food);
       else
         sprintf(buff[5],"Speed: %3.1f  Food: %3d",
                 pl->speed,pl->stats.food);
--- 454,464 ----
    if(pl->contr->last_value==-1||pl->contr->last_speed!=pl->speed||
       pl->stats.food!=pl->contr->last_stats.food) {
       flag[5]=1;
!      if(pl->stats.food<100&&(pl->stats.food&4)) {
         sprintf(buff[5],"Speed: %3.1f  Food: *%d* HUNGRY!",
                 pl->speed,pl->stats.food);
+ 		fprintf(stderr,"");
+ 		}
       else
         sprintf(buff[5],"Speed: %3.1f  Food: %3d",
                 pl->speed,pl->stats.food);
*** xio.h	Thu Jul 16 13:06:46 1992
--- ../xio.h	Thu Jul 16 13:12:11 1992
***************
*** 28,34 ****
  static char font_inv_text[]="8x13";
  char spellname[11][MAX_NAME]={
    "bullets","fireball","lightning","magic missile","arrows","bombs",
!   "golem","dimension door","unused", "unused","unused"
  };
  
  char ann_last[MAX_BUF];
--- 28,34 ----
  static char font_inv_text[]="8x13";
  char spellname[11][MAX_NAME]={
    "bullets","fireball","lightning","magic missile","arrows","bombs",
!   "golem","dimension door","iron wall", "unused","unused"
  };
  
  char ann_last[MAX_BUF];

Dougal Scott-Dougal.Scott@fcit.monash.edu.au  Faculty of Computing & Info Tech
I am eager for the pleasures of the flesh more    Monash University, Caulfield
than for salvation, my soul is dead, so I shall            Victoria, AUSTRALIA 
look after the flesh. -Carmina Burana
Who says hedgehogs are of no value to the economy? In New
Zealand they make up approximately 1.7% of the roading.