PlayerCombatStats modified skills
This commit is contained in:
@@ -68,7 +68,7 @@ public class CharacterSkill extends AbstractGameObject {
|
|||||||
165, 166, 166, 167, 167, //185 to 189
|
165, 166, 166, 167, 167, //185 to 189
|
||||||
168}; //190
|
168}; //190
|
||||||
|
|
||||||
private static final float[] baseSkillValues = {
|
static final float[] baseSkillValues = {
|
||||||
0.0f, 0.0f, 0.2f, 0.4f, 0.6f, //0 to 4
|
0.0f, 0.0f, 0.2f, 0.4f, 0.6f, //0 to 4
|
||||||
0.8f, 1.0f, 1.1666666f, 1.3333334f, 1.5f, //5 to 9
|
0.8f, 1.0f, 1.1666666f, 1.3333334f, 1.5f, //5 to 9
|
||||||
1.6666667f, 1.8333334f, 2.0f, 2.2f, 2.4f, //10 to 14
|
1.6666667f, 1.8333334f, 2.0f, 2.2f, 2.4f, //10 to 14
|
||||||
|
|||||||
@@ -121,9 +121,13 @@ public class PlayerCombatStats {
|
|||||||
float skillLevel = 0;
|
float skillLevel = 0;
|
||||||
float masteryLevel = 0;
|
float masteryLevel = 0;
|
||||||
|
|
||||||
if(this.owner.skills.containsKey(skill))
|
if(this.owner.skills.containsKey(skill)) {
|
||||||
skillLevel = this.owner.skills.get(skill).getModifiedAmount();
|
skillLevel = this.owner.skills.get(skill).getModifiedAmount();
|
||||||
|
float newCalc = calculateModifiedSkill(skill, this.owner);
|
||||||
|
if(newCalc != skillLevel){
|
||||||
|
int i = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
if(this.owner.skills.containsKey(mastery))
|
if(this.owner.skills.containsKey(mastery))
|
||||||
masteryLevel = this.owner.skills.get(mastery).getModifiedAmount();
|
masteryLevel = this.owner.skills.get(mastery).getModifiedAmount();
|
||||||
|
|
||||||
@@ -595,13 +599,30 @@ public class PlayerCombatStats {
|
|||||||
float spiModPercentage = (spiMod / totalMod);
|
float spiModPercentage = (spiMod / totalMod);
|
||||||
//calculate stat weight
|
//calculate stat weight
|
||||||
float weight = 0;
|
float weight = 0;
|
||||||
weight += pc.statStrCurrent * strModPercentage;
|
weight += pc.statStrBase * strModPercentage;
|
||||||
weight += pc.statDexCurrent * dexModPercentage;
|
weight += pc.statDexBase * dexModPercentage;
|
||||||
weight += pc.statConCurrent * conModPercentage;
|
weight += pc.statConBase * conModPercentage;
|
||||||
weight += pc.statIntCurrent * intModPercentage;
|
weight += pc.statIntBase * intModPercentage;
|
||||||
weight += pc.statSpiCurrent * spiModPercentage;
|
weight += pc.statSpiBase * spiModPercentage;
|
||||||
|
|
||||||
float modifiedSkill = (75 + 3*pc.statIntCurrent + 2 * weight) / 20;
|
Enum.SourceType sourceType = Enum.SourceType.GetSourceType(skillBase.getNameNoSpace());
|
||||||
|
float base = 7f;
|
||||||
|
base += CharacterSkill.baseSkillValues[(int) weight];
|
||||||
|
float bonus = 0f;
|
||||||
|
if (CharacterSkill.GetOwner(skill).getBonuses() != null) {
|
||||||
|
//Get bonuses from runes
|
||||||
|
bonus = CharacterSkill.GetOwner(skill).getBonuses().getSkillBonus(skillBase.sourceType);
|
||||||
|
}
|
||||||
|
if (CharacterSkill.GetOwner(skill).getBonuses() != null) {
|
||||||
|
//add bonuses from effects/items and runes
|
||||||
|
base += bonus + CharacterSkill.GetOwner(skill).getBonuses().getFloat(Enum.ModType.Skill, sourceType);
|
||||||
|
}
|
||||||
|
float modAmount = skill.getBaseAmount();
|
||||||
|
if (CharacterSkill.GetOwner(skill).getBonuses() != null) {
|
||||||
|
//Multiply any percent bonuses
|
||||||
|
modAmount *= (1 + CharacterSkill.GetOwner(skill).getBonuses().getFloatPercentAll(Enum.ModType.Skill, sourceType));
|
||||||
|
}
|
||||||
|
float modifiedSkill = modAmount;
|
||||||
|
|
||||||
return modifiedSkill;
|
return modifiedSkill;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user