Crossfire Server, Trunk  R20513
Functions
scroll.c File Reference

The implementation of the Scroll class of objects. More...

#include <global.h>
#include <ob_methods.h>
#include <ob_types.h>
#include <sounds.h>
#include <sproto.h>
Include dependency graph for scroll.c:

Go to the source code of this file.

Functions

void init_type_scroll (void)
 Initializer for the scroll object type. More...
 
static method_ret scroll_type_apply (ob_methods *context, object *scroll, object *applier, int aflags)
 Handles reading a spell scroll. More...
 

Detailed Description

The implementation of the Scroll class of objects.

Definition in file scroll.c.

Function Documentation

void init_type_scroll ( void  )

Initializer for the scroll object type.

Definition at line 37 of file scroll.c.

References register_apply(), SCROLL, and scroll_type_apply().

Referenced by register_all_ob_types().

Here is the call graph for this function:

Here is the caller graph for this function:

static method_ret scroll_type_apply ( ob_methods context,
object scroll,
object applier,
int  aflags 
)
static

Handles reading a spell scroll.

Parameters
contextThe method context
scrollThe scroll to apply
applierThe object attempting to apply the scroll
aflagsSpecial flags (always apply/unapply)
Returns
METHOD_OK
Todo:

should handle scroll failure differently if god-like scroll.

Tweak failure parameters.

Definition at line 57 of file scroll.c.

References calc_skill_exp(), cast_spell(), change_exp(), die_roll(), draw_ext_info(), draw_ext_info_format(), obj::facing, find_skill_by_name(), FLAG_BLESSED, FLAG_BLIND, FLAG_CURSED, FLAG_DAMNED, FLAG_IDENTIFIED, FLAG_WIZ, HEAD, identify(), obj::inv, obj::level, MAX, METHOD_OK, MSG_TYPE_APPLY, MSG_TYPE_APPLY_ERROR, MSG_TYPE_APPLY_FAILURE, MSG_TYPE_APPLY_SUCCESS, treasureliststruct::name, obj::name, NDI_BLACK, NDI_UNIQUE, object_decrease_nrof_by_one, PLAYER, QUERY_FLAG, rndm(), scroll_failure(), settings, SK_LITERACY, obj::skill, skill_names, SPELL, Settings::spell_failure_effects, TRUE, and obj::type.

Referenced by init_type_scroll().

Here is the call graph for this function:

Here is the caller graph for this function: