Browse Source

r8 resists

lakebane-master
FatBoy-DOTC 7 months ago
parent
commit
a821f7f7e4
  1. 153
      src/engine/objects/Mob.java

153
src/engine/objects/Mob.java

@ -171,48 +171,7 @@ public class Mob extends AbstractIntelligenceAgent { @@ -171,48 +171,7 @@ public class Mob extends AbstractIntelligenceAgent {
public static void setResistsForMob(Mob mob){
Resists resists = new Resists("Generic");
int realmID = RealmMap.getRealmIDAtLocation(mob.bindLoc);
Realm realm = Realm.getRealm(realmID);
//Zone parentMacro = null;
//for(Zone zone : ZoneManager.getAllZonesIn(mob.loc)){
// if(zone.isMacroZone() == false)
// continue;
// parentMacro = zone;
//}
if(realm != null) {
switch (realm.getRealmName()) {
//ice generics
case "Hethlund":
case "Hregenlund":
case "Ecklund":
case "Kralgaard":
resists.addResists(Resists.getResists(28));
break;
//Desert Generics
case "Letharuun":
case "Adduram":
case "Neshraa":
resists.addResists(Resists.getResists(2));
break;
//Swamp Generics
case "Aeglund":
case "Thollmar":
resists.addResists(Resists.getResists(8));
break;
//Oblivion Generics
case "Oblivion":
case "Vandernoch":
resists.addResists(Resists.getResists(4));
break;
//Maelstrom Generics
case "Maelstrom":
resists.addResists(Resists.getResists(32));
break;
case "Valkos":
case "Ulward":
resists.addResists(Resists.getResists(5));
}
}
if(MobBase.mobbase_race_types.size() == 0){
DbManager.MobBaseQueries.LOAD_ALL_MOBBASE_RACES();
}
@ -232,7 +191,42 @@ public class Mob extends AbstractIntelligenceAgent { @@ -232,7 +191,42 @@ public class Mob extends AbstractIntelligenceAgent {
case "Animal":
case "All":
case "SiegeEngineer":
resists.addResists(new Resists("Generic"));
int realmID = RealmMap.getRealmIDAtLocation(mob.bindLoc);
Realm realm = Realm.getRealm(realmID);
if(realm != null) {
switch (realm.getRealmName()) {
//ice generics
case "Hethlund":
case "Hregenlund":
case "Ecklund":
case "Kralgaard":
resists.addResists(Resists.getResists(28));
break;
//Desert Generics
case "Letharuun":
case "Adduram":
case "Neshraa":
resists.addResists(Resists.getResists(2));
break;
//Swamp Generics
case "Aeglund":
case "Thollmar":
resists.addResists(Resists.getResists(8));
break;
//Oblivion Generics
case "Oblivion":
case "Vandernoch":
resists.addResists(Resists.getResists(4));
break;
//Maelstrom Generics
case "Maelstrom":
resists.addResists(Resists.getResists(32));
break;
case "Valkos":
case "Ulward":
resists.addResists(Resists.getResists(5));
}
}
break;
case "Aracoix":
resists.addResists(Resists.getResists(22));
@ -1760,8 +1754,8 @@ public class Mob extends AbstractIntelligenceAgent { @@ -1760,8 +1754,8 @@ public class Mob extends AbstractIntelligenceAgent {
//TODO set these correctly later
this.rangeHandOne = this.mobBase.getAttackRange();
this.rangeHandTwo = -1;
this.minDamageHandOne = (int)this.mobBase.getMinDmg();
this.maxDamageHandOne = (int)this.mobBase.getMaxDmg();
this.minDamageHandOne = (int) this.mobBase.getMinDmg();
this.maxDamageHandOne = (int) this.mobBase.getMaxDmg();
this.minDamageHandTwo = 0;
this.maxDamageHandTwo = 0;
this.atrHandOne = this.mobBase.getAtr();
@ -1841,10 +1835,10 @@ public class Mob extends AbstractIntelligenceAgent { @@ -1841,10 +1835,10 @@ public class Mob extends AbstractIntelligenceAgent {
try {
NPCManager.applyRuneSetEffects(this);
recalculateStats();
if(this.mobBase.getLevel() > 80){
if(this.getMobBaseID() == 14319){//ithriana
if (this.mobBase.getLevel() > 80) {
if (this.getMobBaseID() == 14319) {//ithriana
this.healthMax = 5400000;
} else{
} else {
this.healthMax = 1500000;
}
}
@ -1868,44 +1862,51 @@ public class Mob extends AbstractIntelligenceAgent { @@ -1868,44 +1862,51 @@ public class Mob extends AbstractIntelligenceAgent {
Logger.error(e.getMessage());
}
if(this.behaviourType.equals(MobBehaviourType.HamletGuard) && this.getMobBaseID() == 14104) {//guards
if (this.behaviourType.equals(MobBehaviourType.HamletGuard) && this.getMobBaseID() == 14104) {//guards
this.behaviourType = MobBehaviourType.Aggro;
}
for(MobEquipment equipped: this.equip.values()){
if(equipped.getItemBase().isVorg() && this.getMobBaseID() != 14062 && this.getMobBaseID() != 14163){
for (MobEquipment equipped : this.equip.values()) {
if (equipped.getItemBase().isVorg() && this.getMobBaseID() != 14062 && this.getMobBaseID() != 14163) {
this.dropper = true;
}
}
for(Item item : this.charItemManager.getInventory()){
if(item.getItemBase().isDiscRune() && this.level < 75){
for (Item item : this.charItemManager.getInventory()) {
if (item.getItemBase().isDiscRune() && this.level < 75) {
this.dropper = true;
}
}
if(this.dropper){
this.level = 65;
this.atrHandOne *= 2;
this.atrHandTwo *= 2;
this.defenseRating *= 2;
this.maxDamageHandOne *= 2;
this.maxDamageHandTwo *= 2;
this.minDamageHandOne *= 2;
this.minDamageHandTwo *= 2;
this.mobResists = new Resists("Dropper");
} else{
setResistsForMob(this);
switch (this.getObjectUUID()) {
case 40551://ithrianna
this.mobResists = Resists.getResists(14);
break;
case 11297: // mordoth
this.mobResists = Resists.getResists(16);
break;
case 19842://vranaxxas
this.mobResists = Resists.getResists(37);
break;
case 6407://draug tovald
this.mobResists = Resists.getResists(15);
break;
case 30959://shuggroth mael
this.mobResists = Resists.getResists(17);
break;
default:
if (this.dropper) {
this.level = 65;
this.atrHandOne *= 2;
this.atrHandTwo *= 2;
this.defenseRating *= 2;
this.maxDamageHandOne *= 2;
this.maxDamageHandTwo *= 2;
this.minDamageHandOne *= 2;
this.minDamageHandTwo *= 2;
this.mobResists = new Resists("Dropper");
} else {
setResistsForMob(this);
}
}
//for(Item loot : this.charItemManager.getInventory()){
// if(loot.getItemBase().isDiscRune() && this.level < 80){
// if(this.firstSpawn) {
// this.killCharacter("first spawn");
// this.firstSpawn = false;
// if(this.despawned == false)
// this.despawn();
// }
// }
//}
}
@Override

Loading…
Cancel
Save