Re: Disarm problems still no sulution

From: Treker (treker@positron.net)
Date: 08/21/00


Untested (yet) Suggestion:  Change two handed weapons to different type--
ITEM_WEAR_2WIELD, for example. Check whether item is CAN_WEAR
ITEM_WEAR_2WIELD, if yes, do not allow DWIELD, if not, allow.

Pseudo code:

 else if(GET_EQ(ch,WEAR_WIELD) && !IS_OBJ_STAT(GET_EQ(ch, WEAR_WIELD),
ITEM_WEAR_2WIELD))
   {
    send_to_char("You are already wielding a weapon which requires both
hands!\r\n", ch);
    perform_remove(ch, WEAR_DWIELD);
   }
---End code
The above code is just to give an idea of how to approach the suggestion, it
isn't a sure-fix.

(Please tell me if it works)


Hmm...

If you're already adding ITEM_WEAR_2WIELD, you can go around in the
look/examine code (and the equipment command code) and add a prefix to any
2WIELD item such as "Two Handed "...in he wield spot.  Or you could come up
with something like that, that is, if you wanted to

Sounds annoying, because you've gotta add a new ITEM_WEAR_* define, and
change anything that it depends on in your code, but it should work.



>
> Hi
> You may remember i wrote to you with this problem before, but the
> suggested
> answer had the same problem as the one which i wrote,
> Here is the initial letter i wrote:
>
> Hi
> I am having some problems with my dual wield skill. Firstly, at the moment
> the player can only dual wield an weapon if it has the dwield bit
> set on it.
> Unfortunately this mean that they can wield a weapon which
> requires 2 hands,
> and then dual wield a single handed weapon.
>
> I want to add a check into the dual wield code to make sure that
> the weapon
> they are wielding has the dwield bit set to it (i.e making it
> require only 1
> hand to wield). And if it hasn't (i.e it requires two hands to
> hold) Then it
> stops them dwielding the weapon.
>
> Here is the code I came up with for the check, if anyone has any ideas.
>
> else if (!CAN_WEAR(GET_EQ(ch, WEAR_WIELD), ITEM_WEAR_DWIELD))
> {
>   send_to_char("You are already wielding a weapon which requires both
> hands!\r\n", ch);
>   perform_remove(ch, WEAR_DWIELD);> }

Methinks this code checks if item wielded in WEAR_WIELD is not DWIELDable.

>
> The problem with this code is that wield works fine but no matter which
> weapon type you wield two-handed or single handed, it always throws up the
> catch above. It is obviously a problem with the logic statement
> but i am not
> sure quite what.
>
> And this was the statement suggested:
>
> else if(GET_EQ(ch,WEAR_WIELD) &&
> !IS_OBJ_STAT(GET_EQ(ch,WEAR_WIELD),ITEM_WEAR_DWIELD))
>   {
>    send_to_char("You are already wielding a weapon which requires both
> hands!\r\n", ch);
>    perform_remove(ch, WEAR_DWIELD);
>   }
>
>
> The trouble with this is that it won't let you dwield any weapon,
> no matter
> what weapon you are wielding. Any further suggestions

So both of those are always true, regardless of what type of weapon?
If so, is it possible that the WIELDed weapons are also DWIELDable and that
2 handed weapons have the ITEM_WEAR_DWIELD flag?

See my suggestion above.

>
> Chears
> Alex Mann


-Treker

PS: Thanks for helping me before.


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/11/01 PDT