| 150 | } |
| 151 | |
| 152 | staticfn int |
| 153 | is_pure(boolean talk) |
| 154 | { |
| 155 | int purity; |
| 156 | aligntyp original_alignment = u.ualignbase[A_ORIGINAL]; |
| 157 | |
| 158 | if (wizard && talk) { |
| 159 | if (u.ualign.type != original_alignment) { |
| 160 | You("are currently %s instead of %s.", align_str(u.ualign.type), |
| 161 | align_str(original_alignment)); |
| 162 | } else if (u.ualignbase[A_CURRENT] != original_alignment) { |
| 163 | You("have converted."); |
| 164 | } else if (u.ualign.record < MIN_QUEST_ALIGN) { |
| 165 | You("are currently %d and require %d.", u.ualign.record, |
| 166 | MIN_QUEST_ALIGN); |
| 167 | if (yn_function("adjust?", (char *) 0, 'y', TRUE) == 'y') |
| 168 | u.ualign.record = MIN_QUEST_ALIGN; |
| 169 | } |
| 170 | } |
| 171 | purity = (u.ualign.record >= MIN_QUEST_ALIGN |
| 172 | && u.ualign.type == original_alignment |
| 173 | && u.ualignbase[A_CURRENT] == original_alignment) |
| 174 | ? 1 |
| 175 | : (u.ualignbase[A_CURRENT] != original_alignment) ? -1 : 0; |
| 176 | return purity; |
| 177 | } |
| 178 | |
| 179 | /* |
| 180 | * Expel the player to the stairs on the parent of the quest dungeon. |
no test coverage detected