… | |
… | |
1126 | * the player any time. |
1126 | * the player any time. |
1127 | * Ignore casting time for firewalls |
1127 | * Ignore casting time for firewalls |
1128 | */ |
1128 | */ |
1129 | if (caster == op && caster->type != FIREWALL) |
1129 | if (caster == op && caster->type != FIREWALL) |
1130 | { |
1130 | { |
1131 | op->speed_left -= spell_ob->casting_time * PATH_TIME_MULT (op, spell_ob) * fabs (op->speed); |
1131 | op->speed_left -= spell_ob->casting_time * PATH_TIME_MULT (op, spell_ob) * op->speed; |
1132 | /* Other portions of the code may also decrement the speed of the player, so |
1132 | /* Other portions of the code may also decrement the speed of the player, so |
1133 | * put a lower limit so that the player isn't stuck here too long |
1133 | * put a lower limit so that the player isn't stuck here too long |
1134 | */ |
1134 | */ |
1135 | if ((spell_ob->casting_time > 0) && op->speed_left < -spell_ob->casting_time * PATH_TIME_MULT (op, spell_ob) * fabs (op->speed)) |
1135 | if ((spell_ob->casting_time > 0) && op->speed_left < -spell_ob->casting_time * PATH_TIME_MULT (op, spell_ob) * op->speed) |
1136 | op->speed_left = -spell_ob->casting_time * PATH_TIME_MULT (op, spell_ob) * fabs (op->speed); |
1136 | op->speed_left = -spell_ob->casting_time * PATH_TIME_MULT (op, spell_ob) * op->speed; |
1137 | } |
1137 | } |
1138 | else if (caster->type == WAND || caster->type == HORN || caster->type == ROD || caster->type == POTION || caster->type == SCROLL) |
1138 | else if (caster->type == WAND || caster->type == HORN || caster->type == ROD || caster->type == POTION || caster->type == SCROLL) |
1139 | op->speed_left -= 2 * fabs (op->speed); |
1139 | op->speed_left -= 2 * op->speed; |
1140 | |
1140 | |
1141 | if (op->type == PLAYER && op == caster) |
1141 | if (op->type == PLAYER && op == caster) |
1142 | { |
1142 | { |
1143 | op->stats.grace -= SP_level_spellpoint_cost (caster, spell_ob, SPELL_GRACE); |
1143 | op->stats.grace -= SP_level_spellpoint_cost (caster, spell_ob, SPELL_GRACE); |
1144 | op->stats.sp -= SP_level_spellpoint_cost (caster, spell_ob, SPELL_MANA); |
1144 | op->stats.sp -= SP_level_spellpoint_cost (caster, spell_ob, SPELL_MANA); |