* prints a message if encumbrance changed since the last check */
| 1975 | * prints a message if encumbrance changed since the last check |
| 1976 | */ |
| 1977 | void |
| 1978 | encumber_msg(void) |
| 1979 | { |
| 1980 | int newcap = near_capacity(); |
| 1981 | |
| 1982 | if (go.oldcap < newcap) { |
| 1983 | switch (newcap) { |
| 1984 | case 1: |
| 1985 | Your("movements are slowed slightly because of your load."); |
| 1986 | break; |
| 1987 | case 2: |
| 1988 | You("rebalance your load. Movement is difficult."); |
| 1989 | break; |
| 1990 | case 3: |
| 1991 | You("%s under your heavy load. Movement is very hard.", |
| 1992 | stagger(gy.youmonst.data, "stagger")); |
| 1993 | break; |
| 1994 | default: |
| 1995 | You("%s move a handspan with this load!", |
| 1996 | newcap == 4 ? "can barely" : "can't even"); |
| 1997 | break; |
| 1998 | } |
| 1999 | disp.botl = TRUE; |
| 2000 | } else if (go.oldcap > newcap) { |
| 2001 | switch (newcap) { |
| 2002 | case 0: |
| 2003 | Your("movements are now unencumbered."); |
| 2004 | break; |
| 2005 | case 1: |
| 2006 | Your("movements are only slowed slightly by your load."); |
| 2007 | break; |
| 2008 | case 2: |
| 2009 | You("rebalance your load. Movement is still difficult."); |
| 2010 | break; |
| 2011 | case 3: |
| 2012 | You("%s under your load. Movement is still very hard.", |
| 2013 | stagger(gy.youmonst.data, "stagger")); |
| 2014 | break; |
| 2015 | } |
| 2016 | disp.botl = TRUE; |
| 2017 | } |
| 2018 | |
| 2019 | go.oldcap = newcap; |
| 2020 | } |
| 2021 | |
| 2022 | /* Is there a container at x,y. Optional: return count of containers at x,y */ |
| 2023 | int |
no test coverage detected