dropper resists and level increase

This commit is contained in:
2024-07-06 20:43:03 -05:00
parent 516b66a50a
commit c5822b5acf
3 changed files with 34 additions and 4 deletions
+2 -2
View File
@@ -125,7 +125,7 @@ public enum LootManager {
mob.getCharItemManager().addItemToInventory(specialDrop);
mob.setResists(new Resists("Dropper"));
if(!Mob.discDroppers.contains(mob))
Mob.discDroppers.add(mob);
Mob.AddDiscDropper(mob);
}
//iterate the booty sets
@@ -460,7 +460,7 @@ public enum LootManager {
if (lootItem != null) {
mob.getCharItemManager().addItemToInventory(lootItem);
if(lootItem.getItemBase().isDiscRune() && !Mob.discDroppers.contains(mob))
Mob.discDroppers.add(mob);
Mob.AddDiscDropper(mob);
}
}
+11 -2
View File
@@ -1397,6 +1397,11 @@ public class Mob extends AbstractIntelligenceAgent {
loadInventory();
this.updateLocation();
if(Mob.discDroppers.contains(this)){
this.setLevel((short)65);
this.setResists(new Resists("Dropper"));
}
}
public void despawn() {
@@ -1467,7 +1472,7 @@ public class Mob extends AbstractIntelligenceAgent {
Logger.error(e.getMessage());
}
Resists.calculateResists(this);
//Resists.calculateResists(this);
}
public void calculateMaxHealthManaStamina() {
@@ -2264,5 +2269,9 @@ public class Mob extends AbstractIntelligenceAgent {
}
}
}
public static void AddDiscDropper(Mob mob){
discDroppers.add(mob);
mob.setLevel((short)65);
mob.setResists(new Resists("Dropper"));
}
}
+21
View File
@@ -46,6 +46,9 @@ public class Resists {
case "Mine":
setMineResists();
break;
case "Dropper":
setDropperResists();
break;
default:
setGenericResists();
break;
@@ -231,6 +234,24 @@ public class Resists {
this.resists.put(DamageType.Siege, 0f);
}
public final void setDropperResists() {
this.immuneToAll = false;
this.resists.put(DamageType.Slash, 50f);
this.resists.put(DamageType.Crush, 50f);
this.resists.put(DamageType.Pierce, 50f);
this.resists.put(DamageType.Magic, 50f);
this.resists.put(DamageType.Bleed, 50f);
this.resists.put(DamageType.Poison, 50f);
this.resists.put(DamageType.Mental, 50f);
this.resists.put(DamageType.Holy, 50f);
this.resists.put(DamageType.Unholy, 50f);
this.resists.put(DamageType.Lightning, 50f);
this.resists.put(DamageType.Fire, 50f);
this.resists.put(DamageType.Cold, 50f);
this.resists.put(DamageType.Healing, 0f);
this.immuneTo.put(DamageType.Siege, true);
}
/**
* Create generic resists
*/