Browse Source

toughness sync issue

lakebane-strongholds
FatBoy-DOTC 2 months ago
parent
commit
d4f5043a25
  1. 13
      src/engine/objects/CharacterSkill.java

13
src/engine/objects/CharacterSkill.java

@ -992,6 +992,9 @@ public class CharacterSkill extends AbstractGameObject {
//Get Base skill for unmodified stats //Get Base skill for unmodified stats
float base = 7f; float base = 7f;
if(this.skillsBase.getToken() == -660435875){
base = 0;
}
float statMod = 0.5f; float statMod = 0.5f;
if (this.skillsBase.getStrMod() > 0) if (this.skillsBase.getStrMod() > 0)
statMod += (float) this.skillsBase.getStrMod() * (float) (int) ((PlayerCharacter) CharacterSkill.GetOwner(this)).statStrBase / 100f; statMod += (float) this.skillsBase.getStrMod() * (float) (int) ((PlayerCharacter) CharacterSkill.GetOwner(this)).statStrBase / 100f;
@ -1009,7 +1012,7 @@ public class CharacterSkill extends AbstractGameObject {
statMod = 600f; statMod = 600f;
base += CharacterSkill.baseSkillValues[(int) statMod]; base += CharacterSkill.baseSkillValues[(int) statMod];
if (base + bonus < 1f) if (base + bonus < 1f && this.skillsBase.getToken() != -660435875)
this.baseAmountBeforeMods = 1f; this.baseAmountBeforeMods = 1f;
else else
this.baseAmountBeforeMods = base + bonus; this.baseAmountBeforeMods = base + bonus;
@ -1084,6 +1087,9 @@ public class CharacterSkill extends AbstractGameObject {
//Get Base skill for modified stats //Get Base skill for modified stats
//TODO this fomula needs verified //TODO this fomula needs verified
float base = 7f; float base = 7f;
if(this.skillsBase.getToken() == -660435875){
base = 0;
}
float statMod = 0.5f; float statMod = 0.5f;
if (this.skillsBase.getStrMod() > 0) if (this.skillsBase.getStrMod() > 0)
statMod += (float) this.skillsBase.getStrMod() * (float) CharacterSkill.GetOwner(this).getStatStrCurrent() / 100f; statMod += (float) this.skillsBase.getStrMod() * (float) CharacterSkill.GetOwner(this).getStatStrCurrent() / 100f;
@ -1099,6 +1105,9 @@ public class CharacterSkill extends AbstractGameObject {
statMod = 1f; statMod = 1f;
else if (statMod > 600) else if (statMod > 600)
statMod = 600f; statMod = 600f;
if(this.skillsBase.getToken() == -660435875){
statMod = 0;
}
base += CharacterSkill.baseSkillValues[(int) statMod]; base += CharacterSkill.baseSkillValues[(int) statMod];
SourceType sourceType = SourceType.GetSourceType(this.skillsBase.getNameNoSpace()); SourceType sourceType = SourceType.GetSourceType(this.skillsBase.getNameNoSpace());
@ -1109,7 +1118,7 @@ public class CharacterSkill extends AbstractGameObject {
base += bonus + CharacterSkill.GetOwner(this).getBonuses().getFloat(ModType.Skill, sourceType); base += bonus + CharacterSkill.GetOwner(this).getBonuses().getFloat(ModType.Skill, sourceType);
} }
if (base < 1f) if (base < 1f && this.skillsBase.getToken() != -660435875)
this.baseAmount = 1f; this.baseAmount = 1f;
else else
this.baseAmount = base; this.baseAmount = base;

Loading…
Cancel
Save