Atrinik Server 2.5
Functions
types/arrow.c File Reference
#include <global.h>

Go to the source code of this file.

Functions

sint32 bow_get_ws (object *bow, object *arrow)
sint16 arrow_get_wc (object *op, object *bow, object *arrow)
sint16 arrow_get_damage (object *op, object *bow, object *arrow)
int bow_get_skill (object *bow)
objectarrow_find (object *op, shstr *type, int tag)
void bow_fire (object *op, int dir)
objectfix_stopped_arrow (object *op)
void move_arrow (object *op)
void stop_arrow (object *op)

Detailed Description

Arrow and bow related code.

Definition in file arrow.c.


Function Documentation

object* arrow_find ( object op,
shstr type,
int  tag 
)

Extended find arrow version, using tag and containers.

Find an arrow in the inventory and after that in the right type container (quiver).

Parameters:
opPlayer.
typeType of the ammunition (arrows, bolts, etc).
tagFiremode tag.
Returns:
Pointer to the arrow, NULL if not found.

Definition at line 121 of file arrow.c.

sint16 arrow_get_damage ( object op,
object bow,
object arrow 
)

Calculate arrow's damage.

Parameters:
opPlayer.
bowBow used.
arrowArrow.
Returns:
The arrow's damage.

Definition at line 66 of file arrow.c.

sint16 arrow_get_wc ( object op,
object bow,
object arrow 
)

Calculate arrow's wc.

Parameters:
opPlayer.
bowBow used.
arrowArrow.
Returns:
The arrow's wc.

Definition at line 48 of file arrow.c.

void bow_fire ( object op,
int  dir 
)

Player fires a bow.

Parameters:
opObject firing.
dirDirection to fire.

Definition at line 220 of file arrow.c.

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 96 of file arrow.c.

sint32 bow_get_ws ( object bow,
object arrow 
)

Calculate how quickly bow fires its arrow.

Parameters:
bowThe bow.
arrowArrow.
Returns:
Firing speed.

Definition at line 37 of file arrow.c.

object* fix_stopped_arrow ( object op)

Fix a stopped arrow.

Parameters:
opThe arrow object.
Returns:
The arrow object.

Definition at line 349 of file arrow.c.

void move_arrow ( object op)

Move an arrow along its course.

Parameters:
opThe arrow or thrown object

Definition at line 415 of file arrow.c.

void stop_arrow ( object op)

What to do when a non-living flying object has to stop.

Parameters:
opThe object.

Definition at line 569 of file arrow.c.