… | |
… | |
52 | |
52 | |
53 | static object * |
53 | static object * |
54 | gen_key (const shstr &keycode) |
54 | gen_key (const shstr &keycode) |
55 | { |
55 | { |
56 | /* get a key and set its keycode */ |
56 | /* get a key and set its keycode */ |
57 | object *key = archetype::get (shstr_key2); |
57 | object *key = archetype::get (shstr_key_random_map); |
58 | |
|
|
59 | key->slaying = keycode; |
58 | key->slaying = keycode; |
60 | key->stats.food = 100; |
|
|
61 | key->speed_left = -1.f; |
|
|
62 | key->flag [FLAG_IS_USED_UP] = true; |
|
|
63 | key->set_speed (1.f / 300.f); |
|
|
64 | |
|
|
65 | return key; |
59 | return key; |
66 | } |
60 | } |
67 | |
61 | |
68 | /* places keys in the map, preferably in something alive. |
62 | /* places keys in the map, preferably in something alive. |
69 | keycode is the key's code, |
63 | keycode is the key's code, |
… | |
… | |
828 | |
822 | |
829 | if (opts & DOORED) |
823 | if (opts & DOORED) |
830 | { |
824 | { |
831 | for (i = 0, door = doorlist[0]; doorlist[i] != NULL; i++) |
825 | for (i = 0, door = doorlist[0]; doorlist[i] != NULL; i++) |
832 | { |
826 | { |
833 | object *new_door = get_archetype ("locked_door1"); |
827 | object *new_door = get_archetype (shstr_locked_door1); |
834 | |
828 | |
835 | door = doorlist[i]; |
829 | door = doorlist[i]; |
836 | new_door->face = door->face; |
830 | new_door->face = door->face; |
837 | new_door->x = door->x; |
831 | new_door->x = door->x; |
838 | new_door->y = door->y; |
832 | new_door->y = door->y; |