[CF-Devel] Stealing Idea + simple patch

crossfire-devel-admin at archives.real-time.com crossfire-devel-admin at archives.real-time.com
Thu Aug 21 10:29:42 CDT 2003


I don't think the thief stealing skill is very interesting/useful at this 
point.  I was thinking it would be more interesting if the skill could be 
used in shops.  
This would work by unsetting the unpaid flag, and putting it in the thiefs 
inventory.  The price of the item would determine the difficulty of theft.
Theft failure should result in some type of punishment based on the price of 
the item and maybe the reputation of the thief.
I'm included a patch to implement the stealing part of the above.  I'm still 
trying to determine the best way to implement the punishments.

These are the things I wan't to be possible on theft failure.
	Locked out of that store for a period of time, the character would be 
teleported out of the store(This should always be part of the punishment,  
but short ~1min for cheap objects stolen be newbies)
	Teleportation to a punishment area.  For instance the shop cellar.  The worse 
the crime the farther the walk out.  The shop would need a teleportation 
list.  The list would be ordered by serverity of crime.  Celler would be 
inhabited by shop keepers nasty pets.  City jail could also be a dest.
	A random item might fall out of pockets and become shop inventory.

Also it would be nice to be able to track theft attempts.  Each theft attempt 
at a store would make the next theft more difficult.  This would be 
periodically reset.

Store maps would probably need to be modified to handle all this.  Unmodified 
maps would just prohibit stealing.

Any ideas/ comments would be appreciated.  I don't think I implemented the 
skill checks the best way.  I just copied some from attempt_steal.

Sorry for the long windedness
Adam


Well here is a diff file for skills.c agains 1.5.0 of crossfire.
CUT BELOW HERE
82a83,106
>
     
       *  Here is our first attempt at stealing an unpaid object from
     
     >
     
       *  a store.
     
     >
     
       */
     
     >
     
      int attempt_steal_store(object* op, object* who)
     
     >
     
      {
     
     >
     
              int cost = query_cost(op, who, F_BUY);
     
     >
     
              int victim_lvl=cost / 500, thief_lvl = SK_level(who)*10;
     
     >
     
              int stats_value = get_weighted_skill_stats(who)*3;
     
     >
     
            int roll=die_roll(2, 100, who, PREFER_LOW)/2; /* weighted 1-100 */
     
     >
     
              int chance = stats_value+thief_lvl-victim_lvl;
     
     >
     
              if( roll < chance) {
     
     >
     
               new_draw_info(NDI_UNIQUE, 0, who, "You take a 5 finger 
     
     discount!\n");
>
     
               CLEAR_FLAG(op, FLAG_UNPAID);
     
     >
     
               pick_up(who, op);
     
     >
     
                 return(1);
     
     >
     
              } else {
     
     >
     
               new_draw_info(NDI_UNIQUE, 0, who, "The shop keeper is looking this 
     
     way!!\n");
>
     
                 return(0);
     
     >
     
              }
     
     >
     
     
     >
     
            /*new_draw_info_format(NDI_UNIQUE, 0, who, "Value %d\n", cost); */
     
     >
     
      }
     
     >
     
     
     >
     
      /*
     
     290a315,319
>
     
            if(QUERY_FLAG(tmp, FLAG_UNPAID)) {
     
     >
     
               if (attempt_steal_store(tmp, op)) {
     
     >
     
                 return (calc_skill_exp(op,tmp));
     
     >
     
               }
     
     >
     
            }
     
     

_______________________________________________
crossfire-devel mailing list
     
     crossfire-devel at lists.real-time.com
     
     
     https://mailman.real-time.com/mailman/listinfo/crossfire-devel
     
     
    


More information about the crossfire mailing list