Go to the documentation of this file.
61 int fire_bolt(
object *
op,
object *caster,
int dir,
object *spob) {
125 if (
op->other_arch == NULL) {
126 LOG(
llevError,
"BUG: explode_bullet(): op without other_arch\n");
137 LOG(
llevError,
"BUG: explode_bullet(): env out of map\n");
145 LOG(
llevError,
"BUG: explode_bullet(): op out of map\n");
151 if (
op->attacktype) {
175 tmp->attacktype =
op->attacktype;
176 tmp->range =
op->range;
177 tmp->stats.dam =
op->stats.dam;
178 tmp->duration =
op->duration;
183 tmp->stats.dam =
op->dam_modifier;
184 tmp->range =
op->stats.maxhp;
185 tmp->duration =
op->stats.hp;
191 tmp->stats.maxhp =
op->count;
192 if (
tmp->stats.maxhp == 0)
193 tmp->stats.maxhp = 1;
197 tmp->stats.sp =
op->direction;
218 tag_t op_tag =
op->count, tmp_tag;
228 if (
op->other_arch) {
240 tmp_tag =
tmp->count;
272 if (
op->skill &&
op->skill != new_ob->
skill) {
299 int i, success = 0, range_min = -1, range_max = 1;
304 if (!
spell->other_arch)
321 movetype =
spell->other_arch->clone.move_type;
323 for (i = range_min; i <= range_max; i++) {
365 tmp->attacktype =
spell->attacktype;
383 if (
tmp->range < 2 &&
spell->range >= 2)
404 LOG(
llevDebug,
"cast_cone(): arch %s doesn't have flying 1\n",
spell->other_arch->name);
406 if (!
tmp->move_on &&
tmp->stats.dam) {
407 LOG(
llevDebug,
"cast_cone(): arch %s doesn't have move_on set\n",
spell->other_arch->name);
413 tmp->stats.maxhp =
tmp->count;
414 if (
tmp->stats.maxhp == 0)
415 tmp->stats.maxhp = 1;
464 tmp->attacktype =
spell->attacktype;
505 for (dist = 1; dist < range; dist++) {
522 if (target != NULL) {
547 object *effect, *target;
565 || (!god &&
spell->stats.grace)
567 || (target->
race && god && strstr(target->
race, god->
race))) {
572 if (
spell->other_arch)
583 "%s answers your call!",
610 "The %s looks stronger!",
676 tmp->glow_radius = radius;
685 if (
tmp->glow_radius >
op->glow_radius)
686 op->glow_radius =
tmp->glow_radius;
689 LOG(
llevError,
"make_object_glow() failed to insert glowing force in %s\n",
op->name);
708 int i, j, range, mflags,
friendly = 0, dam, dur;
711 object *
tmp, *found_skill;
729 else if (caster->
skill)
738 for (i = -range; i < range; i++) {
739 for (j = -range; j < range; j++) {
800 int cast_curse(
object *
op,
object *caster,
object *spell_ob,
int dir) {
814 if (
inv->name == spell_ob->
name) {
817 }
else if (spell_ob->
race && spell_ob->
race ==
inv->name) {
820 "You can not cast %s while %s is in effect",
841 if (duration >
force->duration) {
842 force->duration = duration;
851 force->speed_left = -1.0;
860 "You are a victim of %s's curse!",
907 int done_one, range, mflags,
level, at, best_at, immunity_chance = 50;
908 int16_t
x,
y, nx, ny;
920 immunity_chance = atoi(race);
921 if (immunity_chance < 0 || immunity_chance > 100) {
922 LOG(
llevError,
"ignoring invalid immunity_chance %d for %s\n", immunity_chance,
spell->arch->name);
923 immunity_chance = 50;
933 else if (god && !strcmp(
spell->race,
"GOD_SLAYING"))
935 else if (god && !strcmp(
spell->race,
"GOD_FRIEND"))
940 for (
x =
op->x-range; x <= op->
x+range;
x++)
941 for (
y =
op->y-range; y <= op->
y+range;
y++) {
958 if (race && head->
race && !strstr(race, head->
race))
965 if (
spell->attacktype) {
967 if (
spell->attacktype&(1<<at))
968 if (best_at == -1 || head->
resist[at] > head->
resist[best_at])
974 if (head->
resist[best_at] == 100)
977 at = head->
resist[best_at]/5;
1061 if (done_one &&
spell->other_arch) {
1092 if (!
spell->other_arch)
1102 tmp->attacktype =
tmp->spell->attacktype;
1109 for (i = 0; i <
spell->duration; i++)
1112 tmp->direction = dir;
1137 object *target = NULL, *
tmp = NULL;
1162 if (target != NULL) {
1178 LOG(
llevError,
"Error: spell arch for cast_light() missing.\n");
1182 if (
tmp->glow_radius) {
1209 int i, mflags, range, dam_mod, dur_mod;
1210 object *target_head;
1230 for (i = 1; i < range; i++) {
1249 target_head =
HEAD(walk);
1260 disease->
stats.
wc += dur_mod/2;
1262 if (disease->
magic > 0)
1263 disease->
magic += dur_mod/4;
1279 disease->
last_sp -= 2*dam_mod;
int SP_level_range_adjust(const object *caster, const object *spob)
#define object_was_destroyed(op, old_tag)
bool object_value_set(const object *op, const char *const key)
#define FORCE_CHANGE_ABILITY
object * object_get_owner(object *op)
void set_spell_skill(object *op, object *caster, object *spob, object *dest)
static int make_object_glow(object *op, int radius, int time)
object * object_get_env_recursive(object *op)
TIPS on SURVIVING Crossfire is populated with a wealth of different monsters These monsters can have varying immunities and attack types In some of them can be quite a bit smarter than others It will be important for new players to learn the abilities of different monsters and learn just how much it will take to kill them This section discusses how monsters can interact with players Most monsters in the game are out to mindlessly kill and destroy the players These monsters will help boost a player s after he kills them When fighting a large amount of monsters in a single attempt to find a narrower hallway so that you are not being attacked from all sides Charging into a room full of Beholders for instance would not be open the door and fight them one at a time For there are several maps designed for them Find these areas and clear them out All throughout these a player can find signs and books which they can read by stepping onto them and hitting A to apply the book sign These messages will help the player to learn the system One more always keep an eye on your food If your food drops to your character will soon so BE CAREFUL ! NPCs Non Player Character are special monsters which have intelligence Players may be able to interact with these monsters to help solve puzzles and find items of interest To speak with a monster you suspect to be a simply move to an adjacent square to them and push the double ie Enter your and press< Return > You can also use say if you feel like typing a little extra Other NPCs may not speak to but display intelligence with their movement Some monsters can be friendly
void object_update_turn_face(object *op)
void remove_friendly_object(object *op)
void LOG(LogLevel logLevel, const char *format,...)
int get_fear_bonus(int stat)
#define QUERY_FLAG(xyz, p)
int fire_swarm(object *op, object *caster, object *spell, int dir)
int tailor_god_spell(object *spellop, object *caster)
void object_set_enemy(object *op, object *enemy)
int mood_change(object *op, object *caster, object *spell)
int infect_object(object *victim, object *disease, int force)
void object_set_owner(object *op, object *owner)
static object * get_pointed_target(object *op, int dir, int range, int type)
int create_bomb(object *op, object *caster, int dir, object *spell)
non standard information is not specified or uptime this means how long since the executable has been started A particular host may have been running a server for quite a long time
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...) PRINTF_ARGS(6
#define MSG_TYPE_VICTIM_SPELL
int SP_level_duration_adjust(const object *caster, const object *spob)
int change_skill(object *who, object *new_skill, int flag)
void fix_object(object *op)
int hit_map(object *op, int dir, uint32_t type, int full_hit)
const char * object_get_value(const object *op, const char *const key)
object * object_insert_in_ob(object *op, object *where)
int16_t resist[NROFATTACKS]
const object * find_god(const char *name)
void cone_drop(object *op)
#define MSG_TYPE_SPELL_SUCCESS
void check_bullet(object *op)
static event_registration m
void object_free_drop_inventory(object *ob)
int cast_light(object *op, object *caster, object *spell, int dir)
void explode_bullet(object *op)
sstring add_refcount(sstring str)
const char * determine_god(object *op)
short freearr_y[SIZEOFFREE]
#define ARCH_DETECT_MAGIC
void query_name(const object *op, char *buf, size_t size)
int out_of_map(mapstruct *m, int x, int y)
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
#define GET_MAP_MOVE_BLOCK(M, X, Y)
int caster_level(const object *caster, const object *spell)
#define FLAG_UNAGGRESSIVE
int die_roll(int num, int size, const object *op, int goodbad)
int cast_curse(object *op, object *caster, object *spell_ob, int dir)
object * map_find_by_flag(mapstruct *map, int x, int y, int flag)
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
struct archetype * other_arch
How to Install a Crossfire Server on you must install a python script engine on your computer Python is the default script engine of Crossfire You can find the python engine you have only to install them The VisualC Crossfire settings are for d
object * find_skill_by_name(object *who, const char *name)
static std::shared_ptr< inja::Environment > env
object * create_archetype(const char *name)
void free_string(sstring str)
#define FREE_AND_CLEAR_STR(xyz)
#define FOR_MAP_PREPARE(map_, mx_, my_, it_)
int change_abil(object *op, object *tmp)
int cast_smite_spell(object *op, object *caster, int dir, object *spell)
method_ret ob_process(object *op)
int SP_level_dam_adjust(const object *caster, const object *spob)
#define MSG_TYPE_SPELL_FAILURE
void add_friendly_object(object *op)
int get_map_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny)
#define MSG_TYPE_SPELL_ERROR
int get_turn_bonus(int stat)
int did_make_save(const object *op, int level, int bonus)
int hit_player(object *op, int dam, object *hitter, uint32_t type, int full_hit)
#define CLEAR_FLAG(xyz, p)
int random_roll(int min, int max, const object *op, int goodbad)
int cast_cause_disease(object *op, object *caster, object *spell, int dir)
void share_exp(object *op, int64_t exp, const char *skill, int flag)
object * arch_to_object(archetype *at)
void object_remove(object *op)
#define OB_TYPE_MOVE_BLOCK(ob1, type)
void object_copy_owner(object *op, object *clone)
int object_set_value(object *op, const char *key, const char *value, int add_key)
short freearr_x[SIZEOFFREE]
int cast_destruction(object *op, object *caster, object *spell_ob)
#define FOR_INV_PREPARE(op_, it_)
int fire_bolt(object *op, object *caster, int dir, object *spob)
int cast_cone(object *op, object *caster, int dir, object *spell)