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

Re: An "easy" MU/Fighter balance fix?



----------
X-Sun-Data-Type: text
X-Sun-Data-Description: text
X-Sun-Data-Name: text
X-Sun-Content-Lines: 36


Peter, you write:
> > [my suggestion for new wc adjustments deleted]
> 
> [your response/counter proposal deleted]
>
> Additionally, I'm prepared to back up my 4-class proposal with coding.
> Many of those who advocated having a multitude of skills were willing
> to "help", but I didn't see any volunteers to be responsible for it.

I don't know whether your final comment here was directed at *me*, but
I think you're off base on this accusation.  The "game play" sections of
the Crossfire code (i.e. everything not relating to graphics, file I/O
and server client stuff) are really pretty simple-minded.  Doing work 
in this area goes quite quickly with relative safety in comparison to the
other coding work.  Given this fact I think it is more important to come
to a consensus about how game playing should be changed than it is to find
people to do actual coding.   In fact I think the tendency to code first
and ask questions later leads to generally poorer code, the zillions of
conditional compile flags we now suffer from is one symptom of this.

BTW, I happen to have already coded my suggested change, you'll find a
context diff file for common/living.c attached to this mail.  However I
wouldn't go so far as to send this to Mark for official inclusion until
I felt like at least a plurality of this list agreed with the idea.

--Ken

+------------------------+---------------------------------------------+
| Ken Woodruff           | Most Latin words in -us have plural in -i,  |
| woodruff@cadence.com   | but not all, & so zeal not according to     |
+------------------------+ knowledge issues in such oddities as hiati, |
| Disclaimer: What tote  | octopi, omnibi, & ignorami; ...             |
| bag full of $20 bills? |     Fowler, "Modern English Usage"          |
+------------------------+---------------------------------------------+

----------
X-Sun-Data-Type: default
X-Sun-Data-Description: default
X-Sun-Data-Name: liv.diff
X-Sun-Content-Lines: 73

***************
*** 718,719 ****
--- 718,776 ----
  
+ /* Adjust the player's weapon class based on their
+  * level, class and attributes.  In the future other
+  * adjustments could go here.  This routine simply 
+  * applies a modifier (rather the setting an absolute
+  * value) since fix_player() has already calculated
+  * ring and weapon bonusses.
+  */
+ 
+ #define op_is_player(OP)          ((OP)->type == PLAYER)
+ #define get_player_level(PL)      ((PL)->level)
+ #define get_player_class_name(PL) ((PL)->arch->name)
+ #define get_player_strength(PL)   ((PL)->stats.Str)
+ typedef char *String;
+ 
+ /* just in case there's no math.h */
+ extern double floor(double);
+ 
+ static void
+ adjust_player_wc(object *pl)
+ {
+    int level_wc;   
+    double class_mult;
+    String class_name;
+ 
+    if (!op_is_player(pl)) {
+       LOG(llevError, "adjust_player_wc called for non-player\n");
+       return;
+    }
+ 
+    /* original algorithm from fix_player():
+     *    op->stats.wc-=(op->level+thaco_bonus[op->stats.Str]);
+     */
+ 
+    /* get multiplier for class */
+    /* TO DO: use some field in the arch? */
+    class_name = get_player_class_name(pl);
+    if (!strcmp(class_name, "wizard") ||
+          !strcmp(class_name, "mage")) {
+       class_mult = 0.25;   
+    } else if (!strcmp(class_name, "fighter") ||
+         !strcmp(class_name, "ninja") ||
+         !strcmp(class_name, "warrior")) {
+       class_mult = 2.0;   
+    } else if (!strcmp(class_name, "barbarian") ||
+         !strcmp(class_name, "viking")) {
+       class_mult = 1.5;   
+    } else {
+       /* thief, priest, elf, etc. */
+       class_mult = 1.0;
+    }
+ 
+    level_wc = (int)floor(class_mult * (double)get_player_level(pl) + 0.5);
+    pl->stats.wc -= (level_wc + thaco_bonus[get_player_strength(pl)]);
+ 
+    return;
+ }
+ 
  /*
***************
*** 894,896 ****
        op->stats.ac-=dex_bonus[op->stats.Dex];
!     op->stats.wc-=(op->level+thaco_bonus[op->stats.Str]);
      if(op->contr->braced)
--- 951,955 ----
        op->stats.ac-=dex_bonus[op->stats.Dex];
! 
!     adjust_player_wc(op); 
! 
      if(op->contr->braced)