Get skill points. @return skill points
()
| 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. |
no test coverage detected