Browse Source

Merge branch 'magicbox1.5' of http://repo.magicbane.com/MagicBane/Server into magicbox1.5

master
FatBoy-DOTC 1 year ago
parent
commit
9a68509847
  1. 1024
      src/engine/Enum.java
  2. 11
      src/engine/ai/MobileFSMManager.java
  3. 9
      src/engine/gameManager/ConfigManager.java
  4. 7
      src/engine/gameManager/ZoneManager.java
  5. 3
      src/engine/objects/PlayerCharacter.java

1024
src/engine/Enum.java

File diff suppressed because it is too large Load Diff

11
src/engine/ai/MobileFSMManager.java

@ -47,10 +47,15 @@ public class MobileFSMManager { @@ -47,10 +47,15 @@ public class MobileFSMManager {
};
alive = true;
//assign the AI varibales base don difficulty scaling from config file:
float difficulty = Float.parseFloat(ConfigManager.MB_MOB_DIFFICULTY.getValue());
AI_BASE_AGGRO_RANGE = (int)(100 * difficulty); // range at which aggressive mobs will attack you
AI_POWER_DIVISOR = (int)(20 * (1.5f-difficulty)); //duration between mob casts
float difficulty = Float.parseFloat(ConfigManager.MB_AI_AGGRO_RANGE.getValue());
AI_BASE_AGGRO_RANGE = (int) (100 * difficulty); // range at which aggressive mobs will attack you
difficulty = Float.parseFloat(ConfigManager.MB_AI_CAST_FREQUENCY.getValue());
AI_POWER_DIVISOR = (int) (20 * (1.5f - difficulty)); //duration between mob casts
Thread t = new Thread(worker, "MobileFSMManager");
t.start();
}

9
src/engine/gameManager/ConfigManager.java

@ -61,6 +61,11 @@ public enum ConfigManager { @@ -61,6 +61,11 @@ public enum ConfigManager {
MB_WORLD_MAINTENANCE,
MB_WORLD_GREETING,
MB_WORLD_KEYCLONE_MAX,
MB_USE_RUINS,
// Mobile AI modifiers
MB_AI_CAST_FREQUENCY,
MB_AI_AGGRO_RANGE,
//drop rates
MB_NORMAL_EXP_RATE,
@ -86,9 +91,7 @@ public enum ConfigManager { @@ -86,9 +91,7 @@ public enum ConfigManager {
MB_MAGICBOT_FORTOFIX,
MB_MAGICBOT_RECRUIT,
MB_MAGICBOT_MAGICBOX,
MB_MAGICBOT_ADMINLOG,
MB_MOB_DIFFICULTY;//0.1(easy) - 1.0(hard)
MB_MAGICBOT_ADMINLOG;
// Map to hold our config pulled in from the environment
// We also use the config to point to the current message pump

7
src/engine/gameManager/ZoneManager.java

@ -103,8 +103,7 @@ public enum ZoneManager { @@ -103,8 +103,7 @@ public enum ZoneManager {
ZoneManager.zonesByID.put(zoneID, zone);
if (zone != null)
ZoneManager.zonesByUUID.put(zone.getObjectUUID(), zone);
ZoneManager.zonesByUUID.put(zone.getObjectUUID(), zone);
ZoneManager.zonesByName.put(zone.getName().toLowerCase(), zone);
@ -144,6 +143,10 @@ public enum ZoneManager { @@ -144,6 +143,10 @@ public enum ZoneManager {
return ZoneManager.zonesByID.get(zoneID);
}
public static Zone getZoneByName(final String zoneName) {
return ZoneManager.zonesByName.get(zoneName);
}
public static final Collection<Zone> getAllZones() {
return ZoneManager.zonesByUUID.values();
}

3
src/engine/objects/PlayerCharacter.java

@ -879,14 +879,11 @@ public class PlayerCharacter extends AbstractCharacter { @@ -879,14 +879,11 @@ public class PlayerCharacter extends AbstractCharacter {
//handle rented room binds.
if (bindBuilding == null){
bindLocation = Enum.Ruins.getRandomRuin().getLocation();
return bindLocation;
}
bindLocation = BuildingManager.GetBindLocationForBuilding(bindBuilding);
if (bindLocation == null)

Loading…
Cancel
Save