Galactic Bloodshed
Namespaces | Functions
fire.cc File Reference
#include "gb/fire.h"
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include "gb/GB_server.h"
#include "gb/buffers.h"
#include "gb/config.h"
#include "gb/doship.h"
#include "gb/files.h"
#include "gb/files_shl.h"
#include "gb/getplace.h"
#include "gb/load.h"
#include "gb/races.h"
#include "gb/ships.h"
#include "gb/shlmisc.h"
#include "gb/shootblast.h"
#include "gb/tele.h"
#include "gb/tweakables.h"
#include "gb/utils/rand.h"
#include "gb/vars.h"
Include dependency graph for fire.cc:

Go to the source code of this file.

Namespaces

 anonymous_namespace{fire.cc}
 

Functions

static void check_overload (Ship *, int, int *)
 
static void check_retal_strength (Ship *, int *)
 
bool anonymous_namespace{fire.cc}::has_planet_defense (const shipnum_t shipno, const player_t Playernum)
 
void fire (const command_t &argv, GameObj &g)
 
void bombard (const command_t &argv, GameObj &g)
 
void defend (const command_t &argv, GameObj &g)
 
void detonate (const command_t &argv, GameObj &g)
 
int retal_strength (Ship *s)
 
int adjacent (int fx, int fy, int tx, int ty, const Planet &p)
 

Function Documentation

◆ adjacent()

int adjacent ( int  fx,
int  fy,
int  tx,
int  ty,
const Planet p 
)

Definition at line 758 of file fire.cc.

Referenced by bombard(), and move_popn().

Here is the caller graph for this function:

◆ bombard()

void bombard ( const command_t argv,
GameObj g 
)

Ship vs planet

Definition at line 305 of file fire.cc.

References adjacent(), check_overload(), check_retal_strength(), deductAPs(), do_shiplist(), enufAP(), getplanet(), getsmap(), anonymous_namespace{fire.cc}::has_planet_defense(), post(), putplanet(), putship(), putsmap(), shoot_planet_to_ship(), shoot_ship_to_planet(), shoot_ship_to_ship(), use_destruct(), and use_fuel().

Here is the call graph for this function:

◆ check_overload()

static void check_overload ( Ship ship,
int  cew,
int *  strength 
)
static

Definition at line 769 of file fire.cc.

References post().

Referenced by bombard(), defend(), and fire().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_retal_strength()

static void check_retal_strength ( Ship ship,
int *  strength 
)
static

Definition at line 794 of file fire.cc.

References retal_strength().

Referenced by bombard(), defend(), and fire().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ defend()

void defend ( const command_t argv,
GameObj g 
)

Planet vs ship

Definition at line 498 of file fire.cc.

References check_overload(), check_retal_strength(), deductAPs(), enufAP(), getplanet(), getsector(), getsmap(), post(), putplanet(), putship(), putsmap(), shoot_ship_to_planet(), use_destruct(), and use_fuel().

Here is the call graph for this function:

◆ detonate()

void detonate ( const command_t argv,
GameObj g 
)

Definition at line 691 of file fire.cc.

References do_shiplist(), and domine().

Here is the call graph for this function:

◆ fire()

void fire ( const command_t argv,
GameObj g 
)

Ship vs ship

Definition at line 49 of file fire.cc.

References check_overload(), check_retal_strength(), deductAPs(), do_shiplist(), enufAP(), getplanet(), post(), putship(), shoot_ship_to_ship(), use_destruct(), and use_fuel().

Here is the call graph for this function:

◆ retal_strength()

int retal_strength ( Ship s)

Definition at line 731 of file fire.cc.

Referenced by check_retal_strength(), doabm(), mech_attack_people(), mech_defend(), people_attack_mech(), and walk().

Here is the caller graph for this function: