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

Comparing deliantra/server/server/spell_attack.C (file contents):
Revision 1.50 by root, Sun Apr 20 23:25:09 2008 UTC vs.
Revision 1.54 by root, Wed Apr 30 10:31:04 2008 UTC

1/* 1/*
2 * This file is part of Deliantra, the Roguelike Realtime MMORPG. 2 * This file is part of Deliantra, the Roguelike Realtime MMORPG.
3 * 3 *
4 * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Deliantra team 4 * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
5 * Copyright (©) 2002-2003,2007 Mark Wedel & Crossfire Development Team 5 * Copyright (©) 2002-2003,2007 Mark Wedel & Crossfire Development Team
6 * Copyright (©) 1992,2007 Frank Tore Johansen 6 * Copyright (©) 1992,2007 Frank Tore Johansen
7 * 7 *
8 * Deliantra is free software: you can redistribute it and/or modify 8 * Deliantra is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
948 if (op->env) 948 if (op->env)
949 { 949 {
950 if (env->map == NULL) 950 if (env->map == NULL)
951 return; 951 return;
952 952
953 if (env->type == PLAYER)
954 esrv_del_item (env->contr, op->count);
955
956 if (!(op = op->insert_at (env, op))) 953 if (!(op = op->insert_at (env, op)))
957 return; 954 return;
958 } 955 }
959 956
960 // elmex Tue Aug 15 17:46:51 CEST 2006: Prevent bomb from exploding 957 // elmex Tue Aug 15 17:46:51 CEST 2006: Prevent bomb from exploding
999} 996}
1000 997
1001int 998int
1002create_bomb (object *op, object *caster, int dir, object *spell) 999create_bomb (object *op, object *caster, int dir, object *spell)
1003{ 1000{
1004
1005 object *tmp; 1001 object *tmp;
1006 int mflags; 1002 int mflags;
1007 sint16 dx = op->x + freearr_x[dir], dy = op->y + freearr_y[dir]; 1003 sint16 dx = op->x + freearr_x[dir], dy = op->y + freearr_y[dir];
1008 maptile *m; 1004 maptile *m;
1009 1005
1011 if ((mflags & P_OUT_OF_MAP) || (GET_MAP_MOVE_BLOCK (m, dx, dy) & MOVE_WALK)) 1007 if ((mflags & P_OUT_OF_MAP) || (GET_MAP_MOVE_BLOCK (m, dx, dy) & MOVE_WALK))
1012 { 1008 {
1013 new_draw_info (NDI_UNIQUE, 0, op, "There is something in the way."); 1009 new_draw_info (NDI_UNIQUE, 0, op, "There is something in the way.");
1014 return 0; 1010 return 0;
1015 } 1011 }
1012
1016 tmp = arch_to_object (spell->other_arch); 1013 tmp = arch_to_object (spell->other_arch);
1017 1014
1018 /* level dependencies for bomb */ 1015 /* level dependencies for bomb */
1019 tmp->range = spell->range + SP_level_range_adjust (caster, spell); 1016 tmp->range = spell->range + SP_level_range_adjust (caster, spell);
1020 tmp->stats.dam = spell->stats.dam + SP_level_dam_adjust (caster, spell); 1017 tmp->stats.dam = spell->stats.dam + SP_level_dam_adjust (caster, spell);
1601 } 1598 }
1602 1599
1603 /* charm */ 1600 /* charm */
1604 if (QUERY_FLAG (spell, FLAG_NO_ATTACK) && !QUERY_FLAG (head, FLAG_FRIENDLY)) 1601 if (QUERY_FLAG (spell, FLAG_NO_ATTACK) && !QUERY_FLAG (head, FLAG_FRIENDLY))
1605 { 1602 {
1603 INVOKE_OBJECT (KILL, head, ARG_OBJECT (caster));
1604
1606 /* Prevent uncontolled outbreaks of self replicating monsters. 1605 /* Prevent uncontrolled outbreaks of self replicating monsters.
1607 Typical use case is charm, go somwhere, use aggravation to make hostile. 1606 Typical use case is charm, go somwhere, use aggravation to make hostile.
1608 This could lead to fun stuff like mice outbreak in bigworld and server crawl. */ 1607 This could lead to fun stuff like mice outbreak in bigworld and server crawl. */
1609 CLEAR_FLAG (head, FLAG_GENERATOR); 1608 CLEAR_FLAG (head, FLAG_GENERATOR);
1610 head->set_owner (op); 1609 head->set_owner (op);
1611 set_spell_skill (op, caster, spell, head); 1610 set_spell_skill (op, caster, spell, head);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines