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

Comparing deliantra/server/server/rune.C (file contents):
Revision 1.20 by root, Sun Feb 18 18:30:28 2007 UTC vs.
Revision 1.28 by root, Sun Jul 1 05:00:20 2007 UTC

1/* 1/*
2 * CrossFire, A Multiplayer game for X-windows 2 * This file is part of Crossfire TRT, the Roguelike Realtime MORPG.
3 * 3 *
4 * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team 4 * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Crossfire TRT team
5 * Copyright (C) 2003 Mark Wedel & Crossfire Development Team 5 * Copyright (©) 2003,2007 Mark Wedel & Crossfire Development Team
6 * Copyright (C) 1992 Frank Tore Johansen 6 * Copyright (©) 1992,2007 Frank Tore Johansen
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * Crossfire TRT 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
10 * the Free Software Foundation; either version 2 of the License, or 10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version. 11 * (at your option) any later version.
12 * 12 *
13 * This program is distributed in the hope that it will be useful, 13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details. 16 * GNU General Public License for more details.
17 * 17 *
18 * You should have received a copy of the GNU General Public License 18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software 19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 * 20 *
22 * The authors can be reached via e-mail at <crossfire@schmorp.de> 21 * The authors can be reached via e-mail to <crossfire@schmorp.de>
23 */ 22 */
24 23
25#include <global.h> 24#include <global.h>
26#include <sproto.h> 25#include <sproto.h>
27#include <spells.h> 26#include <spells.h>
194 } 193 }
195 else 194 else
196 op->invisible = 1; 195 op->invisible = 1;
197 196
198 if (op->invisible != det) 197 if (op->invisible != det)
199 update_object (op, UP_OBJ_FACE); 198 update_object (op, UP_OBJ_CHANGE);
200} 199}
201
202 200
203/* peterm: rune_attack 201/* peterm: rune_attack
204 * function handles those runes which detonate but do not cast spells. 202 * function handles those runes which detonate but do not cast spells.
205 */ 203 */
206
207
208void 204void
209rune_attack (object *op, object *victim) 205rune_attack (object *op, object *victim)
210{ 206{
211 if (victim) 207 if (victim)
212 { 208 {
274 if (rv.distance > 1) 270 if (rv.distance > 1)
275 return; 271 return;
276 272
277 trap_show (trap, env); 273 trap_show (trap, env);
278 274
275 if (victim->type == PLAYER) // only count players as enemies
276 trap->enemy = victim; // set the victim as the traps enemy, so that summoned
277 // creatures know who to attack.
278
279 /* Only if it is a spell do we proceed here */ 279 /* Only if it is a spell do we proceed here */
280 if ((trap->inv && trap->inv->type == SPELL) || (trap->other_arch && trap->other_arch->clone.type == SPELL)) 280 if ((trap->inv && trap->inv->type == SPELL) || (trap->other_arch && trap->other_arch->type == SPELL))
281 { 281 {
282 282
283 if (trap->destroyed ()) 283 if (trap->destroyed ())
284 return; 284 return;
285 285
352 352
353 /* we could put a probability chance here, but since nothing happens 353 /* we could put a probability chance here, but since nothing happens
354 * if you fail, no point on that. I suppose we could do a level 354 * if you fail, no point on that. I suppose we could do a level
355 * comparison so low level players can't erase high level players runes. 355 * comparison so low level players can't erase high level players runes.
356 */ 356 */
357 if (tmp->type == SIGN && !strcmp (tmp->arch->name, "rune_mark")) 357 if (tmp->type == SIGN && !strcmp (tmp->arch->archname, "rune_mark"))
358 { 358 {
359 tmp->destroy (); 359 tmp->destroy ();
360 new_draw_info (NDI_UNIQUE, 0, op, "You wipe out the rune of marking!"); 360 new_draw_info (NDI_UNIQUE, 0, op, "You wipe out the rune of marking!");
361 return 1; 361 return 1;
362 } 362 }
410{ 410{
411 if (where == NULL) 411 if (where == NULL)
412 return 0; 412 return 0;
413 413
414 object *tmp = get_archetype ("runedet"); 414 object *tmp = get_archetype ("runedet");
415 tmp->face = &new_faces[GET_ANIMATION (trap, 0)]; 415 tmp->face = GET_ANIMATION (trap, 0);
416 tmp->insert_at (where, 0); 416 tmp->insert_at (where, 0);
417 417
418 return 1; 418 return 1;
419} 419}
420 420

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines