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 {
public static void setResistsForMob(Mob mob){ public static void setResistsForMob(Mob mob){
Resists resists = new Resists("Generic"); 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){ if(MobBase.mobbase_race_types.size() == 0){
DbManager.MobBaseQueries.LOAD_ALL_MOBBASE_RACES(); DbManager.MobBaseQueries.LOAD_ALL_MOBBASE_RACES();
} }
@ -232,7 +191,42 @@ public class Mob extends AbstractIntelligenceAgent {
case "Animal": case "Animal":
case "All": case "All":
case "SiegeEngineer": 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; break;
case "Aracoix": case "Aracoix":
resists.addResists(Resists.getResists(22)); resists.addResists(Resists.getResists(22));
@ -1760,8 +1754,8 @@ 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.getMinDmg();
this.maxDamageHandOne = (int)this.mobBase.getMaxDmg(); this.maxDamageHandOne = (int) this.mobBase.getMaxDmg();
this.minDamageHandTwo = 0; this.minDamageHandTwo = 0;
this.maxDamageHandTwo = 0; this.maxDamageHandTwo = 0;
this.atrHandOne = this.mobBase.getAtr(); this.atrHandOne = this.mobBase.getAtr();
@ -1841,10 +1835,10 @@ public class Mob extends AbstractIntelligenceAgent {
try { try {
NPCManager.applyRuneSetEffects(this); NPCManager.applyRuneSetEffects(this);
recalculateStats(); recalculateStats();
if(this.mobBase.getLevel() > 80){ if (this.mobBase.getLevel() > 80) {
if(this.getMobBaseID() == 14319){//ithriana if (this.getMobBaseID() == 14319) {//ithriana
this.healthMax = 5400000; this.healthMax = 5400000;
} else{ } else {
this.healthMax = 1500000; this.healthMax = 1500000;
} }
} }
@ -1868,44 +1862,51 @@ public class Mob extends AbstractIntelligenceAgent {
Logger.error(e.getMessage()); 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; this.behaviourType = MobBehaviourType.Aggro;
} }
for(MobEquipment equipped: this.equip.values()){ for (MobEquipment equipped : this.equip.values()) {
if(equipped.getItemBase().isVorg() && this.getMobBaseID() != 14062 && this.getMobBaseID() != 14163){ if (equipped.getItemBase().isVorg() && this.getMobBaseID() != 14062 && this.getMobBaseID() != 14163) {
this.dropper = true; this.dropper = true;
} }
} }
for(Item item : this.charItemManager.getInventory()){ for (Item item : this.charItemManager.getInventory()) {
if(item.getItemBase().isDiscRune() && this.level < 75){ if (item.getItemBase().isDiscRune() && this.level < 75) {
this.dropper = true; this.dropper = true;
} }
} }
switch (this.getObjectUUID()) {
if(this.dropper){ case 40551://ithrianna
this.level = 65; this.mobResists = Resists.getResists(14);
this.atrHandOne *= 2; break;
this.atrHandTwo *= 2; case 11297: // mordoth
this.defenseRating *= 2; this.mobResists = Resists.getResists(16);
this.maxDamageHandOne *= 2; break;
this.maxDamageHandTwo *= 2; case 19842://vranaxxas
this.minDamageHandOne *= 2; this.mobResists = Resists.getResists(37);
this.minDamageHandTwo *= 2; break;
this.mobResists = new Resists("Dropper"); case 6407://draug tovald
} else{ this.mobResists = Resists.getResists(15);
setResistsForMob(this); 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 @Override

Loading…
Cancel
Save