Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e7c3ba5eba | |||
| ea86ab2300 | |||
| 501e8c937f | |||
| cae5c36d84 | |||
| 1b92fa76e1 | |||
| bbdb683061 | |||
| 2d04547c74 | |||
| 5192c801f7 | |||
| d966d50bd5 | |||
| 7e20db33f2 | |||
| 669ee7215b | |||
| 6fa00a43a4 | |||
| 4edf740179 | |||
| c7abb4c920 | |||
| df3964110a |
@@ -103,15 +103,19 @@ public class PrintStatsCmd extends AbstractDevCmd {
|
|||||||
main = getWeaponBase(1, equip);
|
main = getWeaponBase(1, equip);
|
||||||
ItemBase off = null;
|
ItemBase off = null;
|
||||||
|
|
||||||
if (equip != null)
|
if(equip != null){
|
||||||
getWeaponBase(2, equip);
|
if(equip.get(2) != null && !equip.get(2).getItemBase().isShield()){
|
||||||
if (main == null && off == null) {
|
//off hand weapon
|
||||||
out += "Main Hand: atr: " + tar.getAtrHandOne() + ", damage: " + tar.getMinDamageHandOne() + " to " + tar.getMaxDamageHandOne() + ", speed: " + tar.getSpeedHandOne() + ", range: 6" + newline;
|
out += "Attack Rating: " + tar.atrHandTwo + newline;
|
||||||
} else {
|
out += "Damage: " + tar.minDamageHandTwo + " - " + tar.maxDamageHandTwo + newline;
|
||||||
if (main != null)
|
out += "Range: " + tar.rangeHandTwo + newline;
|
||||||
out += "Main Hand: atr: " + tar.getAtrHandOne() + ", damage: " + tar.getMinDamageHandOne() + " to " + tar.getMaxDamageHandOne() + ", speed: " + tar.getSpeedHandOne() + ", range: " + main.getRange() + newline;
|
out += "Attack Speed: " + tar.speedHandTwo + newline;
|
||||||
if (off != null)
|
} else{
|
||||||
out += "Main Hand: atr: " + tar.getAtrHandTwo() + ", damage: " + tar.getMinDamageHandTwo() + " to " + tar.getMaxDamageHandTwo() + ", speed: " + tar.getSpeedHandTwo() + ", range: " + off.getRange() + newline;
|
out += "Attack Rating: " + tar.atrHandOne + newline;
|
||||||
|
out += "Damage: " + tar.minDamageHandOne + " - " + tar.maxDamageHandOne + newline;
|
||||||
|
out += "Range: " + tar.rangeHandOne + newline;
|
||||||
|
out += "Attack Speed: " + tar.speedHandOne + newline;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
out += "isAlive: " + tar.isAlive() + ", Combat: " + tar.isCombat() + newline;
|
out += "isAlive: " + tar.isAlive() + ", Combat: " + tar.isCombat() + newline;
|
||||||
|
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ public class aiInfoCmd extends AbstractDevCmd {
|
|||||||
|
|
||||||
if (mob.guardedCity != null)
|
if (mob.guardedCity != null)
|
||||||
output += "Patrolling: " + mob.guardedCity.getCityName() + newline;
|
output += "Patrolling: " + mob.guardedCity.getCityName() + newline;
|
||||||
|
output += "See Invis Level: " + mob.mobBase.getSeeInvis() + newline;
|
||||||
output += "Can Cast: " + MobAI.canCast(mob) + newline;
|
output += "Can Cast: " + MobAI.canCast(mob) + newline;
|
||||||
output += "Powers:" + newline;
|
output += "Powers:" + newline;
|
||||||
|
|
||||||
|
|||||||
@@ -518,7 +518,7 @@ public enum CombatManager {
|
|||||||
/**
|
/**
|
||||||
* Attempt to attack target
|
* Attempt to attack target
|
||||||
*/
|
*/
|
||||||
private static void attack(AbstractCharacter ac, AbstractWorldObject target, Item weapon, ItemBase wb, boolean mainHand) {
|
private static void attack(AbstractCharacter attacker, AbstractWorldObject target, Item weapon, ItemBase wb, boolean mainHand) {
|
||||||
|
|
||||||
float atr;
|
float atr;
|
||||||
int minDamage, maxDamage;
|
int minDamage, maxDamage;
|
||||||
@@ -526,20 +526,20 @@ public enum CombatManager {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
if (ac == null)
|
if (attacker == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (target == null)
|
if (target == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (mainHand) {
|
if (mainHand) {
|
||||||
atr = ac.getAtrHandOne();
|
atr = attacker.getAtrHandOne();
|
||||||
minDamage = ac.getMinDamageHandOne();
|
minDamage = attacker.getMinDamageHandOne();
|
||||||
maxDamage = ac.getMaxDamageHandOne();
|
maxDamage = attacker.getMaxDamageHandOne();
|
||||||
} else {
|
} else {
|
||||||
atr = ac.getAtrHandTwo();
|
atr = attacker.getAtrHandTwo();
|
||||||
minDamage = ac.getMinDamageHandTwo();
|
minDamage = attacker.getMinDamageHandTwo();
|
||||||
maxDamage = ac.getMaxDamageHandTwo();
|
maxDamage = attacker.getMaxDamageHandTwo();
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean tarIsRat = false;
|
boolean tarIsRat = false;
|
||||||
@@ -558,9 +558,9 @@ public enum CombatManager {
|
|||||||
//Dont think we need to do this anymore.
|
//Dont think we need to do this anymore.
|
||||||
|
|
||||||
if (tarIsRat)
|
if (tarIsRat)
|
||||||
if (ac.getBonuses().getFloatPercentAll(ModType.Slay, SourceType.Rat) != 0) { //strip away current % dmg buffs then add with rat %
|
if (attacker.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);
|
float percent = 1 + attacker.getBonuses().getFloatPercentAll(ModType.Slay, SourceType.Rat);
|
||||||
|
|
||||||
minDamage *= percent;
|
minDamage *= percent;
|
||||||
maxDamage *= percent;
|
maxDamage *= percent;
|
||||||
@@ -571,24 +571,24 @@ public enum CombatManager {
|
|||||||
//subtract stamina
|
//subtract stamina
|
||||||
|
|
||||||
if (wb == null)
|
if (wb == null)
|
||||||
ac.modifyStamina(-0.5f, ac, true);
|
attacker.modifyStamina(-0.5f, attacker, true);
|
||||||
else {
|
else {
|
||||||
float stam = wb.getWeight() / 3;
|
float stam = wb.getWeight() / 3;
|
||||||
stam = (stam < 1) ? 1 : stam;
|
stam = (stam < 1) ? 1 : stam;
|
||||||
ac.modifyStamina(-(stam), ac, true);
|
attacker.modifyStamina(-(stam), attacker, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
ac.cancelOnAttackSwing();
|
attacker.cancelOnAttackSwing();
|
||||||
|
|
||||||
errorTrack = 2;
|
errorTrack = 2;
|
||||||
|
|
||||||
//set last time this player has attacked something.
|
//set last time this player has attacked something.
|
||||||
|
|
||||||
if (target.getObjectType().equals(GameObjectType.PlayerCharacter) && target.getObjectUUID() != ac.getObjectUUID() && ac.getObjectType() == GameObjectType.PlayerCharacter) {
|
if (target.getObjectType().equals(GameObjectType.PlayerCharacter) && target.getObjectUUID() != attacker.getObjectUUID() && attacker.getObjectType() == GameObjectType.PlayerCharacter) {
|
||||||
ac.setTimeStamp("LastCombatPlayer", System.currentTimeMillis());
|
attacker.setTimeStamp("LastCombatPlayer", System.currentTimeMillis());
|
||||||
((PlayerCharacter) target).setTimeStamp("LastCombatPlayer", System.currentTimeMillis());
|
((PlayerCharacter) target).setTimeStamp("LastCombatPlayer", System.currentTimeMillis());
|
||||||
} else
|
} else
|
||||||
ac.setTimeStamp("LastCombatMob", System.currentTimeMillis());
|
attacker.setTimeStamp("LastCombatMob", System.currentTimeMillis());
|
||||||
|
|
||||||
errorTrack = 3;
|
errorTrack = 3;
|
||||||
|
|
||||||
@@ -599,42 +599,16 @@ public enum CombatManager {
|
|||||||
if (target.getObjectType().equals(GameObjectType.Building)) {
|
if (target.getObjectType().equals(GameObjectType.Building)) {
|
||||||
|
|
||||||
if (BuildingManager.getBuildingFromCache(target.getObjectUUID()) == null) {
|
if (BuildingManager.getBuildingFromCache(target.getObjectUUID()) == null) {
|
||||||
ac.setCombatTarget(null);
|
attacker.setCombatTarget(null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
defense = 0;
|
defense = 0;
|
||||||
|
|
||||||
Building building = (Building) target;
|
|
||||||
|
|
||||||
if (building.getParentZone() != null && building.getParentZone().isPlayerCity()) {
|
|
||||||
|
|
||||||
if (System.currentTimeMillis() > building.getTimeStamp("CallForHelp")) {
|
|
||||||
|
|
||||||
building.getTimestamps().put("CallForHelp", System.currentTimeMillis() + 15000);
|
|
||||||
|
|
||||||
for (Mob mob : building.getParentZone().zoneMobSet) {
|
|
||||||
if (!mob.isPlayerGuard())
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (mob.getCombatTarget() != null)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (mob.getGuild() != null && building.getGuild() != null)
|
|
||||||
if (!Guild.sameGuild(mob.getGuild().getNation(), building.getGuild().getNation()))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (mob.getLoc().distanceSquared2D(building.getLoc()) > sqr(300))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
mob.setCombatTarget(ac);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
AbstractCharacter tar = (AbstractCharacter) target;
|
AbstractCharacter tar = (AbstractCharacter) target;
|
||||||
defense = tar.getDefenseRating();
|
defense = tar.getDefenseRating();
|
||||||
handleRetaliate(tar, ac); //Handle target attacking back if in combat and has no other target
|
handleRetaliate(tar, attacker); //Handle target attacking back if in combat and has no other target
|
||||||
}
|
}
|
||||||
|
|
||||||
errorTrack = 4;
|
errorTrack = 4;
|
||||||
@@ -660,11 +634,11 @@ public enum CombatManager {
|
|||||||
|
|
||||||
if (roll < chance) {
|
if (roll < chance) {
|
||||||
|
|
||||||
if (ac.getObjectType().equals(GameObjectType.PlayerCharacter))
|
if (attacker.getObjectType().equals(GameObjectType.PlayerCharacter))
|
||||||
updateAttackTimers((PlayerCharacter) ac, target, true);
|
updateAttackTimers((PlayerCharacter) attacker, target, true);
|
||||||
|
|
||||||
boolean skipPassives = false;
|
boolean skipPassives = false;
|
||||||
PlayerBonuses bonuses = ac.getBonuses();
|
PlayerBonuses bonuses = attacker.getBonuses();
|
||||||
|
|
||||||
if (bonuses != null && bonuses.getBool(ModType.IgnorePassiveDefense, SourceType.None))
|
if (bonuses != null && bonuses.getBool(ModType.IgnorePassiveDefense, SourceType.None))
|
||||||
skipPassives = true;
|
skipPassives = true;
|
||||||
@@ -679,26 +653,26 @@ public enum CombatManager {
|
|||||||
// Apply Weapon power effect if any. don't try to apply twice if
|
// Apply Weapon power effect if any. don't try to apply twice if
|
||||||
// dual wielding. Perform after passive test for sync purposes.
|
// dual wielding. Perform after passive test for sync purposes.
|
||||||
|
|
||||||
if (ac.getObjectType().equals(GameObjectType.PlayerCharacter) && (mainHand || wb.isTwoHanded())) {
|
if (attacker.getObjectType().equals(GameObjectType.PlayerCharacter) && (mainHand || wb.isTwoHanded())) {
|
||||||
|
|
||||||
dpj = ((PlayerCharacter) ac).getWeaponPower();
|
dpj = ((PlayerCharacter) attacker).getWeaponPower();
|
||||||
|
|
||||||
if (dpj != null) {
|
if (dpj != null) {
|
||||||
|
|
||||||
PlayerBonuses bonus = ac.getBonuses();
|
PlayerBonuses bonus = attacker.getBonuses();
|
||||||
float attackRange = getWeaponRange(wb, bonus);
|
float attackRange = getWeaponRange(wb, bonus);
|
||||||
dpj.attack(target, attackRange);
|
dpj.attack(target, attackRange);
|
||||||
|
|
||||||
if (dpj.getPower() != null && (dpj.getPowerToken() == -1851459567 || dpj.getPowerToken() == -1851489518))
|
if (dpj.getPower() != null && (dpj.getPowerToken() == -1851459567 || dpj.getPowerToken() == -1851489518))
|
||||||
((PlayerCharacter) ac).setWeaponPower(dpj);
|
((PlayerCharacter) attacker).setWeaponPower(dpj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//check to apply second backstab.
|
//check to apply second backstab.
|
||||||
|
|
||||||
if (ac.getObjectType().equals(GameObjectType.PlayerCharacter) && !mainHand) {
|
if (attacker.getObjectType().equals(GameObjectType.PlayerCharacter) && !mainHand) {
|
||||||
|
|
||||||
dpj = ((PlayerCharacter) ac).getWeaponPower();
|
dpj = ((PlayerCharacter) attacker).getWeaponPower();
|
||||||
|
|
||||||
if (dpj != null && dpj.getPower() != null && (dpj.getPowerToken() == -1851459567 || dpj.getPowerToken() == -1851489518)) {
|
if (dpj != null && dpj.getPower() != null && (dpj.getPowerToken() == -1851459567 || dpj.getPowerToken() == -1851489518)) {
|
||||||
float attackRange = getWeaponRange(wb, bonuses);
|
float attackRange = getWeaponRange(wb, bonuses);
|
||||||
@@ -718,24 +692,24 @@ public enum CombatManager {
|
|||||||
|
|
||||||
//Handle Block passive
|
//Handle Block passive
|
||||||
|
|
||||||
if (testPassive(ac, tarAc, "Block") && canTestBlock(ac, target)) {
|
if (testPassive(attacker, tarAc, "Block") && canTestBlock(attacker, target)) {
|
||||||
|
|
||||||
if (!target.isAlive())
|
if (!target.isAlive())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
sendPassiveDefenseMessage(ac, wb, target, MBServerStatics.COMBAT_SEND_BLOCK, dpj, mainHand);
|
sendPassiveDefenseMessage(attacker, wb, target, MBServerStatics.COMBAT_SEND_BLOCK, dpj, mainHand);
|
||||||
passiveFired = true;
|
passiveFired = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Handle Parry passive
|
//Handle Parry passive
|
||||||
|
|
||||||
if (!passiveFired)
|
if (!passiveFired)
|
||||||
if (canTestParry(ac, target) && testPassive(ac, tarAc, "Parry")) {
|
if (canTestParry(attacker, target) && testPassive(attacker, tarAc, "Parry")) {
|
||||||
|
|
||||||
if (!target.isAlive())
|
if (!target.isAlive())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
sendPassiveDefenseMessage(ac, wb, target, MBServerStatics.COMBAT_SEND_PARRY, dpj, mainHand);
|
sendPassiveDefenseMessage(attacker, wb, target, MBServerStatics.COMBAT_SEND_PARRY, dpj, mainHand);
|
||||||
passiveFired = true;
|
passiveFired = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -746,12 +720,12 @@ public enum CombatManager {
|
|||||||
//Handle Dodge passive
|
//Handle Dodge passive
|
||||||
|
|
||||||
if (!passiveFired)
|
if (!passiveFired)
|
||||||
if (testPassive(ac, tarAc, "Dodge")) {
|
if (testPassive(attacker, tarAc, "Dodge")) {
|
||||||
|
|
||||||
if (!target.isAlive())
|
if (!target.isAlive())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
sendPassiveDefenseMessage(ac, wb, target, MBServerStatics.COMBAT_SEND_DODGE, dpj, mainHand);
|
sendPassiveDefenseMessage(attacker, wb, target, MBServerStatics.COMBAT_SEND_DODGE, dpj, mainHand);
|
||||||
passiveFired = true;
|
passiveFired = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -767,7 +741,7 @@ public enum CombatManager {
|
|||||||
//if target is player, set last attack timestamp
|
//if target is player, set last attack timestamp
|
||||||
|
|
||||||
if (target.getObjectType().equals(GameObjectType.PlayerCharacter))
|
if (target.getObjectType().equals(GameObjectType.PlayerCharacter))
|
||||||
updateAttackTimers((PlayerCharacter) target, ac, false);
|
updateAttackTimers((PlayerCharacter) target, attacker, false);
|
||||||
|
|
||||||
//Get damage Type
|
//Get damage Type
|
||||||
|
|
||||||
@@ -775,7 +749,7 @@ public enum CombatManager {
|
|||||||
|
|
||||||
if (wb != null)
|
if (wb != null)
|
||||||
damageType = wb.getDamageType();
|
damageType = wb.getDamageType();
|
||||||
else if (ac.getObjectType().equals(GameObjectType.Mob) && ((Mob) ac).isSiege())
|
else if (attacker.getObjectType().equals(GameObjectType.Mob) && ((Mob) attacker).isSiege())
|
||||||
damageType = DamageType.Siege;
|
damageType = DamageType.Siege;
|
||||||
else
|
else
|
||||||
damageType = DamageType.Crush;
|
damageType = DamageType.Crush;
|
||||||
@@ -794,7 +768,7 @@ public enum CombatManager {
|
|||||||
//make sure target is not immune to damage type;
|
//make sure target is not immune to damage type;
|
||||||
|
|
||||||
if (resists != null && resists.immuneTo(damageType)) {
|
if (resists != null && resists.immuneTo(damageType)) {
|
||||||
sendCombatMessage(ac, target, 0f, wb, dpj, mainHand);
|
sendCombatMessage(attacker, target, 0f, wb, dpj, mainHand);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -805,9 +779,9 @@ public enum CombatManager {
|
|||||||
float damage;
|
float damage;
|
||||||
|
|
||||||
if (wb != null)
|
if (wb != null)
|
||||||
damage = calculateDamage(ac, tarAc, minDamage, maxDamage, damageType, resists);
|
damage = calculateDamage(attacker, tarAc, minDamage, maxDamage, damageType, resists);
|
||||||
else
|
else
|
||||||
damage = calculateDamage(ac, tarAc, minDamage, maxDamage, damageType, resists);
|
damage = calculateDamage(attacker, tarAc, minDamage, maxDamage, damageType, resists);
|
||||||
|
|
||||||
float d = 0f;
|
float d = 0f;
|
||||||
|
|
||||||
@@ -821,34 +795,34 @@ public enum CombatManager {
|
|||||||
damage *= 2.5f; //increase damage if sitting
|
damage *= 2.5f; //increase damage if sitting
|
||||||
|
|
||||||
if (tarAc.getHealth() > 0)
|
if (tarAc.getHealth() > 0)
|
||||||
d = tarAc.modifyHealth(-damage, ac, false);
|
d = tarAc.modifyHealth(-damage, attacker, false);
|
||||||
|
|
||||||
} else if (target.getObjectType().equals(GameObjectType.Building)) {
|
} else if (target.getObjectType().equals(GameObjectType.Building)) {
|
||||||
|
|
||||||
if (BuildingManager.getBuildingFromCache(target.getObjectUUID()) == null) {
|
if (BuildingManager.getBuildingFromCache(target.getObjectUUID()) == null) {
|
||||||
ac.setCombatTarget(null);
|
attacker.setCombatTarget(null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (target.getHealth() > 0)
|
if (target.getHealth() > 0)
|
||||||
d = ((Building) target).modifyHealth(-damage, ac);
|
d = ((Building) target).modifyHealth(-damage, attacker);
|
||||||
}
|
}
|
||||||
|
|
||||||
errorTrack = 13;
|
errorTrack = 13;
|
||||||
|
|
||||||
//Test to see if any damage needs done to weapon or armor
|
//Test to see if any damage needs done to weapon or armor
|
||||||
|
|
||||||
testItemDamage(ac, target, weapon, wb);
|
testItemDamage(attacker, target, weapon, wb);
|
||||||
|
|
||||||
// if target is dead, we got the killing blow, remove attack timers on our weapons
|
// if target is dead, we got the killing blow, remove attack timers on our weapons
|
||||||
|
|
||||||
if (tarAc != null && !tarAc.isAlive())
|
if (tarAc != null && !tarAc.isAlive())
|
||||||
removeAttackTimers(ac);
|
removeAttackTimers(attacker);
|
||||||
|
|
||||||
//test double death fix
|
//test double death fix
|
||||||
|
|
||||||
if (d != 0)
|
if (d != 0)
|
||||||
sendCombatMessage(ac, target, damage, wb, dpj, mainHand); //send damage message
|
sendCombatMessage(attacker, target, damage, wb, dpj, mainHand); //send damage message
|
||||||
|
|
||||||
errorTrack = 14;
|
errorTrack = 14;
|
||||||
|
|
||||||
@@ -875,7 +849,7 @@ public enum CombatManager {
|
|||||||
int procChance = ThreadLocalRandom.current().nextInt(100);
|
int procChance = ThreadLocalRandom.current().nextInt(100);
|
||||||
|
|
||||||
if (procChance < MBServerStatics.PROC_CHANCE)
|
if (procChance < MBServerStatics.PROC_CHANCE)
|
||||||
((WeaponProcEffectModifier) aem).applyProc(ac, target);
|
((WeaponProcEffectModifier) aem).applyProc(attacker, target);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -887,52 +861,52 @@ public enum CombatManager {
|
|||||||
|
|
||||||
//handle damage shields
|
//handle damage shields
|
||||||
|
|
||||||
if (ac.isAlive() && tarAc != null && tarAc.isAlive())
|
if (attacker.isAlive() && tarAc != null && tarAc.isAlive())
|
||||||
handleDamageShields(ac, tarAc, damage);
|
handleDamageShields(attacker, tarAc, damage);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// Apply Weapon power effect if any.
|
// Apply Weapon power effect if any.
|
||||||
// don't try to apply twice if dual wielding.
|
// don't try to apply twice if dual wielding.
|
||||||
|
|
||||||
if (ac.getObjectType().equals(GameObjectType.PlayerCharacter) && (mainHand || wb.isTwoHanded())) {
|
if (attacker.getObjectType().equals(GameObjectType.PlayerCharacter) && (mainHand || wb.isTwoHanded())) {
|
||||||
dpj = ((PlayerCharacter) ac).getWeaponPower();
|
dpj = ((PlayerCharacter) attacker).getWeaponPower();
|
||||||
|
|
||||||
if (dpj != null) {
|
if (dpj != null) {
|
||||||
|
|
||||||
PowersBase wp = dpj.getPower();
|
PowersBase wp = dpj.getPower();
|
||||||
|
|
||||||
if (wp.requiresHitRoll() == false) {
|
if (wp.requiresHitRoll() == false) {
|
||||||
PlayerBonuses bonus = ac.getBonuses();
|
PlayerBonuses bonus = attacker.getBonuses();
|
||||||
float attackRange = getWeaponRange(wb, bonus);
|
float attackRange = getWeaponRange(wb, bonus);
|
||||||
dpj.attack(target, attackRange);
|
dpj.attack(target, attackRange);
|
||||||
} else
|
} else
|
||||||
((PlayerCharacter) ac).setWeaponPower(null);
|
((PlayerCharacter) attacker).setWeaponPower(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (target.getObjectType() == GameObjectType.Mob)
|
if (target.getObjectType() == GameObjectType.Mob)
|
||||||
((Mob) target).handleDirectAggro(ac);
|
((Mob) target).handleDirectAggro(attacker);
|
||||||
|
|
||||||
errorTrack = 17;
|
errorTrack = 17;
|
||||||
|
|
||||||
//miss, Send miss message
|
//miss, Send miss message
|
||||||
|
|
||||||
sendCombatMessage(ac, target, 0f, wb, dpj, mainHand);
|
sendCombatMessage(attacker, target, 0f, wb, dpj, mainHand);
|
||||||
|
|
||||||
//if attacker is player, set last attack timestamp
|
//if attacker is player, set last attack timestamp
|
||||||
|
|
||||||
if (ac.getObjectType().equals(GameObjectType.PlayerCharacter))
|
if (attacker.getObjectType().equals(GameObjectType.PlayerCharacter))
|
||||||
updateAttackTimers((PlayerCharacter) ac, target, true);
|
updateAttackTimers((PlayerCharacter) attacker, target, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
errorTrack = 18;
|
errorTrack = 18;
|
||||||
|
|
||||||
//cancel effects that break on attack or attackSwing
|
//cancel effects that break on attack or attackSwing
|
||||||
ac.cancelOnAttack();
|
attacker.cancelOnAttack();
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.error(ac.getName() + ' ' + errorTrack + ' ' + e);
|
Logger.error(attacker.getName() + ' ' + errorTrack + ' ' + e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,14 +5,17 @@ import engine.InterestManagement.WorldGrid;
|
|||||||
import engine.math.Quaternion;
|
import engine.math.Quaternion;
|
||||||
import engine.math.Vector3f;
|
import engine.math.Vector3f;
|
||||||
import engine.math.Vector3fImmutable;
|
import engine.math.Vector3fImmutable;
|
||||||
|
import engine.mobileAI.MobAI;
|
||||||
import engine.net.Dispatch;
|
import engine.net.Dispatch;
|
||||||
import engine.net.DispatchMessage;
|
import engine.net.DispatchMessage;
|
||||||
import engine.net.client.msg.PetMsg;
|
import engine.net.client.msg.PetMsg;
|
||||||
import engine.objects.*;
|
import engine.objects.*;
|
||||||
import engine.powers.EffectsBase;
|
import engine.powers.EffectsBase;
|
||||||
|
import engine.powers.PowersBase;
|
||||||
import engine.powers.RuneSkillAdjustEntry;
|
import engine.powers.RuneSkillAdjustEntry;
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
|
import javax.smartcardio.ATR;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.concurrent.ThreadLocalRandom;
|
import java.util.concurrent.ThreadLocalRandom;
|
||||||
@@ -225,33 +228,6 @@ public enum NPCManager {
|
|||||||
return buildingSlot;
|
return buildingSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getMaxMinions(Mob guardCaptain) {
|
|
||||||
|
|
||||||
int maxSlots;
|
|
||||||
|
|
||||||
switch (guardCaptain.getRank()) {
|
|
||||||
case 3:
|
|
||||||
maxSlots = 2;
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
case 5:
|
|
||||||
maxSlots = 3;
|
|
||||||
break;
|
|
||||||
case 6:
|
|
||||||
maxSlots = 4;
|
|
||||||
break;
|
|
||||||
case 7:
|
|
||||||
maxSlots = 5;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
case 2:
|
|
||||||
default:
|
|
||||||
maxSlots = 1;
|
|
||||||
|
|
||||||
}
|
|
||||||
return maxSlots;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void AssignPatrolPoints(Mob mob) {
|
public static void AssignPatrolPoints(Mob mob) {
|
||||||
mob.patrolPoints = new ArrayList<>();
|
mob.patrolPoints = new ArrayList<>();
|
||||||
|
|
||||||
@@ -274,6 +250,139 @@ public enum NPCManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void applyGuardStanceModifiers(Mob guard){
|
||||||
|
float damageModifier = 1;
|
||||||
|
float attackRatingModifier = 1;
|
||||||
|
float defenseModifier = 1;
|
||||||
|
float attackSpeedModifier = 1;
|
||||||
|
float powerDamageModifier = 1;
|
||||||
|
//handle stance modifiers for guard mob
|
||||||
|
if(guard.agentType.equals(Enum.AIAgentType.GUARDWALLARCHER)){
|
||||||
|
//apply rogue bonuses
|
||||||
|
attackRatingModifier += 0.5f;
|
||||||
|
defenseModifier += 0.5f;
|
||||||
|
damageModifier += 0.5f;
|
||||||
|
attackSpeedModifier -= 0.36f;
|
||||||
|
}else {
|
||||||
|
Integer contractID;
|
||||||
|
if (guard.agentType.equals(Enum.AIAgentType.GUARDMINION)) {
|
||||||
|
contractID = guard.guardCaptain.contract.getContractID();
|
||||||
|
} else{
|
||||||
|
contractID = guard.contract.getContractID();
|
||||||
|
}
|
||||||
|
if (Enum.MinionType.ContractToMinionMap.get(contractID) != null && Enum.MinionType.ContractToMinionMap.get(contractID).isMage()){
|
||||||
|
//apply mage offensive Stance
|
||||||
|
powerDamageModifier += 0.5f;
|
||||||
|
} else{
|
||||||
|
//apply fighter offensive stance
|
||||||
|
damageModifier += 0.5f;
|
||||||
|
attackSpeedModifier -= 0.36f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
guard.minDamageHandOne *= damageModifier;
|
||||||
|
guard.minDamageHandTwo *= damageModifier;
|
||||||
|
guard.maxDamageHandOne *= damageModifier;
|
||||||
|
guard.maxDamageHandTwo *= damageModifier;
|
||||||
|
guard.atrHandOne *= attackRatingModifier;
|
||||||
|
guard.atrHandTwo *= attackRatingModifier;
|
||||||
|
guard.defenseRating *= defenseModifier;
|
||||||
|
guard.speedHandOne *= attackSpeedModifier;
|
||||||
|
guard.speedHandTwo *= attackSpeedModifier;
|
||||||
|
|
||||||
|
//TODO figure out how to apply +50% powerdamage to mage guards
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setDamageAndSpeedForGuard(Mob guard){
|
||||||
|
|
||||||
|
float rankModifier = 1 + (guard.getRank() * 0.1f);
|
||||||
|
int primaryStat = 0;
|
||||||
|
if(guard.equip == null) {
|
||||||
|
guard.minDamageHandOne = (int)((guard.mobBase.getDamageMin()) * rankModifier);
|
||||||
|
guard.maxDamageHandOne = (int)((guard.mobBase.getDamageMax()) * rankModifier);
|
||||||
|
guard.speedHandOne = 30.0f;
|
||||||
|
}else{
|
||||||
|
if(guard.equip.containsKey(1)){
|
||||||
|
//has main hand weapon
|
||||||
|
ItemBase weapon = guard.equip.get(1).getItemBase();
|
||||||
|
if(weapon.isStrBased())
|
||||||
|
primaryStat = guard.getStatStrCurrent();
|
||||||
|
else
|
||||||
|
primaryStat = guard.getStatDexCurrent();
|
||||||
|
guard.minDamageHandOne = (int)((guard.mobBase.getDamageMin() + weapon.getMinDamage()) * rankModifier) + primaryStat;
|
||||||
|
guard.maxDamageHandOne = (int)((guard.mobBase.getDamageMax() + weapon.getMaxDamage()) * rankModifier) + primaryStat;
|
||||||
|
guard.speedHandOne = weapon.getSpeed();
|
||||||
|
guard.rangeHandOne = weapon.getRange();
|
||||||
|
} else if(guard.equip.containsKey(2) && !guard.equip.get(2).getItemBase().isShield()){
|
||||||
|
//has off hand weapon
|
||||||
|
ItemBase weapon = guard.equip.get(2).getItemBase();
|
||||||
|
if(weapon.isStrBased())
|
||||||
|
primaryStat = guard.getStatStrCurrent();
|
||||||
|
else
|
||||||
|
primaryStat = guard.getStatDexCurrent();
|
||||||
|
guard.minDamageHandTwo = (int)((guard.mobBase.getDamageMin() + weapon.getMinDamage()) * rankModifier) + primaryStat;
|
||||||
|
guard.maxDamageHandTwo = (int)((guard.mobBase.getDamageMax() + weapon.getMaxDamage()) * rankModifier) + primaryStat;
|
||||||
|
guard.speedHandTwo = weapon.getSpeed();
|
||||||
|
guard.rangeHandTwo = weapon.getRange();
|
||||||
|
} else {
|
||||||
|
primaryStat = guard.getStatStrCurrent();
|
||||||
|
guard.minDamageHandOne = (int)((guard.mobBase.getDamageMin()) * rankModifier) + primaryStat;
|
||||||
|
guard.maxDamageHandOne = (int)((guard.mobBase.getDamageMax()) * rankModifier) + primaryStat;
|
||||||
|
guard.speedHandOne = 30.0f;
|
||||||
|
guard.rangeHandOne = 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setDefenseForGuard(Mob guard){
|
||||||
|
int dexterity = guard.getStatDexCurrent();
|
||||||
|
if(dexterity < 1)
|
||||||
|
dexterity = 1;
|
||||||
|
int baseDef = guard.mobBase.getDefenseRating();
|
||||||
|
int armorDefense = 0;
|
||||||
|
for(MobEquipment equipped : guard.equip.values())
|
||||||
|
if(equipped.getItemBase().isArmor() || equipped.getItemBase().isShield())
|
||||||
|
armorDefense += equipped.getItemBase().getDefense();
|
||||||
|
guard.defenseRating = dexterity + baseDef + armorDefense;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setAttackRatingForGuard(Mob guard) {
|
||||||
|
int strength = guard.getStatStrCurrent();
|
||||||
|
int baseAtr = guard.mobBase.getAttackRating();
|
||||||
|
if (guard.equip.get(1) != null)
|
||||||
|
guard.atrHandOne = baseAtr + (int) ((strength * 0.5f) + (guard.equip.get(1).getItemBase().getPercentRequired() * 4) + (guard.equip.get(1).getItemBase().getPercentRequired() * 3));
|
||||||
|
else if (guard.equip.get(2) != null && !guard.equip.get(2).getItemBase().isShield())
|
||||||
|
guard.atrHandTwo = baseAtr + (int) ((strength * 0.5f) + (guard.equip.get(2).getItemBase().getPercentRequired() * 4) + (guard.equip.get(2).getItemBase().getPercentRequired() * 3));
|
||||||
|
else
|
||||||
|
guard.atrHandOne = baseAtr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setMaxHealthForGuard(Mob guard){
|
||||||
|
//values derived fom reading memory address for health on client when selecting player guards
|
||||||
|
switch(guard.getRank()){
|
||||||
|
default:
|
||||||
|
guard.healthMax = 750; //rank 1
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
guard.healthMax = 2082;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
guard.healthMax = 2740;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
guard.healthMax = 3414;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
guard.healthMax = 4080;
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
guard.healthMax = 4746;
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
guard.healthMax = 5412;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void applyMobbaseEffects(Mob mob) {
|
public static void applyMobbaseEffects(Mob mob) {
|
||||||
EffectsBase effectsBase;
|
EffectsBase effectsBase;
|
||||||
for (MobBaseEffects mbe : mob.mobBase.effectsList) {
|
for (MobBaseEffects mbe : mob.mobBase.effectsList) {
|
||||||
|
|||||||
@@ -456,7 +456,7 @@ public class MobAI {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int getGuardPowerRank(Mob mob) {
|
public static int getGuardPowerRank(Mob mob) {
|
||||||
int powerRank = 1;
|
int powerRank = 1;
|
||||||
|
|
||||||
switch (mob.getRank()) {
|
switch (mob.getRank()) {
|
||||||
@@ -578,14 +578,22 @@ public class MobAI {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//no players loaded, no need to proceed
|
//no players loaded, no need to proceed unless it's a player guard
|
||||||
|
boolean bypassLoadedPlayerCheck = false;
|
||||||
|
if(mob.isPlayerGuard() || mob.isSiege()) {
|
||||||
|
bypassLoadedPlayerCheck = true;
|
||||||
|
if(mob.combatTarget != null && mob.combatTarget.getObjectType().equals(Enum.GameObjectType.PlayerCharacter))
|
||||||
|
if(mob.combatTarget.loc.distanceSquared(mob.loc) > 10000)
|
||||||
|
mob.setCombatTarget(null);
|
||||||
|
}
|
||||||
|
|
||||||
if (mob.playerAgroMap.isEmpty()) {
|
if (mob.playerAgroMap.isEmpty() && !bypassLoadedPlayerCheck) {
|
||||||
if (mob.getCombatTarget() != null)
|
if (mob.getCombatTarget() != null)
|
||||||
mob.setCombatTarget(null);
|
mob.setCombatTarget(null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (mob.agentType.equals(Enum.AIAgentType.PET) == false)
|
if (mob.agentType.equals(Enum.AIAgentType.PET) == false)
|
||||||
CheckToSendMobHome(mob);
|
CheckToSendMobHome(mob);
|
||||||
|
|
||||||
@@ -1120,13 +1128,30 @@ public class MobAI {
|
|||||||
mob.setCombatTarget(loadedPlayer);
|
mob.setCombatTarget(loadedPlayer);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (mob.getCombatTarget() == null) {
|
||||||
|
|
||||||
|
//look for siege equipment to aggro if no players found to aggro
|
||||||
|
|
||||||
|
HashSet<AbstractWorldObject> awoList = WorldGrid.getObjectsInRangePartial(mob, MobAIThread.AI_BASE_AGGRO_RANGE, MBServerStatics.MASK_SIEGE);
|
||||||
|
|
||||||
|
for (AbstractWorldObject awoMob : awoList) {
|
||||||
|
|
||||||
|
|
||||||
|
Mob aggroMob = (Mob) awoMob;
|
||||||
|
if(GuardCanAggro(mob,aggroMob)) {
|
||||||
|
mob.setCombatTarget(aggroMob);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.info(mob.getObjectUUID() + " " + mob.getName() + " Failed At: CheckForPlayerGuardAggro" + e.getMessage());
|
Logger.info(mob.getObjectUUID() + " " + mob.getName() + " Failed At: CheckForPlayerGuardAggro" + e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Boolean GuardCanAggro(Mob mob, PlayerCharacter target) {
|
public static Boolean GuardCanAggro(Mob mob, AbstractCharacter target) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
|||||||
@@ -264,19 +264,9 @@ public class CombatUtilities {
|
|||||||
swingIsBlock(agent, target, passiveAnim);
|
swingIsBlock(agent, target, passiveAnim);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (agent.getEquip().get(1) != null && agent.getEquip().get(2) != null && agent.getEquip().get(2).getItemBase().isShield() == false) {
|
|
||||||
//mob is duel wielding and should conduct an attack for each hand
|
swingIsDamage(agent, target, determineDamage(agent), anim);
|
||||||
ItemBase weapon1 = agent.getEquip().get(1).getItemBase();
|
|
||||||
double range1 = getMaxDmg(weapon1.getMinDamage(), agent, weapon1) - getMinDmg(weapon1.getMinDamage(), agent, weapon1);
|
|
||||||
double damage1 = getMinDmg(weapon1.getMinDamage(), agent, weapon1) + ((ThreadLocalRandom.current().nextFloat() * range1) + (ThreadLocalRandom.current().nextFloat() * range1)) / 2;
|
|
||||||
swingIsDamage(agent, target, (float) damage1, CombatManager.getSwingAnimation(weapon1, null, true));
|
|
||||||
ItemBase weapon2 = agent.getEquip().get(2).getItemBase();
|
|
||||||
double range2 = getMaxDmg(weapon2.getMinDamage(), agent, weapon2) - getMinDmg(weapon2.getMinDamage(), agent, weapon2);
|
|
||||||
double damage2 = getMinDmg(weapon2.getMinDamage(), agent, weapon2) + ((ThreadLocalRandom.current().nextFloat() * range2) + (ThreadLocalRandom.current().nextFloat() * range2)) / 2;
|
|
||||||
swingIsDamage(agent, target, (float) damage2, CombatManager.getSwingAnimation(weapon1, null, false));
|
|
||||||
} else {
|
|
||||||
swingIsDamage(agent, target, determineDamage(agent), anim);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (agent.getWeaponPower() != null)
|
if (agent.getWeaponPower() != null)
|
||||||
agent.getWeaponPower().attack(target, MBServerStatics.ONE_MINUTE);
|
agent.getWeaponPower().attack(target, MBServerStatics.ONE_MINUTE);
|
||||||
@@ -319,19 +309,10 @@ public class CombatUtilities {
|
|||||||
if (target == null)
|
if (target == null)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
float damage = 0;
|
int damage = 0;
|
||||||
|
|
||||||
DamageType dt = getDamageType(agent);
|
DamageType dt = getDamageType(agent);
|
||||||
if ((agent.agentType.equals(AIAgentType.PET)) == true || agent.isPet() == true || agent.isNecroPet() == true) {
|
damage = ThreadLocalRandom.current().nextInt((int)getMinDmg(agent), (int)getMaxDmg(agent) + 1);
|
||||||
damage = calculatePetDamage(agent);
|
|
||||||
} else if (agent.isPlayerGuard() == true) {
|
|
||||||
//damage = calculateGuardDamage(agent);
|
|
||||||
damage = calculateMobDamage(agent);
|
|
||||||
} else if (agent.getLevel() > 80) {
|
|
||||||
damage = calculateEpicDamage(agent);
|
|
||||||
} else {
|
|
||||||
damage = calculateMobDamage(agent);
|
|
||||||
}
|
|
||||||
if (AbstractWorldObject.IsAbstractCharacter(target)) {
|
if (AbstractWorldObject.IsAbstractCharacter(target)) {
|
||||||
if (((AbstractCharacter) target).isSit()) {
|
if (((AbstractCharacter) target).isSit()) {
|
||||||
damage *= 2.5f; //increase damage if sitting
|
damage *= 2.5f; //increase damage if sitting
|
||||||
@@ -357,158 +338,16 @@ public class CombatUtilities {
|
|||||||
return dt;
|
return dt;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int calculatePetDamage(Mob agent) {
|
public static double getMinDmg(Mob agent) {
|
||||||
//damage calc for pet
|
if(agent.equip.get(2) != null && !agent.equip.get(2).getItemBase().isShield())
|
||||||
float range;
|
return agent.minDamageHandTwo;
|
||||||
float damage;
|
else return agent.minDamageHandOne;
|
||||||
float min = 40;
|
|
||||||
float max = 60;
|
|
||||||
float dmgMultiplier = 1 + agent.getBonuses().getFloatPercentAll(ModType.MeleeDamageModifier, SourceType.None);
|
|
||||||
double minDmg = getMinDmg(min, agent, null);
|
|
||||||
double maxDmg = getMaxDmg(max, agent, null);
|
|
||||||
dmgMultiplier += agent.getLevel() * 0.1f;
|
|
||||||
range = (float) (maxDmg - minDmg);
|
|
||||||
damage = min + ((ThreadLocalRandom.current().nextFloat() * range) + (ThreadLocalRandom.current().nextFloat() * range)) / 2;
|
|
||||||
return (int) (damage * dmgMultiplier);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int calculateGuardDamage(Mob agent) {
|
public static double getMaxDmg(Mob agent) {
|
||||||
//damage calc for guard
|
if(agent.equip.get(2) != null && !agent.equip.get(2).getItemBase().isShield())
|
||||||
ItemBase weapon = agent.getEquip().get(1).getItemBase();
|
return agent.maxDamageHandTwo;
|
||||||
AbstractWorldObject target = agent.getCombatTarget();
|
else return agent.maxDamageHandOne;
|
||||||
|
|
||||||
float dmgMultiplier = 1 + agent.getBonuses().getFloatPercentAll(ModType.MeleeDamageModifier, SourceType.None);
|
|
||||||
|
|
||||||
double minDmg = weapon.getMinDamage();
|
|
||||||
double maxDmg = weapon.getMaxDamage();
|
|
||||||
double min = getMinDmg(minDmg, agent, weapon);
|
|
||||||
double max = getMaxDmg(maxDmg, agent, weapon);
|
|
||||||
|
|
||||||
DamageType dt = weapon.getDamageType();
|
|
||||||
|
|
||||||
double range = max - min;
|
|
||||||
double damage = min + ((ThreadLocalRandom.current().nextFloat() * range) + (ThreadLocalRandom.current().nextFloat() * range)) / 2;
|
|
||||||
|
|
||||||
if (AbstractWorldObject.IsAbstractCharacter(target))
|
|
||||||
if (((AbstractCharacter) target).isSit())
|
|
||||||
damage *= 2.5f; //increase damage if sitting
|
|
||||||
if (AbstractWorldObject.IsAbstractCharacter(target))
|
|
||||||
return (int) (((AbstractCharacter) target).getResists().getResistedDamage(agent, (AbstractCharacter) target, dt, (float) damage, 0) * dmgMultiplier);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int calculateEpicDamage(Mob agent) {
|
|
||||||
//handle r8 mob damage
|
|
||||||
DamageType dt = DamageType.Crush;
|
|
||||||
AbstractWorldObject target = agent.getCombatTarget();
|
|
||||||
float dmgMultiplier = 1 + agent.getBonuses().getFloatPercentAll(ModType.MeleeDamageModifier, SourceType.None);
|
|
||||||
double min = agent.getMinDamageHandOne();
|
|
||||||
double max = agent.getMaxDamageHandOne();
|
|
||||||
if (agent.getEquip().get(1) != null) {
|
|
||||||
if (agent.getEquip().get(1).getItemBase() != null) {
|
|
||||||
dt = agent.getEquip().get(1).getItemBase().getDamageType();
|
|
||||||
min = agent.getMinDamageHandOne();
|
|
||||||
max = agent.getMaxDamageHandOne();
|
|
||||||
} else if (agent.getEquip().get(2).getItemBase() != null && agent.getEquip().get(2).getItemBase().isShield() == false) {
|
|
||||||
dt = agent.getEquip().get(2).getItemBase().getDamageType();
|
|
||||||
min = agent.getMinDamageHandTwo();
|
|
||||||
max = agent.getMaxDamageHandTwo();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
double range = max - min;
|
|
||||||
double damage = min + ((ThreadLocalRandom.current().nextFloat() * range) + (ThreadLocalRandom.current().nextFloat() * range)) / 2;
|
|
||||||
return (int) (((AbstractCharacter) target).getResists().getResistedDamage(agent, (AbstractCharacter) target, dt, (float) damage, 0) * dmgMultiplier);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int calculateMobDamage(Mob agent) {
|
|
||||||
ItemBase weapon = null;
|
|
||||||
double minDmg;
|
|
||||||
double maxDmg;
|
|
||||||
DamageType dt;
|
|
||||||
|
|
||||||
//main hand or offhand damage
|
|
||||||
|
|
||||||
if (agent.getEquip().get(1) != null)
|
|
||||||
weapon = agent.getEquip().get(1).getItemBase();
|
|
||||||
else if (agent.getEquip().get(2) != null)
|
|
||||||
weapon = agent.getEquip().get(2).getItemBase();
|
|
||||||
|
|
||||||
if (weapon != null) {
|
|
||||||
minDmg = getMinDmg(weapon.getMinDamage(), agent, weapon);
|
|
||||||
maxDmg = getMaxDmg(weapon.getMaxDamage(), agent, weapon);
|
|
||||||
dt = weapon.getDamageType();
|
|
||||||
} else {
|
|
||||||
minDmg = agent.getMobBase().getDamageMin();
|
|
||||||
maxDmg = agent.getMobBase().getDamageMax();
|
|
||||||
dt = DamageType.Crush;
|
|
||||||
}
|
|
||||||
|
|
||||||
AbstractWorldObject target = agent.getCombatTarget();
|
|
||||||
|
|
||||||
float dmgMultiplier = 1 + agent.getBonuses().getFloatPercentAll(ModType.MeleeDamageModifier, SourceType.None);
|
|
||||||
double range = maxDmg - minDmg;
|
|
||||||
double damage = minDmg + ((ThreadLocalRandom.current().nextFloat() * range) + (ThreadLocalRandom.current().nextFloat() * range)) / 2;
|
|
||||||
|
|
||||||
if (AbstractWorldObject.IsAbstractCharacter(target))
|
|
||||||
if (((AbstractCharacter) target).isSit())
|
|
||||||
damage *= 2.5f; //increase damage if sitting
|
|
||||||
if (AbstractWorldObject.IsAbstractCharacter(target))
|
|
||||||
return (int) (((AbstractCharacter) target).getResists().getResistedDamage(agent, (AbstractCharacter) target, dt, (float) damage, 0) * dmgMultiplier);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static double getMinDmg(double min, Mob agent, ItemBase weapon) {
|
|
||||||
|
|
||||||
int primary = agent.getStatStrCurrent();
|
|
||||||
int secondary = agent.getStatDexCurrent();
|
|
||||||
int focusLevel = 0;
|
|
||||||
int masteryLevel = 0;
|
|
||||||
|
|
||||||
if (weapon != null) {
|
|
||||||
if (weapon.isStrBased() == true) {
|
|
||||||
primary = agent.getStatStrCurrent();
|
|
||||||
secondary = agent.getStatDexCurrent();
|
|
||||||
} else {
|
|
||||||
primary = agent.getStatDexCurrent();
|
|
||||||
secondary = agent.getStatStrCurrent();
|
|
||||||
if (agent.getSkills().containsKey(weapon.getSkillRequired())) {
|
|
||||||
focusLevel = (int) agent.getSkills().get(weapon.getSkillRequired()).getModifiedAmount();
|
|
||||||
}
|
|
||||||
if (agent.getSkills().containsKey(weapon.getMastery())) {
|
|
||||||
masteryLevel = (int) agent.getSkills().get(weapon.getMastery()).getModifiedAmount();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return min * (pow(0.0048 * primary + .049 * (primary - 0.75), 0.5) + pow(0.0066 * secondary + 0.064 * (secondary - 0.75), 0.5) + +0.01 * (focusLevel + masteryLevel));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static double getMaxDmg(double max, Mob agent, ItemBase weapon) {
|
|
||||||
|
|
||||||
int primary = agent.getStatStrCurrent();
|
|
||||||
int secondary = agent.getStatDexCurrent();
|
|
||||||
int focusLevel = 0;
|
|
||||||
int masteryLevel = 0;
|
|
||||||
|
|
||||||
if (weapon != null) {
|
|
||||||
|
|
||||||
if (weapon.isStrBased() == true) {
|
|
||||||
primary = agent.getStatStrCurrent();
|
|
||||||
secondary = agent.getStatDexCurrent();
|
|
||||||
} else {
|
|
||||||
primary = agent.getStatDexCurrent();
|
|
||||||
secondary = agent.getStatStrCurrent();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (agent.getSkills().containsKey(weapon.getSkillRequired()))
|
|
||||||
focusLevel = (int) agent.getSkills().get(weapon.getSkillRequired()).getModifiedAmount();
|
|
||||||
|
|
||||||
if (agent.getSkills().containsKey(weapon.getSkillRequired()))
|
|
||||||
masteryLevel = (int) agent.getSkills().get(weapon.getMastery()).getModifiedAmount();
|
|
||||||
|
|
||||||
}
|
|
||||||
return max * (pow(0.0124 * primary + 0.118 * (primary - 0.75), 0.5) + pow(0.0022 * secondary + 0.028 * (secondary - 0.75), 0.5) + 0.0075 * (focusLevel + masteryLevel));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,17 +92,17 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
|
|||||||
public Resists resists = new Resists("Genric");
|
public Resists resists = new Resists("Genric");
|
||||||
protected ConcurrentHashMap<String, JobContainer> timers;
|
protected ConcurrentHashMap<String, JobContainer> timers;
|
||||||
protected ConcurrentHashMap<String, Long> timestamps;
|
protected ConcurrentHashMap<String, Long> timestamps;
|
||||||
protected int atrHandOne;
|
public int atrHandOne;
|
||||||
protected int atrHandTwo;
|
public int atrHandTwo;
|
||||||
protected int minDamageHandOne;
|
public int minDamageHandOne;
|
||||||
protected int maxDamageHandOne;
|
public int maxDamageHandOne;
|
||||||
protected int minDamageHandTwo;
|
public int minDamageHandTwo;
|
||||||
protected int maxDamageHandTwo;
|
public int maxDamageHandTwo;
|
||||||
protected float rangeHandOne;
|
public float rangeHandOne;
|
||||||
protected float rangeHandTwo;
|
public float rangeHandTwo;
|
||||||
protected float speedHandOne;
|
public float speedHandOne;
|
||||||
protected float speedHandTwo;
|
public float speedHandTwo;
|
||||||
protected int defenseRating;
|
public int defenseRating;
|
||||||
protected boolean isActive; // <-Do not use this for deleting character!
|
protected boolean isActive; // <-Do not use this for deleting character!
|
||||||
protected float altitude = 0; // 0=on terrain, 1=tier 1, 2=tier 2, etc.
|
protected float altitude = 0; // 0=on terrain, 1=tier 1, 2=tier 2, etc.
|
||||||
protected ConcurrentHashMap<Integer, JobContainer> recycleTimers;
|
protected ConcurrentHashMap<Integer, JobContainer> recycleTimers;
|
||||||
|
|||||||
@@ -537,6 +537,18 @@ public class Building extends AbstractWorldObject {
|
|||||||
if (value < 0)
|
if (value < 0)
|
||||||
Mine.SendMineAttackMessage(this);
|
Mine.SendMineAttackMessage(this);
|
||||||
|
|
||||||
|
City playerCity = ZoneManager.getCityAtLocation(this.loc);
|
||||||
|
if(playerCity != null){
|
||||||
|
if(this.getGuild().getNation().equals(playerCity.getTOL().getGuild().getNation())){
|
||||||
|
//friendly building has been attacked, add attacker to city outlaw list
|
||||||
|
if(!playerCity.cityOutlaws.contains(attacker.getObjectUUID()) && attacker.getObjectType().equals(GameObjectType.PlayerCharacter))
|
||||||
|
playerCity.cityOutlaws.add(attacker.getObjectUUID());
|
||||||
|
for(Mob guard : playerCity.getParent().zoneMobSet)
|
||||||
|
if(guard.combatTarget == null)
|
||||||
|
guard.setCombatTarget(attacker);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return newHealth - oldHealth;
|
return newHealth - oldHealth;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -914,4 +914,21 @@ public class ItemBase {
|
|||||||
public void setAutoID(boolean autoID) {
|
public void setAutoID(boolean autoID) {
|
||||||
this.autoID = autoID;
|
this.autoID = autoID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isArmor(){
|
||||||
|
|
||||||
|
if(this.isHeavyArmor())
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if(this.isMediumArmor())
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if(this.isLightArmor())
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if(this.isClothArmor())
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+75
-66
@@ -1030,80 +1030,88 @@ public class Mob extends AbstractIntelligenceAgent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void recalculateStats() {
|
public void recalculateStats() {
|
||||||
|
if(this.isPlayerGuard()){
|
||||||
|
NPCManager.setMaxHealthForGuard(this);
|
||||||
|
NPCManager.setAttackRatingForGuard(this);
|
||||||
|
NPCManager.setDefenseForGuard(this);
|
||||||
|
NPCManager.setDamageAndSpeedForGuard(this);
|
||||||
|
NPCManager.applyGuardStanceModifiers(this);
|
||||||
|
}else {
|
||||||
|
|
||||||
|
try {
|
||||||
|
calculateAtrDefenseDamage();
|
||||||
|
} catch (Exception e) {
|
||||||
|
Logger.error(this.getMobBaseID() + " /" + e.getMessage());
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
calculateMaxHealthManaStamina();
|
||||||
|
} catch (Exception e) {
|
||||||
|
Logger.error(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
calculateModifiedStats();
|
calculateModifiedStats();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.error(e.getMessage());
|
Logger.error(e.getMessage());
|
||||||
}
|
}
|
||||||
|
if(this.isSiege())
|
||||||
try {
|
this.healthMax = 10000;
|
||||||
calculateAtrDefenseDamage();
|
|
||||||
} catch (Exception e) {
|
|
||||||
Logger.error(this.getMobBaseID() + " /" + e.getMessage());
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
calculateMaxHealthManaStamina();
|
|
||||||
} catch (Exception e) {
|
|
||||||
Logger.error(e.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
Resists.calculateResists(this);
|
Resists.calculateResists(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void calculateMaxHealthManaStamina() {
|
public void calculateMaxHealthManaStamina() {
|
||||||
float h;
|
float h;
|
||||||
float m;
|
float m;
|
||||||
float s;
|
float s;
|
||||||
|
|
||||||
h = this.mobBase.getHealthMax();
|
h = this.mobBase.getHealthMax();
|
||||||
if (this.isPet()) {
|
if (this.isPet()) {
|
||||||
h = this.level * 0.5f * 120;
|
h = this.level * 0.5f * 120;
|
||||||
}
|
}
|
||||||
m = this.statSpiCurrent;
|
m = this.statSpiCurrent;
|
||||||
s = this.statConCurrent;
|
s = this.statConCurrent;
|
||||||
|
|
||||||
// Apply any bonuses from runes and effects
|
// Apply any bonuses from runes and effects
|
||||||
|
|
||||||
if (this.bonuses != null) {
|
if (this.bonuses != null) {
|
||||||
h += this.bonuses.getFloat(ModType.HealthFull, SourceType.None);
|
h += this.bonuses.getFloat(ModType.HealthFull, SourceType.None);
|
||||||
m += this.bonuses.getFloat(ModType.ManaFull, SourceType.None);
|
m += this.bonuses.getFloat(ModType.ManaFull, SourceType.None);
|
||||||
s += this.bonuses.getFloat(ModType.StaminaFull, SourceType.None);
|
s += this.bonuses.getFloat(ModType.StaminaFull, SourceType.None);
|
||||||
|
|
||||||
//apply effects percent modifiers. DO THIS LAST!
|
//apply effects percent modifiers. DO THIS LAST!
|
||||||
|
|
||||||
h *= (1 + this.bonuses.getFloatPercentAll(ModType.HealthFull, SourceType.None));
|
h *= (1 + this.bonuses.getFloatPercentAll(ModType.HealthFull, SourceType.None));
|
||||||
m *= (1 + this.bonuses.getFloatPercentAll(ModType.ManaFull, SourceType.None));
|
m *= (1 + this.bonuses.getFloatPercentAll(ModType.ManaFull, SourceType.None));
|
||||||
s *= (1 + this.bonuses.getFloatPercentAll(ModType.StaminaFull, SourceType.None));
|
s *= (1 + this.bonuses.getFloatPercentAll(ModType.StaminaFull, SourceType.None));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set max health, mana and stamina
|
// Set max health, mana and stamina
|
||||||
|
|
||||||
if (h > 0)
|
if (h > 0)
|
||||||
this.healthMax = h;
|
this.healthMax = h;
|
||||||
else
|
else
|
||||||
this.healthMax = 1;
|
this.healthMax = 1;
|
||||||
|
|
||||||
if (m > -1)
|
if (m > -1)
|
||||||
this.manaMax = m;
|
this.manaMax = m;
|
||||||
else
|
else
|
||||||
this.manaMax = 0;
|
this.manaMax = 0;
|
||||||
|
|
||||||
if (s > -1)
|
if (s > -1)
|
||||||
this.staminaMax = s;
|
this.staminaMax = s;
|
||||||
else
|
else
|
||||||
this.staminaMax = 0;
|
this.staminaMax = 0;
|
||||||
|
|
||||||
// Update health, mana and stamina if needed
|
// Update health, mana and stamina if needed
|
||||||
|
|
||||||
if (this.getHealth() > this.healthMax)
|
if (this.getHealth() > this.healthMax)
|
||||||
this.setHealth(this.healthMax);
|
this.setHealth(this.healthMax);
|
||||||
|
|
||||||
if (this.mana.get() > this.manaMax)
|
if (this.mana.get() > this.manaMax)
|
||||||
this.mana.set(this.manaMax);
|
this.mana.set(this.manaMax);
|
||||||
|
|
||||||
if (this.stamina.get() > this.staminaMax)
|
if (this.stamina.get() > this.staminaMax)
|
||||||
this.stamina.set(staminaMax);
|
this.stamina.set(staminaMax);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1117,14 +1125,14 @@ public class Mob extends AbstractIntelligenceAgent {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.atrHandOne = (short) this.mobBase.getAttackRating();
|
this.atrHandOne = (short) this.mobBase.getAttackRating();
|
||||||
this.minDamageHandOne = (short) this.mobBase.getMinDmg();
|
this.minDamageHandOne = (short) this.mobBase.getDamageMin();
|
||||||
this.maxDamageHandOne = (short) this.mobBase.getMaxDmg();
|
this.maxDamageHandOne = (short) this.mobBase.getDamageMax();
|
||||||
this.rangeHandOne = 6.5f;
|
this.rangeHandOne = 6.5f;
|
||||||
this.speedHandOne = 20;
|
this.speedHandOne = 20;
|
||||||
|
|
||||||
this.atrHandTwo = (short) this.mobBase.getAttackRating();
|
this.atrHandTwo = (short) this.mobBase.getAttackRating();
|
||||||
this.minDamageHandTwo = (short) this.mobBase.getMinDmg();
|
this.minDamageHandTwo = (short) this.mobBase.getDamageMin();
|
||||||
this.maxDamageHandTwo = (short) this.mobBase.getMaxDmg();
|
this.maxDamageHandTwo = (short) this.mobBase.getDamageMax();
|
||||||
this.rangeHandTwo = 6.5f;
|
this.rangeHandTwo = 6.5f;
|
||||||
this.speedHandTwo = 20;
|
this.speedHandTwo = 20;
|
||||||
|
|
||||||
@@ -1142,8 +1150,8 @@ public class Mob extends AbstractIntelligenceAgent {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
||||||
this.atrHandOne = (short) this.mobBase.getAttackRating();
|
this.atrHandOne = (short) this.mobBase.getAttackRating();
|
||||||
this.minDamageHandOne = (short) this.mobBase.getMinDmg();
|
this.minDamageHandOne = (short) this.mobBase.getDamageMin();
|
||||||
this.maxDamageHandOne = (short) this.mobBase.getMaxDmg();
|
this.maxDamageHandOne = (short) this.mobBase.getDamageMax();
|
||||||
this.rangeHandOne = 6.5f;
|
this.rangeHandOne = 6.5f;
|
||||||
this.speedHandOne = 20;
|
this.speedHandOne = 20;
|
||||||
Logger.info("Mobbase ID " + this.getMobBaseID() + " returned an error. setting to default ATR and Damage." + e.getMessage());
|
Logger.info("Mobbase ID " + this.getMobBaseID() + " returned an error. setting to default ATR and Damage." + e.getMessage());
|
||||||
@@ -1155,8 +1163,8 @@ public class Mob extends AbstractIntelligenceAgent {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
||||||
this.atrHandTwo = (short) this.mobBase.getAttackRating();
|
this.atrHandTwo = (short) this.mobBase.getAttackRating();
|
||||||
this.minDamageHandTwo = (short) this.mobBase.getMinDmg();
|
this.minDamageHandTwo = (short) this.mobBase.getDamageMin();
|
||||||
this.maxDamageHandTwo = (short) this.mobBase.getMaxDmg();
|
this.maxDamageHandTwo = (short) this.mobBase.getDamageMax();
|
||||||
this.rangeHandTwo = 6.5f;
|
this.rangeHandTwo = 6.5f;
|
||||||
this.speedHandTwo = 20;
|
this.speedHandTwo = 20;
|
||||||
Logger.info("Mobbase ID " + this.getMobBaseID() + " returned an error. setting to default ATR and Damage." + e.getMessage());
|
Logger.info("Mobbase ID " + this.getMobBaseID() + " returned an error. setting to default ATR and Damage." + e.getMessage());
|
||||||
@@ -1200,7 +1208,7 @@ public class Mob extends AbstractIntelligenceAgent {
|
|||||||
this.defenseRating = (short) (defense + 0.5f);
|
this.defenseRating = (short) (defense + 0.5f);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.info("Mobbase ID " + this.getMobBaseID() + " returned an error. Setting to Default Defense." + e.getMessage());
|
Logger.info("Mobbase ID " + this.getMobBaseID() + " returned an error. Setting to Default Defense." + e.getMessage());
|
||||||
this.defenseRating = (short) this.mobBase.getDefense();
|
this.defenseRating = (short) this.mobBase.getDefenseRating();
|
||||||
}
|
}
|
||||||
// calculate defense for equipment
|
// calculate defense for equipment
|
||||||
}
|
}
|
||||||
@@ -1351,8 +1359,8 @@ public class Mob extends AbstractIntelligenceAgent {
|
|||||||
mastDam = masteryPercentage;
|
mastDam = masteryPercentage;
|
||||||
|
|
||||||
// TODO Correct these
|
// TODO Correct these
|
||||||
min = this.mobBase.getMinDmg();
|
min = this.mobBase.getDamageMin();
|
||||||
max = this.mobBase.getMaxDmg();
|
max = this.mobBase.getDamageMax();
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (mainHand)
|
if (mainHand)
|
||||||
@@ -1608,11 +1616,11 @@ public class Mob extends AbstractIntelligenceAgent {
|
|||||||
//TODO set these correctly later
|
//TODO set these correctly later
|
||||||
this.rangeHandOne = this.mobBase.getAttackRange();
|
this.rangeHandOne = this.mobBase.getAttackRange();
|
||||||
this.rangeHandTwo = -1;
|
this.rangeHandTwo = -1;
|
||||||
this.minDamageHandOne = (int) this.mobBase.getMinDmg();
|
this.minDamageHandOne = (int) this.mobBase.getDamageMin();
|
||||||
this.maxDamageHandOne = (int) this.mobBase.getMaxDmg();
|
this.maxDamageHandOne = (int) this.mobBase.getDamageMax();
|
||||||
this.minDamageHandTwo = 0;
|
this.minDamageHandTwo = 0;
|
||||||
this.maxDamageHandTwo = 0;
|
this.maxDamageHandTwo = 0;
|
||||||
this.atrHandOne = this.mobBase.getAtr();
|
this.atrHandOne = this.mobBase.getAttackRating();
|
||||||
this.defenseRating = (short) this.mobBase.getDefenseRating();
|
this.defenseRating = (short) this.mobBase.getDefenseRating();
|
||||||
this.isActive = true;
|
this.isActive = true;
|
||||||
|
|
||||||
@@ -1737,7 +1745,8 @@ public class Mob extends AbstractIntelligenceAgent {
|
|||||||
|
|
||||||
DbManager.MobQueries.SET_PROPERTY(this, "mob_level", newRank);
|
DbManager.MobQueries.SET_PROPERTY(this, "mob_level", newRank);
|
||||||
this.level = (short) newRank;
|
this.level = (short) newRank;
|
||||||
|
this.recalculateStats();
|
||||||
|
this.setHealth(this.healthMax);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isRanking() {
|
public boolean isRanking() {
|
||||||
|
|||||||
@@ -43,10 +43,6 @@ public class MobBase extends AbstractGameObject {
|
|||||||
private int goldMod;
|
private int goldMod;
|
||||||
private int seeInvis;
|
private int seeInvis;
|
||||||
private int spawnTime = 0;
|
private int spawnTime = 0;
|
||||||
private int defense = 0;
|
|
||||||
private int atr = 0;
|
|
||||||
private float minDmg = 0;
|
|
||||||
private float maxDmg = 0;
|
|
||||||
private float attackRange;
|
private float attackRange;
|
||||||
private boolean isNecroPet = false;
|
private boolean isNecroPet = false;
|
||||||
private MobBaseStats mobBaseStats;
|
private MobBaseStats mobBaseStats;
|
||||||
@@ -248,30 +244,6 @@ public class MobBase extends AbstractGameObject {
|
|||||||
return mobBaseStats;
|
return mobBaseStats;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getMaxDmg() {
|
|
||||||
return maxDmg;
|
|
||||||
}
|
|
||||||
|
|
||||||
public float getMinDmg() {
|
|
||||||
return minDmg;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getAtr() {
|
|
||||||
return atr;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAtr(int atr) {
|
|
||||||
this.atr = atr;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getDefense() {
|
|
||||||
return defense;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDefense(int defense) {
|
|
||||||
this.defense = defense;
|
|
||||||
}
|
|
||||||
|
|
||||||
public float getAttackRange() {
|
public float getAttackRange() {
|
||||||
return attackRange;
|
return attackRange;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user