forked from MagicBane/Server
Uppercase enum.
This commit is contained in:
@@ -515,7 +515,7 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
|
||||
boolean canFly = false;
|
||||
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, SourceType.FLY) && bonus.getBool(ModType.Fly, SourceType.NONE) && flyer.isAlive())
|
||||
canFly = true;
|
||||
|
||||
return canFly;
|
||||
|
||||
@@ -141,7 +141,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));
|
||||
ret *= (1 + this.bonuses.getFloatPercentAll(ModType.ScanRange, SourceType.NONE));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -306,12 +306,12 @@ public class CharacterSkill extends AbstractGameObject {
|
||||
PlayerBonuses bonus = ac.getBonuses();
|
||||
if (bonus == null)
|
||||
return atr;
|
||||
atr += bonus.getFloat(ModType.OCV, SourceType.None);
|
||||
float pos_Bonus = bonus.getFloatPercentPositive(ModType.OCV, SourceType.None);
|
||||
atr += bonus.getFloat(ModType.OCV, SourceType.NONE);
|
||||
float pos_Bonus = bonus.getFloatPercentPositive(ModType.OCV, SourceType.NONE);
|
||||
atr *= (1 + pos_Bonus);
|
||||
//rUNES will already be applied
|
||||
// atr *= (1 + ((float)bonus.getShort("rune.Attack") / 100)); //precise
|
||||
float neg_Bonus = bonus.getFloatPercentNegative(ModType.OCV, SourceType.None);
|
||||
float neg_Bonus = bonus.getFloatPercentNegative(ModType.OCV, SourceType.NONE);
|
||||
atr *= (1 + neg_Bonus);
|
||||
return atr;
|
||||
}
|
||||
|
||||
+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
|
||||
|
||||
@@ -229,7 +229,7 @@ public class PlayerBonuses {
|
||||
|
||||
//Update seeInvis if needed
|
||||
|
||||
float seeInvis = this.getFloat(ModType.SeeInvisible, SourceType.None);
|
||||
float seeInvis = this.getFloat(ModType.SeeInvisible, SourceType.NONE);
|
||||
if (pc.getSeeInvis() < seeInvis)
|
||||
pc.setSeeInvis((short) seeInvis);
|
||||
|
||||
@@ -458,13 +458,13 @@ public class PlayerBonuses {
|
||||
float percentAmountNegative = this.getFloatPercentNegative(modType, sourceType);
|
||||
|
||||
if (amount != 0)
|
||||
ChatManager.chatSystemInfo(pc, modType.name() + "-" + (sourceType.equals(SourceType.None) == false ? sourceType.name() : "") + " = " + amount);
|
||||
ChatManager.chatSystemInfo(pc, modType.name() + "-" + (sourceType.equals(SourceType.NONE) == false ? sourceType.name() : "") + " = " + amount);
|
||||
|
||||
if (percentAmount != 0)
|
||||
ChatManager.chatSystemInfo(pc, "Percent : " + modType.name() + "-" + (sourceType.equals(SourceType.None) == false ? sourceType.name() : "") + " = " + percentAmount);
|
||||
ChatManager.chatSystemInfo(pc, "Percent : " + modType.name() + "-" + (sourceType.equals(SourceType.NONE) == false ? sourceType.name() : "") + " = " + percentAmount);
|
||||
|
||||
if (percentAmountNegative != 0)
|
||||
ChatManager.chatSystemInfo(pc, "Negative Percent : " + modType.name() + "-" + (sourceType.equals(SourceType.None) == false ? sourceType.name() : "") + " = " + percentAmountNegative);
|
||||
ChatManager.chatSystemInfo(pc, "Negative Percent : " + modType.name() + "-" + (sourceType.equals(SourceType.NONE) == false ? sourceType.name() : "") + " = " + percentAmountNegative);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3110,7 +3110,7 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
|
||||
if (this.bonuses != null)
|
||||
// get rune and effect bonuses
|
||||
bonus += this.bonuses.getFloatPercentNullZero(ModType.Speed, SourceType.None);
|
||||
bonus += this.bonuses.getFloatPercentNullZero(ModType.Speed, SourceType.NONE);
|
||||
|
||||
// TODO get equip bonus
|
||||
this.update();
|
||||
@@ -3614,8 +3614,8 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
//calculateModifiedStats();
|
||||
//update hide and seeInvis levels
|
||||
if (this.bonuses != null) {
|
||||
this.hidden = (int) bonuses.getFloat(ModType.Invisible, SourceType.None);
|
||||
this.seeInvis = (int) bonuses.getFloat(ModType.SeeInvisible, SourceType.None);
|
||||
this.hidden = (int) bonuses.getFloat(ModType.Invisible, SourceType.NONE);
|
||||
this.seeInvis = (int) bonuses.getFloat(ModType.SeeInvisible, SourceType.NONE);
|
||||
} else {
|
||||
this.hidden = (byte) 0;
|
||||
this.seeInvis = (byte) 0;
|
||||
@@ -3683,21 +3683,21 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
// TODO modify for equipment
|
||||
if (this.bonuses != null) {
|
||||
// modify for effects
|
||||
strVal += Math.round(this.bonuses.getFloat(ModType.Attr, SourceType.Strength));
|
||||
dexVal += Math.round(this.bonuses.getFloat(ModType.Attr, SourceType.Dexterity));
|
||||
conVal += Math.round(this.bonuses.getFloat(ModType.Attr, SourceType.Constitution));
|
||||
intVal += Math.round(this.bonuses.getFloat(ModType.Attr, SourceType.Intelligence));
|
||||
spiVal += Math.round(this.bonuses.getFloat(ModType.Attr, SourceType.Spirit));
|
||||
strVal += Math.round(this.bonuses.getFloat(ModType.Attr, SourceType.STRENGTH));
|
||||
dexVal += Math.round(this.bonuses.getFloat(ModType.Attr, SourceType.DEXTERITY));
|
||||
conVal += Math.round(this.bonuses.getFloat(ModType.Attr, SourceType.CONSTITUTION));
|
||||
intVal += Math.round(this.bonuses.getFloat(ModType.Attr, SourceType.INTELLIGENCE));
|
||||
spiVal += Math.round(this.bonuses.getFloat(ModType.Attr, SourceType.SPIRIT));
|
||||
|
||||
// apply dex penalty for armor
|
||||
dexVal *= this.dexPenalty;
|
||||
|
||||
// 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));
|
||||
|
||||
} else
|
||||
// apply dex penalty for armor
|
||||
@@ -3823,10 +3823,10 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
|
||||
if (this.bonuses != null) {
|
||||
// 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 = this.bonuses.getFloatPercentPositive(ModType.DCV, SourceType.None);
|
||||
float pos_Bonus = this.bonuses.getFloatPercentPositive(ModType.DCV, SourceType.NONE);
|
||||
defense = (short) (defense * (1 + pos_Bonus));
|
||||
|
||||
//Lucky rune applies next
|
||||
@@ -3835,7 +3835,7 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
|
||||
//and negative percent modifiers
|
||||
//already done...
|
||||
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));
|
||||
|
||||
} else
|
||||
@@ -3907,7 +3907,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);
|
||||
float range_bonus = 1 + this.bonuses.getFloatPercentAll(ModType.WeaponRange, SourceType.NONE);
|
||||
|
||||
if (mainHand)
|
||||
this.rangeHandOne *= range_bonus;
|
||||
@@ -3958,10 +3958,10 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
// add in any bonuses to atr
|
||||
if (this.bonuses != null) {
|
||||
// Add any base bonuses
|
||||
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;
|
||||
|
||||
// next precise
|
||||
@@ -3969,7 +3969,7 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
// atr *= (1 + ((float) this.bonuses.getShort("rune.Attack") / 100));
|
||||
|
||||
//and negative percent modifiers
|
||||
float neg_Bonus = this.bonuses.getFloatPercentNegative(ModType.OCV, SourceType.None);
|
||||
float neg_Bonus = this.bonuses.getFloatPercentNegative(ModType.OCV, SourceType.NONE);
|
||||
|
||||
atr *= (1 + neg_Bonus);
|
||||
}
|
||||
@@ -3989,8 +3989,8 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
else
|
||||
speed = 20f; //unarmed attack speed
|
||||
if (weapon != null)
|
||||
speed *= (1 + this.bonuses.getFloatPercentAll(ModType.WeaponSpeed, SourceType.None));
|
||||
speed *= (1 + this.bonuses.getFloatPercentAll(ModType.AttackDelay, SourceType.None));
|
||||
speed *= (1 + this.bonuses.getFloatPercentAll(ModType.WeaponSpeed, SourceType.NONE));
|
||||
speed *= (1 + this.bonuses.getFloatPercentAll(ModType.AttackDelay, SourceType.NONE));
|
||||
if (speed < 10)
|
||||
speed = 10;
|
||||
|
||||
@@ -3998,21 +3998,21 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
if (weapon != null) {
|
||||
// Add any base bonuses
|
||||
|
||||
min += weapon.getBonus(ModType.MinDamage, SourceType.None);
|
||||
max += weapon.getBonus(ModType.MaxDamage, SourceType.None);
|
||||
min += weapon.getBonus(ModType.MinDamage, SourceType.NONE);
|
||||
max += weapon.getBonus(ModType.MaxDamage, SourceType.NONE);
|
||||
|
||||
min += weapon.getBonus(ModType.MeleeDamageModifier, SourceType.None);
|
||||
max += weapon.getBonus(ModType.MeleeDamageModifier, SourceType.None);
|
||||
min += weapon.getBonus(ModType.MeleeDamageModifier, SourceType.NONE);
|
||||
max += weapon.getBonus(ModType.MeleeDamageModifier, SourceType.NONE);
|
||||
// Finally use any multipliers. DO THIS LAST!
|
||||
|
||||
float percentMinDamage = 1;
|
||||
float percentMaxDamage = 1;
|
||||
|
||||
percentMinDamage += weapon.getBonusPercent(ModType.MinDamage, SourceType.None);
|
||||
percentMinDamage += weapon.getBonusPercent(ModType.MeleeDamageModifier, SourceType.None);
|
||||
percentMinDamage += weapon.getBonusPercent(ModType.MinDamage, SourceType.NONE);
|
||||
percentMinDamage += weapon.getBonusPercent(ModType.MeleeDamageModifier, SourceType.NONE);
|
||||
|
||||
percentMaxDamage += weapon.getBonusPercent(ModType.MaxDamage, SourceType.None);
|
||||
percentMaxDamage += weapon.getBonusPercent(ModType.MeleeDamageModifier, SourceType.None);
|
||||
percentMaxDamage += weapon.getBonusPercent(ModType.MaxDamage, SourceType.NONE);
|
||||
percentMaxDamage += weapon.getBonusPercent(ModType.MeleeDamageModifier, SourceType.NONE);
|
||||
|
||||
|
||||
min *= percentMinDamage;
|
||||
@@ -4047,21 +4047,21 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
// add in any bonuses to damage
|
||||
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);
|
||||
|
||||
minDamage += this.bonuses.getFloat(ModType.MeleeDamageModifier, SourceType.None);
|
||||
maxDamage += this.bonuses.getFloat(ModType.MeleeDamageModifier, SourceType.None);
|
||||
minDamage += this.bonuses.getFloat(ModType.MeleeDamageModifier, SourceType.NONE);
|
||||
maxDamage += this.bonuses.getFloat(ModType.MeleeDamageModifier, SourceType.NONE);
|
||||
// Finally use any multipliers. DO THIS LAST!
|
||||
|
||||
float percentMinDamage = 1;
|
||||
float percentMaxDamage = 1;
|
||||
|
||||
percentMinDamage += this.bonuses.getFloatPercentAll(ModType.MinDamage, SourceType.None);
|
||||
percentMinDamage += this.bonuses.getFloatPercentAll(ModType.MeleeDamageModifier, SourceType.None);
|
||||
percentMinDamage += this.bonuses.getFloatPercentAll(ModType.MinDamage, SourceType.NONE);
|
||||
percentMinDamage += this.bonuses.getFloatPercentAll(ModType.MeleeDamageModifier, SourceType.NONE);
|
||||
|
||||
percentMaxDamage += this.bonuses.getFloatPercentAll(ModType.MaxDamage, SourceType.None);
|
||||
percentMaxDamage += this.bonuses.getFloatPercentAll(ModType.MeleeDamageModifier, SourceType.None);
|
||||
percentMaxDamage += this.bonuses.getFloatPercentAll(ModType.MaxDamage, SourceType.NONE);
|
||||
percentMaxDamage += this.bonuses.getFloatPercentAll(ModType.MeleeDamageModifier, SourceType.NONE);
|
||||
|
||||
minDamage *= percentMinDamage;
|
||||
maxDamage *= percentMaxDamage;
|
||||
@@ -4099,8 +4099,8 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
float def = ab.getDefense();
|
||||
//apply item defense bonuses
|
||||
if (shield != null) {
|
||||
def += shield.getBonus(ModType.DR, SourceType.None);
|
||||
def *= (1 + shield.getBonusPercent(ModType.DR, SourceType.None));
|
||||
def += shield.getBonus(ModType.DR, SourceType.NONE);
|
||||
def *= (1 + shield.getBonusPercent(ModType.DR, SourceType.NONE));
|
||||
|
||||
}
|
||||
|
||||
@@ -4121,24 +4121,24 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
wbOff = off.getItemBase();
|
||||
|
||||
//set block if block found
|
||||
this.bonuses.setBool(ModType.Block, SourceType.None, false);
|
||||
this.bonuses.setBool(ModType.Block, SourceType.NONE, false);
|
||||
if (this.baseClass != null && (this.baseClass.getObjectUUID() == 2500 || this.baseClass.getObjectUUID() == 2501))
|
||||
if (off != null && off.getItemBase() != null && off.getItemBase().isShield())
|
||||
this.bonuses.setBool(ModType.Block, SourceType.None, true);
|
||||
this.bonuses.setBool(ModType.Block, SourceType.NONE, true);
|
||||
|
||||
//set dodge if rogue
|
||||
if (this.baseClass != null && this.baseClass.getObjectUUID() == 2502)
|
||||
this.bonuses.setBool(ModType.Dodge, SourceType.None, true);
|
||||
this.bonuses.setBool(ModType.Dodge, SourceType.NONE, true);
|
||||
else
|
||||
this.bonuses.setBool(ModType.Dodge, SourceType.None, false);
|
||||
this.bonuses.setBool(ModType.Dodge, SourceType.NONE, false);
|
||||
|
||||
//set parry if fighter or thief and no invalid weapon found
|
||||
this.bonuses.setBool(ModType.Parry, SourceType.None, false);
|
||||
this.bonuses.setBool(ModType.Parry, SourceType.NONE, false);
|
||||
if ((this.baseClass != null && this.baseClass.getObjectUUID() == 2500)
|
||||
|| (this.promotionClass != null && this.promotionClass.getObjectUUID() == 2520))
|
||||
if (wbMain == null || wbMain.getRange() < MBServerStatics.RANGED_WEAPON_RANGE)
|
||||
if (wbOff == null || wbOff.getRange() < MBServerStatics.RANGED_WEAPON_RANGE)
|
||||
this.bonuses.setBool(ModType.Parry, SourceType.None, true);
|
||||
this.bonuses.setBool(ModType.Parry, SourceType.NONE, true);
|
||||
|
||||
}
|
||||
|
||||
@@ -4171,8 +4171,8 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
float def = ib.getDefense();
|
||||
//apply item defense bonuses
|
||||
if (armor != null) {
|
||||
def += armor.getBonus(ModType.DR, SourceType.None);
|
||||
def *= (1 + armor.getBonusPercent(ModType.DR, SourceType.None));
|
||||
def += armor.getBonus(ModType.DR, SourceType.NONE);
|
||||
def *= (1 + armor.getBonusPercent(ModType.DR, SourceType.NONE));
|
||||
}
|
||||
|
||||
|
||||
@@ -4354,13 +4354,13 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
|
||||
|
||||
//apply effects
|
||||
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);
|
||||
|
||||
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));
|
||||
|
||||
}
|
||||
|
||||
@@ -4395,11 +4395,11 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
ModType modType = ModType.GetModType(type);
|
||||
|
||||
// must be allowed to use this passive
|
||||
if (!this.bonuses.getBool(modType, SourceType.None))
|
||||
if (!this.bonuses.getBool(modType, SourceType.NONE))
|
||||
return 0f;
|
||||
|
||||
// must not be stunned
|
||||
if (this.bonuses.getBool(ModType.Stunned, SourceType.None))
|
||||
if (this.bonuses.getBool(ModType.Stunned, SourceType.NONE))
|
||||
return 0f;
|
||||
|
||||
// Get base skill amount
|
||||
@@ -4411,7 +4411,7 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
amount = sk.getModifiedAmount();
|
||||
|
||||
// Add bonuses
|
||||
amount += this.bonuses.getFloat(modType, SourceType.None);
|
||||
amount += this.bonuses.getFloat(modType, SourceType.NONE);
|
||||
|
||||
// Add item bonuses and return
|
||||
if (type.equals(ModType.Dodge) && !fromCombat)
|
||||
@@ -4429,7 +4429,7 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
return 0f;
|
||||
|
||||
// must not be stunned
|
||||
if (this.bonuses.getBool(ModType.Stunned, SourceType.None))
|
||||
if (this.bonuses.getBool(ModType.Stunned, SourceType.NONE))
|
||||
return 0f;
|
||||
|
||||
// Get base skill amount
|
||||
@@ -4444,7 +4444,7 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
amount += this.bonuses.getFloat(modType, sourceType);
|
||||
|
||||
// Add item bonuses and return
|
||||
if (sourceType.equals(SourceType.Dodge) && !fromCombat)
|
||||
if (sourceType.equals(SourceType.DODGE) && !fromCombat)
|
||||
return ((amount / 4) - attackerLevel + this.getLevel()) / 4;
|
||||
else
|
||||
return (amount - attackerLevel + this.getLevel()) / 4;
|
||||
@@ -4913,7 +4913,7 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
|
||||
Vector3fImmutable newLoc = this.getMovementLoc();
|
||||
|
||||
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(newLoc);
|
||||
return;
|
||||
|
||||
+106
-139
@@ -84,19 +84,19 @@ public class Resists {
|
||||
*/
|
||||
public Resists(ResultSet rs) throws SQLException {
|
||||
this.immuneToAll = false;
|
||||
this.resists.put(SourceType.Slashing, rs.getFloat("slash"));
|
||||
this.resists.put(SourceType.Crushing, rs.getFloat("crush"));
|
||||
this.resists.put(SourceType.Piercing, rs.getFloat("pierce"));
|
||||
this.resists.put(SourceType.Magic, rs.getFloat("magic"));
|
||||
this.resists.put(SourceType.Bleeding, rs.getFloat("bleed"));
|
||||
this.resists.put(SourceType.Poison, rs.getFloat("poison"));
|
||||
this.resists.put(SourceType.Mental, rs.getFloat("mental"));
|
||||
this.resists.put(SourceType.Holy, rs.getFloat("holy"));
|
||||
this.resists.put(SourceType.Unholy, rs.getFloat("unholy"));
|
||||
this.resists.put(SourceType.Lightning, rs.getFloat("lightning"));
|
||||
this.resists.put(SourceType.Fire, rs.getFloat("fire"));
|
||||
this.resists.put(SourceType.Cold, rs.getFloat("cold"));
|
||||
this.resists.put(SourceType.Healing, 0f);
|
||||
this.resists.put(SourceType.SLASHING, rs.getFloat("slash"));
|
||||
this.resists.put(SourceType.CRUSHING, rs.getFloat("crush"));
|
||||
this.resists.put(SourceType.PIERCING, rs.getFloat("pierce"));
|
||||
this.resists.put(SourceType.MAGIC, rs.getFloat("magic"));
|
||||
this.resists.put(SourceType.BLEEDING, rs.getFloat("bleed"));
|
||||
this.resists.put(SourceType.POISON, rs.getFloat("poison"));
|
||||
this.resists.put(SourceType.MENTAL, rs.getFloat("mental"));
|
||||
this.resists.put(SourceType.HOLY, rs.getFloat("holy"));
|
||||
this.resists.put(SourceType.UNHOLY, rs.getFloat("unholy"));
|
||||
this.resists.put(SourceType.LIGHTNING, rs.getFloat("lightning"));
|
||||
this.resists.put(SourceType.FIRE, rs.getFloat("fire"));
|
||||
this.resists.put(SourceType.COLD, rs.getFloat("cold"));
|
||||
this.resists.put(SourceType.HEALING, 0f);
|
||||
}
|
||||
|
||||
//Handle Fortitudes
|
||||
@@ -106,8 +106,8 @@ public class Resists {
|
||||
PlayerBonuses bonus = target.getBonuses();
|
||||
|
||||
//see if there is a fortitude
|
||||
float damageCap = bonus.getFloatPercentAll(ModType.DamageCap, SourceType.None);
|
||||
if (damageCap == 0f || type == SourceType.Healing)
|
||||
float damageCap = bonus.getFloatPercentAll(ModType.DamageCap, SourceType.NONE);
|
||||
if (damageCap == 0f || type == SourceType.HEALING)
|
||||
return damage;
|
||||
|
||||
//is fortitude, Are we under the cap?
|
||||
@@ -127,7 +127,7 @@ public class Resists {
|
||||
if (forts == null || !isValidDamageCapType(forts, type, exclusive))
|
||||
return damage;
|
||||
|
||||
float adjustedDamage = bonus.getFloatPercentAll(ModType.AdjustAboveDmgCap, SourceType.None);
|
||||
float adjustedDamage = bonus.getFloatPercentAll(ModType.AdjustAboveDmgCap, SourceType.NONE);
|
||||
//Adjust damage down and return new amount
|
||||
float aadc = 1 + adjustedDamage;
|
||||
return capFire * aadc;
|
||||
@@ -138,7 +138,7 @@ public class Resists {
|
||||
for (SourceType fort : forts) {
|
||||
SourceType dt = SourceType.valueOf(fort.name());
|
||||
|
||||
if (dt == SourceType.None)
|
||||
if (dt == SourceType.NONE)
|
||||
continue;
|
||||
|
||||
if (dt == damageType) {
|
||||
@@ -194,19 +194,19 @@ public class Resists {
|
||||
*/
|
||||
public final void setBuildingResists() {
|
||||
this.immuneToAll = false;
|
||||
this.resists.put(SourceType.Slashing, 85f);
|
||||
this.resists.put(SourceType.Crushing, 85f);
|
||||
this.resists.put(SourceType.Siege, 0f);
|
||||
this.immuneTo.put(SourceType.Piercing, true);
|
||||
this.immuneTo.put(SourceType.Magic, true);
|
||||
this.immuneTo.put(SourceType.Bleeding, true);
|
||||
this.immuneTo.put(SourceType.Poison, true);
|
||||
this.immuneTo.put(SourceType.Mental, true);
|
||||
this.immuneTo.put(SourceType.Holy, true);
|
||||
this.immuneTo.put(SourceType.Unholy, true);
|
||||
this.immuneTo.put(SourceType.Lightning, true);
|
||||
this.immuneTo.put(SourceType.Fire, true);
|
||||
this.immuneTo.put(SourceType.Cold, true);
|
||||
this.resists.put(SourceType.SLASHING, 85f);
|
||||
this.resists.put(SourceType.CRUSHING, 85f);
|
||||
this.immuneTo.put(SourceType.PIERCING, true);
|
||||
this.immuneTo.put(SourceType.MAGIC, true);
|
||||
this.immuneTo.put(SourceType.BLEEDING, true);
|
||||
this.immuneTo.put(SourceType.POISON, true);
|
||||
this.immuneTo.put(SourceType.MENTAL, true);
|
||||
this.immuneTo.put(SourceType.HOLY, true);
|
||||
this.immuneTo.put(SourceType.UNHOLY, true);
|
||||
this.immuneTo.put(SourceType.LIGHTNING, true);
|
||||
this.immuneTo.put(SourceType.FIRE, true);
|
||||
this.immuneTo.put(SourceType.COLD, true);
|
||||
this.resists.put(SourceType.SIEGE, 0f);
|
||||
|
||||
}
|
||||
|
||||
@@ -215,19 +215,19 @@ public class Resists {
|
||||
*/
|
||||
public final void setMineResists() {
|
||||
this.immuneToAll = false;
|
||||
this.immuneTo.put(SourceType.Slashing, true);
|
||||
this.immuneTo.put(SourceType.Crushing, true);
|
||||
this.immuneTo.put(SourceType.Piercing, true);
|
||||
this.immuneTo.put(SourceType.Magic, true);
|
||||
this.immuneTo.put(SourceType.Bleeding, true);
|
||||
this.immuneTo.put(SourceType.Poison, true);
|
||||
this.immuneTo.put(SourceType.Mental, true);
|
||||
this.immuneTo.put(SourceType.Holy, true);
|
||||
this.immuneTo.put(SourceType.Unholy, true);
|
||||
this.immuneTo.put(SourceType.Lightning, true);
|
||||
this.immuneTo.put(SourceType.Fire, true);
|
||||
this.immuneTo.put(SourceType.Cold, true);
|
||||
this.resists.put(SourceType.Siege, 0f);
|
||||
this.immuneTo.put(SourceType.SLASHING, true);
|
||||
this.immuneTo.put(SourceType.CRUSHING, true);
|
||||
this.immuneTo.put(SourceType.PIERCING, true);
|
||||
this.immuneTo.put(SourceType.MAGIC, true);
|
||||
this.immuneTo.put(SourceType.BLEEDING, true);
|
||||
this.immuneTo.put(SourceType.POISON, true);
|
||||
this.immuneTo.put(SourceType.MENTAL, true);
|
||||
this.immuneTo.put(SourceType.HOLY, true);
|
||||
this.immuneTo.put(SourceType.UNHOLY, true);
|
||||
this.immuneTo.put(SourceType.LIGHTNING, true);
|
||||
this.immuneTo.put(SourceType.FIRE, true);
|
||||
this.immuneTo.put(SourceType.COLD, true);
|
||||
this.resists.put(SourceType.SIEGE, 0f);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -235,20 +235,20 @@ public class Resists {
|
||||
*/
|
||||
public final void setGenericResists() {
|
||||
this.immuneToAll = false;
|
||||
this.resists.put(SourceType.Slashing, 0f);
|
||||
this.resists.put(SourceType.Crushing, 0f);
|
||||
this.resists.put(SourceType.Piercing, 0f);
|
||||
this.resists.put(SourceType.Magic, 0f);
|
||||
this.resists.put(SourceType.Bleeding, 0f);
|
||||
this.resists.put(SourceType.Poison, 0f);
|
||||
this.resists.put(SourceType.Mental, 0f);
|
||||
this.resists.put(SourceType.Holy, 0f);
|
||||
this.resists.put(SourceType.Unholy, 0f);
|
||||
this.resists.put(SourceType.Lightning, 0f);
|
||||
this.resists.put(SourceType.Fire, 0f);
|
||||
this.resists.put(SourceType.Cold, 0f);
|
||||
this.resists.put(SourceType.Healing, 0f);
|
||||
this.immuneTo.put(SourceType.Siege, true);
|
||||
this.resists.put(SourceType.SLASHING, 0f);
|
||||
this.resists.put(SourceType.CRUSHING, 0f);
|
||||
this.resists.put(SourceType.PIERCING, 0f);
|
||||
this.resists.put(SourceType.MAGIC, 0f);
|
||||
this.resists.put(SourceType.BLEEDING, 0f);
|
||||
this.resists.put(SourceType.POISON, 0f);
|
||||
this.resists.put(SourceType.MENTAL, 0f);
|
||||
this.resists.put(SourceType.HOLY, 0f);
|
||||
this.resists.put(SourceType.UNHOLY, 0f);
|
||||
this.resists.put(SourceType.LIGHTNING, 0f);
|
||||
this.resists.put(SourceType.FIRE, 0f);
|
||||
this.resists.put(SourceType.COLD, 0f);
|
||||
this.resists.put(SourceType.HEALING, 0f);
|
||||
this.immuneTo.put(SourceType.SIEGE, true);
|
||||
|
||||
}
|
||||
|
||||
@@ -292,10 +292,9 @@ public class Resists {
|
||||
}
|
||||
|
||||
public boolean immuneToAttacks() {
|
||||
return immuneTo(SourceType.ImmuneToAttack);
|
||||
return immuneTo(SourceType.IMMUNETOATTACK);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set a resist
|
||||
*/
|
||||
@@ -303,37 +302,6 @@ public class Resists {
|
||||
this.resists.put(type, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* set immunities from mobbase
|
||||
*/
|
||||
public void setImmuneTo(int immune) {
|
||||
setImmuneTo(SourceType.Stun, ((immune & 1) != 0));
|
||||
setImmuneTo(SourceType.Powerblock, ((immune & 2) != 0));
|
||||
setImmuneTo(SourceType.Drain, ((immune & 4) != 0));
|
||||
setImmuneTo(SourceType.Snare, ((immune & 8) != 0));
|
||||
setImmuneTo(SourceType.Siege, ((immune & 16) != 0));
|
||||
setImmuneTo(SourceType.Slashing, ((immune & 32) != 0));
|
||||
setImmuneTo(SourceType.Crushing, ((immune & 64) != 0));
|
||||
setImmuneTo(SourceType.Piercing, ((immune & 128) != 0));
|
||||
setImmuneTo(SourceType.Magic, ((immune & 256) != 0));
|
||||
setImmuneTo(SourceType.Bleeding, ((immune & 512) != 0));
|
||||
setImmuneTo(SourceType.Poison, ((immune & 1024) != 0));
|
||||
setImmuneTo(SourceType.Mental, ((immune & 2048) != 0));
|
||||
setImmuneTo(SourceType.Holy, ((immune & 4096) != 0));
|
||||
setImmuneTo(SourceType.Unholy, ((immune & 8192) != 0));
|
||||
setImmuneTo(SourceType.Lightning, ((immune & 16384) != 0));
|
||||
setImmuneTo(SourceType.Fire, ((immune & 32768) != 0));
|
||||
setImmuneTo(SourceType.Cold, ((immune & 65536) != 0));
|
||||
setImmuneTo(SourceType.Steal, ((immune & 131072) != 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* set/unset immuneTo
|
||||
*/
|
||||
public void setImmuneTo(SourceType type, boolean value) {
|
||||
this.immuneTo.put(type, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* set immuneToAll
|
||||
*/
|
||||
@@ -357,7 +325,7 @@ public class Resists {
|
||||
//handle fortitudes
|
||||
damage = handleFortitude(target, type, damage);
|
||||
//calculate armor piercing
|
||||
float ap = source.getBonuses().getFloatPercentAll(ModType.ArmorPiercing, SourceType.None);
|
||||
float ap = source.getBonuses().getFloatPercentAll(ModType.ArmorPiercing, SourceType.NONE);
|
||||
float damageAfterResists = damage * (1 - (this.getResist(type, trains) * 0.01f) + ap);
|
||||
//check to see if any damage absorbers should cancel
|
||||
if (target != null) {
|
||||
@@ -390,41 +358,41 @@ public class Resists {
|
||||
|
||||
if (rb != null) {
|
||||
// Handle immunities
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.Stun))
|
||||
this.immuneTo.put(SourceType.Stun, true);
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.Blind))
|
||||
this.immuneTo.put(SourceType.Blind, true);
|
||||
if (rb.getBool(ModType.ImmuneToAttack, SourceType.None))
|
||||
this.immuneTo.put(SourceType.ImmuneToAttack, true);
|
||||
if (rb.getBool(ModType.ImmuneToPowers, SourceType.None))
|
||||
this.immuneTo.put(SourceType.ImmuneToPowers, true);
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.Powerblock))
|
||||
this.immuneTo.put(SourceType.Powerblock, true);
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.DeBuff))
|
||||
this.immuneTo.put(SourceType.DeBuff, true);
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.Fear))
|
||||
this.immuneTo.put(SourceType.Fear, true);
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.Charm))
|
||||
this.immuneTo.put(SourceType.Charm, true);
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.Root))
|
||||
this.immuneTo.put(SourceType.Root, true);
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.Snare))
|
||||
this.immuneTo.put(SourceType.Snare, true);
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.STUN))
|
||||
this.immuneTo.put(SourceType.STUN, true);
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.BLIND))
|
||||
this.immuneTo.put(SourceType.BLIND, true);
|
||||
if (rb.getBool(ModType.ImmuneToAttack, SourceType.NONE))
|
||||
this.immuneTo.put(SourceType.IMMUNETOATTACK, true);
|
||||
if (rb.getBool(ModType.ImmuneToPowers, SourceType.NONE))
|
||||
this.immuneTo.put(SourceType.IMMUNETOPOWERS, true);
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.POWERBLOCK))
|
||||
this.immuneTo.put(SourceType.POWERBLOCK, true);
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.DEBUFF))
|
||||
this.immuneTo.put(SourceType.DEBUFF, true);
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.FEAR))
|
||||
this.immuneTo.put(SourceType.FEAR, true);
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.CHARM))
|
||||
this.immuneTo.put(SourceType.CHARM, true);
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.ROOT))
|
||||
this.immuneTo.put(SourceType.ROOT, true);
|
||||
if (rb.getBool(ModType.ImmuneTo, SourceType.SNARE))
|
||||
this.immuneTo.put(SourceType.SNARE, true);
|
||||
|
||||
// Handle resists
|
||||
slash += rb.getFloat(ModType.Resistance, SourceType.Slashing);
|
||||
crush += rb.getFloat(ModType.Resistance, SourceType.Crushing);
|
||||
pierce += rb.getFloat(ModType.Resistance, SourceType.Piercing);
|
||||
magic += rb.getFloat(ModType.Resistance, SourceType.Magic);
|
||||
bleed += rb.getFloat(ModType.Resistance, SourceType.Bleeding);
|
||||
poison += rb.getFloat(ModType.Resistance, SourceType.Poison);
|
||||
mental += rb.getFloat(ModType.Resistance, SourceType.Mental);
|
||||
holy += rb.getFloat(ModType.Resistance, SourceType.Holy);
|
||||
unholy += rb.getFloat(ModType.Resistance, SourceType.Unholy);
|
||||
lightning += rb.getFloat(ModType.Resistance, SourceType.Lightning);
|
||||
fire += rb.getFloat(ModType.Resistance, SourceType.Fire);
|
||||
cold += rb.getFloat(ModType.Resistance, SourceType.Cold);
|
||||
healing += rb.getFloat(ModType.Resistance, SourceType.Healing); // DamageType.Healing.name());
|
||||
slash += rb.getFloat(ModType.Resistance, SourceType.SLASHING);
|
||||
crush += rb.getFloat(ModType.Resistance, SourceType.CRUSHING);
|
||||
pierce += rb.getFloat(ModType.Resistance, SourceType.PIERCING);
|
||||
magic += rb.getFloat(ModType.Resistance, SourceType.MAGIC);
|
||||
bleed += rb.getFloat(ModType.Resistance, SourceType.BLEEDING);
|
||||
poison += rb.getFloat(ModType.Resistance, SourceType.POISON);
|
||||
mental += rb.getFloat(ModType.Resistance, SourceType.MENTAL);
|
||||
holy += rb.getFloat(ModType.Resistance, SourceType.HOLY);
|
||||
unholy += rb.getFloat(ModType.Resistance, SourceType.UNHOLY);
|
||||
lightning += rb.getFloat(ModType.Resistance, SourceType.LIGHTNING);
|
||||
fire += rb.getFloat(ModType.Resistance, SourceType.FIRE);
|
||||
cold += rb.getFloat(ModType.Resistance, SourceType.COLD);
|
||||
healing += rb.getFloat(ModType.Resistance, SourceType.HEALING); // DamageType.Healing.name());
|
||||
|
||||
}
|
||||
|
||||
@@ -448,21 +416,20 @@ public class Resists {
|
||||
}
|
||||
}
|
||||
|
||||
this.resists.put(SourceType.Slashing, slash);
|
||||
this.resists.put(SourceType.Crushing, crush);
|
||||
this.resists.put(SourceType.Piercing, pierce);
|
||||
this.resists.put(SourceType.Magic, magic);
|
||||
this.resists.put(SourceType.Bleeding, bleed);
|
||||
this.resists.put(SourceType.Poison, poison);
|
||||
this.resists.put(SourceType.Mental, mental);
|
||||
this.resists.put(SourceType.Holy, holy);
|
||||
this.resists.put(SourceType.Unholy, unholy);
|
||||
this.resists.put(SourceType.Lightning, lightning);
|
||||
this.resists.put(SourceType.Fire, fire);
|
||||
this.resists.put(SourceType.Cold, cold);
|
||||
this.resists.put(SourceType.Healing, healing);
|
||||
|
||||
this.immuneTo.put(SourceType.Siege, true);
|
||||
this.resists.put(SourceType.SLASHING, slash);
|
||||
this.resists.put(SourceType.CRUSHING, crush);
|
||||
this.resists.put(SourceType.PIERCING, pierce);
|
||||
this.resists.put(SourceType.MAGIC, magic);
|
||||
this.resists.put(SourceType.BLEEDING, bleed);
|
||||
this.resists.put(SourceType.POISON, poison);
|
||||
this.resists.put(SourceType.MENTAL, mental);
|
||||
this.resists.put(SourceType.HOLY, holy);
|
||||
this.resists.put(SourceType.UNHOLY, unholy);
|
||||
this.resists.put(SourceType.LIGHTNING, lightning);
|
||||
this.resists.put(SourceType.FIRE, fire);
|
||||
this.resists.put(SourceType.COLD, cold);
|
||||
this.resists.put(SourceType.HEALING, healing);
|
||||
this.immuneTo.put(SourceType.SIEGE, true);
|
||||
|
||||
// debug printing of resists
|
||||
// printResists(pc);
|
||||
|
||||
Reference in New Issue
Block a user