| 4852 | } |
| 4853 | |
| 4854 | staticfn int |
| 4855 | pick_animal(void) |
| 4856 | { |
| 4857 | int res; |
| 4858 | |
| 4859 | if (!ga.animal_list) |
| 4860 | mon_animal_list(TRUE); |
| 4861 | assert(ga.animal_list != 0); |
| 4862 | res = ga.animal_list[rn2(ga.animal_list_count)]; |
| 4863 | /* rogue level should use monsters represented by uppercase letters |
| 4864 | only, but since chameleons aren't generated there (not uppercase!) |
| 4865 | we don't perform a lot of retries */ |
| 4866 | if (Is_rogue_level(&u.uz) && !isupper(monsym(&mons[res]))) |
| 4867 | res = ga.animal_list[rn2(ga.animal_list_count)]; |
| 4868 | return res; |
| 4869 | } |
| 4870 | |
| 4871 | void |
| 4872 | decide_to_shapeshift(struct monst *mon) |
no test coverage detected