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.92 by root, Wed Dec 24 01:37:24 2008 UTC vs.
Revision 1.93 by root, Wed Dec 31 17:35:38 2008 UTC

2010 if (!weapon) 2010 if (!weapon)
2011 { 2011 {
2012 new_draw_info (NDI_BLACK, 0, op, "You must mark a weapon to use with this spell!"); 2012 new_draw_info (NDI_BLACK, 0, op, "You must mark a weapon to use with this spell!");
2013 return 0; 2013 return 0;
2014 } 2014 }
2015
2015 if (spell->race && strcmp (weapon->arch->archname, spell->race)) 2016 if (spell->race && weapon->arch->archname != spell->race)
2016 { 2017 {
2017 new_draw_info (NDI_UNIQUE, 0, op, "The spell fails to transform your weapon."); 2018 new_draw_info (NDI_UNIQUE, 0, op, "The spell fails to transform your weapon.");
2018 return 0; 2019 return 0;
2019 } 2020 }
2021
2020 if (weapon->type != WEAPON) 2022 if (weapon->type != WEAPON)
2021 { 2023 {
2022 new_draw_info (NDI_UNIQUE, 0, op, "You need to wield a weapon to animate it."); 2024 new_draw_info (NDI_UNIQUE, 0, op, "You need to wield a weapon to animate it.");
2023 return 0; 2025 return 0;
2024 } 2026 }
2027
2025 if (QUERY_FLAG (weapon, FLAG_APPLIED)) 2028 if (QUERY_FLAG (weapon, FLAG_APPLIED))
2026 { 2029 {
2027 new_draw_info_format (NDI_BLACK, 0, op, "You need to unequip %s before using it in this spell", query_name (weapon)); 2030 new_draw_info_format (NDI_BLACK, 0, op, "You need to unequip %s before using it in this spell", query_name (weapon));
2028 return 0; 2031 return 0;
2029 } 2032 }
2271 * op is the piece object. 2274 * op is the piece object.
2272 */ 2275 */
2273void 2276void
2274move_peacemaker (object *op) 2277move_peacemaker (object *op)
2275{ 2278{
2276 object *tmp; 2279 for (object *tmp = op->ms ().bot; tmp; tmp = tmp->above)
2277
2278 for (tmp = GET_MAP_OB (op->map, op->x, op->y); tmp != NULL; tmp = tmp->above)
2279 { 2280 {
2280 int atk_lev, def_lev; 2281 int atk_lev, def_lev;
2281 object *victim = tmp->head_ (); 2282 object *victim = tmp->head_ ();
2282 2283
2283 if (!QUERY_FLAG (victim, FLAG_MONSTER)) 2284 if (!QUERY_FLAG (victim, FLAG_MONSTER))
2318 new_draw_info_format (NDI_UNIQUE, 0, op->owner, "%s no longer feels like fighting.", &victim->name); 2319 new_draw_info_format (NDI_UNIQUE, 0, op->owner, "%s no longer feels like fighting.", &victim->name);
2319 } 2320 }
2320 } 2321 }
2321} 2322}
2322 2323
2323
2324/* This writes a rune that contains the appropriate message. 2324/* This writes a rune that contains the appropriate message.
2325 * There really isn't any adjustments we make. 2325 * There really isn't any adjustments we make.
2326 */ 2326 */
2327
2328int 2327int
2329write_mark (object *op, object *spell, const char *msg) 2328write_mark (object *op, object *spell, const char *msg)
2330{ 2329{
2331 char rune[HUGE_BUF]; 2330 char rune[HUGE_BUF];
2332 object *tmp; 2331 object *tmp;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines