78 int fire_bolt(
object *op,
object *caster,
int dir,
object *spob,
object *skill) {
149 LOG(
llevError,
"BUG: explode_bullet(): op without other_arch\n");
160 LOG(
llevError,
"BUG: explode_bullet(): env out of map\n");
170 LOG(
llevError,
"BUG: explode_bullet(): op out of map\n");
261 if (!(mflags&P_IS_ALIVE))
266 tmp_tag = tmp->
count;
301 int fire_bullet(
object *op,
object *caster,
int dir,
object *spob) {
403 int cast_cone(
object *op,
object *caster,
int dir,
object *spell) {
405 int i, success = 0, range_min = -1, range_max = 1;
429 for (i = range_min; i <= range_max; i++) {
450 if (caster->
type !=
RUNE && d == 0) {
552 int create_bomb(
object *op,
object *caster,
int dir,
object *spell) {
612 for (dist = 1; dist < range; dist++) {
656 object *effect, *target;
677 || (target->
race && god && strstr(target->
race, god->
race))) {
693 "%s answers your call!",
694 "%s answers your call!",
721 "The %s looks stronger!",
722 "The %s looks stronger!",
748 effect->
x = target->
x;
749 effect->
y = target->
y;
800 if (!tmp->
env || op != tmp->
env) {
801 LOG(
llevError,
"make_object_glow() failed to insert glowing force in %s\n", op->
name);
820 int i, j, range, mflags, friendly = 0, dam, dur;
841 else if (caster->
skill)
848 for (i = -range; i < range; i++) {
849 for (j = -range; j < range; j++) {
914 int cast_curse(
object *op,
object *caster,
object *spell_ob,
int dir) {
925 for (force = tmp->
inv; force != NULL; force = force->
below) {
927 if (force->
name == spell_ob->
name) {
929 }
else if (spell_ob->
race && spell_ob->
race == force->
name) {
932 "You can not cast %s while %s is in effect",
933 "You can not cast %s while %s is in effect",
973 "You are a victim of %s's curse!",
974 "You are a victim of %s's curse!",
1017 int done_one, range, mflags, level, at, best_at;
1035 else if (god && !strcmp(spell->
race,
"GOD_SLAYING"))
1037 else if (god && !strcmp(spell->
race,
"GOD_FRIEND"))
1042 for (x = op->
x-range; x <= op->x+range; x++)
1043 for (y = op->
y-range; y <= op->y+range; y++) {
1071 if (race && head->
race && !strstr(race, head->
race))
1081 if (best_at == -1 || head->
resist[at] > head->
resist[best_at])
1087 if (head->
resist[best_at] == 100)
1090 at = head->
resist[best_at]/5;
1108 if (head->
level > level)
1185 int fire_swarm(
object *op,
object *caster,
object *spell,
int dir) {
1208 for (i = 0; i < spell->
duration; i++)
1235 int cast_light(
object *op,
object *caster,
object *spell,
int dir) {
1236 object *target = NULL, *tmp = NULL;
1264 target = target->
head;
1279 LOG(
llevError,
"Error: spell arch for cast_light() missing.\n");
1283 if (tmp->glow_radius) {
1312 int i, mflags, range, dam_mod, dur_mod;
1313 object *walk, *target_head;
1333 for (i = 1; i < range; i++) {
1353 while (target_head->
head)
1354 target_head = target_head->
head;
1365 disease->
stats.
wc += dur_mod/2;
1367 if (disease->
magic > 0)
1368 disease->
magic += dur_mod/4;
1384 disease->
last_sp -= 2*dam_mod;
int get_map_flags(mapstruct *oldmap, mapstruct **newmap, sint16 x, sint16 y, sint16 *nx, sint16 *ny)
const int fear_bonus[MAX_STAT+1]
void explode_bullet(object *op)
int fire_bolt(object *op, object *caster, int dir, object *spob, object *skill)
const char * determine_god(object *op)
int mood_change(object *op, object *caster, object *spell)
void share_exp(object *op, sint64 exp, const char *skill, int flag)
int fire_swarm(object *op, object *caster, object *spell, int dir)
#define FORCE_CHANGE_ABILITY
int change_skill(object *who, object *new_skill, int flag)
static object * get_pointed_target(object *op, int dir, int range, int type)
void set_owner(object *op, object *owner)
int caster_level(const object *caster, const object *spell)
sstring add_refcount(sstring str)
int cast_curse(object *op, object *caster, object *spell_ob, int dir)
object * object_get_env_recursive(object *op)
#define ARCH_DETECT_MAGIC
static int make_object_glow(object *op, int radius, int time)
void free_string(sstring str)
#define MSG_TYPE_SPELL_FAILURE
#define SET_ANIMATION(ob, newanim)
short freearr_x[SIZEOFFREE]
int cast_light(object *op, object *caster, object *spell, int dir)
void draw_ext_info(int flags, int pri, const object *pl, uint8 type, uint8 subtype, const char *message, const char *oldmessage)
#define MSG_TYPE_SPELL_ERROR
int SP_level_dam_adjust(const object *caster, const object *spob)
method_ret ob_process(object *op)
int fire_bullet(object *op, object *caster, int dir, object *spob)
int cast_cone(object *op, object *caster, int dir, object *spell)
void remove_friendly_object(object *op)
const object * find_god(const char *name)
void draw_ext_info_format(int flags, int pri, const object *pl, uint8 type, uint8 subtype, const char *new_format, const char *old_format,...)
struct archt * other_arch
short freearr_y[SIZEOFFREE]
int change_abil(object *op, object *tmp)
void remove_ob(object *op)
void cone_drop(object *op)
object * create_archetype(const char *name)
#define FLAG_UNAGGRESSIVE
int SP_level_duration_adjust(const object *caster, const object *spob)
int die_roll(int num, int size, const object *op, int goodbad)
void add_friendly_object(object *op)
int hit_map(object *op, int dir, uint32 type, int full_hit)
object * get_owner(object *op)
int infect_object(object *victim, object *disease, int force)
#define OB_TYPE_MOVE_BLOCK(ob1, type)
#define GET_MAP_MOVE_BLOCK(M, X, Y)
#define FREE_AND_CLEAR_STR(xyz)
#define QUERY_FLAG(xyz, p)
#define CLEAR_FLAG(xyz, p)
object * insert_ob_in_ob(object *op, object *where)
object * insert_ob_in_map(object *op, mapstruct *m, object *originator, int flag)
void copy_owner(object *op, object *clone)
const int turn_bonus[MAX_STAT+1]
sint16 resist[NROFATTACKS]
int create_bomb(object *op, object *caster, int dir, object *spell)
int tailor_god_spell(object *spellop, object *caster)
int cast_smite_spell(object *op, object *caster, int dir, object *spell)
int SP_level_range_adjust(const object *caster, const object *spob)
void set_spell_skill(object *op, object *caster, object *spob, object *dest)
int out_of_map(mapstruct *m, int x, int y)
#define MSG_TYPE_SPELL_SUCCESS
int cast_cause_disease(object *op, object *caster, object *spell, int dir)
#define GET_MAP_OB(M, X, Y)
void LOG(LogLevel logLevel, const char *format,...)
int did_make_save(const object *op, int level, int bonus)
#define was_destroyed(op, old_tag)
int cast_destruction(object *op, object *caster, object *spell_ob)
void query_name(const object *op, char *buf, size_t size)
#define MSG_TYPE_VICTIM_SPELL
void free_object(object *ob)
int random_roll(int min, int max, const object *op, int goodbad)
void fix_object(object *op)
object * find_skill_by_name(object *who, const char *name)
object * arch_to_object(archetype *at)
int hit_player(object *op, int dam, object *hitter, uint32 type, int full_hit)
void check_bullet(object *op)