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

Comparing deliantra/server/random_maps/special.C (file contents):
Revision 1.40 by root, Fri Mar 26 00:59:21 2010 UTC vs.
Revision 1.44 by root, Sun Apr 11 00:34:06 2010 UTC

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,2010 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 Mark Wedel & Crossfire Development Team 5 * Copyright (©) 2002 Mark Wedel & Crossfire Development Team
6 * Copyright (©) 1992 Frank Tore Johansen 6 * Copyright (©) 1992 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
76 if (!tmp->is_head ()) 76 if (!tmp->is_head ())
77 continue; 77 continue;
78 78
79 object *new_ob = tmp->deep_clone (); 79 object *new_ob = tmp->deep_clone ();
80 80
81 if (QUERY_FLAG (tmp, FLAG_IS_LINKED)) 81 if (tmp->flag [FLAG_IS_LINKED])
82 new_ob->add_link (dest_map, tmp->find_link ()->id); 82 new_ob->add_link (dest_map, tmp->find_link ()->id);
83 83
84 dest_map->insert (new_ob, x + i, y + j, 0, INS_NO_MERGE | INS_NO_WALK_ON); 84 dest_map->insert (new_ob, x + i, y + j, 0, INS_NO_MERGE | INS_NO_WALK_ON);
85 } 85 }
86} 86}
176 } 176 }
177 177
178 ix += freearr_x[i]; 178 ix += freearr_x[i];
179 iy += freearr_y[i]; 179 iy += freearr_y[i];
180 potion->face = fountain->face; 180 potion->face = fountain->face;
181 SET_FLAG (potion, FLAG_NO_PICK); 181 potion->set_flag (FLAG_NO_PICK);
182 SET_FLAG (potion, FLAG_IDENTIFIED); 182 potion->set_flag (FLAG_IDENTIFIED);
183 potion->name = potion->name_pl = shstr_fountain; 183 potion->name = potion->name_pl = shstr_fountain;
184 potion->x = ix; 184 potion->x = ix;
185 potion->y = iy; 185 potion->y = iy;
186 potion->material = name_to_material (shstr_adamantium); 186 potion->material = name_to_material (shstr_adamantium);
187 fountain->x = ix; 187 fountain->x = ix;
194place_special_exit (maptile *map, int hole_type, random_map_params *RP) 194place_special_exit (maptile *map, int hole_type, random_map_params *RP)
195{ 195{
196 int ix, iy, i = -1; 196 int ix, iy, i = -1;
197 char buf[16384]; 197 char buf[16384];
198 const char *style, *decor, *mon; 198 const char *style, *decor, *mon;
199 maptile *exit_style = find_style ("/styles/misc", "obscure_exits", -1); 199 maptile *exit_style = find_style ("/styles/misc", "obscure_exits", RP->difficulty);
200 int g_xsize, g_ysize; 200 int g_xsize, g_ysize;
201 201
202 if (!exit_style) 202 if (!exit_style)
203 { 203 {
204 LOG (llevError, "unable to load stylemap /styles/misc obscure_exits\n"); 204 LOG (llevError, "unable to load stylemap /styles/misc obscure_exits\n");
274 */ 274 */
275 if (g_xsize < MIN_RANDOM_MAP_SIZE) g_xsize = MIN_RANDOM_MAP_SIZE; 275 if (g_xsize < MIN_RANDOM_MAP_SIZE) g_xsize = MIN_RANDOM_MAP_SIZE;
276 if (g_ysize < MIN_RANDOM_MAP_SIZE) g_ysize = MIN_RANDOM_MAP_SIZE; 276 if (g_ysize < MIN_RANDOM_MAP_SIZE) g_ysize = MIN_RANDOM_MAP_SIZE;
277 277
278 write_parameters_to_string (buf, g_xsize, g_ysize, RP->wallstyle, RP->floorstyle, mon, 278 write_parameters_to_string (buf, g_xsize, g_ysize, RP->wallstyle, RP->floorstyle, mon,
279 "none", style, decor, "none", RP->exitstyle, 0, 0, 0, 279 "none", style, decor, "none", 0, RP->exitstyle, 0, 0, 0,
280 RMOPT_WALLS_ONLY, 0, 0, 1, RP->dungeon_level, RP->dungeon_level, 280 RMOPT_WALLS_ONLY, 0, 0, 1, RP->dungeon_level, RP->dungeon_level,
281 RP->difficulty, RP->difficulty, -1, 1, 0, 0, 0, 0, RP->difficulty_increase); 281 RP->difficulty, RP->difficulty, -1, 1, 0, 0, 0, 0, RP->difficulty_increase);
282 the_exit->slaying = shstr_random_map_exit; 282 the_exit->slaying = shstr_random_map_exit;
283 the_exit->msg = buf; 283 the_exit->msg = buf;
284 284

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines