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,2008,2009 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
5 | * Copyright (©) 2002,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 it under |
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 |
9 | * the terms of the Affero GNU General Public License as published by the |
… | |
… | |
34 | int |
34 | int |
35 | atnr_is_dragon_enabled (int attacknr) |
35 | atnr_is_dragon_enabled (int attacknr) |
36 | { |
36 | { |
37 | if (attacknr == ATNR_MAGIC || attacknr == ATNR_FIRE || |
37 | if (attacknr == ATNR_MAGIC || attacknr == ATNR_FIRE || |
38 | attacknr == ATNR_ELECTRICITY || attacknr == ATNR_COLD || attacknr == ATNR_ACID || attacknr == ATNR_POISON) |
38 | attacknr == ATNR_ELECTRICITY || attacknr == ATNR_COLD || attacknr == ATNR_ACID || attacknr == ATNR_POISON) |
39 | return 1; |
|
|
40 | |
|
|
41 | return 0; |
|
|
42 | } |
|
|
43 | |
|
|
44 | /* |
|
|
45 | * returns true if the adressed object 'ob' is a player |
|
|
46 | * of the dragon race. |
|
|
47 | */ |
|
|
48 | int |
|
|
49 | is_dragon_pl (const object *op) |
|
|
50 | { |
|
|
51 | if (op |
|
|
52 | && op->type == PLAYER |
|
|
53 | && op->arch |
|
|
54 | && op->arch->race == shstr_dragon) |
|
|
55 | return 1; |
39 | return 1; |
56 | |
40 | |
57 | return 0; |
41 | return 0; |
58 | } |
42 | } |
59 | |
43 | |
… | |
… | |
267 | pl->destroy (); |
251 | pl->destroy (); |
268 | |
252 | |
269 | return 0; |
253 | return 0; |
270 | } |
254 | } |
271 | |
255 | |
272 | const char * |
256 | const_utf8_string |
273 | player::killer_name () const |
257 | player::killer_name () const |
274 | { |
258 | { |
275 | static char buf [2048]; |
259 | static char buf [2048]; |
276 | |
260 | |
277 | if (!killer) |
261 | if (!killer) |