… | |
… | |
662 | case KW_end: |
662 | case KW_end: |
663 | thawer.next (); |
663 | thawer.next (); |
664 | return true; |
664 | return true; |
665 | |
665 | |
666 | default: |
666 | default: |
667 | if (!thawer.parse_error ("map", 0)) |
667 | if (!thawer.parse_error ("map")) |
668 | return false; |
668 | return false; |
669 | break; |
669 | break; |
670 | } |
670 | } |
671 | |
671 | |
672 | thawer.next (); |
672 | thawer.next (); |
… | |
… | |
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 | } |