version 1.37 | | version 1.38 |
---|
| | |
/* | | /* |
* static char *rcsid_random_map_c = | | * static char *rcsid_random_map_c = |
* "$Id: random_map.c,v 1.37 2004/12/29 01:08:49 mwedel Exp $"; | | * "$Id: random_map.c,v 1.38 2005/04/14 06:57:01 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
| | |
write_map_parameters_to_string(buf, RP); | | write_map_parameters_to_string(buf, RP); |
| | |
if(RP->difficulty==0) | | if(RP->difficulty==0) { |
RP->difficulty = RP->dungeon_level; /* use this instead of a map difficulty */ | | RP->difficulty = RP->dungeon_level; /* use this instead of a map difficulty */ |
| | if (RP->difficulty_increase > 0.001) { |
| | RP->difficulty = (int)((float)RP->dungeon_level * RP->difficulty_increase); |
| | if (RP->difficulty < 1) RP->difficulty=1; |
| | } |
| | } |
else | | else |
RP->difficulty_given=1; | | RP->difficulty_given=1; |
| | |
| | |
strcat(buf,small_buf); | | strcat(buf,small_buf); |
} | | } |
| | |
| | if(RP->difficulty_increase != 1.0 ) { |
| | sprintf(small_buf,"difficulty_increase %f\n",RP->difficulty_increase); |
| | strcat(buf,small_buf); |
| | } |
| | |
sprintf(small_buf,"dungeon_level %d\n",RP->dungeon_level); | | sprintf(small_buf,"dungeon_level %d\n",RP->dungeon_level); |
strcat(buf,small_buf); | | strcat(buf,small_buf); |
| | |
| | |
int origin_x_n, | | int origin_x_n, |
int origin_y_n, | | int origin_y_n, |
int random_seed_n, | | int random_seed_n, |
int treasureoptions_n ) | | int treasureoptions_n, |
| | float difficulty_increase) |
{ | | { |
| | |
char small_buf[256]; | | char small_buf[256]; |
| | |
strcat(buf,small_buf); | | strcat(buf,small_buf); |
} | | } |
| | |
| | if(difficulty_increase > 0.001 ) { |
| | sprintf(small_buf,"difficulty_increase %f\n",difficulty_increase); |
| | strcat(buf,small_buf); |
| | } |
| | |
sprintf(small_buf,"dungeon_level %d\n",dungeon_level_n); | | sprintf(small_buf,"dungeon_level %d\n",dungeon_level_n); |
strcat(buf,small_buf); | | strcat(buf,small_buf); |
| | |