… | |
… | |
779 | if ((hitter->type == PLAYER) && (hitter->casting_time > -1)) |
779 | if ((hitter->type == PLAYER) && (hitter->casting_time > -1)) |
780 | { |
780 | { |
781 | hitter->casting_time = -1; |
781 | hitter->casting_time = -1; |
782 | new_draw_info (NDI_UNIQUE, 0, hitter, "You attacked and lost your spell!"); |
782 | new_draw_info (NDI_UNIQUE, 0, hitter, "You attacked and lost your spell!"); |
783 | } |
783 | } |
|
|
784 | |
784 | if ((op->casting_time > -1) && (hitdam > 0)) |
785 | if ((op->casting_time > -1) && (hitdam > 0)) |
785 | { |
786 | { |
786 | op->casting_time = -1; |
787 | op->casting_time = -1; |
787 | if (op->type == PLAYER) |
788 | if (op->type == PLAYER) |
788 | { |
789 | { |
789 | new_draw_info (NDI_UNIQUE, 0, op, "You were hit and lost your spell!"); |
790 | new_draw_info (NDI_UNIQUE, 0, op, "You were hit and lost your spell!"); |
790 | new_draw_info_format (NDI_ALL | NDI_UNIQUE, 5, NULL, "%s was hit by %s and lost a spell.", &op_name, &hitter->name); |
791 | new_draw_info_format (NDI_ALL | NDI_UNIQUE, 5, NULL, "%s was hit by %s and lost a spell.", &op_name, &hitter->name); |
791 | } |
792 | } |
792 | } |
793 | } |
793 | } |
794 | } |
|
|
795 | |
794 | if (!simple_attack) |
796 | if (!simple_attack) |
795 | { |
797 | { |
796 | /* If you hit something, the victim should *always* wake up. |
798 | /* If you hit something, the victim should *always* wake up. |
797 | * Before, invisible hitters could avoid doing this. |
799 | * Before, invisible hitters could avoid doing this. |
798 | * -b.t. */ |
800 | * -b.t. */ |
… | |
… | |
869 | } |
871 | } |
870 | |
872 | |
871 | int |
873 | int |
872 | attack_ob (object *op, object *hitter) |
874 | attack_ob (object *op, object *hitter) |
873 | { |
875 | { |
874 | |
|
|
875 | if (hitter->head) |
|
|
876 | hitter = hitter->head; |
876 | hitter = hitter->head_ (); |
|
|
877 | |
877 | return attack_ob_simple (op, hitter, hitter->stats.dam, hitter->stats.wc); |
878 | return attack_ob_simple (op, hitter, hitter->stats.dam, hitter->stats.wc); |
878 | } |
879 | } |
879 | |
880 | |
880 | /* op is the arrow, tmp is what is stopping the arrow. |
881 | /* op is the arrow, tmp is what is stopping the arrow. |
881 | * |
882 | * |