Browse Source

stronghold loot

lakebane-strongholds
FatBoy-DOTC 6 months ago
parent
commit
4059664354
  1. 24
      src/engine/gameManager/LootManager.java
  2. 12
      src/engine/objects/Mine.java

24
src/engine/gameManager/LootManager.java

@ -681,9 +681,29 @@ public enum LootManager {
mob.getCharItemManager().addItemToInventory(goldAmount); mob.getCharItemManager().addItemToInventory(goldAmount);
} }
for(int i = 0; i < 3 * multiplier; i++){ int random = 3211 + ThreadLocalRandom.current().nextInt(6);
DropPresent(mob); if(random > 3216)
random = 3216;
int baseLoot = rollRandomItem(random);
ItemBase contract = ItemBase.getItemBase(baseLoot);
if (contract != null) {
MobLoot toAdd = new MobLoot(mob, contract, false);
if (toAdd != null)
mob.getCharItemManager().addItemToInventory(toAdd);
if (commander) {
int glassID = rollRandomItem(126);
ItemBase glassItem = ItemBase.getItemBase(glassID);
if (glassItem != null) {
MobLoot toAdd2 = new MobLoot(mob, glassItem, false);
if (toAdd != null)
mob.getCharItemManager().addItemToInventory(toAdd2);
}
} }
} }
} }
}

12
src/engine/objects/Mine.java

@ -676,22 +676,29 @@ public class Mine extends AbstractGameObject {
building.setMeshUUID(407650); building.setMeshUUID(407650);
building.setMeshScale(new Vector3f(0,0,0)); building.setMeshScale(new Vector3f(0,0,0));
InterestManager.setObjectDirty(building); InterestManager.setObjectDirty(building);
WorldGrid.updateObject(building);
} }
//update tower to become stronghold mesh //update tower to become stronghold mesh
tower.setMeshUUID(5001500); tower.setMeshUUID(5001500);
tower.setMeshScale(new Vector3f(1,1,1)); tower.setMeshScale(new Vector3f(1,1,1));
InterestManager.setObjectDirty(tower); InterestManager.setObjectDirty(tower);
WorldGrid.updateObject(tower);
//create elite mobs //create elite mobs
for(int i = 0; i < 15; i++){ for(int i = 0; i < 15; i++){
Mob guard = Mob.createMob(14315, Vector3fImmutable.getRandomPointOnCircle(tower.loc,30),Guild.getErrantGuild(),true,mineZone,null,0, "Elite",65); Mob guard = Mob.createMob(14315, Vector3fImmutable.getRandomPointOnCircle(tower.loc,30),Guild.getErrantGuild(),true,mineZone,null,0, "Elite",65);
if(guard != null){ if(guard != null){
guard.setLevel((short)65);
guard.setResists(new Resists("Elite")); guard.setResists(new Resists("Elite"));
guard.healthMax *= 2; guard.healthMax *= 2;
guard.setHealth(guard.healthMax); guard.setHealth(guard.healthMax);
guard.spawnTime = 1000000000; guard.spawnTime = 1000000000;
guard.BehaviourType = Enum.MobBehaviourType.Aggro; guard.BehaviourType = Enum.MobBehaviourType.Aggro;
guard.maxDamageHandOne *= 2;
guard.minDamageHandOne *= 2;
guard.atrHandOne *= 2;
guard.defenseRating *= 2;
InterestManager.setObjectDirty(guard); InterestManager.setObjectDirty(guard);
this.strongholdMobs.add(guard); this.strongholdMobs.add(guard);
LootManager.GenerateStrongholdLoot(guard,false); LootManager.GenerateStrongholdLoot(guard,false);
@ -700,11 +707,16 @@ public class Mine extends AbstractGameObject {
//create stronghold commander //create stronghold commander
Mob commander = Mob.createMob(14315, tower.loc,Guild.getErrantGuild(),true,mineZone,null,0, "Commander",75); Mob commander = Mob.createMob(14315, tower.loc,Guild.getErrantGuild(),true,mineZone,null,0, "Commander",75);
if(commander != null){ if(commander != null){
commander.setLevel((short)75);
commander.setResists(new Resists("Elite")); commander.setResists(new Resists("Elite"));
commander.healthMax *= 2; commander.healthMax *= 2;
commander.setHealth(commander.healthMax); commander.setHealth(commander.healthMax);
commander.spawnTime = 1000000000; commander.spawnTime = 1000000000;
commander.BehaviourType = Enum.MobBehaviourType.Aggro; commander.BehaviourType = Enum.MobBehaviourType.Aggro;
commander.maxDamageHandOne *= 3;
commander.minDamageHandOne *= 3;
commander.atrHandOne *= 3;
commander.defenseRating *= 3;
InterestManager.setObjectDirty(commander); InterestManager.setObjectDirty(commander);
this.strongholdMobs.add(commander); this.strongholdMobs.add(commander);
LootManager.GenerateStrongholdLoot(commander,true); LootManager.GenerateStrongholdLoot(commander,true);

Loading…
Cancel
Save