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

0.87.5 Patch (Sigh! So many patches, so little time.)




Hello people,
  I like the new version of crossfire, its more and more like nethack :-)



  Tired of people who SPEND AGES looking for 18s in Str?

  Here is the solution. This patch allows you to SWAP characteristics
around in the "roll again?" phase. So if you want that 18 in your INT
rather that your STR, just type 1 then 4 ( to swap stats 1 & 4!).

Patch from 0.87.5
-----------------
changes main.c		(roll_stats function and misc. Code added here) 
changes player.c & login.c          	 (to print help. Calls main.c)

checked on a decstation 3100



Has anyone had problems with/suggestions:
  * characters 'sticking' on run mode? Ie you can only run & cant stop
  * Special weapons have gone missing?
  * 'regenerate' the treasure. ie stuff gets distributed around the
  maps after use (ie food that eated gets places randomly) this would
  allow the game to 'go on for ever' (books, scrolls, food, chests and
  money)

have fun,
cam


 Cameron  Blackwood                 I  will  not  be  pushed, filed, indexed,
 Home:  +61 3 889-1140(ah)          briefed, debriefed or numbered! -Number 6
 Email: c.blackwood@rdt.monash.edu.au      Gaunix: korg@yoyo.cc.monash.edu.au
 -----=====  Robotics and Digital Technology,  Monash University.  =====-----
Ancient Pharohs looked forward to end of world: believed cadavers would
rise, reclaim hearts from golden jars. Must be currently holding breath
with anticipation.                             - Rorschach. The Watchmen.



-=-=-=-=-=-=-=-=-=-=-=8<  Cut Here >8 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

*** main.c.bak	Tue Sep 22 19:00:31 1992
--- main.c	Tue Sep 22 19:04:42 1992
***************
*** 39,44 ****
--- 39,46 ----
  extern object *free_objects;
  extern object objarray[STARTMAX];
  
+ int	Swap_First;			/* Swap stat Generation */
+ 
  void info_keys(object *op) {
    clear_win_info(op);
    draw_info(op,"Push `hjklynub' to walk in a direction.");
***************
*** 154,159 ****
--- 156,211 ----
    op->stats.hp=op->stats.maxhp;
  }
  
