Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

src/magic.c File Reference


Detailed Description

Helper functions for spells and magical effects.

Definition in file magic.c.

#include "crogue.h"

Go to the source code of this file.

Functions

char boltchar (sint dx, sint dy)
ushort attack_tile (uint x, uint y, const char *str, const char *death_message, uint damage)
ushort identify (void)
void entangle (uint duration)
void confuse (uint duration)
void hallucinate (uint duration)
void paralyze (uint duration)
void engulf_in_darkness (sint duration)
void potion_numbness_effect (void)
void potion_numbness_expire (void)
void numb (uint duration)
void detect_invisible (uint duration)
void removecurses (void)
int enchant_item (void)

Variables

const stat_timer_desc entangle_timer
const stat_timer_desc confuse_timer
const stat_timer_desc hallucinate_timer
const stat_timer_desc paralyzation_timer
const stat_timer_desc darkness_timer
const func_timer_desc numbness_timer
const stat_timer_desc detect_invis_timer


Function Documentation

ushort attack_tile uint  x,
uint  y,
const char *  str,
const char *  death_message,
uint  damage
 

Definition at line 39 of file magic.c.

References message(), monst_anger(), monst_takedamage(), monstbytile(), monstname(), world::plr, plr_takedamage(), retprintf(), ushort, w, player::x, and player::y.

char boltchar sint  dx,
sint  dy
 

Definition at line 26 of file magic.c.

void confuse uint  duration  ) 
 

Definition at line 108 of file magic.c.

References add_timer(), and confuse_timer.

void detect_invisible uint  duration  ) 
 

Definition at line 217 of file magic.c.

References add_timer(), and detect_invis_timer.

int enchant_item void   ) 
 

Definition at line 252 of file magic.c.

References filter_enchantable(), filter_matches(), INVENTORY, ITEMDESC, ITEMFLAG_CHARGED, ITEMFLAG_PLUS, itemname(), message(), pick_item(), RANGE, and update_player().

void engulf_in_darkness sint  duration  ) 
 

Definition at line 147 of file magic.c.

References add_timer(), and darkness_timer.

void entangle uint  duration  ) 
 

Definition at line 95 of file magic.c.

References add_timer(), and entangle_timer.

void hallucinate uint  duration  ) 
 

Definition at line 121 of file magic.c.

References add_timer(), and hallucinate_timer.

ushort identify void   ) 
 

Definition at line 60 of file magic.c.

References filter_matches(), filter_unidentified(), identify_type(), INVENTORY, ITEMFLAG_IDENTIFIED, itemname(), message(), pick_item(), and ushort.

void numb uint  duration  ) 
 

Definition at line 163 of file magic.c.

References add_timer(), and numbness_timer.

void paralyze uint  duration  ) 
 

Definition at line 134 of file magic.c.

References add_timer(), and paralyzation_timer.

void potion_numbness_effect void   )  [static]
 

Definition at line 169 of file magic.c.

References apply_stat_mod_desc(), STAT_DEXTERITY, STAT_FLAG_NUMB, STAT_FLAGS, STATMOD_ADD, and STATMOD_OR.

void potion_numbness_expire void   )  [static]
 

Definition at line 178 of file magic.c.

References die(), player::hps, player::hps_max, player::intrinsic, message(), world::plr, RANGE, sint, STAT_STRENGTH, STAT_TOUGHNESS, uint, update_player(), and w.

void removecurses void   ) 
 

Definition at line 224 of file magic.c.

References filter_cursed(), filter_matches(), INVENTORY, ITEMFLAG_CURSED, message(), and pick_item().


Variable Documentation

const stat_timer_desc confuse_timer [static]
 

Initial value:

 {
        TIMER_STAT,
        {STATMOD_OR, STAT_FLAGS, STAT_FLAG_CONFUSED},
        gettext("You are no longer confused.")
    }

Definition at line 101 of file magic.c.

Referenced by confuse().

const stat_timer_desc darkness_timer [static]
 

Initial value:

 {
        TIMER_STAT,
        {STATMOD_ADD, STAT_LIGHTRADIUS, -4},
        gettext("The area around you is bright again.")
    }

Definition at line 140 of file magic.c.

Referenced by engulf_in_darkness().

const stat_timer_desc detect_invis_timer [static]
 

Initial value:

 {
        TIMER_STAT,
        {STATMOD_OR, STAT_FLAGS, STAT_FLAG_SEEINVIS},
        gettext("Your vision darkens.")
    }

Definition at line 210 of file magic.c.

Referenced by detect_invisible().

const stat_timer_desc entangle_timer [static]
 

Initial value:

 {
        TIMER_STAT,
        {STATMOD_OR, STAT_FLAGS, STAT_FLAG_ENTANGLED},
        gettext("You break free of the webs.")
    }

Definition at line 88 of file magic.c.

Referenced by entangle().

const stat_timer_desc hallucinate_timer [static]
 

Initial value:

 {
        TIMER_STAT,
        {STATMOD_OR, STAT_FLAGS, STAT_FLAG_HALLUCINATING},
        gettext("You stop hallucinating.")
    }

Definition at line 114 of file magic.c.

Referenced by hallucinate().

const func_timer_desc numbness_timer [static]
 

Initial value:

 {
        TIMER_FUNC,
        &potion_numbness_effect,
        &potion_numbness_expire
    }

Definition at line 156 of file magic.c.

Referenced by numb().

const stat_timer_desc paralyzation_timer [static]
 

Initial value:

 {
        TIMER_STAT,
        {STATMOD_OR, STAT_FLAGS, STAT_FLAG_PARALYZED},
        gettext("You can move again.")
    }

Definition at line 127 of file magic.c.

Referenced by paralyze().


Generated on Thu May 20 13:12:13 2004 for CalcRogue by doxygen 1.3.6