drop rate work

This commit is contained in:
2024-03-13 21:23:47 -05:00
parent 9a570de54c
commit 6023022077
2 changed files with 42 additions and 10 deletions
+18 -2
View File
@@ -1,10 +1,12 @@
package engine.devcmd.cmds;
import engine.Enum;
import engine.devcmd.AbstractDevCmd;
import engine.gameManager.LootManager;
import engine.gameManager.ZoneManager;
import engine.loot.BootySetEntry;
import engine.objects.*;
import org.pmw.tinylog.Logger;
import java.util.ArrayList;
import java.util.concurrent.ThreadLocalRandom;
@@ -26,7 +28,9 @@ public class SimulateBootyCmd extends AbstractDevCmd {
String output;
output = "Booty Simulation:" + newline;
if(target.getObjectType().equals(Enum.GameObjectType.Mob) == false){
return;//ugh what?
}
Mob mob = (Mob) target;
output += "Name: " + mob.getName() + newline;
output += "Special Loot:" + newline;
@@ -51,7 +55,7 @@ public class SimulateBootyCmd extends AbstractDevCmd {
int failures = 0;
int goldAmount = 0;
for (int i = 0; i < 10000; ++i) {
for (int i = 0; i < 1000; ++i) {
try {
mob.loadInventory();
@@ -85,6 +89,9 @@ public class SimulateBootyCmd extends AbstractDevCmd {
}
} catch (Exception ex) {
failures++;
//throwbackError(playerCharacter,ex.getLocalizedMessage());
//Logger.error(ex.fillInStackTrace());
//return;
}
if (mob.getEquip() != null) {
for (MobEquipment me : mob.getEquip().values()) {
@@ -131,8 +138,17 @@ public class SimulateBootyCmd extends AbstractDevCmd {
}
output += "GLASS DROPS: " + GlassItems.size() + newline;
for(Item glass : GlassItems){
output += " " + glass.getName() + newline;
}
output += "RUNE DROPS: " + Runes.size() + newline;
for(Item rune : Runes){
output += " " + rune.getName() + newline;
}
output += "CONTRACTS DROPS: " + Contracts.size() + newline;
for(Item contract : Contracts){
output += " " + contract.getName() + newline;
}
output += "RESOURCE DROPS: " + Resources.size() + newline;
output += "OFFERINGS DROPPED: " + Offerings.size() + newline;
output += "ENCHANTED ITEMS DROPPED: " + OtherDrops.size() + newline;