Returns concentration bonus for a spell and SpellInfo. @param sp the spell @param cs TODO @param si the spell info @return concentration bonus for a spell and SpellInfo
(final Spell sp, CharacterSpell cs, final SpellInfo si)
| 8337 | * @return concentration bonus for a spell and SpellInfo |
| 8338 | */ |
| 8339 | public int getConcentration(final Spell sp, CharacterSpell cs, final SpellInfo si) |
| 8340 | { |
| 8341 | CDOMObject ow; |
| 8342 | int spellLevel; |
| 8343 | int metaConcentration = 0; |
| 8344 | |
| 8345 | spellLevel = si.getActualLevel(); |
| 8346 | ow = cs.getOwner(); |
| 8347 | |
| 8348 | if (si.getFeatList() != null) |
| 8349 | { |
| 8350 | for (Ability metaFeat : si.getFeatList()) |
| 8351 | { |
| 8352 | spellLevel -= metaFeat.getSafe(IntegerKey.ADD_SPELL_LEVEL); |
| 8353 | metaConcentration = |
| 8354 | (int) (metaConcentration + BonusCalc.charBonusTo(metaFeat, "CONCENTRATION", "FEATBONUS", this)); |
| 8355 | } |
| 8356 | } |
| 8357 | |
| 8358 | return getConcentration(sp, cs, null, spellLevel, metaConcentration, ow); |
| 8359 | } |
| 8360 | |
| 8361 | public int getConcentration(final Spell sp, final CharacterSpell aSpell, PCClass aClass, int spellLevel, |
| 8362 | int metaConcentration, CDOMObject ow) |
no test coverage detected