forked from MagicBane/Server
Uppercase enum.
This commit is contained in:
+30
-30
@@ -712,19 +712,19 @@ public class Mob extends AbstractIntelligenceAgent implements Delayed {
|
||||
// TODO modify for equipment
|
||||
if (this.bonuses != null) {
|
||||
// modify for effects
|
||||
strVal += this.bonuses.getFloat(ModType.Attr, SourceType.Strength);
|
||||
dexVal += this.bonuses.getFloat(ModType.Attr, SourceType.Dexterity);
|
||||
conVal += this.bonuses.getFloat(ModType.Attr, SourceType.Constitution);
|
||||
intVal += this.bonuses.getFloat(ModType.Attr, SourceType.Intelligence);
|
||||
spiVal += this.bonuses.getFloat(ModType.Attr, SourceType.Spirit);
|
||||
strVal += this.bonuses.getFloat(ModType.Attr, SourceType.STRENGTH);
|
||||
dexVal += this.bonuses.getFloat(ModType.Attr, SourceType.DEXTERITY);
|
||||
conVal += this.bonuses.getFloat(ModType.Attr, SourceType.CONSTITUTION);
|
||||
intVal += this.bonuses.getFloat(ModType.Attr, SourceType.INTELLIGENCE);
|
||||
spiVal += this.bonuses.getFloat(ModType.Attr, SourceType.SPIRIT);
|
||||
|
||||
// apply dex penalty for armor
|
||||
// modify percent amounts. DO THIS LAST!
|
||||
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));
|
||||
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));
|
||||
}
|
||||
|
||||
// Set current stats
|
||||
@@ -741,7 +741,7 @@ public class Mob extends AbstractIntelligenceAgent implements Delayed {
|
||||
float bonus = 1;
|
||||
if (this.bonuses != null)
|
||||
// get rune and effect bonuses
|
||||
bonus *= (1 + this.bonuses.getFloatPercentAll(ModType.Speed, SourceType.None));
|
||||
bonus *= (1 + this.bonuses.getFloatPercentAll(ModType.Speed, SourceType.NONE));
|
||||
|
||||
if (this.isPlayerGuard())
|
||||
switch (this.mobBase.getLoadID()) {
|
||||
@@ -838,7 +838,7 @@ public class Mob extends AbstractIntelligenceAgent implements Delayed {
|
||||
if (!this.isMoving())
|
||||
return;
|
||||
|
||||
if (this.isAlive() == false || this.getBonuses().getBool(ModType.Stunned, SourceType.None) || this.getBonuses().getBool(ModType.CannotMove, SourceType.None)) {
|
||||
if (this.isAlive() == false || this.getBonuses().getBool(ModType.Stunned, SourceType.NONE) || this.getBonuses().getBool(ModType.CannotMove, SourceType.NONE)) {
|
||||
//Target is stunned or rooted. Don't move
|
||||
|
||||
this.stopMovement(this.getMovementLoc());
|
||||
@@ -1079,15 +1079,15 @@ public class Mob extends AbstractIntelligenceAgent implements Delayed {
|
||||
// Apply any bonuses from runes and effects
|
||||
|
||||
if (this.bonuses != null) {
|
||||
h += this.bonuses.getFloat(ModType.HealthFull, SourceType.None);
|
||||
m += this.bonuses.getFloat(ModType.ManaFull, SourceType.None);
|
||||
s += this.bonuses.getFloat(ModType.StaminaFull, SourceType.None);
|
||||
h += this.bonuses.getFloat(ModType.HealthFull, SourceType.NONE);
|
||||
m += this.bonuses.getFloat(ModType.ManaFull, SourceType.NONE);
|
||||
s += this.bonuses.getFloat(ModType.StaminaFull, SourceType.NONE);
|
||||
|
||||
//apply effects percent modifiers. DO THIS LAST!
|
||||
|
||||
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));
|
||||
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
|
||||
@@ -1191,18 +1191,18 @@ public class Mob extends AbstractIntelligenceAgent implements Delayed {
|
||||
|
||||
// add any bonuses
|
||||
|
||||
defense += (short) this.bonuses.getFloat(ModType.DCV, SourceType.None);
|
||||
defense += (short) this.bonuses.getFloat(ModType.DCV, SourceType.NONE);
|
||||
|
||||
// Finally, multiply any percent modifiers. DO THIS LAST!
|
||||
|
||||
float pos_Bonus = 1 + this.bonuses.getFloatPercentPositive(ModType.DCV, SourceType.None);
|
||||
float pos_Bonus = 1 + this.bonuses.getFloatPercentPositive(ModType.DCV, SourceType.NONE);
|
||||
|
||||
|
||||
defense = (short) (defense * pos_Bonus);
|
||||
|
||||
//Lucky rune applies next
|
||||
|
||||
float neg_Bonus = this.bonuses.getFloatPercentNegative(ModType.DCV, SourceType.None);
|
||||
float neg_Bonus = this.bonuses.getFloatPercentNegative(ModType.DCV, SourceType.NONE);
|
||||
defense = (short) (defense * (1 + neg_Bonus));
|
||||
|
||||
|
||||
@@ -1397,16 +1397,16 @@ public class Mob extends AbstractIntelligenceAgent implements Delayed {
|
||||
// add in any bonuses to atr
|
||||
|
||||
if (this.bonuses != null) {
|
||||
atr += this.bonuses.getFloat(ModType.OCV, SourceType.None);
|
||||
atr += this.bonuses.getFloat(ModType.OCV, SourceType.NONE);
|
||||
|
||||
// Finally use any multipliers. DO THIS LAST!
|
||||
float pos_Bonus = 1 + this.bonuses.getFloatPercentPositive(ModType.OCV, SourceType.None);
|
||||
float pos_Bonus = 1 + this.bonuses.getFloatPercentPositive(ModType.OCV, SourceType.NONE);
|
||||
|
||||
atr *= pos_Bonus;
|
||||
|
||||
//and negative percent modifiers
|
||||
//TODO DO DEBUFFS AFTER?? wILL TEst when finished
|
||||
float neg_Bonus = this.bonuses.getFloatPercentNegative(ModType.OCV, SourceType.None);
|
||||
float neg_Bonus = this.bonuses.getFloatPercentNegative(ModType.OCV, SourceType.NONE);
|
||||
|
||||
atr *= (1 + neg_Bonus);
|
||||
}
|
||||
@@ -1427,8 +1427,8 @@ public class Mob extends AbstractIntelligenceAgent implements Delayed {
|
||||
else
|
||||
speed = 20f; //unarmed attack speed
|
||||
|
||||
if (this.bonuses != null && this.bonuses.getFloat(ModType.AttackDelay, SourceType.None) != 0f) //add effects speed bonus
|
||||
speed *= (1 + this.bonuses.getFloatPercentAll(ModType.AttackDelay, SourceType.None));
|
||||
if (this.bonuses != null && this.bonuses.getFloat(ModType.AttackDelay, SourceType.NONE) != 0f) //add effects speed bonus
|
||||
speed *= (1 + this.bonuses.getFloatPercentAll(ModType.AttackDelay, SourceType.NONE));
|
||||
|
||||
if (speed < 10)
|
||||
speed = 10;
|
||||
@@ -1460,12 +1460,12 @@ public class Mob extends AbstractIntelligenceAgent implements Delayed {
|
||||
|
||||
if (this.bonuses != null) {
|
||||
// Add any base bonuses
|
||||
minDamage += this.bonuses.getFloat(ModType.MinDamage, SourceType.None);
|
||||
maxDamage += this.bonuses.getFloat(ModType.MaxDamage, SourceType.None);
|
||||
minDamage += this.bonuses.getFloat(ModType.MinDamage, SourceType.NONE);
|
||||
maxDamage += this.bonuses.getFloat(ModType.MaxDamage, SourceType.NONE);
|
||||
|
||||
// Finally use any multipliers. DO THIS LAST!
|
||||
minDamage *= (1 + this.bonuses.getFloatPercentAll(ModType.MinDamage, SourceType.None));
|
||||
maxDamage *= (1 + this.bonuses.getFloatPercentAll(ModType.MaxDamage, SourceType.None));
|
||||
minDamage *= (1 + this.bonuses.getFloatPercentAll(ModType.MinDamage, SourceType.NONE));
|
||||
maxDamage *= (1 + this.bonuses.getFloatPercentAll(ModType.MaxDamage, SourceType.NONE));
|
||||
}
|
||||
|
||||
// set damages
|
||||
|
||||
Reference in New Issue
Block a user