1 | /* |
1 | /* |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
3 | * |
3 | * |
4 | * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008,2009 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2003,2007 Mark Wedel & Crossfire Development Team |
5 | * Copyright (©) 2003,2007 Mark Wedel & Crossfire Development Team |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
7 | * |
7 | * |
8 | * Deliantra is free software: you can redistribute it and/or modify |
8 | * Deliantra is free software: you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by |
9 | * it under the terms of the GNU General Public License as published by |
… | |
… | |
41 | /* Only prohibit stealing if the player does not have a free |
41 | /* Only prohibit stealing if the player does not have a free |
42 | * hand available and in fact does have hands. |
42 | * hand available and in fact does have hands. |
43 | */ |
43 | */ |
44 | if (op->type == PLAYER && op->slot[body_arm].used <= 0 && op->slot[body_arm].info) |
44 | if (op->type == PLAYER && op->slot[body_arm].used <= 0 && op->slot[body_arm].info) |
45 | { |
45 | { |
46 | new_draw_info (NDI_UNIQUE, 0, op, "But you have no free hands to steal with!"); |
46 | new_draw_info (NDI_UNIQUE, 0, op, "But you have no free hands to steal with! " |
|
|
47 | "H<Try to unapply weapons or things you hold in your hands, use the C<body> command.>"); |
47 | return -1; |
48 | return -1; |
48 | } |
49 | } |
49 | |
50 | |
50 | /* ADJUSTMENTS */ |
51 | /* ADJUSTMENTS */ |
51 | |
52 | |
… | |
… | |
1479 | for (tmp = op->inv; tmp != NULL; tmp = tmp->below) |
1480 | for (tmp = op->inv; tmp != NULL; tmp = tmp->below) |
1480 | { |
1481 | { |
1481 | /* can't toss invisible or inv-locked items */ |
1482 | /* can't toss invisible or inv-locked items */ |
1482 | if (tmp->invisible || QUERY_FLAG (tmp, FLAG_INV_LOCKED)) |
1483 | if (tmp->invisible || QUERY_FLAG (tmp, FLAG_INV_LOCKED)) |
1483 | continue; |
1484 | continue; |
1484 | if (!request || !strcmp (query_name (tmp), request) || !strcmp (tmp->name, request)) |
1485 | if (!request || !strcmp (query_name (tmp), request) || !strcmp (&tmp->name, request)) |
1485 | break; |
1486 | break; |
1486 | } |
1487 | } |
1487 | } |
1488 | } |
1488 | |
1489 | |
1489 | /* this should prevent us from throwing away |
1490 | /* this should prevent us from throwing away |
… | |
… | |
1720 | { |
1721 | { |
1721 | throw_ob->last_sp += eff_str / 3; /* fly a little further */ |
1722 | throw_ob->last_sp += eff_str / 3; /* fly a little further */ |
1722 | throw_ob->stats.dam += throw_ob->inv->stats.dam + throw_ob->magic + 2; |
1723 | throw_ob->stats.dam += throw_ob->inv->stats.dam + throw_ob->magic + 2; |
1723 | throw_ob->stats.wc -= throw_ob->magic + throw_ob->inv->stats.wc; |
1724 | throw_ob->stats.wc -= throw_ob->magic + throw_ob->inv->stats.wc; |
1724 | /* only throw objects get directional faces */ |
1725 | /* only throw objects get directional faces */ |
1725 | if (GET_ANIM_ID (throw_ob) && NUM_ANIMATIONS (throw_ob)) |
1726 | if (throw_ob->has_anim () && throw_ob->anim_frames ()) |
1726 | SET_ANIMATION (throw_ob, dir); |
1727 | throw_ob->set_anim_frame (dir); |
1727 | } |
1728 | } |
1728 | else |
1729 | else |
1729 | { |
1730 | { |
1730 | uint16 mat = throw_ob->materials; |
1731 | uint16 mat = throw_ob->materials; |
1731 | |
1732 | |