Browse Source

dropper resists and level increase

lakebane-new
FatBoy-DOTC 5 months ago
parent
commit
c5822b5acf
  1. 4
      src/engine/gameManager/LootManager.java
  2. 13
      src/engine/objects/Mob.java
  3. 21
      src/engine/objects/Resists.java

4
src/engine/gameManager/LootManager.java

@ -125,7 +125,7 @@ public enum LootManager { @@ -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 { @@ -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);
}
}

13
src/engine/objects/Mob.java

@ -1397,6 +1397,11 @@ public class Mob extends AbstractIntelligenceAgent { @@ -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 { @@ -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 { @@ -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
src/engine/objects/Resists.java

@ -46,6 +46,9 @@ public class Resists { @@ -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 { @@ -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
*/

Loading…
Cancel
Save