2 * This file contains misc functions for dealing with armor
3 * @(#)armor.c 3.9 (Berkeley) 6/15/81
5 * Rogue: Exploring the Dungeons of Doom
6 * Copyright (C) 1980, 1981 Michael Toy, Ken Arnold and Glenn Wichman
9 * See the file LICENSE.TXT for full copyright and licensing information.
17 * The player wants to wear something, so let him/her put it on.
22 register struct linked_list
*item
;
23 register struct object
*obj
;
25 if (cur_armor
!= NULL
)
27 addmsg("You are already wearing some");
29 addmsg(". You'll have to take it off first");
34 if ((item
= get_item("wear", ARMOR
)) == NULL
)
36 obj
= (struct object
*) ldata(item
);
37 if (obj
->o_type
!= ARMOR
)
39 msg("You can't wear that.");
44 addmsg("You are now w");
47 msg("earing %s.", a_names
[obj
->o_which
]);
49 obj
->o_flags
|= ISKNOW
;
54 * Get the armor off of the players back
59 register struct object
*obj
;
61 if ((obj
= cur_armor
) == NULL
)
64 msg("Not wearing armor");
66 msg("You aren't wearing any armor");
69 if (!dropcheck(cur_armor
))
75 addmsg("You used to be ");
76 msg(" wearing %c) %s", pack_char(obj
), inv_name(obj
, TRUE
));
81 * Do nothing but let other things happen