Skip to content
Browse files

CheckSpellDisruption: only consider the cc bonus when the feat is there

  • Loading branch information...
1 parent 3b5706b commit f8b06b0606662df7bb1a142b3d4f8185eda959e5 @lynxlynxlynx lynxlynxlynx committed May 8, 2014
Showing with 4 additions and 3 deletions.
  1. +4 −3 gemrb/core/Scriptable/Actor.cpp
View
7 gemrb/core/Scriptable/Actor.cpp
@@ -3759,9 +3759,10 @@ bool Actor::CheckSpellDisruption(int damage, int spellLevel)
}
int roll = core->Roll(1, 20, 0);
int concentration = Modified[IE_CONCENTRATION];
- int bonus = 4; // combat casting bonus for when injured
- if (BaseStats[IE_HITPOINTS] == Modified[IE_HITPOINTS]) {
- bonus = 0;
+ int bonus = 0;
+ // combat casting bonus only applies when injured
+ if (HasFeat(FEAT_COMBAT_CASTING) && BaseStats[IE_HITPOINTS] != Modified[IE_HITPOINTS]) {
+ bonus += 4;
}
// ~Spell Disruption check (d20 + Concentration + Combat Casting bonus) %d + %d + %d vs. (10 + damageTaken + spellLevel) = 10 + %d + %d.~
if (GameScript::ID_ClassMask(this, 0x6ee)) { // 0x6ee == CLASSMASK_GROUP_CASTERS

0 comments on commit f8b06b0

Please sign in to comment.
Something went wrong with that request. Please try again.