I mentioned in my first post I am doing a major overhaul on the source. Here
are a few things I stumbled on, and thought to post 'em up as a minor
contribution. They probably have been mentioned elsewhere, as ROM2.4b6 is
becoming outdated..
coughwhycoughnotgagreleasewheezethecoughnextgagversionsputterrusscough

On with the fun stuff...
Problem   :
ch's cannot enter a hero_only room if they are a hero
Function  :
bool can_see_room
Error     :
if(IS_SET (pRoomIndex->room_flags, ROOM_HEROES_ONLY) && !IS_IMMORTAL (ch))
Fixed     :
if(IS_SET (pRoomIndex->room_flags, ROOM_HEROES_ONLY) && ch->level <
LEVEL_HERO && !IS_IMMORTAL (ch))


Problem   :
mobs greater than level hero are automatically holylighted
Function  :
bool can_see
Error line:
if((!IS_NPC (ch) && IS_SET (ch->act, PLR_HOLYLIGHT)) || (IS_NPC (ch) &&
IS_IMMORTAL (ch)))
Fixed     :
if((!IS_NPC (ch) && IS_SET (ch->act, PLR_HOLYLIGHT)) || (IS_NPC (ch) &&
IS_IMMORTAL (ch) && ch->desc != NULL))

Problem   :
Immortals cannot drop no_drop objects
Function  :
bool can_drop_obj
Error     : checks are ordered incorrectly
   if(!IS_SET (obj->extra_flags, ITEM_NODROP))
      return TRUE;

   if(!IS_NPC (ch) && ch->level >= LEVEL_IMMORTAL)
      return TRUE;
Fixed     :
   if(!IS_NPC (ch) && ch->level >= LEVEL_IMMORTAL)
      return TRUE;

   if(!IS_SET (obj->extra_flags, ITEM_NODROP))
      return TRUE;

Problem   :
AC on rings, floating objects, lights, and wielded isn't calculated
Function  :
int apply_ac
Error     :
not included in function
Fixed     : add these in
   case WEAR_FINGER_L:
      return obj->value[type];
   case WEAR_FINGER_R:
      return obj->value[type];
   case WEAR_FLOAT:
      return obj->value[type];
   case WEAR_LIGHT:
      return obj->value[type];
   case WEAR_WIELD:
      return obj->value[type];


Problem   :
auto_assist player mobs scream and attack but do not attack when an
immortal attacks an otherwise unattackable mob, also happens in other
autoassist types
Function  :
void check_assist
Error     :
         /* quick check for ASSIST_PLAYER */
         if(!IS_NPC (ch) && IS_NPC (rch)
         && IS_SET (rch->off_flags, ASSIST_PLAYERS) && rch->level + 6 >
victim->level)
         {
            do_function (rch, &do_emote, "screams and attacks!");
            multi_hit (rch, victim, TYPE_UNDEFINED);
            continue;
         }
(...further down...)
               if(target != NULL)
               {
                  do_function (rch, &do_emote, "screams and attacks!");
                  multi_hit (rch, target, TYPE_UNDEFINED);
               }

Fixed     :
         /* quick check for ASSIST_PLAYER */
         if(!IS_NPC (ch) && IS_NPC (rch)
         && IS_SET (rch->off_flags, ASSIST_PLAYERS) && rch->level + 6 >
victim->level)
         {
            if(!is_safe(rch,ch))
            {
               do_function (rch, &do_emote, "screams and attacks!");
               multi_hit (rch, victim, TYPE_UNDEFINED);
            }
            continue;
         }
(...further down...)
               if(target != NULL && (!is_safe(rch, target)))
               {
                  do_function (rch, &do_emote, "screams and attacks!");
                  multi_hit (rch, target, TYPE_UNDEFINED);
               }

Problem   :
tables.c is prone to errors when adding flags in the tables (not a true
error, but should be changed for readability. new table entries won't
need a henpecking to make sure they are correct
Function  : (example)
const struct flag_type affect_flags[]
Error     : (example)
   {"blind",             A,             TRUE},
Fixed     : (example)
   {"blind",             AFF_BLIND,             TRUE},


Happy Tweaking,
Drylar Levre the CloudReader
-also, if anyone knows of a good, simple rom (or derivitave) converted to
c++, lemme know. I want to see how a few functions are handled in the
conversion.


Reply via email to