… | |
… | |
146 | } |
146 | } |
147 | |
147 | |
148 | /* Now, find force in player's inventory */ |
148 | /* Now, find force in player's inventory */ |
149 | force = pl->inv; |
149 | force = pl->inv; |
150 | while (force |
150 | while (force |
151 | && ((force->type != FORCE) || (!force->slaying) || (strcmp (force->slaying, pl->map->path)) || (!force->msg) |
151 | && ((force->type != FORCE) || !force->slaying || force->slaying != pl->map->path || !force->msg |
152 | || (strcmp (force->msg, rune->msg)))) |
152 | || force->msg != rune->msg)) |
153 | force = force->below; |
153 | force = force->below; |
154 | |
154 | |
155 | if (!force) |
155 | if (!force) |
156 | /* No force, need to create & insert one */ |
156 | /* No force, need to create & insert one */ |
157 | { |
157 | { |
… | |
… | |
245 | if (!wall) |
245 | if (!wall) |
246 | /* Nothing -> bail out */ |
246 | /* Nothing -> bail out */ |
247 | return; |
247 | return; |
248 | |
248 | |
249 | /* Find base name */ |
249 | /* Find base name */ |
250 | strcpy (archetype, wall->arch->name); |
250 | assign (archetype, wall->arch->name); |
251 | underscore = strchr (archetype, '_'); |
251 | underscore = strchr (archetype, '_'); |
252 | |
252 | |
253 | /* search for the first _ before a number */ |
253 | /* search for the first _ before a number */ |
254 | while (underscore && !isdigit (*(underscore + 1))) |
254 | while (underscore && !isdigit (*(underscore + 1))) |
255 | underscore = strchr (underscore + 1, '_'); |
255 | underscore = strchr (underscore + 1, '_'); |