ZergMultiplier scales correctly
This commit is contained in:
@@ -134,7 +134,7 @@ public abstract class AbstractIntelligenceAgent extends AbstractCharacter {
|
||||
float ret = MobAIThread.AI_BASE_AGGRO_RANGE;
|
||||
|
||||
if (this.bonuses != null)
|
||||
ret *= (1 + this.bonuses.getFloatPercentAll(ModType.ScanRange, SourceType.None, null));
|
||||
ret *= (1 + this.bonuses.getFloatPercentAll(ModType.ScanRange, SourceType.None));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1127,7 +1127,7 @@ public class CharacterSkill extends AbstractGameObject {
|
||||
|
||||
if (CharacterSkill.GetOwner(this).getBonuses() != null) {
|
||||
//Multiply any percent bonuses
|
||||
modAmount *= (1 + CharacterSkill.GetOwner(this).getBonuses().getFloatPercentAll(ModType.Skill, sourceType, null));
|
||||
modAmount *= (1 + CharacterSkill.GetOwner(this).getBonuses().getFloatPercentAll(ModType.Skill, sourceType));
|
||||
}
|
||||
|
||||
this.modifiedAmount = (int) (modAmount);
|
||||
|
||||
+15
-15
@@ -1177,11 +1177,11 @@ public class Mob extends AbstractIntelligenceAgent {
|
||||
|
||||
// apply dex penalty for armor
|
||||
// modify percent amounts. DO THIS LAST!
|
||||
strVal *= (1 + this.bonuses.getFloatPercentAll(ModType.Attr, SourceType.Strength, null));
|
||||
dexVal *= (1 + this.bonuses.getFloatPercentAll(ModType.Attr, SourceType.Dexterity, null));
|
||||
conVal *= (1 + this.bonuses.getFloatPercentAll(ModType.Attr, SourceType.Constitution, null));
|
||||
intVal *= (1 + this.bonuses.getFloatPercentAll(ModType.Attr, SourceType.Intelligence, null));
|
||||
spiVal *= (1 + this.bonuses.getFloatPercentAll(ModType.Attr, SourceType.Spirit, null));
|
||||
strVal *= (1 + this.bonuses.getFloatPercentAll(ModType.Attr, SourceType.Strength));
|
||||
dexVal *= (1 + this.bonuses.getFloatPercentAll(ModType.Attr, SourceType.Dexterity));
|
||||
conVal *= (1 + this.bonuses.getFloatPercentAll(ModType.Attr, SourceType.Constitution));
|
||||
intVal *= (1 + this.bonuses.getFloatPercentAll(ModType.Attr, SourceType.Intelligence));
|
||||
spiVal *= (1 + this.bonuses.getFloatPercentAll(ModType.Attr, SourceType.Spirit));
|
||||
} else {
|
||||
// apply dex penalty for armor
|
||||
}
|
||||
@@ -1200,7 +1200,7 @@ public class Mob extends AbstractIntelligenceAgent {
|
||||
float bonus = 1;
|
||||
if (this.bonuses != null)
|
||||
// get rune and effect bonuses
|
||||
bonus *= (1 + this.bonuses.getFloatPercentAll(ModType.Speed, SourceType.None, null));
|
||||
bonus *= (1 + this.bonuses.getFloatPercentAll(ModType.Speed, SourceType.None));
|
||||
|
||||
if (this.isPlayerGuard)
|
||||
switch (this.mobBase.getLoadID()) {
|
||||
@@ -1568,9 +1568,9 @@ public class Mob extends AbstractIntelligenceAgent {
|
||||
|
||||
//apply effects percent modifiers. DO THIS LAST!
|
||||
|
||||
h *= (1 + this.bonuses.getFloatPercentAll(ModType.HealthFull, SourceType.None, null));
|
||||
m *= (1 + this.bonuses.getFloatPercentAll(ModType.ManaFull, SourceType.None, null));
|
||||
s *= (1 + this.bonuses.getFloatPercentAll(ModType.StaminaFull, SourceType.None, null));
|
||||
h *= (1 + this.bonuses.getFloatPercentAll(ModType.HealthFull, SourceType.None));
|
||||
m *= (1 + this.bonuses.getFloatPercentAll(ModType.ManaFull, SourceType.None));
|
||||
s *= (1 + this.bonuses.getFloatPercentAll(ModType.StaminaFull, SourceType.None));
|
||||
}
|
||||
|
||||
// Set max health, mana and stamina
|
||||
@@ -1853,9 +1853,9 @@ public class Mob extends AbstractIntelligenceAgent {
|
||||
int max = (int)this.mobBase.getDamageMax();
|
||||
int atr = this.mobBase.getAtr();
|
||||
if(this.bonuses != null){
|
||||
min *= 1 + this.bonuses.getFloatPercentAll(ModType.MeleeDamageModifier, SourceType.None, null);
|
||||
max *= 1 + this.bonuses.getFloatPercentAll(ModType.MeleeDamageModifier, SourceType.None, null);
|
||||
atr *= 1 + this.bonuses.getFloatPercentAll(ModType.OCV,SourceType.None, null);
|
||||
min *= 1 + this.bonuses.getFloatPercentAll(ModType.MeleeDamageModifier, SourceType.None);
|
||||
max *= 1 + this.bonuses.getFloatPercentAll(ModType.MeleeDamageModifier, SourceType.None);
|
||||
atr *= 1 + this.bonuses.getFloatPercentAll(ModType.OCV,SourceType.None);
|
||||
atr += this.bonuses.getFloat(ModType.OCV,SourceType.None);
|
||||
}
|
||||
this.minDamageHandOne = min;
|
||||
@@ -1873,9 +1873,9 @@ public class Mob extends AbstractIntelligenceAgent {
|
||||
int max = (int)this.mobBase.getDamageMax();
|
||||
int atr = this.mobBase.getAtr();
|
||||
if(this.bonuses != null){
|
||||
min *= 1 + this.bonuses.getFloatPercentAll(ModType.MeleeDamageModifier, SourceType.None, null);
|
||||
max *= 1 + this.bonuses.getFloatPercentAll(ModType.MeleeDamageModifier, SourceType.None, null);
|
||||
atr *= 1 + this.bonuses.getFloatPercentAll(ModType.OCV,SourceType.None, null);
|
||||
min *= 1 + this.bonuses.getFloatPercentAll(ModType.MeleeDamageModifier, SourceType.None);
|
||||
max *= 1 + this.bonuses.getFloatPercentAll(ModType.MeleeDamageModifier, SourceType.None);
|
||||
atr *= 1 + this.bonuses.getFloatPercentAll(ModType.OCV,SourceType.None);
|
||||
atr += this.bonuses.getFloat(ModType.OCV,SourceType.None);
|
||||
}
|
||||
this.minDamageHandTwo = min;
|
||||
|
||||
@@ -340,7 +340,7 @@ public class PlayerBonuses {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public float getFloatPercentAll(ModType modType, SourceType sourceType, PlayerCharacter pc) {
|
||||
public float getFloatPercentAll(ModType modType, SourceType sourceType) {
|
||||
float amount = 0;
|
||||
for (AbstractEffectModifier mod : this.bonusFloats.keySet()) {
|
||||
|
||||
@@ -357,15 +357,6 @@ public class PlayerBonuses {
|
||||
amount += this.bonusFloats.get(mod);
|
||||
}
|
||||
|
||||
if(pc != null) {
|
||||
if (modType.equals(ModType.PowerDamageModifier) || modType.equals(ModType.MeleeDamageModifier)) {
|
||||
if(pc.ZergMultiplier == 0.0f){
|
||||
amount = -1.0f;
|
||||
}else {
|
||||
amount -= 1.0f - pc.ZergMultiplier;
|
||||
}
|
||||
}
|
||||
}
|
||||
return amount;
|
||||
}
|
||||
|
||||
|
||||
@@ -3717,11 +3717,11 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
dexVal *= this.dexPenalty;
|
||||
|
||||
// modify percent amounts. DO THIS LAST!
|
||||
strVal *= (1 + this.bonuses.getFloatPercentAll(ModType.Attr, SourceType.Strength, null));
|
||||
dexVal *= (1 + this.bonuses.getFloatPercentAll(ModType.Attr, SourceType.Dexterity, null));
|
||||
conVal *= (1 + this.bonuses.getFloatPercentAll(ModType.Attr, SourceType.Constitution, null));
|
||||
intVal *= (1 + this.bonuses.getFloatPercentAll(ModType.Attr, SourceType.Intelligence, null));
|
||||
spiVal *= (1 + this.bonuses.getFloatPercentAll(ModType.Attr, SourceType.Spirit, null));
|
||||
strVal *= (1 + this.bonuses.getFloatPercentAll(ModType.Attr, SourceType.Strength));
|
||||
dexVal *= (1 + this.bonuses.getFloatPercentAll(ModType.Attr, SourceType.Dexterity));
|
||||
conVal *= (1 + this.bonuses.getFloatPercentAll(ModType.Attr, SourceType.Constitution));
|
||||
intVal *= (1 + this.bonuses.getFloatPercentAll(ModType.Attr, SourceType.Intelligence));
|
||||
spiVal *= (1 + this.bonuses.getFloatPercentAll(ModType.Attr, SourceType.Spirit));
|
||||
|
||||
} else
|
||||
// apply dex penalty for armor
|
||||
@@ -4182,7 +4182,7 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
this.rangeHandTwo = weapon.getItemBase().getRange() * (1 + (this.statStrBase / 600));
|
||||
|
||||
if (this.bonuses != null) {
|
||||
float range_bonus = 1 + this.bonuses.getFloatPercentAll(ModType.WeaponRange, SourceType.None, null);
|
||||
float range_bonus = 1 + this.bonuses.getFloatPercentAll(ModType.WeaponRange, SourceType.None);
|
||||
|
||||
if (mainHand)
|
||||
this.rangeHandOne *= range_bonus;
|
||||
@@ -4349,11 +4349,11 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
float percentMinDamage = 1;
|
||||
float percentMaxDamage = 1;
|
||||
|
||||
percentMinDamage += this.bonuses.getFloatPercentAll(ModType.MinDamage, SourceType.None, null);
|
||||
percentMinDamage += this.bonuses.getFloatPercentAll(ModType.MeleeDamageModifier, SourceType.None, null);
|
||||
percentMinDamage += this.bonuses.getFloatPercentAll(ModType.MinDamage, SourceType.None);
|
||||
percentMinDamage += this.bonuses.getFloatPercentAll(ModType.MeleeDamageModifier, SourceType.None);
|
||||
|
||||
percentMaxDamage += this.bonuses.getFloatPercentAll(ModType.MaxDamage, SourceType.None, null);
|
||||
percentMaxDamage += this.bonuses.getFloatPercentAll(ModType.MeleeDamageModifier, SourceType.None, null);
|
||||
percentMaxDamage += this.bonuses.getFloatPercentAll(ModType.MaxDamage, SourceType.None);
|
||||
percentMaxDamage += this.bonuses.getFloatPercentAll(ModType.MeleeDamageModifier, SourceType.None);
|
||||
|
||||
minDamage *= percentMinDamage;
|
||||
maxDamage *= percentMaxDamage;
|
||||
@@ -4673,9 +4673,9 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
m += this.bonuses.getFloat(ModType.ManaFull, SourceType.None);
|
||||
s += this.bonuses.getFloat(ModType.StaminaFull, SourceType.None);
|
||||
|
||||
h *= (1 + this.bonuses.getFloatPercentAll(ModType.HealthFull, SourceType.None, null));
|
||||
m *= (1 + this.bonuses.getFloatPercentAll(ModType.ManaFull, SourceType.None, null));
|
||||
s *= (1 + this.bonuses.getFloatPercentAll(ModType.StaminaFull, SourceType.None, null));
|
||||
h *= (1 + this.bonuses.getFloatPercentAll(ModType.HealthFull, SourceType.None));
|
||||
m *= (1 + this.bonuses.getFloatPercentAll(ModType.ManaFull, SourceType.None));
|
||||
s *= (1 + this.bonuses.getFloatPercentAll(ModType.StaminaFull, SourceType.None));
|
||||
|
||||
}
|
||||
|
||||
@@ -4757,7 +4757,7 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
divisr = 16;
|
||||
float blockChance = ((passiveSkill.getModifiedAmount() + blockBonusFromShield) / divisr);
|
||||
if(this.bonuses != null)
|
||||
blockChance *= 1 + this.bonuses.getFloatPercentAll(ModType.Block, SourceType.None, null);
|
||||
blockChance *= 1 + this.bonuses.getFloatPercentAll(ModType.Block, SourceType.None);
|
||||
return blockChance;
|
||||
case "Parry":
|
||||
if(!fromCombat)
|
||||
@@ -4781,7 +4781,7 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
float parryChance =((passiveSkill.getModifiedAmount() + parryBonus) / 4);
|
||||
|
||||
if(this.bonuses != null)
|
||||
parryChance *= 1 + this.bonuses.getFloatPercentAll(ModType.Parry, SourceType.None, null);
|
||||
parryChance *= 1 + this.bonuses.getFloatPercentAll(ModType.Parry, SourceType.None);
|
||||
|
||||
return parryChance;
|
||||
|
||||
@@ -4797,7 +4797,7 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
float dodgeChance = ((passiveSkill.getModifiedAmount()) / divisor);
|
||||
|
||||
if(this.bonuses != null)
|
||||
dodgeChance *= 1 + this.bonuses.getFloatPercentAll(ModType.Dodge, SourceType.None, null);
|
||||
dodgeChance *= 1 + this.bonuses.getFloatPercentAll(ModType.Dodge, SourceType.None);
|
||||
|
||||
return dodgeChance;
|
||||
default:
|
||||
|
||||
@@ -505,7 +505,7 @@ public class PlayerCombatStats {
|
||||
);
|
||||
if(this.owner.bonuses != null){
|
||||
minDMG += this.owner.bonuses.getFloat(Enum.ModType.MinDamage, Enum.SourceType.None);
|
||||
minDMG *= 1 + this.owner.bonuses.getFloatPercentAll(Enum.ModType.MeleeDamageModifier, Enum.SourceType.None, this.owner);
|
||||
minDMG *= 1 + this.owner.bonuses.getFloatPercentAll(Enum.ModType.MeleeDamageModifier, Enum.SourceType.None);
|
||||
}
|
||||
|
||||
if(this.owner.charItemManager != null){
|
||||
@@ -585,7 +585,7 @@ public class PlayerCombatStats {
|
||||
|
||||
if(this.owner.bonuses != null){
|
||||
maxDMG += this.owner.bonuses.getFloat(Enum.ModType.MaxDamage, Enum.SourceType.None);
|
||||
maxDMG *= 1 + this.owner.bonuses.getFloatPercentAll(Enum.ModType.MeleeDamageModifier, Enum.SourceType.None, this.owner);
|
||||
maxDMG *= 1 + this.owner.bonuses.getFloatPercentAll(Enum.ModType.MeleeDamageModifier, Enum.SourceType.None);
|
||||
}
|
||||
|
||||
if(this.owner.charItemManager != null){
|
||||
@@ -676,7 +676,7 @@ public class PlayerCombatStats {
|
||||
}
|
||||
}
|
||||
|
||||
float bonusValues = 1 + this.owner.bonuses.getFloatPercentAll(Enum.ModType.AttackDelay,Enum.SourceType.None, null);//1.0f;
|
||||
float bonusValues = 1 + this.owner.bonuses.getFloatPercentAll(Enum.ModType.AttackDelay,Enum.SourceType.None);//1.0f;
|
||||
bonusValues -= stanceValue + delayExtra; // take away stance modifier from alacrity bonus values
|
||||
speed *= 1 + stanceValue; // apply stance bonus
|
||||
speed *= bonusValues; // apply alacrity bonuses without stance mod
|
||||
@@ -712,7 +712,7 @@ public class PlayerCombatStats {
|
||||
range = weapon.getItemBase().getRange();
|
||||
}
|
||||
if(owner.bonuses != null){
|
||||
range *= 1 + this.owner.bonuses.getFloatPercentAll(Enum.ModType.WeaponRange, Enum.SourceType.None, null);
|
||||
range *= 1 + this.owner.bonuses.getFloatPercentAll(Enum.ModType.WeaponRange, Enum.SourceType.None);
|
||||
}
|
||||
if(mainHand){
|
||||
this.rangeHandOne = range;
|
||||
|
||||
@@ -131,7 +131,7 @@ public class Resists {
|
||||
PlayerBonuses bonus = target.getBonuses();
|
||||
|
||||
//see if there is a fortitude
|
||||
float damageCap = bonus.getFloatPercentAll(ModType.DamageCap, SourceType.None, null);
|
||||
float damageCap = bonus.getFloatPercentAll(ModType.DamageCap, SourceType.None);
|
||||
if (damageCap == 0f || type == DamageType.Healing)
|
||||
return damage;
|
||||
|
||||
@@ -152,7 +152,7 @@ public class Resists {
|
||||
if (forts == null || !isValidDamageCapType(forts, type, exclusive))
|
||||
return damage;
|
||||
|
||||
float adjustedDamage = bonus.getFloatPercentAll(ModType.AdjustAboveDmgCap, SourceType.None, null);
|
||||
float adjustedDamage = bonus.getFloatPercentAll(ModType.AdjustAboveDmgCap, SourceType.None);
|
||||
//Adjust damage down and return new amount
|
||||
float aadc = 1 + adjustedDamage;
|
||||
return capFire * aadc;
|
||||
|
||||
Reference in New Issue
Block a user