ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/spell_effect.C
(Generate patch)

Comparing deliantra/server/server/spell_effect.C (file contents):
Revision 1.80 by root, Tue Apr 22 07:01:47 2008 UTC vs.
Revision 1.81 by root, Sat May 3 12:29:09 2008 UTC

2274 object *tmp; 2274 object *tmp;
2275 2275
2276 for (tmp = GET_MAP_OB (op->map, op->x, op->y); tmp != NULL; tmp = tmp->above) 2276 for (tmp = GET_MAP_OB (op->map, op->x, op->y); tmp != NULL; tmp = tmp->above)
2277 { 2277 {
2278 int atk_lev, def_lev; 2278 int atk_lev, def_lev;
2279 object *victim = tmp; 2279 object *victim = tmp->head_ ();
2280 2280
2281 if (tmp->head)
2282 victim = tmp->head;
2283 if (!QUERY_FLAG (victim, FLAG_MONSTER)) 2281 if (!QUERY_FLAG (victim, FLAG_MONSTER))
2284 continue; 2282 continue;
2283
2285 if (QUERY_FLAG (victim, FLAG_UNAGGRESSIVE)) 2284 if (QUERY_FLAG (victim, FLAG_UNAGGRESSIVE))
2286 continue; 2285 continue;
2286
2287 if (victim->stats.exp == 0) 2287 if (victim->stats.exp == 0)
2288 continue; 2288 continue;
2289 2289
2290 def_lev = MAX (1, victim->level); 2290 def_lev = MAX (1, victim->level);
2291 atk_lev = MAX (1, op->level); 2291 atk_lev = MAX (1, op->level);
2292 2292
2293 if (rndm (0, atk_lev - 1) > def_lev) 2293 if (rndm (0, atk_lev - 1) > def_lev)
2294 { 2294 {
2295 /* make this sucker peaceful. */ 2295 /* make this sucker peaceful. */
2296 2296
2297 INVOKE_OBJECT (KILL, victim, ARG_OBJECT (op));
2297 change_exp (op->owner, victim->stats.exp, op->skill, 0); 2298 change_exp (op->owner, victim->stats.exp, op->skill, 0);
2298 victim->stats.exp = 0; 2299 victim->stats.exp = 0;
2299#if 0 2300#if 0
2300 /* No idea why these were all set to zero - if something 2301 /* No idea why these were all set to zero - if something
2301 * makes this creature agressive, he should still do damage. 2302 * makes this creature agressive, he should still do damage.
2308 victim->attack_movement = RANDO2; 2309 victim->attack_movement = RANDO2;
2309 SET_FLAG (victim, FLAG_UNAGGRESSIVE); 2310 SET_FLAG (victim, FLAG_UNAGGRESSIVE);
2310 SET_FLAG (victim, FLAG_RUN_AWAY); 2311 SET_FLAG (victim, FLAG_RUN_AWAY);
2311 SET_FLAG (victim, FLAG_RANDOM_MOVE); 2312 SET_FLAG (victim, FLAG_RANDOM_MOVE);
2312 CLEAR_FLAG (victim, FLAG_MONSTER); 2313 CLEAR_FLAG (victim, FLAG_MONSTER);
2314
2313 if (victim->name) 2315 if (victim->name)
2314 {
2315 new_draw_info_format (NDI_UNIQUE, 0, op->owner, "%s no longer feels like fighting.", &victim->name); 2316 new_draw_info_format (NDI_UNIQUE, 0, op->owner, "%s no longer feels like fighting.", &victim->name);
2316 }
2317 } 2317 }
2318 } 2318 }
2319} 2319}
2320 2320
2321 2321

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines