version 1.26 | | version 1.27 |
---|
| | |
/* | | /* |
* static char *rcsid_treasure_c = | | * static char *rcsid_treasure_c = |
* "$Id: treasure.c,v 1.26 2006/03/18 17:15:25 ryo_saeba Exp $"; | | * "$Id: treasure.c,v 1.27 2006/04/06 21:18:35 tchize Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
object *the_chest; | | object *the_chest; |
int i,xl,yl; | | int i,xl,yl; |
| | |
the_chest = get_archetype("chest"); /* was "chest_2" */ | | the_chest = create_archetype("chest"); /* was "chest_2" */ |
| | |
/* first, find a place to put the chest. */ | | /* first, find a place to put the chest. */ |
i = find_first_free_spot(the_chest,map,x,y); | | i = find_first_free_spot(the_chest,map,x,y); |
| | |
object *the_key; | | object *the_key; |
| | |
/* get a key and set its keycode */ | | /* get a key and set its keycode */ |
the_key = get_archetype("key2"); | | the_key = create_archetype("key2"); |
the_key->slaying = add_string(keycode); | | the_key->slaying = add_string(keycode); |
| | |
| | |
| | |
| | |
if(!wall_blocked(map,x1,y1) | | if(!wall_blocked(map,x1,y1) |
|| layout[x1][y1]=='>') {/* place a door */ | | || layout[x1][y1]=='>') {/* place a door */ |
object * new_door=get_archetype( (freearr_x[i]==0)?doors[1]:doors[0]); | | object * new_door=create_archetype( (freearr_x[i]==0)?doors[1]:doors[0]); |
new_door->x = x + freearr_x[i]; | | new_door->x = x + freearr_x[i]; |
new_door->y = y + freearr_y[i]; | | new_door->y = y + freearr_y[i]; |
remove_monsters(new_door->x,new_door->y,map); | | remove_monsters(new_door->x,new_door->y,map); |
| | |
| | |
if(opts & DOORED) { | | if(opts & DOORED) { |
for(i=0,door=doorlist[0];doorlist[i]!=NULL;i++) { | | for(i=0,door=doorlist[0];doorlist[i]!=NULL;i++) { |
object *new_door=get_archetype("locked_door1"); | | object *new_door=create_archetype("locked_door1"); |
char keybuf[256]; | | char keybuf[256]; |
door=doorlist[i]; | | door=doorlist[i]; |
new_door->face = door->face; | | new_door->face = door->face; |