… | |
… | |
104 | if (tmp == NULL) |
104 | if (tmp == NULL) |
105 | return 0; |
105 | return 0; |
106 | |
106 | |
107 | if (QUERY_FLAG (tmp, FLAG_CURSED) || QUERY_FLAG (tmp, FLAG_DAMNED)) |
107 | if (QUERY_FLAG (tmp, FLAG_CURSED) || QUERY_FLAG (tmp, FLAG_DAMNED)) |
108 | { |
108 | { |
109 | tmp->destroy (true); |
109 | tmp->destroy (); |
110 | tmp = NULL; |
110 | tmp = NULL; |
111 | } |
111 | } |
112 | } |
112 | } |
113 | while (!tmp); |
113 | while (!tmp); |
114 | |
114 | |
… | |
… | |
123 | if (op->has_random_items ()) |
123 | if (op->has_random_items ()) |
124 | while ((op->stats.hp--) > 0) |
124 | while ((op->stats.hp--) > 0) |
125 | create_treasure (op->randomitems, op, GT_ENVIRONMENT, |
125 | create_treasure (op->randomitems, op, GT_ENVIRONMENT, |
126 | op->stats.exp ? op->stats.exp : op->map == NULL ? 14 : op->map->difficulty, 0); |
126 | op->stats.exp ? op->stats.exp : op->map == NULL ? 14 : op->map->difficulty, 0); |
127 | |
127 | |
128 | op->destroy (true); |
128 | op->destroy (); |
129 | break; |
129 | break; |
130 | } |
130 | } |
131 | |
131 | |
132 | return tmp ? 1 : 0; |
132 | return tmp ? 1 : 0; |
133 | } |
133 | } |