Browse Source

stronghold mobs no longer lose bonuses from weapon powers

lakebane-strongholds
FatBoy-DOTC 5 months ago
parent
commit
ef82f9ab5b
  1. 29
      src/engine/gameManager/LootManager.java
  2. 1
      src/engine/gameManager/StrongholdManager.java
  3. 30
      src/engine/objects/Mob.java

29
src/engine/gameManager/LootManager.java

@ -675,22 +675,47 @@ public enum LootManager {
if (commander) if (commander)
multiplier = 2; multiplier = 2;
int high = 250000; int high = 125000;
int low = 65000; int low = 50000;
int gold = ThreadLocalRandom.current().nextInt(low, high + 1) * multiplier; int gold = ThreadLocalRandom.current().nextInt(low, high + 1) * multiplier;
if (gold > 0) { if (gold > 0) {
MobLoot goldAmount = new MobLoot(mob, gold); MobLoot goldAmount = new MobLoot(mob, gold);
mob.getCharItemManager().addItemToInventory(goldAmount); mob.getCharItemManager().addItemToInventory(goldAmount);
} }
//present drop chance for all
if (ThreadLocalRandom.current().nextInt(100) < 35) if (ThreadLocalRandom.current().nextInt(100) < 35)
DropPresent(mob); DropPresent(mob);
//random contract drop chance for all
if (ThreadLocalRandom.current().nextInt(100) < 35) {
int contractTableID = 250;
contractTableID += ThreadLocalRandom.current().nextInt(0, 12);
if (contractTableID > 259)
contractTableID = 659;
if (ThreadLocalRandom.current().nextInt(100) < 35) {
int id = rollRandomItem(contractTableID);
ItemBase ib = ItemBase.getItemBase(id);
if (ib != null) {
MobLoot contract = new MobLoot(mob, ib, true);
if (contract != null)
mob.getCharItemManager().addItemToInventory(contract);
}
}
}
//special commander drop chances
if (commander) { if (commander) {
//present chance
if (ThreadLocalRandom.current().nextInt(100) < 25) if (ThreadLocalRandom.current().nextInt(100) < 25)
DropPresent(mob); DropPresent(mob);
//present chance
if (ThreadLocalRandom.current().nextInt(100) < 25) if (ThreadLocalRandom.current().nextInt(100) < 25)
DropPresent(mob); DropPresent(mob);

1
src/engine/gameManager/StrongholdManager.java

@ -81,6 +81,7 @@ public class StrongholdManager {
guard.defenseRating = 2200; guard.defenseRating = 2200;
guard.setFirstName("Elite Guardian"); guard.setFirstName("Elite Guardian");
InterestManager.setObjectDirty(guard); InterestManager.setObjectDirty(guard);
guard.StrongholdGuardian = true;
} }
} }
//create stronghold commander //create stronghold commander

30
src/engine/objects/Mob.java

@ -103,6 +103,8 @@ public class Mob extends AbstractIntelligenceAgent {
private boolean lootSync = false; private boolean lootSync = false;
public boolean StrongholdCommander = false; public boolean StrongholdCommander = false;
public boolean StrongholdGuardian = false;
/** /**
* No Id Constructor * No Id Constructor
@ -1478,11 +1480,22 @@ public class Mob extends AbstractIntelligenceAgent {
} catch (Exception e) { } catch (Exception e) {
Logger.error(e.getMessage()); Logger.error(e.getMessage());
} }
if(this.StrongholdCommander || this.StrongholdGuardian){
//Resists.calculateResists(this); this.setResists(new Resists("Elite"));
return;
}
} }
public void calculateMaxHealthManaStamina() { public void calculateMaxHealthManaStamina() {
if(this.StrongholdCommander){
this.healthMax = 50000;
return;
} else if(this.StrongholdGuardian){
this.healthMax = 12500;
return;
}
float h; float h;
float m; float m;
float s; float s;
@ -1540,6 +1553,19 @@ public class Mob extends AbstractIntelligenceAgent {
public void calculateAtrDefenseDamage() { public void calculateAtrDefenseDamage() {
if(this.StrongholdCommander){
this.maxDamageHandOne = 3500;
this.minDamageHandOne = 1500;
this.atrHandOne = 3500;
this.defenseRating = 3500;
return;
} else if(this.StrongholdGuardian){
this.maxDamageHandOne = 1550;
this.minDamageHandOne = 750;
this.atrHandOne = 1800;
this.defenseRating = 2200;
return;
}
if (this.charItemManager == null || this.equip == null) { if (this.charItemManager == null || this.equip == null) {
Logger.error("Player " + currentID + " missing skills or equipment"); Logger.error("Player " + currentID + " missing skills or equipment");
defaultAtrAndDamage(true); defaultAtrAndDamage(true);

Loading…
Cancel
Save