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

Method getSkillPoints

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

Get skill points. @return skill points

()

Source from the content-addressed store, hash-verified

1835 * @return skill points
1836 */
1837 public int getSkillPoints()
1838 {
1839 int returnValue = 0;
1840
1841 // First compute gained points, and then remove the already spent ones.
1842 // We can't use Remaining points because the level may be removed, and
1843 // then we have
1844 // to display this as -x on the "Total Skill Points" field
1845 for (PCLevelInfo li : getLevelInfo())
1846 {
1847 returnValue += li.getSkillPointsGained(this);
1848 }
1849
1850 for (Skill aSkill : getSkillSet())
1851 {
1852 for (PCClass pcc : getSkillRankClasses(aSkill))
1853 {
1854 if (pcc != null)
1855 {
1856 Double curRank = getSkillRankForClass(aSkill, pcc);
1857 if (curRank == null)
1858 {
1859 Logging.errorPrint("Got null on ranks for " + aSkill + " in class " + pcc);
1860 curRank = 0.0d;
1861 }
1862 // Only add the cost for skills associated with a class.
1863 // Skill ranks from feats etc are free.
1864 final int cost = getSkillCostForClass(aSkill, pcc).getCost();
1865 returnValue -= (int) (cost * curRank);
1866 }
1867 }
1868 }
1869 if (Globals.getGameModeHasPointPool())
1870 {
1871 returnValue += (int) getRemainingFeatPoints(false); // DO NOT CALL
1872 // getFeats() here! It
1873 // will set up a
1874 // recursive loop and
1875 // result in a stack
1876 // overflow!
1877 }
1878 return returnValue;
1879 }
1880
1881 /**
1882 * Get list of special abilities.

Callers 4

setScoreBaseMethod · 0.80
showPointPoolMethod · 0.80
investSkillPointsMethod · 0.80

Calls 10

getLevelInfoMethod · 0.95
getSkillSetMethod · 0.95
getSkillRankClassesMethod · 0.95
getSkillRankForClassMethod · 0.95
errorPrintMethod · 0.95
getSkillCostForClassMethod · 0.95
getSkillPointsGainedMethod · 0.80
getCostMethod · 0.65

Tested by

no test coverage detected