1 | |
|
|
2 | /* |
|
|
3 | * static char *rcsid_resurrection_c = |
|
|
4 | * "$Id: resurrection.C,v 1.5 2006/09/10 15:59:57 root Exp $"; |
|
|
5 | */ |
|
|
6 | |
|
|
7 | /* |
1 | /* |
8 | CrossFire, A Multiplayer game for X-windows |
2 | CrossFire, A Multiplayer game for X-windows |
9 | |
3 | |
10 | Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
4 | Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
11 | Copyright (C) 1992 Frank Tore Johansen |
5 | Copyright (C) 1992 Frank Tore Johansen |
… | |
… | |
22 | |
16 | |
23 | You should have received a copy of the GNU General Public License |
17 | You should have received a copy of the GNU General Public License |
24 | along with this program; if not, write to the Free Software |
18 | along with this program; if not, write to the Free Software |
25 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
26 | |
20 | |
27 | The authors can be reached via e-mail at crossfire-devel@real-time.com |
21 | The authors can be reached via e-mail at <crossfire@schmorp.de> |
28 | */ |
22 | */ |
29 | |
23 | |
30 | /* the contents of this file were create solely by peterm@soda.berkeley.edu |
24 | /* the contents of this file were create solely by peterm@soda.berkeley.edu |
31 | all of the above disclaimers apply. */ |
25 | all of the above disclaimers apply. */ |
32 | |
26 | |
… | |
… | |
126 | { |
120 | { |
127 | fgets (buf, 255, deadplayer); |
121 | fgets (buf, 255, deadplayer); |
128 | sscanf (buf, "%s", buf2); |
122 | sscanf (buf, "%s", buf2); |
129 | if (!(strcmp (buf2, "exp"))) |
123 | if (!(strcmp (buf2, "exp"))) |
130 | { |
124 | { |
131 | long long exp_; |
|
|
132 | |
|
|
133 | sscanf (buf, "%s %lld", buf2, &exp_); |
125 | sscanf (buf, "%s %" SCNd64, buf2, &exp); |
134 | exp = exp_; |
|
|
135 | if (spell->stats.exp) |
126 | if (spell->stats.exp) |
136 | { |
127 | { |
137 | exp -= exp / spell->stats.exp; |
128 | exp -= exp / spell->stats.exp; |
138 | sprintf (buf, "exp %lld\n", exp_); |
129 | sprintf (buf, "exp %" PRId64 "\n", exp); |
139 | exp = exp_; |
|
|
140 | } |
130 | } |
141 | } |
131 | } |
142 | if (!(strcmp (buf2, "Con"))) |
132 | if (!(strcmp (buf2, "Con"))) |
143 | { |
133 | { |
144 | sscanf (buf, "%s %d", buf2, &Con); |
134 | sscanf (buf, "%s %d", buf2, &Con); |
… | |
… | |
173 | { |
163 | { |
174 | object *temp, *newob; |
164 | object *temp, *newob; |
175 | char name_to_resurrect[MAX_BUF]; |
165 | char name_to_resurrect[MAX_BUF]; |
176 | int leveldead = 25, mflags, clevel; |
166 | int leveldead = 25, mflags, clevel; |
177 | sint16 sx, sy; |
167 | sint16 sx, sy; |
178 | mapstruct *m; |
168 | maptile *m; |
179 | |
169 | |
180 | clevel = caster_level (caster, spell); |
170 | clevel = caster_level (caster, spell); |
181 | |
171 | |
182 | if (spell->last_heal) |
172 | if (spell->last_heal) |
183 | { |
173 | { |
… | |
… | |
217 | |
207 | |
218 | /* no matter what, we fry the corpse. */ |
208 | /* no matter what, we fry the corpse. */ |
219 | if (temp && temp->map) |
209 | if (temp && temp->map) |
220 | { |
210 | { |
221 | /* replace corpse object with a burning object */ |
211 | /* replace corpse object with a burning object */ |
222 | newob = arch_to_object (find_archetype ("burnout")); |
212 | newob = arch_to_object (archetype::find ("burnout")); |
223 | if (newob != NULL) |
213 | if (newob != NULL) |
224 | { |
214 | { |
225 | newob->x = temp->x; |
215 | newob->x = temp->x; |
226 | newob->y = temp->y; |
216 | newob->y = temp->y; |
227 | insert_ob_in_map (newob, temp->map, op, 0); |
217 | insert_ob_in_map (newob, temp->map, op, 0); |