MCPcopy Create free account
hub / github.com/PCGen/pcgen / getConcentration

Method getConcentration

code/src/java/pcgen/core/PlayerCharacter.java:8339–8359  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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)

Callers 2

getTokenMethod · 0.80
getTokenMethod · 0.80

Calls 15

charBonusToMethod · 0.95
getDomainSourceMethod · 0.95
getClassKeyedMethod · 0.95
getPcclassMethod · 0.95
getVariableValueMethod · 0.95
getGameAsPropertyMethod · 0.95
getTotalBonusToMethod · 0.95
getStatModForMethod · 0.95
getActualLevelMethod · 0.80
getFeatListMethod · 0.80
getSafeMethod · 0.80
getSpellTypeMethod · 0.80

Tested by

no test coverage detected