Top Mud Sites Forum

Top Mud Sites Forum (http://www.topmudsites.com/forums/index.php)
-   MUD Coding (http://www.topmudsites.com/forums/forumdisplay.php?f=9)
-   -   Adding restrictions to Backstab (http://www.topmudsites.com/forums/showthread.php?t=480)

Jaegar 07-26-2002 11:53 PM

I am working with RoM 2.4 and am trying to add a restriction to backstab.  I want to be able to restrict backstab to weapons with the damage noun of pierce.  If someone could direct me in how I would make the "if" check in backstab for a damage noun on a weapon it would be appreciated.

Thanks in advance,

Jaegar

Robbert 07-27-2002 12:04 PM

Do you want specifically the damage noun of pierce, or all weapons which do piercing damage? ROM is set up to allow for different words to describe the same damage type.

For only pierce by itself, take a look at attack_table in const.c and find what number in the list "pierce" is. Remember to start counting with 0. Then simply compare that value to obj->value[3]. If they match, then the weapon has the verb of "pierce'.

If you want to allow for all piercing verbs, you need to do a check for each one of the types, just as outlined above. I dont recommend this, in retrospect, because ROM considers biting attacks as piercing, and scratch attacks. You may want to check for "stab" as well as "pierce" though.

Jaegar 07-28-2002 11:43 PM

We ended up restricting it to weapon type of dagger.  I know that there are other weapons that might possibly be a valid weapon for backstab, but dagger seems the logical weapon to be used.

Thanks for your reply.

Jaegar

Torren 07-29-2002 08:44 AM

if you still wanted to continue you to make it so that only DAM_PIERCE is affected, and you wouldn't have to worry about bites since gsn_backstab is passed to one_hit and you check to make sure they are already wielding a weapon. just do this check if ( attack_table[wield->value[3]].damage == DAM_PIERCE) Blah.


All times are GMT -4. The time now is 06:01 AM.

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright Top Mud Sites.com 2022