… | |
… | |
1134 | |
1134 | |
1135 | /* player/monster is trying to cast the spell. might fumble it */ |
1135 | /* player/monster is trying to cast the spell. might fumble it */ |
1136 | if (spell_ob->stats.grace && random_roll (0, 99, op, PREFER_HIGH) < |
1136 | if (spell_ob->stats.grace && random_roll (0, 99, op, PREFER_HIGH) < |
1137 | (spell_ob->level / (float) MAX (1, op->level) * cleric_chance[op->stats.Wis])) |
1137 | (spell_ob->level / (float) MAX (1, op->level) * cleric_chance[op->stats.Wis])) |
1138 | { |
1138 | { |
1139 | play_sound_player_only (op->contr, SOUND_FUMBLE_SPELL, 0, 0); |
1139 | op->contr->play_sound (sound_find ("fumble_spell")); |
1140 | new_draw_info (NDI_UNIQUE, 0, op, "You fumble the prayer."); |
1140 | new_draw_info (NDI_UNIQUE, 0, op, "You fumble the prayer."); |
1141 | |
1141 | |
1142 | op->stats.grace -= random_roll (1, SP_level_spellpoint_cost (caster, spell_ob, SPELL_GRACE), op, PREFER_LOW); |
1142 | op->stats.grace -= random_roll (1, SP_level_spellpoint_cost (caster, spell_ob, SPELL_GRACE), op, PREFER_LOW); |
1143 | return 0; |
1143 | return 0; |
1144 | } |
1144 | } |