Atrinik Server 2.5
Functions
server/spell_effect.c File Reference
#include <global.h>

Go to the source code of this file.

Functions

void cast_magic_storm (object *op, object *tmp, int lvl)
int recharge (object *op)
int cast_create_food (object *op, object *caster, int dir, const char *stringarg)
int probe (object *op)
int cast_wor (object *op, object *caster)
int cast_create_town_portal (object *op)
int cast_destruction (object *op, object *caster, int dam, int attacktype)
int cast_heal_around (object *op, int level, int type)
int cast_heal (object *op, int level, object *target, int spell_type)
int cast_change_attr (object *op, object *caster, object *target, int spell_type)
int create_bomb (object *op, object *caster, int dir, int spell_type)
void animate_bomb (object *op)
int remove_depletion (object *op, object *target)
int remove_curse (object *op, object *target, int type, int src)
int do_cast_identify (object *tmp, object *op, int mode, int *done, int level)
int cast_identify (object *op, int level, object *single_ob, int mode)
int cast_consecrate (object *op)
int finger_of_death (object *op, object *target)
int cast_cause_disease (object *op, object *caster, int dir, archetype *disease_arch, int type)
int cast_transform_wealth (object *op)

Detailed Description

Various spell effects.

Definition in file spell_effect.c.


Function Documentation

void animate_bomb ( object op)

This handles an exploding bomb.

Parameters:
opThe original bomb object.

Definition at line 1174 of file spell_effect.c.

int cast_cause_disease ( object op,
object caster,
int  dir,
archetype disease_arch,
int  type 
)

Let's try to infect something.

Parameters:
opWho is casting.
casterWhat object is casting.
dirCast direction.
disease_archArchetype of the disease.
typeID of the spell.
Return values:
0No one caught anything.
1At least one living was affected.

Definition at line 1618 of file spell_effect.c.

int cast_change_attr ( object op,
object caster,
object target,
int  spell_type 
)

Cast some stat-improving spell.

Parameters:
opWho is casting.
casterWhat is casting.
targetTarget of the caster; who is receiving the spell.
spell_typeID of the spell.
Return values:
0Spell failed.
1Spell was successful.

Definition at line 1016 of file spell_effect.c.

int cast_consecrate ( object op)

A spell to make an altar your god's.

Parameters:
opWho is casting.
Return values:
0No consecration happened.
1An altar was consecrated.

Definition at line 1489 of file spell_effect.c.

int cast_create_food ( object op,
object caster,
int  dir,
const char *  stringarg 
)

Create food.

Allows the choice of what sort of food object to make. If stringarg is NULL, it will create food dependent on level.

Parameters:
opWho is casting.
casterWhat is casting.
dirCasting direction.
stringargOptional parameter specifying what kind of items to create.
Return values:
0No food created.
1Food was created.

Definition at line 121 of file spell_effect.c.

int cast_create_town_portal ( object op)

This function cast the spell of town portal for op.

The spell operates in two passes. During the first one a place is marked as a destination for the portal. During the second one, 2 portals are created, one in the position the player cast it and one in the destination place. The portal are synchronized and 2 forces are inserted in the player to destruct the portal next time player creates a new portal pair.

Parameters:
opWho is casting.
Return values:
0Spell was unsuccessful for some reason.
1Spell worked.

Definition at line 286 of file spell_effect.c.

int cast_destruction ( object op,
object caster,
int  dam,
int  attacktype 
)

Hit all enemies around the caster.

Parameters:
opWho is casting.
casterWhat object is casting.
damBase damage to do.
attacktypeAttacktype.
Returns:
1.

Definition at line 585 of file spell_effect.c.

int cast_heal ( object op,
int  level,
object target,
int  spell_type 
)

Heals something.

Parameters:
opWho is casting.
levelLevel of the skill.
targetTarget.
spell_typeID of the spell.

Definition at line 738 of file spell_effect.c.

int cast_heal_around ( object op,
int  level,
int  type 
)

Cast an area of effect healing spell.

Parameters:
opObject.
levelLevel of the spell being cast.
typeID of the spell.
Returns:
1 on success, 0 on failure.

Definition at line 658 of file spell_effect.c.

int cast_identify ( object op,
int  level,
object single_ob,
int  mode 
)

Cast identify spell.

Parameters:
opObject receiving the spell effects.
levelLevel of the identification.
single_obIf set, and mode is IDENTIFY_MARKED, only this object will be identified, otherwise contents of this object. If NULL, the inventory of 'op' will be identified.
modeOne of Identify modes.
Returns:
Number of objects identified.

Definition at line 1448 of file spell_effect.c.

void cast_magic_storm ( object op,
object tmp,
int  lvl 
)

This is really used mostly for spell fumbles at the like.

Parameters:
opWhat is casting this.
tmpObject to propagate.
lvlHow nasty should the propagation be.

Definition at line 37 of file spell_effect.c.

int cast_transform_wealth ( object op)

Transform wealth spell.

Parameters:
opWho is casting.
Returns:
1 on success, 0 otherwise.

Definition at line 1766 of file spell_effect.c.

int cast_wor ( object op,
object caster 
)

Word of recall causes the player to return 'home'.

We put a force into the player object, so that there is a time delay effect.

Parameters:
opWho is casting.
casterWhat is casting.
Returns:
1 on success, 0 otherwise.

Definition at line 230 of file spell_effect.c.

int create_bomb ( object op,
object caster,
int  dir,
int  spell_type 
)

Create a bomb.

Parameters:
opWho is casting.
casterWhat object is casting.
dirCast direction.
spell_typeID of the spell to cast.
Return values:
0No bomb was placed.
1Bomb was placed on map.

Definition at line 1147 of file spell_effect.c.

int do_cast_identify ( object tmp,
object op,
int  mode,
int *  done,
int  level 
)

Actually identify an object when casting identify.

Parameters:
tmpWhat to identify.
opWho is receiving the spell effect.
modeOne of Identify modes.
[out]doneContains the number of objects identified so far.
levelMaximum level of items we can identify.
Returns:
1 if we can keep identifying items, 0 otherwise.

Definition at line 1399 of file spell_effect.c.

int finger_of_death ( object op,
object target 
)

Finger of death spell.

If target is undead, the spell will restore target to max health instead of damaging it.

Parameters:
opCaster.
targetTarget.
Returns:
1.

Definition at line 1569 of file spell_effect.c.

int probe ( object op)

Try to get information about a living thing.

Parameters:
opWho is casting.
Return values:
0Nothing probed.
1Something was probed.

Definition at line 196 of file spell_effect.c.

int recharge ( object op)

Recharge wands.

Parameters:
opWho is casting.
Return values:
0Nothing happened.
1Wand was recharged, or destroyed.

Definition at line 62 of file spell_effect.c.

int remove_curse ( object op,
object target,
int  type,
int  src 
)

Cast remove curse or remove damnation.

Parameters:
opCaster object.
targetTarget.
typeID of the spell.
srcWhere the spell comes from.
Returns:
0 on failure / no cursed items, number of objects uncursed otherwise.

Definition at line 1297 of file spell_effect.c.

int remove_depletion ( object op,
object target 
)

Cast remove depletion spell.

Parameters:
opObject casting this.
targetTarget.
Returns:
0 on failure / no depletion, number of stats cured otherwise.

Definition at line 1210 of file spell_effect.c.