* Exceptions to things based on race. * Correctly checks polymorphed player race. * Returns: * 0 No exception, normal rules apply. * 1 If the race/object combination is acceptable. * -1 If the race/object combination is unacceptable. */
| 1357 | * -1 If the race/object combination is unacceptable. |
| 1358 | */ |
| 1359 | int |
| 1360 | racial_exception(struct monst *mon, struct obj *obj) |
| 1361 | { |
| 1362 | const struct permonst *ptr = raceptr(mon); |
| 1363 | |
| 1364 | /* Acceptable Exceptions: */ |
| 1365 | /* Allow hobbits to wear elven armor - LoTR */ |
| 1366 | if (ptr == &mons[PM_HOBBIT] && is_elven_armor(obj)) |
| 1367 | return 1; |
| 1368 | /* Unacceptable Exceptions: */ |
| 1369 | /* Checks for object that certain races should never use go here */ |
| 1370 | /* return -1; */ |
| 1371 | |
| 1372 | return 0; |
| 1373 | } |
| 1374 | |
| 1375 | /* Remove an object from a monster's inventory. */ |
| 1376 | void |
no test coverage detected