Atrinik Server  4.0
Functions
bow.c File Reference
#include <global.h>
#include <player.h>
#include <object.h>
#include <object_methods.h>
#include <bow.h>
#include <arrow.h>

Go to the source code of this file.

Functions

static int ranged_fire_func (object *op, object *shooter, int dir, double *delay)
 
 OBJECT_TYPE_INIT_DEFINE (bow)
 
double bow_get_ws (object *bow, object *arrow)
 
int bow_get_skill (object *bow)
 

Detailed Description

Handles code for bows.

Author
Alex Tokar

Definition in file bow.c.

Function Documentation

int bow_get_skill ( object bow)

Get skill required to use the specified bow object.

Parameters
bowThe bow (could actually be a crossbow/sling/etc).
Returns
Required skill to use the object.

Definition at line 158 of file bow.c.

double bow_get_ws ( object bow,
object arrow 
)

Calculate how quickly bow fires its arrows.

Parameters
bowThe bow.
arrowArrow.
Returns
Firing speed.

Definition at line 144 of file bow.c.

OBJECT_TYPE_INIT_DEFINE ( bow  )

Initialize the bow type object methods.

Definition at line 127 of file bow.c.

static int ranged_fire_func ( object op,
object shooter,
int  dir,
double *  delay 
)
static

Used to fire a ranged weapon, eg, a bow firing arrows, throwing weapons/potions, firing wands/rods, etc.

Parameters
opThe weapon being fired (bow, wand, throwing object).
shooterWho is doing the firing.
dirDirection to fire into.
[out]delayIf non-NULL, will contain delay caused by this action.
Returns
One of Object method return values.

Definition at line 41 of file bow.c.