ZergMultiplier scales correctly

This commit is contained in:
2025-02-21 20:10:10 -06:00
parent 2dbaac5bcf
commit 9b7bcdc043
15 changed files with 77 additions and 83 deletions
+8 -8
View File
@@ -505,8 +505,8 @@ public enum CombatManager {
if (weapon != null && weapon.getBonusPercent(ModType.WeaponSpeed, SourceType.None) != 0f) //add weapon speed bonus
wepSpeed *= (1 + weapon.getBonus(ModType.WeaponSpeed, SourceType.None));
if (abstractCharacter.getBonuses() != null && abstractCharacter.getBonuses().getFloatPercentAll(ModType.AttackDelay, SourceType.None, null) != 0f) //add effects speed bonus
wepSpeed *= (1 + abstractCharacter.getBonuses().getFloatPercentAll(ModType.AttackDelay, SourceType.None, null));
if (abstractCharacter.getBonuses() != null && abstractCharacter.getBonuses().getFloatPercentAll(ModType.AttackDelay, SourceType.None) != 0f) //add effects speed bonus
wepSpeed *= (1 + abstractCharacter.getBonuses().getFloatPercentAll(ModType.AttackDelay, SourceType.None));
if (wepSpeed < 10)
wepSpeed = 10; //Old was 10, but it can be reached lower with legit buffs,effects.
@@ -599,9 +599,9 @@ public enum CombatManager {
//Dont think we need to do this anymore.
if (tarIsRat)
if (ac.getBonuses().getFloatPercentAll(ModType.Slay, SourceType.Rat, null) != 0) { //strip away current % dmg buffs then add with rat %
if (ac.getBonuses().getFloatPercentAll(ModType.Slay, SourceType.Rat) != 0) { //strip away current % dmg buffs then add with rat %
float percent = 1 + ac.getBonuses().getFloatPercentAll(ModType.Slay, SourceType.Rat, null);
float percent = 1 + ac.getBonuses().getFloatPercentAll(ModType.Slay, SourceType.Rat);
minDamage *= percent;
maxDamage *= percent;
@@ -1130,9 +1130,9 @@ public enum CombatManager {
if (eff.getPower() != null && (eff.getPower().getToken() == 429506943 || eff.getPower().getToken() == 429408639 || eff.getPower().getToken() == 429513599 || eff.getPower().getToken() == 429415295))
swingAnimation = 0;
// if(source != null && source.getObjectType().equals(GameObjectType.PlayerCharacter)){
// damage *= ((PlayerCharacter)source).ZergMultiplier;
//} // Health modifications are modified by the ZergMechanic
if(source != null && source.getObjectType().equals(GameObjectType.PlayerCharacter)){
damage *= ((PlayerCharacter)source).ZergMultiplier;
} // Health modifications are modified by the ZergMechanic
TargetedActionMsg cmm = new TargetedActionMsg(source, target, damage, swingAnimation);
DispatchMessage.sendToAllInRange(target, cmm);
@@ -1295,7 +1295,7 @@ public enum CombatManager {
return 0f;
if (bonus != null)
rangeMod += bonus.getFloatPercentAll(ModType.WeaponRange, SourceType.None, null);
rangeMod += bonus.getFloatPercentAll(ModType.WeaponRange, SourceType.None);
return weapon.getRange() * rangeMod;
}
+1 -1
View File
@@ -564,7 +564,7 @@ public enum PowersManager {
cost = 0;
if (bonus != null)
cost *= (1 + bonus.getFloatPercentAll(ModType.PowerCost, SourceType.None, null));
cost *= (1 + bonus.getFloatPercentAll(ModType.PowerCost, SourceType.None));
if (playerCharacter.getAltitude() > 0)
cost *= 1.5f;