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

CF: Patch: movement&skills



Hi,

this one might be considered unbalancing by some, but we don't think
it is. It changes the movement code to automatically use woodsman
or mountaineer when moving on the appropiate terrain, so you don't
have to 'ready_skill them. This seems to be more logical --- after all,
when moving through forest, you automatically use the "skill" if you
have it --- you don't sit down, thinking "now, I'm in a forest. What
do I have to do here?".

The possible effect on game balance is that some maps (snake pit, for
example) have "mountain" terrain and monsters --- with the old system,
you could either fight slowly (since melee weapons != mountaineer)
or move quickly (mountaineer != melee weapons). Now you can do both,
since you don't have to 'ready_skill mountaineer.

------------------------------ Cut ------------------------------

diff -r -C 5 crossfire-0.93.7/common/object.c crossfire/common/object.c
*** crossfire-0.93.7/common/object.c	Tue Jan  6 10:29:18 1998
--- crossfire/common/object.c	Fri Jan  9 13:05:43 1998
***************
*** 1754,1774 ****
    if(QUERY_FLAG(op,FLAG_NO_APPLY))
      return;
    for(tmp=op->below;tmp!=NULL;tmp=tmp->below) {
      if (tmp==tmp->below)	/* if we have a map loop, exit */
         break;
!     if(QUERY_FLAG(tmp,FLAG_SLOW_MOVE)&&!QUERY_FLAG(op,FLAG_FLYING)) { 
! 	if(op->type==PLAYER && op->chosen_skill) { 
!              if((QUERY_FLAG(tmp,FLAG_IS_HILLY) && op->contr->shoottype == range_skill 
! 		&& op->chosen_skill->stats.sp==SK_CLIMBING) 
! 	        || (QUERY_FLAG(tmp,FLAG_IS_WOODED) && op->contr->shoottype == range_skill
! 		&& op->chosen_skill->stats.sp==SK_WOODSMAN))
!       		    op->speed_left -= (SLOW_PENALTY(tmp)*FABS(op->speed))/4;
!              else 
! 		op->speed_left -= SLOW_PENALTY(tmp)*FABS(op->speed);
! 	} else 
! 		op->speed_left -= SLOW_PENALTY(tmp)*FABS(op->speed);
      }
      if(QUERY_FLAG(op,FLAG_FLYING)?QUERY_FLAG(tmp,FLAG_FLY_ON):
        QUERY_FLAG(tmp,FLAG_WALK_ON)) {
  #if 0
  /* the function that called this (a bit up the line) will draw the
--- 1754,1776 ----
    if(QUERY_FLAG(op,FLAG_NO_APPLY))
      return;
    for(tmp=op->below;tmp!=NULL;tmp=tmp->below) {
      if (tmp==tmp->below)	/* if we have a map loop, exit */
         break;
!     if(QUERY_FLAG(tmp,FLAG_SLOW_MOVE)&&!QUERY_FLAG(op,FLAG_FLYING)) {
!         float diff;
! 
!         diff=(SLOW_PENALTY(tmp)*FABS(op->speed));
!         if (op->type==PLAYER)
! 	  {
! 	    if ((QUERY_FLAG(tmp,FLAG_IS_HILLY) && find_skill(op,20)) ||
! 		(QUERY_FLAG(tmp,FLAG_IS_WOODED) && find_skill(op,21)))
! 	      {
! 		diff=diff/4.0;
! 	      }
! 	  }
! 	op->speed_left -= diff;
      }
      if(QUERY_FLAG(op,FLAG_FLYING)?QUERY_FLAG(tmp,FLAG_FLY_ON):
        QUERY_FLAG(tmp,FLAG_WALK_ON)) {
  #if 0
  /* the function that called this (a bit up the line) will draw the
[to unsubscribe etc., send mail to crossfire-request@ifi.uio.no]