… | |
… | |
900 | |
900 | |
901 | op->speed_left = -FABS (op->speed) * 5; /* Freeze them for a short while */ |
901 | op->speed_left = -FABS (op->speed) * 5; /* Freeze them for a short while */ |
902 | return 1; |
902 | return 1; |
903 | } |
903 | } |
904 | |
904 | |
905 | |
|
|
906 | /* cast_heal: Heals something. |
905 | /* cast_heal: Heals something. |
907 | * op is the caster. |
906 | * op is the caster. |
908 | * dir is the direction he is casting it in. |
907 | * dir is the direction he is casting it in. |
909 | * spell is the spell object. |
908 | * spell is the spell object. |
910 | */ |
909 | */ |
… | |
… | |
936 | { |
935 | { |
937 | /* See how many points we actually heal. Instead of messages |
936 | /* See how many points we actually heal. Instead of messages |
938 | * based on type of spell, we instead do messages based |
937 | * based on type of spell, we instead do messages based |
939 | * on amount of damage healed. |
938 | * on amount of damage healed. |
940 | */ |
939 | */ |
941 | if (heal > (tmp->stats.maxhp - tmp->stats.hp)) |
940 | if (heal > tmp->stats.maxhp - tmp->stats.hp) |
942 | heal = tmp->stats.maxhp - tmp->stats.hp; |
941 | heal = tmp->stats.maxhp - tmp->stats.hp; |
|
|
942 | |
943 | tmp->stats.hp += heal; |
943 | tmp->stats.hp += heal; |
944 | |
944 | |
945 | if (tmp->stats.hp >= tmp->stats.maxhp) |
945 | if (tmp->stats.hp >= tmp->stats.maxhp) |
946 | new_draw_info (NDI_UNIQUE, 0, tmp, "You feel just fine!"); |
946 | new_draw_info (NDI_UNIQUE, 0, tmp, "You feel just fine!"); |
947 | else if (heal > 50) |
947 | else if (heal > 50) |
… | |
… | |
956 | success = 1; |
956 | success = 1; |
957 | } |
957 | } |
958 | } |
958 | } |
959 | |
959 | |
960 | if (spell->attacktype & AT_DISEASE) |
960 | if (spell->attacktype & AT_DISEASE) |
961 | if (cure_disease (tmp, op)) |
961 | if (cure_disease (tmp, op, spell)) |
962 | success = 1; |
962 | success = 1; |
963 | |
963 | |
964 | if (spell->attacktype & AT_POISON) |
964 | if (spell->attacktype & AT_POISON) |
965 | { |
965 | { |
966 | at = archetype::find ("poisoning"); |
966 | at = archetype::find ("poisoning"); |
… | |
… | |
1015 | } |
1015 | } |
1016 | |
1016 | |
1017 | if (spell->stats.food && tmp->stats.food < 999) |
1017 | if (spell->stats.food && tmp->stats.food < 999) |
1018 | { |
1018 | { |
1019 | tmp->stats.food += spell->stats.food; |
1019 | tmp->stats.food += spell->stats.food; |
|
|
1020 | |
1020 | if (tmp->stats.food > 999) |
1021 | if (tmp->stats.food > 999) |
1021 | tmp->stats.food = 999; |
1022 | tmp->stats.food = 999; |
|
|
1023 | |
1022 | success = 1; |
1024 | success = 1; |
1023 | /* We could do something a bit better like the messages for healing above */ |
1025 | /* We could do something a bit better like the messages for healing above */ |
1024 | new_draw_info (NDI_UNIQUE, 0, tmp, "You feel your belly fill with food"); |
1026 | new_draw_info (NDI_UNIQUE, 0, tmp, "You feel your belly fill with food"); |
1025 | } |
1027 | } |
1026 | |
1028 | |
… | |
… | |
2282 | } |
2284 | } |
2283 | |
2285 | |
2284 | /* moves the peacemaker spell. |
2286 | /* moves the peacemaker spell. |
2285 | * op is the piece object. |
2287 | * op is the piece object. |
2286 | */ |
2288 | */ |
2287 | |
|
|
2288 | void |
2289 | void |
2289 | move_peacemaker (object *op) |
2290 | move_peacemaker (object *op) |
2290 | { |
2291 | { |
2291 | object *tmp; |
2292 | object *tmp; |
2292 | |
2293 | |