Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

partly reverted old 3f9adcb: don't mix disruption and concentration

once we're in that branch, we already know the checks failed, so
don't give them another chance with a different calculation
  • Loading branch information...
commit 0a8af6cd4598bed84602eb1125f638c42a21b507 1 parent ef47a1e
@lynxlynxlynx lynxlynxlynx authored
Showing with 6 additions and 24 deletions.
  1. +6 −24 gemrb/core/GameScript/GSUtils.cpp
View
30 gemrb/core/GameScript/GSUtils.cpp
@@ -2575,31 +2575,13 @@ inline static bool InterruptSpellcasting(Scriptable* Sender) {
// ouch, we got hit
if (Sender->InterruptCasting) {
- int roll = 0;
-
- // iwd2 does an extra concentration check first:
- // d20 + Concentration Skill Level + Constitution bonus (+4 Combat casting feat) >= 15 + spell level
- if (core->HasFeature(GF_3ED_RULES)) {
- roll = core->Roll(1, 20, 0); // TODO: check if the original does a lucky roll
- roll += caster->GetStat(IE_CONCENTRATION);
- roll += caster->GetAbilityBonus(IE_CON);
- if (caster->HasFeat(FEAT_COMBAT_CASTING)) {
- roll += 4;
- }
- Spell* spl = gamedata->GetSpell(Sender->SpellResRef, true);
- if (!spl) return false;
- roll -= spl->SpellLevel;
- gamedata->FreeSpell(spl, Sender->SpellResRef, false);
- }
- if (roll < 15) {
- if (caster->InParty) {
- displaymsg->DisplayConstantString(STR_SPELLDISRUPT, DMC_WHITE, Sender);
- } else {
- displaymsg->DisplayConstantStringName(STR_SPELL_FAILED, DMC_WHITE, Sender);
- }
- DisplayStringCore(Sender, VB_SPELL_DISRUPTED, DS_CONSOLE|DS_CONST );
- return true;
+ if (caster->InParty) {
+ displaymsg->DisplayConstantString(STR_SPELLDISRUPT, DMC_WHITE, Sender);
+ } else {
+ displaymsg->DisplayConstantStringName(STR_SPELL_FAILED, DMC_WHITE, Sender);
}
+ DisplayStringCore(Sender, VB_SPELL_DISRUPTED, DS_CONSOLE|DS_CONST );
+ return true;
}
// abort casting on invisible or dead targets
Please sign in to comment.
Something went wrong with that request. Please try again.