+ Roll_Again(op)
+ object *op;
+ {
+   draw_info(op,"Roll again (y/n/1-6 1-6)? ");
+   draw_info(op,"1-6 then 1-6 to swap stats.\n");
+ }
+ 
+ Swap_Stat(op,Swap_Second)
+ object *op;
+ int Swap_Second;
+ {
+ signed char tmp;
+ char *from,*to,buffer[32];
+ 
+ if ( Swap_First== 0 ) { 
+   draw_info(op,"How the hell did you get here?!?!!!");
+   return;
+   }
+ switch(Swap_First) {
+   case 1: from= &op->stats.Str; break;
+   case 2: from= &op->stats.Dex; break;
+   case 3: from= &op->stats.Con; break;
+   case 4: from= &op->stats.Int; break;
+   case 5: from= &op->stats.Wis; break;
+   case 6: from= &op->stats.Cha; break;
+   };
+ switch(Swap_Second) {
+   case 1: to= &op->stats.Str; draw_info(op,"Str done\n"); break;
+   case 2: to= &op->stats.Dex; draw_info(op,"Dex done\n"); break;
+   case 3: to= &op->stats.Con; draw_info(op,"Con done\n"); break;
+   case 4: to= &op->stats.Int; draw_info(op,"Int done\n"); break;
+   case 5: to= &op->stats.Wis; draw_info(op,"Wis done\n"); break;
+   case 6: to= &op->stats.Cha; draw_info(op,"Cha done\n"); break;
+   };
+ tmp= (signed char) *from;
+ *from= (signed char) *to;
+ *to=tmp;
+   op->stats.hp= -10000;
+   op->level=0;
+   op->stats.exp=0;
+   op->stats.sp=0;
+   op->stats.ac=0;
+   add_exp(op,0);
+   op->stats.sp=op->stats.maxsp;
+   op->stats.hp=op->stats.maxhp;
+   add_exp(op,0);
+ Swap_First=0;
+ }
+ 
+ 
  int distance(object *ob1,object *ob2) {
    int i;
    i= (ob1->x - ob2->x)*(ob1->x - ob2->x)+
***************
*** 1490,1496 ****
  #else
            tmp->state=2;
            draw_info(tmp,"Welcome back!");
!           draw_info(tmp,"Roll again (y/n)?");
  #endif
            if(tmp->name!=NULL)
              free_string(tmp->name);
--- 1542,1548 ----
  #else
            tmp->state=2;
            draw_info(tmp,"Welcome back!");
! 	  Roll_Again(tmp);
  #endif
            if(tmp->name!=NULL)
              free_string(tmp->name);
***************
*** 1502,1507 ****
--- 1554,1577 ----
          break;
        case 2:
          switch(text[0]) {
+ 	case '1':
+ 	  if ( ! Swap_First ) { Swap_First=1; draw_info(op,"Str ->"); }
+ 	  else { Swap_Stat(op,1); } break;
+ 	case '2':
+ 	  if ( ! Swap_First ) { Swap_First=2; draw_info(op,"Dex ->"); }
+ 	  else { Swap_Stat(op,2); } break;
+ 	case '3':
+ 	  if ( ! Swap_First ) { Swap_First=3; draw_info(op,"Con ->"); }
+ 	  else { Swap_Stat(op,3); } break;
+ 	case '4':
+ 	  if ( ! Swap_First ) { Swap_First=4; draw_info(op,"Int ->"); }
+ 	  else { Swap_Stat(op,4); } break;
+ 	case '5':
+ 	  if ( ! Swap_First ) { Swap_First=5; draw_info(op,"Wis ->"); }
+ 	  else { Swap_Stat(op,5); } break;
+ 	case '6':
+ 	  if ( ! Swap_First ) { Swap_First=6; draw_info(op,"Cha ->"); }
+ 	  else { Swap_Stat(op,6); } break;
          case 'n':
          case 'N':
            op->state=3;
***************
*** 1529,1535 ****
            repeat=1;
            break;
          default:
!           draw_info(op,"Yes, No or Quit.  Roll again?");
            repeat=0;
          }
          break;
--- 1599,1605 ----
            repeat=1;
            break;
          default:
!           draw_info(op,"Yes, No, Quit or 1-6  Roll again?");
            repeat=0;
          }
          break;
*** player.c.bak	Tue Sep 22 19:00:41 1992
--- player.c	Tue Sep 22 19:00:40 1992
***************
*** 142,148 ****
  #ifndef SAVE_PLAYER
    draw_info(p->ob,"Welcome, Brave Warrior!");
    draw_info(p->ob," ");
!   draw_info(p->ob,"Roll again (y/n)?");
  #endif
    if((cp=XGetDefault(p->gdisp,"crossfire","name"))!=NULL&&check_name(p,cp)) {
      if(p->ob->name!=NULL)
--- 142,148 ----
  #ifndef SAVE_PLAYER
    draw_info(p->ob,"Welcome, Brave Warrior!");
    draw_info(p->ob," ");
!   Roll_Again(p->ob);
  #endif
    if((cp=XGetDefault(p->gdisp,"crossfire","name"))!=NULL&&check_name(p,cp)) {
      if(p->ob->name!=NULL)
*** login.c.bak	Tue Sep 22 19:00:35 1992
--- login.c	Tue Sep 22 19:00:34 1992
***************
*** 144,150 ****
      draw_info(op," ");
      draw_info(op,"Welcome Brave New warrior!");
      draw_info(op," ");
!     draw_info(op,"Roll again (y/n)?");
      op->state = 2;
    }
    else{
--- 144,150 ----
      draw_info(op," ");
      draw_info(op,"Welcome Brave New warrior!");
      draw_info(op," ");
!     Roll_Again(op);
      op->state = 2;
    }
    else{