summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/throw.h
blob: 0e37d57636bf5ac30db4ffefb7901dd252345c24 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/**
 * @file
 * @brief Throwing and launching stuff.
**/

#ifndef THROW_H
#define THROW_H

#include <string>
#include "externs.h"
#include "enum.h"

enum fire_type
{
    FIRE_NONE      = 0x0000,
    FIRE_LAUNCHER  = 0x0001,
#if TAG_MAJOR_VERSION == 34
    FIRE_DART      = 0x0002,
#endif
    FIRE_STONE     = 0x0004,
    FIRE_JAVELIN   = 0x0010,
    FIRE_ROCK      = 0x0100,
    FIRE_NET       = 0x0200,
    FIRE_RETURNING = 0x0400,
    FIRE_TOMAHAWK  = 0x0800,
    FIRE_INSCRIBED = 0x1000,   // Only used for _get_fire_order
};

struct bolt;
class dist;

bool item_is_quivered(const item_def &item);
bool fire_warn_if_impossible(bool silent = false);
int get_next_fire_item(int current, int offset);
int get_ammo_to_shoot(int item, dist &target, bool teleport = false);
void fire_thing(int item = -1);
void throw_item_no_quiver();

bool silver_damages_victim(bolt &beam, actor* victim, int &dmg,
                           string &dmg_msg);

bool throw_it(bolt &pbolt, int throw_2, dist *target = NULL);

bool thrown_object_destroyed(item_def *item, const coord_def& where);
int launcher_final_speed(const item_def &launcher,
                         const item_def *shield, bool scaled = true);

void setup_monster_throw_beam(monster* mons, bolt &beam);
bool mons_throw(monster* mons, bolt &beam, int msl, bool teleport = false);
#endif