Changeset 1456
- Timestamp:
- 06/29/09 13:13:34 (14 months ago)
- Location:
- trunk/src
- Files:
-
- 2 modified
-
attack.c (modified) (2 diffs)
-
object/obj-util.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/attack.c
r1417 r1456 491 491 int msec = op_ptr->delay_factor * op_ptr->delay_factor; 492 492 493 /* Get the "bow" */ 494 j_ptr = &inventory[INVEN_BOW]; 495 496 /* Require a usable launcher */ 497 if (!j_ptr->tval || !p_ptr->state.ammo_tval) 498 { 499 msg_print("You have nothing to fire with."); 500 return; 501 } 502 493 503 /* Get item to fire and direction to fire in. */ 494 504 item = args[0].item; 495 505 dir = args[1].direction; 496 506 507 /* Check the item being fired is usable by the player. */ 508 if (!item_is_available(item, NULL, (USE_INVEN | USE_FLOOR))) 509 { 510 msg_format("That item is not within your reach."); 511 return; 512 } 513 497 514 /* Get the object for the ammo */ 498 515 o_ptr = object_from_item_idx(item); 499 516 500 /* Get the "bow" */ 501 j_ptr = &inventory[INVEN_BOW]; 517 /* Check the ammo can be used with the launcher */ 518 if (o_ptr->tval != p_ptr->state.ammo_tval) 519 { 520 msg_format("That ammo cannot be fired by your current weapon."); 521 return; 522 } 502 523 503 524 /* Base range XXX XXX */ … … 808 829 dir = args[1].direction; 809 830 831 /* Check the item being thrown is usable by the player. */ 832 if (!item_is_available(item, NULL, (USE_INVEN | USE_FLOOR))) 833 { 834 msg_format("That item is not within your reach."); 835 return; 836 } 837 810 838 /* Get the object */ 811 839 o_ptr = object_from_item_idx(item); -
trunk/src/object/obj-util.c
r1448 r1456 2334 2334 /* Redraw stuff */ 2335 2335 p_ptr->redraw |= (PR_INVEN); 2336 2337 /* Inventory has changed, repeated command may use the wrong item */ 2338 cmd_disable_repeat(); 2336 2339 } 2337 2340 … … 2893 2896 2894 2897 /* Message */ 2895 if (flag) msg_print("You combine some items in your pack."); 2898 if (flag) 2899 { 2900 msg_print("You combine some items in your pack."); 2901 2902 /* Stop "repeat last command" from working. */ 2903 cmd_disable_repeat(); 2904 } 2896 2905 } 2897 2906
