* Is the player unable to enter the given form? If so, why? */
| 1830 | * Is the player unable to enter the given form? If so, why? |
| 1831 | */ |
| 1832 | string cant_transform_reason(transformation which_trans, |
| 1833 | bool involuntary, bool temp) |
| 1834 | { |
| 1835 | if (!involuntary && you.has_mutation(MUT_NO_FORMS)) |
| 1836 | return "You have sacrificed the ability to change form!"; |
| 1837 | |
| 1838 | // the undead cannot enter most forms. |
| 1839 | if (lifeless_prevents_form(which_trans)) |
| 1840 | return "Your unliving flesh cannot be transformed in this way."; |
| 1841 | |
| 1842 | if (SP_GARGOYLE == you.species && which_trans == transformation::statue) |
| 1843 | return "You're already a statue."; |
| 1844 | |
| 1845 | if (!temp) |
| 1846 | return ""; |
| 1847 | |
| 1848 | if (you.transform_uncancellable && which_trans != transformation::slaughter) |
| 1849 | return "You are stuck in your current form!"; |
| 1850 | |
| 1851 | if (which_trans == transformation::death && you.duration[DUR_DEATHS_DOOR]) |
| 1852 | return "You cannot mock death while in death's door."; |
| 1853 | |
| 1854 | return ""; |
| 1855 | } |
| 1856 | |
| 1857 | bool check_transform_into(transformation which_trans, bool involuntary, |
| 1858 | const item_def* talisman) |
no test coverage detected