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

Comparing deliantra/server/server/swamp.C (file contents):
Revision 1.4 by root, Sun Sep 10 15:59:58 2006 UTC vs.
Revision 1.16 by root, Fri Mar 26 01:04:45 2010 UTC

1
2/* 1/*
3 * static char *rcsid_swamp_c = 2 * This file is part of Deliantra, the Roguelike Realtime MMORPG.
4 * "$Id: swamp.C,v 1.4 2006/09/10 15:59:58 root Exp $"; 3 *
4 * Copyright (©) 2005,2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
5 * Copyright (©) 2005 Mark Wedel & Crossfire Development Team
6 * Copyright (©) 1992 Frank Tore Johansen
7 *
8 * Deliantra is free software: you can redistribute it and/or modify it under
9 * the terms of the Affero GNU General Public License as published by the
10 * Free Software Foundation, either version 3 of the License, or (at your
11 * option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the Affero GNU General Public License
19 * and the GNU General Public License along with this program. If not, see
20 * <http://www.gnu.org/licenses/>.
21 *
22 * The authors can be reached via e-mail to <support@deliantra.net>
5 */ 23 */
6
7/*
8 CrossFire, A Multiplayer game for X-windows
9
10 Copyright (C) 2005 Mark Wedel & Crossfire Development Team
11 Copyright (C) 1992 Frank Tore Johansen
12
13 This program is free software; you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation; either version 2 of the License, or
16 (at your option) any later version.
17
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software
25 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26
27 The authors can be reached via e-mail at crossfire-devel@real-time.com
28*/
29 24
30#include <global.h> 25#include <global.h>
31#ifndef __CEXTRACT__ 26#ifndef __CEXTRACT__
32# include <sproto.h> 27# include <sproto.h>
33#endif 28#endif
78 case 2: 73 case 2:
79 if (rndm (0, 2) == 0) 74 if (rndm (0, 2) == 0)
80 { 75 {
81 new_draw_info_format (NDI_UNIQUE | NDI_RED, 0, above, "You are down to your NECK in the dangerous %s.", &op->name); 76 new_draw_info_format (NDI_UNIQUE | NDI_RED, 0, above, "You are down to your NECK in the dangerous %s.", &op->name);
82 op->stats.food = 3; 77 op->stats.food = 3;
83 sprintf (above->contr->killer, "drowning in a %s", &op->name); 78 above->contr->killer = op;
84 above->stats.hp--; 79 above->stats.hp--;
85 above->speed_left -= op->move_slow_penalty; 80 above->speed_left -= op->move_slow_penalty;
86 } 81 }
87 break; 82 break;
88 83
94 /* player is ready to drown - only woodsman skill can save him */ 89 /* player is ready to drown - only woodsman skill can save him */
95 if (!woodsman) 90 if (!woodsman)
96 { 91 {
97 op->stats.food = 0; 92 op->stats.food = 0;
98 new_draw_info_format (NDI_UNIQUE | NDI_ALL, 1, NULL, "%s disappeared into a %s.", &above->name, &op->name); 93 new_draw_info_format (NDI_UNIQUE | NDI_ALL, 1, NULL, "%s disappeared into a %s.", &above->name, &op->name);
99 sprintf (above->contr->killer, "drowning in a %s", &op->name); 94 above->contr->killer = op;
100 95
101 above->stats.hp = -1; 96 above->stats.hp = -1;
102 kill_player (above); /* player dies in the swamp */ 97 kill_player (above); /* player dies in the swamp */
103 } 98 }
104 else 99 else
113 } 108 }
114 else if (!QUERY_FLAG (above, FLAG_ALIVE) && !(above->move_type & MOVE_FLYING) && 109 else if (!QUERY_FLAG (above, FLAG_ALIVE) && !(above->move_type & MOVE_FLYING) &&
115 !(QUERY_FLAG (above, FLAG_IS_FLOOR)) && !(QUERY_FLAG (above, FLAG_OVERLAY_FLOOR)) && !(QUERY_FLAG (above, FLAG_NO_PICK))) 110 !(QUERY_FLAG (above, FLAG_IS_FLOOR)) && !(QUERY_FLAG (above, FLAG_OVERLAY_FLOOR)) && !(QUERY_FLAG (above, FLAG_NO_PICK)))
116 { 111 {
117 if (rndm (0, 2) == 0) 112 if (rndm (0, 2) == 0)
118 decrease_ob (above); 113 above->decrease ();
119 } 114 }
115
120 above = nabove; 116 above = nabove;
121 } 117 }
122} 118}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines