Difference between revisions of "Manual:DIL Manual/meleeattack()"

From DikuMUD Wiki
Jump to navigation Jump to search
(XML import)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 +
<span id="bfmelee"></span>
 +
integer meleeattack ( ch : unitptr, vict : unitptr,
 +
                      bonus : integer, wtype : integer )
 +
    ch    : The character which should make an additional attack.
 +
    vict  : The victim of the attack.
 +
    bonus : Any penalty or bonus added to the attack.
 +
    wtype : The weapon type of the attack, if a valid type then that is
 +
            used for the attack purpose, otherwise the default weapon/hand
 +
            attack is used.
  
 +
    result: 'ch' performs a melee attack (using whatever weapon is wielded
 +
            or his bare hands) against 'vict'. Returns the amount of damage
 +
            given (-1 is failed).
  
 +
    If wtype is within a valid weapon range (WPN_XXX) any weapon will
 +
    be bypassed, and the value will be used as the attacktype. Good
 +
    for things like "meleeattack(ch, vict, bonus, WPN_CIRCLE_KICK)"
 +
    if you want person to be able to perform an extra attack even
 +
    though wielding a weapon or something. Note that this will require
 +
    BOTH a weapon type WPN_CIRCLE_KICK and a skill "kick" in order for
 +
    it to work.
 
<span id="bfmelee"></span>
 
<span id="bfmelee"></span>
 
  integer meleeattack ( ch : unitptr, vict : unitptr,
 
  integer meleeattack ( ch : unitptr, vict : unitptr,
                       bonus : integer, wtype : integer, primary : integer)
+
                       bonus : integer, wtype : integer )
     ch     : The character which should make an additional attack.
+
     ch   : The character which should make an additional attack.
     vict   : The victim of the attack.
+
     vict : The victim of the attack.
     bonus   : Any penalty or bonus added to the attack.
+
     bonus : Any penalty or bonus added to the attack.
     wtype   : The weapon type of the attack, if a valid type then that is
+
     wtype : The weapon type of the attack, if a valid type then that is
              used for the attack purpose, otherwise the default weapon/hand
+
            used for the attack purpose, otherwise the default weapon/hand
              attack is used.
+
            attack is used.
    primary : Used to determine if we should use the primary weapon (wielded)
 
              of offhand (held/hand attack).
 
  
 
     result: 'ch' performs a melee attack (using whatever weapon is wielded
 
     result: 'ch' performs a melee attack (using whatever weapon is wielded
Line 19: Line 36:
 
     If wtype is within a valid weapon range (WPN_XXX) any weapon will
 
     If wtype is within a valid weapon range (WPN_XXX) any weapon will
 
     be bypassed, and the value will be used as the attacktype. Good
 
     be bypassed, and the value will be used as the attacktype. Good
     for things like "meleeattack(ch, vict, bonus, WPN_CIRCLE_KICK, TRUE)"
+
     for things like "meleeattack(ch, vict, bonus, WPN_CIRCLE_KICK)"
 
     if you want person to be able to perform an extra attack even
 
     if you want person to be able to perform an extra attack even
 
     though wielding a weapon or something. Note that this will require
 
     though wielding a weapon or something. Note that this will require
 
     BOTH a weapon type WPN_CIRCLE_KICK and a skill "kick" in order for
 
     BOTH a weapon type WPN_CIRCLE_KICK and a skill "kick" in order for
 
     it to work.
 
     it to work.

Latest revision as of 22:32, 4 December 2025

integer meleeattack ( ch : unitptr, vict : unitptr,
                     bonus : integer, wtype : integer )
   ch    : The character which should make an additional attack.
   vict  : The victim of the attack.
   bonus : Any penalty or bonus added to the attack.
   wtype : The weapon type of the attack, if a valid type then that is
           used for the attack purpose, otherwise the default weapon/hand
           attack is used.
   result: 'ch' performs a melee attack (using whatever weapon is wielded
           or his bare hands) against 'vict'. Returns the amount of damage
           given (-1 is failed).
   If wtype is within a valid weapon range (WPN_XXX) any weapon will
   be bypassed, and the value will be used as the attacktype. Good
   for things like "meleeattack(ch, vict, bonus, WPN_CIRCLE_KICK)"
   if you want person to be able to perform an extra attack even
   though wielding a weapon or something. Note that this will require
   BOTH a weapon type WPN_CIRCLE_KICK and a skill "kick" in order for
   it to work.

integer meleeattack ( ch : unitptr, vict : unitptr,
                     bonus : integer, wtype : integer )
   ch    : The character which should make an additional attack.
   vict  : The victim of the attack.
   bonus : Any penalty or bonus added to the attack.
   wtype : The weapon type of the attack, if a valid type then that is
           used for the attack purpose, otherwise the default weapon/hand
           attack is used.
   result: 'ch' performs a melee attack (using whatever weapon is wielded
           or his bare hands) against 'vict'. Returns the amount of damage
           given (-1 is failed).
   If wtype is within a valid weapon range (WPN_XXX) any weapon will
   be bypassed, and the value will be used as the attacktype. Good
   for things like "meleeattack(ch, vict, bonus, WPN_CIRCLE_KICK)"
   if you want person to be able to perform an extra attack even
   though wielding a weapon or something. Note that this will require
   BOTH a weapon type WPN_CIRCLE_KICK and a skill "kick" in order for
   it to work.