… | |
… | |
1562 | */ |
1562 | */ |
1563 | for (int i = 1000; --i;) |
1563 | for (int i = 1000; --i;) |
1564 | { |
1564 | { |
1565 | object *pick = at (gen (width), gen (height)).bot; |
1565 | object *pick = at (gen (width), gen (height)).bot; |
1566 | |
1566 | |
1567 | // do not prefer big monsters just because they are big. |
1567 | // must be head: do not prefer big monsters just because they are big. |
1568 | if (pick && pick->is_head ()) |
1568 | if (pick && pick->is_head ()) |
1569 | return pick->head_ (); |
1569 | return pick; |
1570 | } |
1570 | } |
1571 | |
1571 | |
1572 | // instead of crashing in the unlikely(?) case, try to return *something* |
1572 | // instead of crashing in the unlikely(?) case, try to return *something* |
1573 | return archetype::find (shstr_bug); |
1573 | return archetype::find (shstr_bug); |
1574 | } |
1574 | } |