Unarmed Combat [by Boxboy]
Snippet Posted Sunday, March 4th @ 08:10:27 AM, by Brandon Brown in the Skills dept.
BoxBoy writes in with a snippet for a skill which allows more effective and realistic unarmed combat.
It has been a while since i posted anything and I have just written this happy little piece of code to allow classes to fight with some skill even when they have no weapon.
Depending on how well practiced the skill is the amount of damage will be greater or smaller.
As this is a small piece of code I don't really care about credit, it would be nice, but I'm not the bothered.

Well go into fight.c

and look for,
      /* If no weapon, add bare hand damage instead */
      if (IS_NPC(ch)) {
        dam += dice(ch->mob_specials.damnodice, ch->mob_specials.damsizedice);
      } else {
      dam += number(0, 2);
      /* Max 2 bare hand damage for players */
      }

and change it to,

      /* If no weapon, add bare hand damage instead */
      if (IS_NPC(ch)) {
      dam += dice(ch->mob_specials.damnodice, ch->mob_specials.damsizedice);
      }
        //BoxBoy: My Unarmed Combat Code
        else if (GET_SKILL(ch, SKILL_UNARMED)>75 && !GET_EQ(ch, WEAR_HOLD)){
      dam += number(GET_HITROLL(ch)/2, GET_HITROLL(ch));
        } else if (GET_SKILL(ch, SKILL_UNARMED)>50 && !GET_EQ(ch, WEAR_HOLD)){
      dam += number(GET_HITROLL(ch)/4, GET_HITROLL(ch)/2);
        } else if (GET_SKILL(ch, SKILL_UNARMED)>25 && !GET_EQ(ch, WEAR_HOLD)){
      dam += number(GET_HITROLL(ch)/8, GET_HITROLL(ch)/4);
        }
      //BoxBoy: End Unarmed Combat Code
        else {
      dam += number(0, 2);      /* Max 2 bare hand damage for players */
      }

and define like any other skill. If you don't know how to do that you are either new to this, or you should be shot!
The files to add it in are,
spells.h
spell_parser.c
class.c (just telling it which classes get it)

Also I had an idea for all those roleplay MUDs out there, a text parser that changes what people say, from,
Boruki says, 'the sword is very crap hehehe'
to
Boruki says, 'That sword is of no use'
Boruki laughs at the idea.
or
Boruki says, 'you shouldn't do that'
to
Boruki says, 'Thou shalt not do that'

Anyway, just though that would be so cool to see done, and someone might find it interesting to do.

Oh and before anyone says 'why has he got a check for people holding something?!?' thats cause if you are holding something you are not unarmed!

Boruki, the Bleached Jacked Up Bunny

<< FTP Uploads 2001/03/04 | Reply | Threaded | FTP Uploads 2001/03/11 >>

 


Related Links
  BoxBoy
Related Articles
More by bbrown
 
 

Quick Links
 
The CircleMUD FAQ
The CircleMUD home page
Alex's Snippets
Wintermute Snippets
CircleMUD Bug Reporting or Help
CircleMUD List Archives
CircleMUD Resources
Death Gate's Scripts
(Author of C conversion)
Sammy's code site
Erwin S. Andreasen's page
(Author of mudFTP and other goodies)
Death's Gate Scripting site
Help for CircleMUD in Windows
The OasisOLC Maintenance Effort
George's Random Stuff
Imaginary Realities
MUD Dictionary
 
 


Unarmed, but kinda
by Scathe (baez@as-if.com) on Saturday, June 23rd @ 12:18:10 PM
http://
Yea, we came up with this wicked idea.
In bash when it says about needing a weapon of the check line change it to something like:
if (!GET_EQ(ch, WEAR_WIELD) && !GET_SKILL(ch, SKILL_UNARMED))

and happy lil ppl can now bash without the weapons

Scathe Zombie
[ Reply to this comment ]