… | |
… | |
1014 | } |
1014 | } |
1015 | |
1015 | |
1016 | return success; |
1016 | return success; |
1017 | } |
1017 | } |
1018 | |
1018 | |
1019 | |
|
|
1020 | /* This is used for the spells that gain stats. There are no spells |
1019 | /* This is used for the spells that gain stats. There are no spells |
1021 | * right now that icnrease wis/int/pow on a temp basis, so no |
1020 | * right now that icnrease wis/int/pow on a temp basis, so no |
1022 | * good comments for those. |
1021 | * good comments for those. |
1023 | */ |
1022 | */ |
1024 | static const char *const no_gain_msgs[NUM_STATS] = { |
1023 | static const char *const no_gain_msgs[NUM_STATS] = { |
1025 | "You grow no stronger.", |
1024 | "You grow no stronger.", |
1026 | "You grow no more agile.", |
1025 | "You grow no more agile.", |
1027 | "You don't feel any healthier.", |
1026 | "You don't feel any healthier.", |
1028 | "no wis", |
1027 | "You didn't grow any more intelligent.", |
|
|
1028 | "You do not feel any wiser.", |
|
|
1029 | "You don't feel any more powerful." |
1029 | "You are no easier to look at.", |
1030 | "You are no easier to look at.", |
1030 | "no int", |
|
|
1031 | "no pow" |
|
|
1032 | }; |
1031 | }; |
1033 | |
1032 | |
1034 | int |
1033 | int |
1035 | cast_change_ability (object *op, object *caster, object *spell_ob, int dir, int silent) |
1034 | cast_change_ability (object *op, object *caster, object *spell_ob, int dir, int silent) |
1036 | { |
1035 | { |
… | |
… | |
1087 | } |
1086 | } |
1088 | else |
1087 | else |
1089 | { |
1088 | { |
1090 | new_draw_info (NDI_UNIQUE, 0, op, "Recasting the spell had no effect."); |
1089 | new_draw_info (NDI_UNIQUE, 0, op, "Recasting the spell had no effect."); |
1091 | } |
1090 | } |
|
|
1091 | |
1092 | return 1; |
1092 | return 1; |
1093 | } |
1093 | } |
|
|
1094 | |
1094 | force->duration = spell_ob->duration + SP_level_duration_adjust (caster, spell_ob) * 50; |
1095 | force->duration = spell_ob->duration + SP_level_duration_adjust (caster, spell_ob) * 50; |
1095 | force->speed = 1.0; |
1096 | force->speed = 1.0; |
1096 | force->speed_left = -1.0; |
1097 | force->speed_left = -1.0; |
1097 | SET_FLAG (force, FLAG_APPLIED); |
1098 | SET_FLAG (force, FLAG_APPLIED); |
1098 | |
1099 | |
… | |
… | |
1104 | force->resist[i] = spell_ob->resist[i] + SP_level_dam_adjust (caster, spell_ob); |
1105 | force->resist[i] = spell_ob->resist[i] + SP_level_dam_adjust (caster, spell_ob); |
1105 | if (force->resist[i] > 100) |
1106 | if (force->resist[i] > 100) |
1106 | force->resist[i] = 100; |
1107 | force->resist[i] = 100; |
1107 | } |
1108 | } |
1108 | } |
1109 | } |
|
|
1110 | |
1109 | if (spell_ob->stats.hp) |
1111 | if (spell_ob->stats.hp) |
1110 | force->stats.hp = spell_ob->stats.hp + SP_level_dam_adjust (caster, spell_ob); |
1112 | force->stats.hp = spell_ob->stats.hp + SP_level_dam_adjust (caster, spell_ob); |
1111 | |
1113 | |
1112 | if (tmp->type == PLAYER) |
1114 | if (tmp->type == PLAYER) |
1113 | { |
1115 | { |
… | |
… | |
1153 | force->attacktype = spell_ob->attacktype; |
1155 | force->attacktype = spell_ob->attacktype; |
1154 | |
1156 | |
1155 | insert_ob_in_ob (force, tmp); |
1157 | insert_ob_in_ob (force, tmp); |
1156 | change_abil (tmp, force); /* Mostly to display any messages */ |
1158 | change_abil (tmp, force); /* Mostly to display any messages */ |
1157 | tmp->update_stats (); |
1159 | tmp->update_stats (); |
|
|
1160 | |
1158 | return 1; |
1161 | return 1; |
1159 | } |
1162 | } |
1160 | |
1163 | |
1161 | /* This used to be part of cast_change_ability, but it really didn't make |
1164 | /* This used to be part of cast_change_ability, but it really didn't make |
1162 | * a lot of sense, since most of the values it derives are from the god |
1165 | * a lot of sense, since most of the values it derives are from the god |
1163 | * of the caster. |
1166 | * of the caster. |
1164 | */ |
1167 | */ |
1165 | |
|
|
1166 | int |
1168 | int |
1167 | cast_bless (object *op, object *caster, object *spell_ob, int dir) |
1169 | cast_bless (object *op, object *caster, object *spell_ob, int dir) |
1168 | { |
1170 | { |
1169 | int i; |
1171 | int i; |
1170 | object *god = find_god (determine_god (op)), *tmp2, *force = NULL, *tmp; |
1172 | object *god = find_god (determine_god (op)), *tmp2, *force = NULL, *tmp; |