|
|
@ -527,7 +527,7 @@ public abstract class AbstractCharacter extends AbstractWorldObject { |
|
|
|
boolean canFly = false; |
|
|
|
boolean canFly = false; |
|
|
|
PlayerBonuses bonus = flyer.getBonuses(); |
|
|
|
PlayerBonuses bonus = flyer.getBonuses(); |
|
|
|
|
|
|
|
|
|
|
|
if (bonus != null && !bonus.getBool(ModType.NoMod, SourceType.Fly) && bonus.getBool(ModType.Fly, SourceType.None) && flyer.isAlive()) |
|
|
|
if (bonus != null && !bonus.getBool(ModType.NoMod, EffectSourceType.Flight) && bonus.getBool(ModType.Fly, EffectSourceType.None) && flyer.isAlive()) |
|
|
|
canFly = true; |
|
|
|
canFly = true; |
|
|
|
|
|
|
|
|
|
|
|
return canFly; |
|
|
|
return canFly; |
|
|
@ -613,10 +613,10 @@ public abstract class AbstractCharacter extends AbstractWorldObject { |
|
|
|
|
|
|
|
|
|
|
|
if (abstractCharacter.bonuses != null) { |
|
|
|
if (abstractCharacter.bonuses != null) { |
|
|
|
// add any bonuses
|
|
|
|
// add any bonuses
|
|
|
|
defense += (short) abstractCharacter.bonuses.getFloat(ModType.DCV, SourceType.None); |
|
|
|
defense += (short) abstractCharacter.bonuses.getFloat(ModType.DCV, EffectSourceType.None); |
|
|
|
|
|
|
|
|
|
|
|
// Finally multiply any percent modifiers. DO THIS LAST!
|
|
|
|
// Finally multiply any percent modifiers. DO THIS LAST!
|
|
|
|
float pos_Bonus = abstractCharacter.bonuses.getFloatPercentPositive(ModType.DCV, SourceType.None); |
|
|
|
float pos_Bonus = abstractCharacter.bonuses.getFloatPercentPositive(ModType.DCV, EffectSourceType.None); |
|
|
|
defense = (short) (defense * (1 + pos_Bonus)); |
|
|
|
defense = (short) (defense * (1 + pos_Bonus)); |
|
|
|
|
|
|
|
|
|
|
|
//Lucky rune applies next
|
|
|
|
//Lucky rune applies next
|
|
|
@ -625,7 +625,7 @@ public abstract class AbstractCharacter extends AbstractWorldObject { |
|
|
|
|
|
|
|
|
|
|
|
//and negative percent modifiers
|
|
|
|
//and negative percent modifiers
|
|
|
|
//already done...
|
|
|
|
//already done...
|
|
|
|
float neg_Bonus = abstractCharacter.bonuses.getFloatPercentNegative(ModType.DCV, SourceType.None); |
|
|
|
float neg_Bonus = abstractCharacter.bonuses.getFloatPercentNegative(ModType.DCV, EffectSourceType.None); |
|
|
|
defense = (short) (defense * (1 + neg_Bonus)); |
|
|
|
defense = (short) (defense * (1 + neg_Bonus)); |
|
|
|
|
|
|
|
|
|
|
|
} else |
|
|
|
} else |
|
|
@ -728,7 +728,7 @@ public abstract class AbstractCharacter extends AbstractWorldObject { |
|
|
|
abstractCharacter.rangeHandTwo = weapon.template.item_weapon_max_range * (1 + (abstractCharacter.statStrBase / 600)); |
|
|
|
abstractCharacter.rangeHandTwo = weapon.template.item_weapon_max_range * (1 + (abstractCharacter.statStrBase / 600)); |
|
|
|
|
|
|
|
|
|
|
|
if (abstractCharacter.bonuses != null) { |
|
|
|
if (abstractCharacter.bonuses != null) { |
|
|
|
float range_bonus = 1 + abstractCharacter.bonuses.getFloatPercentAll(ModType.WeaponRange, SourceType.None); |
|
|
|
float range_bonus = 1 + abstractCharacter.bonuses.getFloatPercentAll(ModType.WeaponRange, EffectSourceType.None); |
|
|
|
|
|
|
|
|
|
|
|
if (mainHand) |
|
|
|
if (mainHand) |
|
|
|
abstractCharacter.rangeHandOne *= range_bonus; |
|
|
|
abstractCharacter.rangeHandOne *= range_bonus; |
|
|
@ -772,10 +772,10 @@ public abstract class AbstractCharacter extends AbstractWorldObject { |
|
|
|
// add in any bonuses to atr
|
|
|
|
// add in any bonuses to atr
|
|
|
|
if (abstractCharacter.bonuses != null) { |
|
|
|
if (abstractCharacter.bonuses != null) { |
|
|
|
// Add any base bonuses
|
|
|
|
// Add any base bonuses
|
|
|
|
atr += abstractCharacter.bonuses.getFloat(ModType.OCV, SourceType.None); |
|
|
|
atr += abstractCharacter.bonuses.getFloat(ModType.OCV, EffectSourceType.None); |
|
|
|
|
|
|
|
|
|
|
|
// Finally use any multipliers. DO THIS LAST!
|
|
|
|
// Finally use any multipliers. DO THIS LAST!
|
|
|
|
float pos_Bonus = (1 + abstractCharacter.bonuses.getFloatPercentPositive(ModType.OCV, SourceType.None)); |
|
|
|
float pos_Bonus = (1 + abstractCharacter.bonuses.getFloatPercentPositive(ModType.OCV, EffectSourceType.None)); |
|
|
|
atr *= pos_Bonus; |
|
|
|
atr *= pos_Bonus; |
|
|
|
|
|
|
|
|
|
|
|
// next precise
|
|
|
|
// next precise
|
|
|
@ -783,7 +783,7 @@ public abstract class AbstractCharacter extends AbstractWorldObject { |
|
|
|
// atr *= (1 + ((float) this.bonuses.getShort("rune.Attack") / 100));
|
|
|
|
// atr *= (1 + ((float) this.bonuses.getShort("rune.Attack") / 100));
|
|
|
|
|
|
|
|
|
|
|
|
//and negative percent modifiers
|
|
|
|
//and negative percent modifiers
|
|
|
|
float neg_Bonus = abstractCharacter.bonuses.getFloatPercentNegative(ModType.OCV, SourceType.None); |
|
|
|
float neg_Bonus = abstractCharacter.bonuses.getFloatPercentNegative(ModType.OCV, EffectSourceType.None); |
|
|
|
|
|
|
|
|
|
|
|
atr *= (1 + neg_Bonus); |
|
|
|
atr *= (1 + neg_Bonus); |
|
|
|
} |
|
|
|
} |
|
|
@ -803,7 +803,7 @@ public abstract class AbstractCharacter extends AbstractWorldObject { |
|
|
|
else |
|
|
|
else |
|
|
|
speed = 20f; //unarmed attack speed
|
|
|
|
speed = 20f; //unarmed attack speed
|
|
|
|
if (weapon != null) |
|
|
|
if (weapon != null) |
|
|
|
speed *= (1 + abstractCharacter.bonuses.getFloatPercentAll(ModType.WeaponSpeed, SourceType.None)); |
|
|
|
speed *= (1 + abstractCharacter.bonuses.getFloatPercentAll(ModType.WeaponSpeed, EffectSourceType.None)); |
|
|
|
|
|
|
|
|
|
|
|
PlayerBonuses bonuses = abstractCharacter.bonuses; |
|
|
|
PlayerBonuses bonuses = abstractCharacter.bonuses; |
|
|
|
if (bonuses != null) { |
|
|
|
if (bonuses != null) { |
|
|
@ -823,7 +823,7 @@ public abstract class AbstractCharacter extends AbstractWorldObject { |
|
|
|
speed *= (1 + bonuses.bonusFloats.get(mod)); |
|
|
|
speed *= (1 + bonuses.bonusFloats.get(mod)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
//speed *= (1 + abstractCharacter.bonuses.getFloatPercentAll(ModType.AttackDelay, SourceType.None));
|
|
|
|
//speed *= (1 + abstractCharacter.bonuses.getFloatPercentAll(ModType.AttackDelay, EffectSourceType.None));
|
|
|
|
|
|
|
|
|
|
|
|
if (speed < 10) |
|
|
|
if (speed < 10) |
|
|
|
speed = 10; |
|
|
|
speed = 10; |
|
|
@ -832,22 +832,22 @@ public abstract class AbstractCharacter extends AbstractWorldObject { |
|
|
|
if (weapon != null) { |
|
|
|
if (weapon != null) { |
|
|
|
// Add any base bonuses
|
|
|
|
// Add any base bonuses
|
|
|
|
|
|
|
|
|
|
|
|
min += weapon.getBonus(ModType.MinDamage, SourceType.None); |
|
|
|
min += weapon.getBonus(ModType.MinDamage, EffectSourceType.None); |
|
|
|
max += weapon.getBonus(ModType.MaxDamage, SourceType.None); |
|
|
|
max += weapon.getBonus(ModType.MaxDamage, EffectSourceType.None); |
|
|
|
|
|
|
|
|
|
|
|
min += weapon.getBonus(ModType.MeleeDamageModifier, SourceType.None); |
|
|
|
min += weapon.getBonus(ModType.MeleeDamageModifier, EffectSourceType.None); |
|
|
|
max += weapon.getBonus(ModType.MeleeDamageModifier, SourceType.None); |
|
|
|
max += weapon.getBonus(ModType.MeleeDamageModifier, EffectSourceType.None); |
|
|
|
|
|
|
|
|
|
|
|
// Finally use any multipliers. DO THIS LAST!
|
|
|
|
// Finally use any multipliers. DO THIS LAST!
|
|
|
|
|
|
|
|
|
|
|
|
float percentMinDamage = 1; |
|
|
|
float percentMinDamage = 1; |
|
|
|
float percentMaxDamage = 1; |
|
|
|
float percentMaxDamage = 1; |
|
|
|
|
|
|
|
|
|
|
|
percentMinDamage += weapon.getBonusPercent(ModType.MinDamage, SourceType.None); |
|
|
|
percentMinDamage += weapon.getBonusPercent(ModType.MinDamage, EffectSourceType.None); |
|
|
|
percentMinDamage += weapon.getBonusPercent(ModType.MeleeDamageModifier, SourceType.None); |
|
|
|
percentMinDamage += weapon.getBonusPercent(ModType.MeleeDamageModifier, EffectSourceType.None); |
|
|
|
|
|
|
|
|
|
|
|
percentMaxDamage += weapon.getBonusPercent(ModType.MaxDamage, SourceType.None); |
|
|
|
percentMaxDamage += weapon.getBonusPercent(ModType.MaxDamage, EffectSourceType.None); |
|
|
|
percentMaxDamage += weapon.getBonusPercent(ModType.MeleeDamageModifier, SourceType.None); |
|
|
|
percentMaxDamage += weapon.getBonusPercent(ModType.MeleeDamageModifier, EffectSourceType.None); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
min *= percentMinDamage; |
|
|
|
min *= percentMinDamage; |
|
|
@ -884,21 +884,21 @@ public abstract class AbstractCharacter extends AbstractWorldObject { |
|
|
|
// add in any bonuses to damage
|
|
|
|
// add in any bonuses to damage
|
|
|
|
if (abstractCharacter.bonuses != null) { |
|
|
|
if (abstractCharacter.bonuses != null) { |
|
|
|
// Add any base bonuses
|
|
|
|
// Add any base bonuses
|
|
|
|
minDamage += abstractCharacter.bonuses.getFloat(ModType.MinDamage, SourceType.None); |
|
|
|
minDamage += abstractCharacter.bonuses.getFloat(ModType.MinDamage, EffectSourceType.None); |
|
|
|
maxDamage += abstractCharacter.bonuses.getFloat(ModType.MaxDamage, SourceType.None); |
|
|
|
maxDamage += abstractCharacter.bonuses.getFloat(ModType.MaxDamage, EffectSourceType.None); |
|
|
|
|
|
|
|
|
|
|
|
minDamage += abstractCharacter.bonuses.getFloat(ModType.MeleeDamageModifier, SourceType.None); |
|
|
|
minDamage += abstractCharacter.bonuses.getFloat(ModType.MeleeDamageModifier, EffectSourceType.None); |
|
|
|
maxDamage += abstractCharacter.bonuses.getFloat(ModType.MeleeDamageModifier, SourceType.None); |
|
|
|
maxDamage += abstractCharacter.bonuses.getFloat(ModType.MeleeDamageModifier, EffectSourceType.None); |
|
|
|
// Finally use any multipliers. DO THIS LAST!
|
|
|
|
// Finally use any multipliers. DO THIS LAST!
|
|
|
|
|
|
|
|
|
|
|
|
float percentMinDamage = 1; |
|
|
|
float percentMinDamage = 1; |
|
|
|
float percentMaxDamage = 1; |
|
|
|
float percentMaxDamage = 1; |
|
|
|
|
|
|
|
|
|
|
|
percentMinDamage += abstractCharacter.bonuses.getFloatPercentAll(ModType.MinDamage, SourceType.None); |
|
|
|
percentMinDamage += abstractCharacter.bonuses.getFloatPercentAll(ModType.MinDamage, EffectSourceType.None); |
|
|
|
percentMinDamage += abstractCharacter.bonuses.getFloatPercentAll(ModType.MeleeDamageModifier, SourceType.None); |
|
|
|
percentMinDamage += abstractCharacter.bonuses.getFloatPercentAll(ModType.MeleeDamageModifier, EffectSourceType.None); |
|
|
|
|
|
|
|
|
|
|
|
percentMaxDamage += abstractCharacter.bonuses.getFloatPercentAll(ModType.MaxDamage, SourceType.None); |
|
|
|
percentMaxDamage += abstractCharacter.bonuses.getFloatPercentAll(ModType.MaxDamage, EffectSourceType.None); |
|
|
|
percentMaxDamage += abstractCharacter.bonuses.getFloatPercentAll(ModType.MeleeDamageModifier, SourceType.None); |
|
|
|
percentMaxDamage += abstractCharacter.bonuses.getFloatPercentAll(ModType.MeleeDamageModifier, EffectSourceType.None); |
|
|
|
|
|
|
|
|
|
|
|
minDamage *= percentMinDamage; |
|
|
|
minDamage *= percentMinDamage; |
|
|
|
maxDamage *= percentMaxDamage; |
|
|
|
maxDamage *= percentMaxDamage; |
|
|
@ -947,8 +947,8 @@ public abstract class AbstractCharacter extends AbstractWorldObject { |
|
|
|
//apply item defense bonuses
|
|
|
|
//apply item defense bonuses
|
|
|
|
|
|
|
|
|
|
|
|
if (shield != null) { |
|
|
|
if (shield != null) { |
|
|
|
def += shield.getBonus(ModType.DR, SourceType.None); |
|
|
|
def += shield.getBonus(ModType.DR, EffectSourceType.None); |
|
|
|
def *= (1 + shield.getBonusPercent(ModType.DR, SourceType.None)); |
|
|
|
def *= (1 + shield.getBonusPercent(ModType.DR, EffectSourceType.None)); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -991,8 +991,8 @@ public abstract class AbstractCharacter extends AbstractWorldObject { |
|
|
|
//apply item defense bonuses
|
|
|
|
//apply item defense bonuses
|
|
|
|
|
|
|
|
|
|
|
|
if (armor != null) { |
|
|
|
if (armor != null) { |
|
|
|
def += armor.getBonus(ModType.DR, SourceType.None); |
|
|
|
def += armor.getBonus(ModType.DR, EffectSourceType.None); |
|
|
|
def *= (1 + armor.getBonusPercent(ModType.DR, SourceType.None)); |
|
|
|
def *= (1 + armor.getBonusPercent(ModType.DR, EffectSourceType.None)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return (def * (1 + ((int) armorSkill.getModifiedAmount() / 50f))); |
|
|
|
return (def * (1 + ((int) armorSkill.getModifiedAmount() / 50f))); |
|
|
|