 |
Crossfire Server, Trunk
1.75.0
|
Go to the documentation of this file.
97 if (caster == op && spob->
skill)
99 else if (caster->
skill)
112 if (at->clone.type ==
SPELL) {
113 fprintf(stderr,
"%s:%s:%s:%s:%d\n", at->clone.name ? at->clone.name :
"null",
114 at->name, at->clone.other_arch ? at->clone.other_arch->name :
"null",
115 at->clone.skill ? at->clone.skill :
"null", at->clone.level);
120 if (at->clone.type ==
SPELL && at->clone.path_attuned == 0) {
123 fprintf(stderr,
"Spells with no path set:\n");
126 fprintf(stderr,
"- %s\n", at->clone.name ? at->clone.name :
"null");
173 new_level =
spell->level
176 return MAX(new_level, 1);
243 sp =
spell->stats.sp;
246 if (!sp &&
spell->stats.sp)
249 if (
spell->stats.grace &&
spell->stats.maxgrace) {
252 grace =
spell->stats.grace;
255 if (
spell->stats.grace && !grace)
259 if (
spell->stats.sp && !sp)
262 if (
spell->stats.grace && !grace)
266 return MAX(sp, grace);
411 object *spob1 = NULL, *spob2 = NULL;
422 if (spob->type ==
SPELL) {
423 if (!strncmp(spob->name, spname, strlen(spname))) {
424 if (strlen(spname) == strlen(spob->name))
429 }
else if (!strncmp(spob->name, spname, strlen(spob->name))) {
436 LOG(
llevError,
"Found multiple spells with overlapping base names: %s, %s\n", spob2->name, spob->name);
446 if (spob1 && nummatch == 1)
502 "Something is in the way. You cast it at your feet.");
557 && (tmp->type !=
BOW)
558 && (tmp->type !=
ARROW)
559 && (tmp->type !=
GOLEM)
573 if (tmp->type == op->
type
634 if (dir < 0 || dir > 8) {
635 LOG(
llevError,
"Invalid direction %d in fire_arch_from_position for %s\n", dir,
spell->name);
639 if (
spell->other_arch == NULL)
643 LOG(
llevError,
"Unexpected object type %d in fire_arch_from_position for %s\n",
spell->type,
spell->name);
681 LOG(
llevError,
"Unexpected object subtype %d in fire_arch_from_position for %s\n",
spell->subtype,
spell->name);
690 "You can't cast the spell on top of a wall!");
855 for (inv = tmp->
inv; inv; inv = inv->
below) {
890 int owner_type = 0, mflags;
895 if (exclude != NULL) {
896 exclude =
HEAD(exclude);
897 owner_type = exclude->
type;
940 object *tmp, *head = NULL, *prev = NULL;
1008 for (i = 0; i < n; i++)
1053 const char *godname;
1057 if (!strcmp(godname,
"none"))
1058 godname =
"Your spirit";
1060 if (failure <= -20 && failure > -40) {
1062 "%s gives a sign to renew your faith.",
1067 }
else if (failure <= -40 && failure > -60) {
1069 "Your diety touches your mind!");
1071 }
else if (failure <= -60 && failure > -150) {
1073 "%s requires you to pray NOW. You comply, ignoring all else.",
1077 }
else if (failure <= -150) {
1109 if (failure <= -20 && failure > -40) {
1111 "Your spell causes an unexpected effect.");
1115 }
else if (failure <= -40 && failure > -60) {
1117 "Your magic recoils on you, making you confused!");
1119 }
else if (failure <= -60 && failure > -80) {
1121 "Your magic stuns you!");
1123 }
else if (failure <= -80) {
1129 "The magic warps and you are turned inside out!");
1133 "You lose control of the mana! The uncontrolled magic blasts you!");
1187 object *first = NULL;
1203 for (item = first; item; item = item->
below) {
1236 "Your %s turns to a flower!",
1260 if (second >= first)
1265 "You suddenly feel really weird!");
1311 char *ingredients[10];
1331 for (i = 0; i <
count; i++) {
1334 while (isdigit(*ingredients[i])) {
1335 nrof[i] = 10*nrof[i]+(*(ingredients[i])-
'0');
1340 while (*ingredients[i] ==
' ')
1346 if (check->title == NULL)
1347 name2 = check->name;
1349 snprintf(name_ob,
sizeof(name_ob),
"%s %s", check->name, check->title);
1353 if (strcmp(name2, ingredients[i]) == 0) {
1359 if (
found[i] == NULL) {
1362 "Casting this spell requires %s, but you don't have any.",
1368 if (
found[i]->nrof < nrof[i]) {
1371 "Casting this spell requires %d %s, but you only have %d.",
1381 for (i = 0; i <
count; i++) {
1424 int cast_spell(
object *op,
object *caster,
int dir,
object *spell_ob,
char *stringarg) {
1425 const char *godname;
1426 int success = 0, mflags, cast_level = 0;
1428 object *
skill = NULL;
1429 int confusion_effect = 0;
1430 float cost_multiplier = 1.0f;
1435 LOG(
llevError,
"cast_spell: null spell object passed\n");
1439 if (!strcmp(godname,
"none"))
1440 godname =
"A random spirit";
1444 LOG(
llevError,
"cast_spell: null caster object passed\n");
1452 if (
rndm(0, 5) < 4) {
1456 "In your confused state, you're not sure of what you cast!");
1459 confusion_effect = 1;
1467 "That spell path is denied to you.");
1492 "This ground is unholy! %s ignores you.",
1498 "Something blocks your spellcasting.");
1503 "Something blocks the magic of your item.");
1507 "Something blocks the magic of your scroll.");
1527 if (spell_ob->
skill) {
1532 "You need the skill %s to cast %s.",
1538 "You lack enough skill to cast that spell.");
1549 "You don't have enough mana.");
1557 "%s grants your prayer, though you are unworthy.",
1563 "%s ignores your prayer.",
1574 "You fumble the spell.");
1580 if (bungle->
arch != NULL) {
1583 LOG(
llevError,
"cast_spell: Could not create spell_bungle arch\n");
1586 }
else if (spell_ob->
stats.
sp) {
1592 "You bungle the spell because you have too much heavy equipment in use.");
1598 if (bungle->
arch != NULL) {
1601 LOG(
llevError,
"cast_spell: Could not create spell_bungle arch\n");
1617 op->
spell = spell_ob;
1630 "You are casting!");
1634 spell_ob = op->
spell;
1676 "You lack the skill %s to use the %s",
1694 if (confusion_effect) {
1698 "In your confused state, you can't control the magic!");
1721 success =
write_rune(op, caster, spell_ob, dir, stringarg);
1725 success =
write_mark(op, spell_ob, stringarg);
1729 success =
fire_bolt(op, caster, dir, spell_ob);
1737 success =
cast_cone(op, caster, dir, spell_ob);
1758 if (success || op->
contr == NULL)
1785 success =
magic_wall(op, caster, dir, spell_ob);
1806 cast_level = caster->
level;
1809 success =
probe(op, caster, spell_ob, dir, cast_level);
1813 success =
cast_heal(op, caster, spell_ob, dir);
1829 success =
cast_bless(op, caster, spell_ob, dir);
1833 success =
cast_curse(op, caster, spell_ob, dir);
1839 cost_multiplier = 0.0f;
1844 success =
recharge(op, caster, spell_ob);
1854 "The spell fizzles");
1862 success =
alchemy(op, caster, spell_ob);
1885 "You lack the proper attunement to cast %s",
1893 success =
fire_swarm(op, caster, spell_ob, dir);
1919 success =
cast_light(op, caster, spell_ob, dir);
1984 int i =
spell->duration/5;
1988 snprintf(dur,
sizeof(dur),
"%d", i);
1992 snprintf(dur,
sizeof(dur),
"%d", i);
2014 if (
spell->duration == atoi(key)) {
2016 "The effects of your %s are draining out.",
spell->name);
2022 if (
spell->duration == atoi(key)) {
2024 "The effects of your %s are about to expire.",
spell->name);
uint8_t casting_time
It takes awhile to cast a spell.
void paralyze_living(object *op, int dam)
Paralyze a living thing.
static void swap_random_stats(object *op)
Randomly swaps 2 stats of op.
#define GET_MAP_OB(M, X, Y)
Gets the bottom object on a map.
object * object_get_owner(object *op)
Returns the object which this object marks as being the owner.
object * find_target_for_friendly_spell(object *op, int dir)
This function is commonly used to find a friendly target for spells such as heal or protection or arm...
void drain_wand_charge(object *wand)
Drains a charge from a wand.
struct Settings settings
Global settings.
uint8_t range_modifier
How going up in level affects range
int fire_bolt(object *op, object *caster, int dir, object *spob)
Cast a bolt-like spell.
void object_update_turn_face(object *op)
If an object with the IS_TURNABLE() flag needs to be turned due to the closest player being on the ot...
#define FOR_MAP_FINISH()
Finishes FOR_MAP_PREPARE().
int16_t maxhp
Max hit points.
#define FLAG_CONFUSED
Will also be unable to cast spells.
object * find_applied_skill_by_name(const object *op, const char *name)
Find a skill by name using the last_skill_ob list.
struct Statistics statistics
Merged spell statistics.
@ llevError
Error, serious thing.
#define FABS(x)
Decstations have trouble with fabs()...
uint16_t difficulty
What level the player should be to play here.
uint32_t path_attuned
Paths the object is attuned to.
int cast_consecrate(object *op, object *caster, object *spell)
A spell to make an altar your god's.
void drain_rod_charge(object *rod)
Drain charges from a rod.
int cast_create_food(object *op, object *caster, object *spell_ob, int dir, const char *stringarg)
Create food.
void LOG(LogLevel logLevel, const char *format,...)
Logs a message to stderr, or to file.
archetype * more
Next part of a linked object.
#define FLAG_GENERATOR
Will generate type ob->stats.food.
object * inv
Pointer to the first object in the inventory.
#define SP_ANIMATE_WEAPON
#define FLAG_STARTEQUIP
Object was given to player at start.
void shuffle_attack(object *op)
This routine shuffles the attack of op to one of the ones in the list.
#define MSG_TYPE_SKILL
Messages related to skill use.
#define QUERY_FLAG(xyz, p)
#define ARCH_SPELL_BUNGLE
Archetype when player bungles a spell.
int cast_identify(object *op, object *caster, object *spell)
Identifies objects in the players inventory/on the ground.
int dimension_door(object *op, object *caster, object *spob, int dir)
Teleport through some doors and space.
int cast_change_map_lightlevel(object *op, object *spell)
This changes the light level for the entire map.
int perceive_self(object *op)
Living thing wants to know information.
int get_cleric_chance(int stat)
void confuse_living(object *op, object *hitter, int dam)
Confuse a living thing.
int cast_destruction(object *op, object *caster, object *spell_ob)
Hit all monsters around the caster.
int op_on_battleground(object *op, int *x, int *y, archetype **trophy)
Check if the given object (usually a player) is standing on a battleground tile.
struct archetype * arch
Pointer to archetype.
int absdir(int d)
Computes an absolute direction.
int tailor_god_spell(object *spellop, object *caster)
Changes the attributes of cone, smite, and ball spells as needed by the code.
int8_t range
Range of the spell.
float speed
Frequency of object 'moves' relative to server tick rate.
int caster_level(const object *caster, const object *spell)
This function returns the effective level the spell is being cast at.
int16_t invisible
How much longer the object will be invis.
#define OB_SPELL_TAG_MATCH(op, count)
Check whether a tag matches in the tags.
int magic_wall(object *op, object *caster, int dir, object *spell_ob)
This creates magic walls.
void check_bullet(object *op)
Checks to see what op should do, given the space it is on (eg, explode, damage player,...
void spell_failure(object *op, int failure, int power, object *skill)
Handles the various effects for differing degrees of failure badness.
static int can_be_transmuted_to_flower(object *op)
Determines if an item can be transmuted after a cast failure.
float speed_left
How much speed is left to spend this round.
struct mapstruct * map
Pointer to the map in which this object is present.
sstring anim_suffix
Used to determine combined animations.
int cast_cause_disease(object *op, object *caster, object *spell, int dir)
Let's try to infect something.
int object_find_first_free_spot(const object *ob, mapstruct *m, int x, int y)
object_find_first_free_spot(archetype, mapstruct, x, y) works like object_find_free_spot(),...
void object_set_owner(object *op, object *owner)
Sets the owner and sets the skill and exp pointers to owner's current skill and experience objects.
#define MSG_TYPE_ATTRIBUTE
Changes to attributes (stats, resistances, etc)
@ range_none
No range selected.
#define SET_ANIMATION(ob, newanim)
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...) PRINTF_ARGS(6
void play_sound_player_only(player *pl, int8_t sound_type, object *emitter, int dir, const char *action)
Plays a sound for specified player only.
#define MSG_TYPE_VICTIM_SPELL
Someone cast a bad spell on the player.
int cast_curse(object *op, object *caster, object *spell_ob, int dir)
Curse an object, reducing its statistics.
int8_t direction
Means the object is moving that way.
void play_sound_map(int8_t sound_type, object *emitter, int dir, const char *action)
Plays a sound on a map.
tag_t count
Unique object number for this object.
static const flag_definition flags[]
Flag mapping.
#define FLAG_WIZCAST
The wizard can cast spells in no-magic area.
int change_skill(object *who, object *new_skill, int flag)
This changes the object's skill to new_skill.
void fix_object(object *op)
Updates all abilities given by applied objects in the inventory of the given object.
int cast_raise_dead_spell(object *op, object *caster, object *spell, int dir, const char *arg)
This handles the raise dead / resurrection spells.
int write_mark(object *op, object *spell, const char *msg)
This writes a rune that contains the appropriate message.
int SP_level_wc_adjust(const object *caster, const object *spob)
Returns adjusted wc based on the caster and the spell.
int cast_polymorph(object *op, object *caster, object *spell_ob, int dir)
Polymorph spell casting.
#define P_NO_MAGIC
Spells (some) can't pass this object.
@ TRANSPORT
see doc/Developers/objects
object * lookup_spell_by_name(object *op, const char *spname)
Look at object 'op' and see if they know the spell spname.
void set_spell_skill(object *op, object *caster, object *spob, object *dest)
Utility function to assign the correct skill when casting.
#define SP_CREATE_MISSILE
int rndm(int min, int max)
Returns a number between min and max.
static void handle_spell_confusion(object *op)
This does a random effect for op, which tried to cast a spell in a confused state.
@ range_golem
Control golem.
int apply_manual(object *op, object *tmp, int aflag)
Main apply handler.
#define MSG_TYPE_SPELL_INFO
random info about spell, not related to failure/success
#define FLAG_APPLIED
Object is ready for use by living.
int16_t level
Level of creature or object.
int summon_hostile_monsters(object *op, int n, const char *monstername)
Summons hostile monsters and places them in nearby squares.
AssetsManager * getManager()
object * object_insert_in_ob(object *op, object *where)
This function inserts the object op in the linked list inside the object environment.
object * above
Pointer to the object stacked above this one.
#define HUGE_BUF
Used for messages - some can be quite long.
#define MSG_TYPE_VICTIM
Something bad is happening to the player.
int cast_spell(object *op, object *caster, int dir, object *spell_ob, char *stringarg)
Main dispatch when someone casts a spell.
int min_casting_level(const object *caster, const object *spell)
This function takes a caster and spell and presents the effective level the caster needs to be to cas...
int cast_detection(object *op, object *caster, object *spell)
Detect magic or invisible items.
Plugin animator file specs[Config] name
void cast_magic_storm(object *op, object *tmp, int lvl)
This is really used mostly for spell fumbles and the like.
int pets_summon_object(object *op, object *caster, object *spell_ob, int dir, const char *stringarg)
General purpose summoning function.
int reflwall(mapstruct *m, int x, int y, object *sp_op)
Decides weither the (spell-)object sp_op will be reflected from the given mapsquare.
int cast_light(object *op, object *caster, object *spell, int dir)
Illuminates something on a map, or try to blind a living thing.
#define FLAG_ALIVE
Object can fight (or be fought)
uint32_t path_denied
Paths the object is denied access to.
void esrv_send_item(object *pl, object *op)
Sends item's info to player.
#define SP_SUMMON_MONSTER
int16_t y
Position in the map for this object.
uint32_t path_repelled
Paths the object is repelled from.
static event_registration m
#define PATH_SP_MULT(op, spell)
Multiplier for spell points / grace based on the attenuation.
void object_free_drop_inventory(object *ob)
Frees everything allocated by an object, removes it from the list of used objects,...
struct player * contr
Pointer to the player which control this object.
int cast_heal(object *op, object *caster, object *spell, int dir)
Heals something.
#define SP_ITEM_CURSE_BLESS
uint8_t subtype
Subtype of object.
sstring add_refcount(sstring str)
This will increase the refcount of the string str.
const char * determine_god(object *op)
Determines if op worships a god.
short freearr_y[SIZEOFFREE]
Y offset when searching around a spot.
int remove_curse(object *op, object *caster, object *spell)
This function removes the cursed/damned status on equipped items.
int mood_change(object *op, object *caster, object *spell)
This covers the various spells that change the moods of monsters - makes them angry,...
void query_name(const object *op, char *buf, size_t size)
Describes an item.
#define MSG_TYPE_ATTRIBUTE_PROTECTION_GAIN
Protections in this.
int can_see_monsterP(mapstruct *m, int x, int y, int dir)
Recursive routine to see if we can find a path to a certain point.
int ok_to_put_more(mapstruct *m, int16_t x, int16_t y, object *op, uint32_t immune_stop)
Returns true if it is ok to put spell op on the space/may provided.
#define SP_DIMENSION_DOOR
size_t split_string(char *str, char *array[], size_t array_size, char sep)
Splits a string delimited by passed in sep value into characters into an array of strings.
object clone
An object from which to do object_copy()
void apply_anim_suffix(object *who, const char *suffix)
Applies a compound animation to an object.
object * spell
Spell that was being cast.
#define HEAD(op)
Returns the head part of an object.
int SP_level_duration_adjust(const object *caster, const object *spob)
Adjust the duration of the spell based on level.
int16_t SP_level_spellpoint_cost(object *caster, object *spell, int flags)
Scales the spellpoint cost of a spell by it's increased effectiveness.
int create_bomb(object *op, object *caster, int dir, object *spell)
Create a bomb.
object * below
Pointer to the object stacked below this one.
int16_t casting_time
Time left before spell goes off.
object * object_find_by_type_and_name(const object *who, int type, const char *name)
Find object in inventory by type and name.
void query_short_name(const object *op, char *buf, size_t size)
query_short_name(object) is similar to query_name(), but doesn't contain any information about object...
void set_attr_value(living *stats, int attr, int8_t value)
Sets Str/Dex/con/Wis/Cha/Int/Pow in stats to value, depending on what attr is (STR to POW).
int16_t encumbrance
How much our player is encumbered.
void rod_adjust(object *rod)
Adjusts rod attributes.
#define MSG_TYPE_ITEM
Item related information.
const Face * face
Face with colors.
#define AP_IGNORE_CURSE
Apply/unapply regardless of cursed/damned status.
int32_t value
How much money it is worth (or contains)
int isqrt(int n)
Compute the square root.
void object_update_speed(object *op)
Updates the speed of an object.
uint8_t type
PLAYER, BULLET, etc.
#define FORCE_TRANSFORMED_ITEM
int16_t dam
How much damage this object does when hitting.
int cast_create_town_portal(object *op, object *caster, object *spell)
This function cast the spell of town portal for op.
void draw_magic_map(object *pl)
Creates and sends magic map to player.
with a maximum of six This is not so if you are wearing plate you receive no benefit Armour is additive with all the supplementry forms of which means that it lasts until the next semi permanent spell effect is cast upon the character spell
void store_spell_expiry(object *spell)
Stores in the spell when to warn player of expiration.
#define GET_MAP_MOVE_BLOCK(M, X, Y)
Gets the blocking state of a square.
#define FOR_INV_FINISH()
Finishes FOR_INV_PREPARE().
int create_aura(object *op, object *caster, object *spell)
Create an aura spell object and put it in the player's inventory.
#define INS_BELOW_ORIGINATOR
Insert new object immediately below originator.
int32_t food
How much food in stomach.
#define MSG_TYPE_SKILL_MISSING
Don't have the skill.
rangetype
What range is currently selected by the player.
uint32_t tag_t
Object tag, unique during the whole game.
The archetype structure is a set of rules on how to generate and manipulate objects which point to ar...
rangetype shoottype
Which range-attack is being used by player.
void dump_spells(void)
Dumps all the spells - now also dumps skill associated with the spell.
void each(std::function< void(T *)> op)
Apply a function to each asset.
#define MSG_TYPE_SPELL
Spell related info.
int random_roll(int min, int max, const object *op, int goodbad)
Roll a random number between min and max.
void regenerate_rod(object *rod)
Regenerates a rod's charges.
#define SP_CHANGE_MAP_LIGHT
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
Same as object_insert_in_map() except it handle separate coordinates and do a clean job preparing mul...
Chaos_Attacks ATTACKS[22]
Some local definitions for shuffle_attack().
struct archetype * other_arch
Pointer used for various things - mostly used for what this objects turns into or what this object cr...
#define FLAG_MONSTER
Will attack players.
int fire_arch_from_position(object *op, object *caster, int16_t x, int16_t y, int dir, object *spell)
Fires an archetype.
object * find_skill_by_name(object *who, const char *name)
This returns the skill pointer of the given name (the one that accumulates exp, has the level,...
#define P_OUT_OF_MAP
This space is outside the map.
Archetypes * archetypes()
Get archetypes.
#define MAX_BUF
Used for all kinds of things.
int cast_bless(object *op, object *caster, object *spell_ob, int dir)
Improve statistics of some living object.
uint64_t spell_suppressions
Number of times ok_to_put_more() returned FALSE.
void esrv_del_item(player *pl, object *ob)
Tells the client to delete an item.
object * head
Points to the main object of a large body.
object * create_archetype(const char *name)
Finds which archetype matches the given name, and returns a new object containing a copy of the arche...
int32_t weight
Attributes of the object.
tag_t * spell_tags
Tags used for spell effect merging.
int spell_find_dir(mapstruct *m, int x, int y, object *exclude)
Search what direction a spell should go in, first the center square then some close squares in the gi...
static bool IS_PLAYER(object *op)
#define FREE_AND_CLEAR_STR(xyz)
Release the shared string, and set it to NULL.
int probe(object *op, object *caster, object *spell_ob, int dir, int level)
Try to get information about a living thing.
int16_t maxgrace
Maximum grace.
uint8_t spell_failure_effects
Nasty backlash to spell failures.
#define FOR_MAP_PREPARE(map_, mx_, my_, it_)
Constructs a loop iterating over all objects of a map tile.
int change_abil(object *op, object *tmp)
Permanently alters an object's stats/flags based on another object.
static int spell_consume_items(object *op, const object *spell_ob)
Check if the player attempting to cast a spell has the required items, and eat those.
#define OUT_OF_REAL_MAP(M, X, Y)
Checks if a square is out of the map.
void get_search_arr(int *search_arr)
New function to make monster searching more efficient, and effective! This basically returns a random...
object * object_decrease_nrof(object *op, uint32_t i)
Decreases a specified number from the amount of an object.
#define FLAG_REFL_SPELL
Spells (some) will reflect from object.
#define FLAG_WIZ
Object has special privilegies.
uint8_t dam_modifier
How going up in level affects damage.
#define NDI_UNIQUE
Print immediately, don't buffer.
sstring slaying
Which race to do double damage to.
uint8_t duration_modifier
how level modifies duration
sstring name
The name of the object, obviously...
method_ret ob_process(object *op)
Processes an object, giving it the opportunity to move or react.
#define MSG_TYPE_SKILL_FAILURE
Failure in using skill.
int alchemy(object *op, object *caster, object *spell_ob)
Change items to gold nuggets.
int animate_weapon(object *op, object *caster, object *spell, int dir)
Generalization of staff_to_snake().
#define MSG_TYPE_SPELL_FAILURE
Spell failure messages.
#define SP_CHANGE_ABILITY
uint8_t spellpoint_level_depend
Spell costs go up with level.
int get_map_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny)
This rolls up wall, blocks_magic, blocks_view, etc, all into one function that just returns a P_.
#define PATH_TIME_MULT(op, spell)
Multiplier for the casting time based on path attenuation.
const typedef char * sstring
object * find_random_spell_in_ob(object *ob, const char *skill)
This returns a random spell from 'ob'.
#define ARCH_SPELL_BLOCKED
Archetype when a spell is blocked (unholy ground or non magic).
sstring skill
Name of the skill this object uses/grants.
int SP_level_range_adjust(const object *caster, const object *spob)
Adjust the range of the spell based on level.
#define MSG_TYPE_SPELL_ERROR
Spell failure messages.
void spell_effect(object *spob, int x, int y, mapstruct *map, object *originator)
Inserts into map a spell effect based on other_arch.
int cast_create_obj(object *op, object *new_op, int dir)
Creates object new_op in direction dir or if that is blocked, beneath the player (op).
int pets_summon_golem(object *op, object *caster, int dir, object *spob)
Summons a monster.
void esrv_update_item(int flags, object *pl, object *op)
Updates object *op for player *pl.
#define FLAG_REFLECTING
Object reflects from walls (lightning)
int dispel_rune(object *op, object *skill, int dir)
Someone is trying to disarm a rune.
int hit_player(object *op, int dam, object *hitter, uint32_t type, int full_hit)
Object is attacked by something.
sstring object_get_value(const object *op, const char *const key)
Get an extra value by key.
#define CLEAR_FLAG(xyz, p)
#define AP_NOPRINT
Don't print messages - caller will do that may be some that still print.
int cast_wonder(object *op, object *caster, int dir, object *spell_ob)
wonder is really just a spell that will likely cast another spell.
int16_t duration
Number of moves (see 'speed') spell lasts.
object * arch_to_object(archetype *at)
Creates and returns a new object which is a copy of the given archetype.
#define FLAG_ANIMATE
The object looks at archetype for faces.
int SP_level_dam_adjust(const object *caster, const object *spob)
Returns adjusted damage based on the caster.
struct treasurelist * randomitems
Items to be generated.
static void prayer_failure(object *op, int failure, int power)
Called when a player fails at casting a prayer.
object * check_spell_known(object *op, const char *name)
Checks to see if player knows the spell.
int fire_swarm(object *op, object *caster, object *spell, int dir)
The following routine creates a swarm of objects.
static int put_a_monster(object *op, const char *monstername)
Puts a monster named monstername near by op.
void object_remove(object *op)
This function removes the object op from the linked list of objects which it is currently tied to.
archetype * try_find_archetype(const char *name)
int cast_change_ability(object *op, object *caster, object *spell_ob, int dir, int silent)
Cast some stat-improving spell.
int freedir[SIZEOFFREE]
Direction we're pointing on this spot.
#define OB_TYPE_MOVE_BLOCK(ob1, type)
Basic macro to see if if ob1 can not move onto a space based on the 'type' move_block parameter Add c...
#define P_NO_CLERIC
No clerical spells cast here.
#define MSG_TYPE_ITEM_CHANGE
Item has changed in some way.
char * spellarg
Optional argument when casting obj::spell.
int cast_word_of_recall(object *op, object *caster, object *spell_ob)
Word of recall causes the player to return 'home'.
void object_copy_owner(object *op, object *clone)
Set the owner to clone's current owner and set the skill and experience objects to clone's objects (t...
uint32_t nrof
Number of objects.
int write_rune(object *op, object *caster, object *spell, int dir, const char *runename)
Player is attempting to write a magical rune.
living stats
Str, Con, Dex, etc.
int object_set_value(object *op, const char *key, const char *value, int add_key)
Updates the key in op to value.
object * more
Pointer to the rest of a large body of objects.
int8_t get_attr_value(const living *stats, int attr)
Gets the value of a stat.
#define AP_UNAPPLY
Item is to be remvoed.
int cast_create_missile(object *op, object *caster, object *spell, int dir, const char *stringarg)
Create a missile (nonmagic - magic +4).
int cast_transfer(object *op, object *caster, object *spell, int dir)
This spell transfers sp from the player to another person.
short freearr_x[SIZEOFFREE]
X offset when searching around a spot.
int cast_item_curse_or_bless(object *op, object *spell_ob)
This alters player's marked item's cursed or blessed status, based on the spell_ob's fields.
void check_spell_expiry(object *spell)
Checks if player should be warned of soon expiring spell.
int cast_smite_spell(object *op, object *caster, int dir, object *spell)
The priest points to a creature and causes a 'godly curse' to descend.
#define SPELL_TAG_SIZE
Defines default size of the *spell_tags pointer.
#define MSG_TYPE_APPLY
Applying objects.
uint32_t attacktype
Bitmask of attacks this object does.
int cast_earth_to_dust(object *op, object *caster, object *spell_ob)
Basically destroys earthwalls in the area.
int recharge(object *op, object *caster, object *spell_ob)
Recharge wands.
#define MSG_TYPE_APPLY_ERROR
object * object_get_player_container(object *op)
Finds the player carrying an object.
@ NUM_STATS
Number of statistics.
#define FOR_INV_PREPARE(op_, it_)
Constructs a loop iterating over the inventory of an object.
void create_treasure(treasurelist *t, object *op, int flag, int difficulty, int tries)
This calls the appropriate treasure creation function.
int cast_invisible(object *op, object *caster, object *spell_ob)
Makes the player or character invisible.
#define SP_WORD_OF_RECALL
int cast_cone(object *op, object *caster, int dir, object *spell)
Casts a cone spell.
#define P_BLOCKSVIEW
This spot blocks the player's view.
static void transmute_item_to_flower(object *op)
This transforms one random item of op to a flower.
in that case they will be relative to whatever the PWD of the crossfire server process is You probably shouldn though Notes on Specific and settings file datadir Usually usr share crossfire Contains data that the server does not need to modify while such as the etc A default install will pack the and treasurelist definitions into a single or trs file and the graphics into a face(metadata) and .tar(bitmaps) file