forked from MagicBane/Server
Initial refactor of damagetype
This commit is contained in:
+18
-18
@@ -710,19 +710,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
|
||||
@@ -739,7 +739,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()) {
|
||||
@@ -836,7 +836,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());
|
||||
@@ -1072,15 +1072,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
|
||||
|
||||
Reference in New Issue
Block a user