Compare commits
No commits in common. 'lakebane-dex-penalty' and 'master' have entirely different histories.
lakebane-d
...
master
115 changed files with 2337 additions and 7366 deletions
@ -1,63 +0,0 @@
@@ -1,63 +0,0 @@
|
||||
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
|
||||
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
|
||||
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
|
||||
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
|
||||
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
|
||||
// Magicbane Emulator Project © 2013 - 2022
|
||||
// www.magicbane.com
|
||||
|
||||
|
||||
package engine.devcmd.cmds; |
||||
|
||||
import engine.Enum.ItemContainerType; |
||||
import engine.Enum.ItemType; |
||||
import engine.Enum.OwnerType; |
||||
import engine.devcmd.AbstractDevCmd; |
||||
import engine.gameManager.ChatManager; |
||||
import engine.gameManager.DbManager; |
||||
import engine.objects.*; |
||||
import engine.powers.EffectsBase; |
||||
|
||||
import java.util.ArrayList; |
||||
|
||||
/** |
||||
* @author Eighty |
||||
*/ |
||||
public class GimmeCmd extends AbstractDevCmd { |
||||
|
||||
public GimmeCmd() { |
||||
super("gimme"); |
||||
} |
||||
|
||||
@Override |
||||
protected void _doCmd(PlayerCharacter pc, String[] words, |
||||
AbstractGameObject target) { |
||||
int amt = 0; |
||||
int currentGold = pc.getCharItemManager().getGoldInventory().getNumOfItems(); |
||||
amt = 10000000 - currentGold; |
||||
if (!pc.getCharItemManager().addGoldToInventory(amt, true)) { |
||||
throwbackError(pc, "Failed to add gold to inventory"); |
||||
return; |
||||
} |
||||
|
||||
ChatManager.chatSayInfo(pc, amt + " gold added to inventory"); |
||||
|
||||
if(pc.level < 75) { |
||||
pc.setLevel((short) 75); |
||||
ChatManager.chatSayInfo(pc, "Level set to 75"); |
||||
} |
||||
pc.getCharItemManager().updateInventory(); |
||||
|
||||
} |
||||
|
||||
@Override |
||||
protected String _getHelpString() { |
||||
return "Round up current gold in inventory to 10,000,000"; |
||||
} |
||||
|
||||
@Override |
||||
protected String _getUsageString() { |
||||
return "'./gimme"; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,77 @@
@@ -0,0 +1,77 @@
|
||||
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
|
||||
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
|
||||
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
|
||||
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
|
||||
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
|
||||
// Magicbane Emulator Project © 2013 - 2022
|
||||
// www.magicbane.com
|
||||
|
||||
|
||||
package engine.devcmd.cmds; |
||||
|
||||
import engine.devcmd.AbstractDevCmd; |
||||
import engine.gameManager.ZoneManager; |
||||
import engine.objects.AbstractGameObject; |
||||
import engine.objects.PlayerCharacter; |
||||
|
||||
/** |
||||
* ./hotzone <- display the current hotzone & time remaining |
||||
* ./hotzone random <- change hotzone to random new zone |
||||
*/ |
||||
|
||||
public class HotzoneCmd extends AbstractDevCmd { |
||||
|
||||
public HotzoneCmd() { |
||||
super("hotzone"); |
||||
} |
||||
|
||||
@Override |
||||
protected void _doCmd(PlayerCharacter playerCharacter, String[] words, |
||||
AbstractGameObject target) { |
||||
|
||||
StringBuilder data = new StringBuilder(); |
||||
String outString; |
||||
|
||||
for (String s : words) { |
||||
data.append(s); |
||||
data.append(' '); |
||||
} |
||||
|
||||
String input = data.toString().trim(); |
||||
|
||||
if (input.length() == 0) { |
||||
outString = "Current hotZone: " + ZoneManager.hotZone.getName() + "\r\n"; |
||||
outString += "Available hotZones: " + ZoneManager.availableHotZones(); |
||||
throwbackInfo(playerCharacter, outString); |
||||
return; |
||||
} |
||||
|
||||
if (input.equalsIgnoreCase("random")) { |
||||
ZoneManager.generateAndSetRandomHotzone(); |
||||
outString = "New hotZone: " + ZoneManager.hotZone.getName() + "\r\n"; |
||||
outString += "Available hotZones: " + ZoneManager.availableHotZones(); |
||||
throwbackInfo(playerCharacter, outString); |
||||
return; |
||||
} |
||||
|
||||
if (input.equalsIgnoreCase("reset")) { |
||||
ZoneManager.resetHotZones(); |
||||
throwbackInfo(playerCharacter, "Available hotZones: " + ZoneManager.availableHotZones()); |
||||
return; |
||||
} |
||||
|
||||
return; |
||||
} |
||||
|
||||
@Override |
||||
protected String _getHelpString() { |
||||
return "Use no arguments to see the current hotzone or \"random\" to change it randomly."; |
||||
} |
||||
|
||||
@Override |
||||
protected String _getUsageString() { |
||||
return "'./hotzone [random]"; |
||||
} |
||||
|
||||
|
||||
} |
@ -1,168 +0,0 @@
@@ -1,168 +0,0 @@
|
||||
package engine.gameManager; |
||||
|
||||
import engine.Enum; |
||||
import engine.InterestManagement.WorldGrid; |
||||
import engine.exception.MsgSendException; |
||||
import engine.math.Vector3f; |
||||
import engine.math.Vector3fImmutable; |
||||
import engine.objects.*; |
||||
import engine.server.MBServerStatics; |
||||
import org.pmw.tinylog.Logger; |
||||
|
||||
import java.util.*; |
||||
import java.util.concurrent.ThreadLocalRandom; |
||||
|
||||
public class ArenaManager { |
||||
private static final List<Arena> activeArenas = new ArrayList<>(); |
||||
public static final List<PlayerCharacter> playerQueue = new ArrayList<>(); |
||||
public static Long pulseDelay = 180000L; |
||||
public static Long lastExecution = 0L; |
||||
|
||||
public static void pulseArenas() { |
||||
if(lastExecution == 0L){ |
||||
lastExecution = System.currentTimeMillis(); |
||||
} |
||||
|
||||
if(activeArenas.isEmpty() && playerQueue.isEmpty()) |
||||
return; |
||||
|
||||
Iterator<Arena> iterator = activeArenas.iterator(); |
||||
|
||||
while (iterator.hasNext()) { |
||||
Arena arena = iterator.next(); |
||||
if (arena.checkToComplete()) { |
||||
iterator.remove(); |
||||
} |
||||
} |
||||
|
||||
if(lastExecution + pulseDelay > System.currentTimeMillis()) |
||||
return; |
||||
|
||||
lastExecution = System.currentTimeMillis(); |
||||
|
||||
while (playerQueue.size() > 1) { |
||||
createArena(); |
||||
} |
||||
} |
||||
|
||||
public static void joinQueue(PlayerCharacter player) { |
||||
if (!playerQueue.contains(player)) { |
||||
playerQueue.add(player); |
||||
} |
||||
for(PlayerCharacter pc : playerQueue){ |
||||
if(pc.equals(player)) |
||||
continue; |
||||
ChatManager.chatSystemInfo(pc, player.getName() + " has joined the arena que. There are now " + playerQueue.size() + " players queued."); |
||||
} |
||||
} |
||||
|
||||
public static void leaveQueue(PlayerCharacter player) { |
||||
playerQueue.remove(player); |
||||
for(PlayerCharacter pc : playerQueue){ |
||||
if(pc.equals(player)) |
||||
continue; |
||||
ChatManager.chatSystemInfo(pc, player.getName() + " has left the arena que. There are now " + playerQueue.size() + " players queued."); |
||||
} |
||||
} |
||||
|
||||
private static void createArena() { |
||||
if (playerQueue.size() > 1) { |
||||
|
||||
Collections.shuffle(playerQueue); |
||||
Arena newArena = new Arena(); |
||||
|
||||
//set starting time
|
||||
newArena.startTime = System.currentTimeMillis(); |
||||
|
||||
//decide an arena location
|
||||
newArena.loc = selectRandomArenaLocation(); |
||||
|
||||
// Assign players to the arena
|
||||
newArena.player1 = playerQueue.remove(0); |
||||
newArena.player2 = playerQueue.remove(0); |
||||
|
||||
// Teleport players to the arena location
|
||||
Zone sdr = ZoneManager.getZoneByUUID(656); |
||||
MovementManager.translocate(newArena.player1, Vector3fImmutable.getRandomPointOnCircle(newArena.loc,75f), null); |
||||
MovementManager.translocate(newArena.player2, Vector3fImmutable.getRandomPointOnCircle(newArena.loc,75f), null); |
||||
|
||||
// Add the new arena to the active arenas list
|
||||
activeArenas.add(newArena); |
||||
} |
||||
} |
||||
|
||||
public static void endArena(Arena arena, PlayerCharacter winner, PlayerCharacter loser, String condition){ |
||||
if (winner != null && loser != null) { |
||||
Logger.info("[ARENA] The fight between {} and {} is concluded. Victor: {}", |
||||
arena.player1.getName(), arena.player2.getName(), winner.getName()); |
||||
} else { |
||||
Logger.info("[ARENA] The fight between {} and {} is concluded. No Winner Declared.", |
||||
arena.player1.getName(), arena.player2.getName()); |
||||
} |
||||
// Teleport players to the arena location
|
||||
Zone sdr = ZoneManager.getZoneByUUID(656); |
||||
MovementManager.translocate(arena.player1, Vector3fImmutable.getRandomPointOnCircle(sdr.getLoc(),50f), null); |
||||
MovementManager.translocate(arena.player2, Vector3fImmutable.getRandomPointOnCircle(sdr.getLoc(),50f), null); |
||||
|
||||
|
||||
|
||||
activeArenas.remove(arena); |
||||
|
||||
if(winner != null){ |
||||
ChatManager.chatPVP("[ARENA] " + winner.getName() + " has slain " + loser.getName() + " in the arena!"); |
||||
//handle prize distribution
|
||||
//ItemBase specialLoot = ItemBase.getItemBase(866);
|
||||
//Item promoted = new MobLoot(winner, specialLoot, 1, false).promoteToItem(winner);
|
||||
//promoted.setNumOfItems(21235);
|
||||
//promoted.setName("Special Banker(21235)");
|
||||
//DbManager.ItemQueries.UPDATE_NUM_ITEMS(promoted,21235);
|
||||
//winner.getCharItemManager().addItemToInventory(promoted);
|
||||
//winner.getCharItemManager().updateInventory();
|
||||
} |
||||
} |
||||
|
||||
public static Vector3fImmutable selectRandomArenaLocation() { |
||||
boolean locSet = false; |
||||
Vector3fImmutable loc = Vector3fImmutable.ZERO; |
||||
|
||||
while (!locSet) { |
||||
try { |
||||
float x = ThreadLocalRandom.current().nextInt(114300, 123600); |
||||
float z = ThreadLocalRandom.current().nextInt(82675, 91700); |
||||
float y = 0; // Y coordinate is always 0
|
||||
|
||||
loc = new Vector3fImmutable(x, y, z * -1); |
||||
HashSet<AbstractWorldObject> inRange = WorldGrid.getObjectsInRangePartial(loc,500f, MBServerStatics.MASK_PLAYER); |
||||
if(inRange.isEmpty() && !isUnderWater(loc)) |
||||
locSet = true; |
||||
//}
|
||||
}catch(Exception e){ |
||||
|
||||
} |
||||
} |
||||
|
||||
return loc; |
||||
} |
||||
|
||||
public static boolean isUnderWater(Vector3fImmutable loc) { |
||||
|
||||
try { |
||||
|
||||
Zone zone = ZoneManager.findSmallestZone(loc); |
||||
|
||||
if (zone.getSeaLevel() != 0) { |
||||
|
||||
float localAltitude = loc.y; |
||||
if (localAltitude < zone.getSeaLevel()) |
||||
return true; |
||||
} else { |
||||
if (loc.y < 0) |
||||
return true; |
||||
} |
||||
} catch (Exception e) { |
||||
|
||||
} |
||||
|
||||
return false; |
||||
} |
||||
} |
@ -1,347 +0,0 @@
@@ -1,347 +0,0 @@
|
||||
package engine.gameManager; |
||||
|
||||
import engine.Enum; |
||||
import engine.InterestManagement.InterestManager; |
||||
import engine.InterestManagement.WorldGrid; |
||||
import engine.math.Vector3f; |
||||
import engine.math.Vector3fImmutable; |
||||
import engine.objects.*; |
||||
import org.pmw.tinylog.Logger; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.HashMap; |
||||
import java.util.concurrent.ThreadLocalRandom; |
||||
|
||||
public class StrongholdManager { |
||||
|
||||
public static void processStrongholds() { |
||||
ArrayList<Mine> mines = Mine.getMines(); |
||||
|
||||
|
||||
//process strongholds selecting 3 randomly to become active
|
||||
int count = 0; |
||||
while (count < 3) { |
||||
int random = ThreadLocalRandom.current().nextInt(1, mines.size()) - 1; |
||||
Mine mine = mines.get(random); |
||||
if (mine != null) { |
||||
if (!mine.isActive && !mine.isStronghold) { |
||||
StartStronghold(mine); |
||||
count++; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
public static void StartStronghold(Mine mine){ |
||||
|
||||
//remove buildings
|
||||
Building tower = BuildingManager.getBuilding(mine.getBuildingID()); |
||||
if(tower == null) |
||||
return; |
||||
|
||||
mine.isStronghold = true; |
||||
mine.strongholdMobs = new ArrayList<>(); |
||||
mine.oldBuildings = new HashMap<>(); |
||||
|
||||
Zone mineZone = ZoneManager.findSmallestZone(tower.loc); |
||||
for(Building building : mineZone.zoneBuildingSet){ |
||||
mine.oldBuildings.put(building.getObjectUUID(),building.meshUUID); |
||||
building.setMeshUUID(407650); |
||||
building.setMeshScale(new Vector3f(0,0,0)); |
||||
InterestManager.setObjectDirty(building); |
||||
WorldGrid.updateObject(building); |
||||
} |
||||
|
||||
//update tower to become stronghold mesh
|
||||
tower.setMeshUUID(getStrongholdMeshID(mine.getParentZone())); |
||||
tower.setMeshScale(new Vector3f(1,1,1)); |
||||
InterestManager.setObjectDirty(tower); |
||||
WorldGrid.updateObject(tower); |
||||
|
||||
//create elite mobs
|
||||
for(int i = 0; i < mine.capSize * 2; i++){ |
||||
Vector3fImmutable loc = Vector3fImmutable.getRandomPointOnCircle(tower.loc,30); |
||||
MobBase guardBase = MobBase.getMobBase(getStrongholdGuardianID(tower.meshUUID)); |
||||
Mob guard = Mob.createStrongholdMob(guardBase.getLoadID(), loc, Guild.getErrantGuild(),true,mineZone,null,0, guardBase.getFirstName(),65); |
||||
if(guard != null){ |
||||
guard.parentZone = mine.getParentZone(); |
||||
guard.bindLoc = loc; |
||||
guard.setLoc(loc); |
||||
guard.StrongholdGuardian = true; |
||||
guard.equipmentSetID = getStrongholdMobEquipSetID(guard); |
||||
guard.runAfterLoad(); |
||||
guard.setLevel((short)65); |
||||
guard.setResists(new Resists("Elite")); |
||||
guard.spawnTime = 1000000000; |
||||
guard.BehaviourType = Enum.MobBehaviourType.Aggro; |
||||
mine.strongholdMobs.add(guard); |
||||
LootManager.GenerateStrongholdLoot(guard,false,false); |
||||
guard.healthMax = 12500; |
||||
guard.setHealth(guard.healthMax); |
||||
guard.maxDamageHandOne = 1550; |
||||
guard.minDamageHandOne = 750; |
||||
guard.atrHandOne = 1800; |
||||
guard.defenseRating = 2200; |
||||
guard.setFirstName("Elite Guardian"); |
||||
InterestManager.setObjectDirty(guard); |
||||
WorldGrid.addObject(guard,loc.x,loc.z); |
||||
WorldGrid.updateObject(guard); |
||||
guard.stronghold = mine; |
||||
guard.mobPowers.clear(); |
||||
guard.mobPowers.put(429399948,20); // find weakness
|
||||
} |
||||
} |
||||
//create stronghold commander
|
||||
Vector3fImmutable loc = tower.loc; |
||||
MobBase commanderBase = MobBase.getMobBase(getStrongholdCommanderID(tower.meshUUID)); |
||||
Mob commander = Mob.createStrongholdMob(commanderBase.getLoadID(), loc,Guild.getErrantGuild(),true,mineZone,null,0, commanderBase.getFirstName(),75); |
||||
if(commander != null){ |
||||
commander.parentZone = mine.getParentZone(); |
||||
commander.bindLoc = loc; |
||||
commander.setLoc(loc); |
||||
commander.StrongholdCommander = true; |
||||
commander.equipmentSetID = getStrongholdMobEquipSetID(commander); |
||||
commander.runAfterLoad(); |
||||
commander.setLevel((short)75); |
||||
commander.setResists(new Resists("Elite")); |
||||
commander.spawnTime = 1000000000; |
||||
commander.BehaviourType = Enum.MobBehaviourType.Aggro; |
||||
commander.mobPowers.clear(); |
||||
commander.mobPowers.put(429032838, 40); // gravechill
|
||||
commander.mobPowers.put(429757701,20); // magebolt
|
||||
commander.mobPowers.put(429121388,20); // blight
|
||||
commander.mobPowers.put(431566891,20); // lightning bolt
|
||||
commander.mobPowers.put(428716075,20); // fire bolt
|
||||
commander.mobPowers.put(429010987,20); // ice bolt
|
||||
mine.strongholdMobs.add(commander); |
||||
LootManager.GenerateStrongholdLoot(commander,true, false); |
||||
commander.healthMax = 50000; |
||||
commander.setHealth(commander.healthMax); |
||||
commander.maxDamageHandOne = 3500; |
||||
commander.minDamageHandOne = 1500; |
||||
commander.atrHandOne = 3500; |
||||
commander.defenseRating = 3500; |
||||
commander.setFirstName("Guardian Commander"); |
||||
InterestManager.setObjectDirty(commander); |
||||
WorldGrid.addObject(commander,loc.x,loc.z); |
||||
WorldGrid.updateObject(commander); |
||||
commander.stronghold = mine; |
||||
} |
||||
|
||||
mine.isActive = true; |
||||
tower.setProtectionState(Enum.ProtectionState.PROTECTED); |
||||
tower.getBounds().setRegions(tower); |
||||
InterestManager.setObjectDirty(tower); |
||||
WorldGrid.updateObject(tower); |
||||
ChatManager.chatSystemChannel(mine.getZoneName() + "'s Stronghold Has Begun!"); |
||||
Logger.info(mine.getZoneName() + "'s Stronghold Has Begun!"); |
||||
} |
||||
|
||||
public static void EndStronghold(Mine mine){ |
||||
|
||||
//restore the buildings
|
||||
Building tower = BuildingManager.getBuilding(mine.getBuildingID()); |
||||
if(tower == null) |
||||
return; |
||||
|
||||
mine.isStronghold = false; |
||||
|
||||
//get rid of the mobs
|
||||
for(Mob mob : mine.strongholdMobs) { |
||||
mob.despawn(); |
||||
mob.removeFromCache(); |
||||
DbManager.MobQueries.DELETE_MOB(mob); |
||||
} |
||||
|
||||
//restore the buildings
|
||||
Zone mineZone = ZoneManager.findSmallestZone(tower.loc); |
||||
for(Building building : mineZone.zoneBuildingSet){ |
||||
if(mine.oldBuildings.containsKey(building.getObjectUUID())) { |
||||
building.setMeshUUID(mine.oldBuildings.get(building.getObjectUUID())); |
||||
building.setMeshScale(new Vector3f(1, 1, 1)); |
||||
InterestManager.setObjectDirty(building); |
||||
WorldGrid.updateObject(building); |
||||
} |
||||
} |
||||
|
||||
//update tower to become Mine Tower again
|
||||
tower.setMeshUUID(1500100); |
||||
|
||||
mine.isActive = false; |
||||
tower.setProtectionState(Enum.ProtectionState.NPC); |
||||
tower.getBounds().setRegions(tower); |
||||
InterestManager.setObjectDirty(tower); |
||||
WorldGrid.updateObject(tower); |
||||
ChatManager.chatSystemChannel(mine.getZoneName() + "'s Stronghold Has Concluded!"); |
||||
Logger.info(mine.getZoneName() + "'s Stronghold Has Concluded!"); |
||||
} |
||||
|
||||
public static int getStrongholdMeshID(Zone parent){ |
||||
while(!parent.isMacroZone()){ |
||||
parent = parent.getParent(); |
||||
if(parent.getName().equalsIgnoreCase("seafloor")){ |
||||
return 0; |
||||
} |
||||
} |
||||
switch(parent.getObjectUUID()){ |
||||
case 197: |
||||
case 234: |
||||
case 178: |
||||
case 122: |
||||
return 814000; //Frost Giant Hall (ICE)
|
||||
case 968: |
||||
case 951: |
||||
case 313: |
||||
case 331: |
||||
return 5001500; // Lich Queens Keep (UNDEAD)
|
||||
case 785: |
||||
case 761: |
||||
case 717: |
||||
case 737: |
||||
return 1306600; // Temple of the Dragon (DESERT)
|
||||
case 353: |
||||
case 371: |
||||
case 388: |
||||
case 532: |
||||
return 564600; // Undead Lord's Keep (SWAMP)
|
||||
case 550: |
||||
case 508: |
||||
case 475: |
||||
case 418: |
||||
return 1326600; // elven hall
|
||||
case 437: |
||||
case 491: |
||||
case 590: |
||||
case 569: |
||||
return 602400; |
||||
case 824: |
||||
case 842: |
||||
case 632: |
||||
return 1600000; // chaos temple
|
||||
} |
||||
return 456100; // small stockade
|
||||
} |
||||
|
||||
public static int getStrongholdGuardianID(int ID){ |
||||
switch(ID){ |
||||
case 814000: |
||||
return 253004; // Mountain Giant Raider Axe
|
||||
case 5001500: |
||||
return 253008; // Vampire Spear Warrior
|
||||
case 1306600: |
||||
return 253007; // Desert Orc Warrior
|
||||
case 564600: |
||||
return 253010; // Kolthoss Warrior
|
||||
case 1326600: |
||||
return 253005; //elven warrior
|
||||
case 602400: |
||||
return 253009; // templar missionary
|
||||
case 1600000: |
||||
return 253006; // scourger
|
||||
} |
||||
return 13434; // human sword and board warrior
|
||||
} |
||||
|
||||
public static int getStrongholdEpicID(int ID){ |
||||
switch(ID){ |
||||
case 814000: |
||||
return 253023; // Mountain Giant Raider Axe
|
||||
case 5001500: |
||||
return 253022; // Vampire Spear Warrior
|
||||
case 1306600: |
||||
return 253021; // Desert Orc Warrior
|
||||
case 564600: |
||||
return 253018; // Kolthoss Warrior
|
||||
case 1326600: |
||||
return 253019; //elven warrior
|
||||
case 602400: |
||||
return 253024; // templar missionary
|
||||
case 1600000: |
||||
return 253020; // scourger
|
||||
} |
||||
return 13434; // human sword and board warrior
|
||||
} |
||||
|
||||
public static int getStrongholdCommanderID(int ID){ |
||||
switch(ID){ |
||||
case 814000: |
||||
return 253017; |
||||
case 5001500: |
||||
return 253012; |
||||
case 1306600: |
||||
return 253016; // Desert Orc Xbow
|
||||
case 564600: |
||||
return 253011; // xbow kolthoss
|
||||
case 1326600: |
||||
return 253013; //elven bow warrior
|
||||
case 602400: |
||||
return 253015; // dune giant with xbow
|
||||
case 1600000: |
||||
return 253014; // barbator
|
||||
} |
||||
return 13433; |
||||
} |
||||
|
||||
public static int getStrongholdMobEquipSetID(Mob mob) { |
||||
if(mob.StrongholdGuardian){ |
||||
return 6327; |
||||
}else{ |
||||
return 10790; |
||||
} |
||||
} |
||||
|
||||
public static void CheckToEndStronghold(Mine mine) { |
||||
|
||||
boolean stillAlive = false; |
||||
for (Mob mob : mine.strongholdMobs) |
||||
if (mob.isAlive()) |
||||
stillAlive = true; |
||||
|
||||
if (!stillAlive) { |
||||
// Epic encounter
|
||||
|
||||
Building tower = BuildingManager.getBuilding(mine.getBuildingID()); |
||||
if (tower == null) |
||||
return; |
||||
|
||||
Zone mineZone = ZoneManager.findSmallestZone(tower.loc); |
||||
|
||||
Vector3fImmutable loc = tower.loc; |
||||
MobBase commanderBase = MobBase.getMobBase(getStrongholdEpicID(tower.meshUUID)); |
||||
Mob commander = Mob.createStrongholdMob(commanderBase.getLoadID(), loc, Guild.getErrantGuild(), true, mineZone, null, 0, commanderBase.getFirstName(), 75); |
||||
if (commander != null) { |
||||
commander.parentZone = mine.getParentZone(); |
||||
commander.bindLoc = loc; |
||||
commander.setLoc(loc); |
||||
commander.StrongholdEpic = true; |
||||
commander.equipmentSetID = getStrongholdMobEquipSetID(commander); |
||||
commander.runAfterLoad(); |
||||
commander.setLevel((short) 85); |
||||
commander.setResists(new Resists("Elite")); |
||||
commander.spawnTime = 1000000000; |
||||
commander.BehaviourType = Enum.MobBehaviourType.Aggro; |
||||
commander.mobPowers.clear(); |
||||
commander.mobPowers.put(429032838, 40); // gravechill
|
||||
commander.mobPowers.put(429757701,40); // magebolt
|
||||
commander.mobPowers.put(429121388,40); // blight
|
||||
commander.mobPowers.put(431566891,40); // lightning bolt
|
||||
commander.mobPowers.put(428716075,40); // fire bolt
|
||||
commander.mobPowers.put(429010987,40); // ice bolt
|
||||
mine.strongholdMobs.add(commander); |
||||
LootManager.GenerateStrongholdLoot(commander, true, true); |
||||
commander.healthMax = 250000; |
||||
commander.setHealth(commander.healthMax); |
||||
commander.maxDamageHandOne = 5000; |
||||
commander.minDamageHandOne = 2500; |
||||
commander.atrHandOne = 5000; |
||||
commander.defenseRating = 3500; |
||||
commander.setFirstName("Defender of " + mine.getParentZone().getParent().getName()); |
||||
InterestManager.setObjectDirty(commander); |
||||
WorldGrid.addObject(commander,loc.x,loc.z); |
||||
WorldGrid.updateObject(commander); |
||||
commander.stronghold = mine; |
||||
|
||||
} |
||||
} |
||||
} |
||||
} |
@ -1,195 +0,0 @@
@@ -1,195 +0,0 @@
|
||||
package engine.gameManager; |
||||
import engine.objects.Guild; |
||||
public class ZergManager { |
||||
|
||||
public static float getCurrentMultiplier(int count, int maxCount){ |
||||
switch(maxCount) { |
||||
case 3: return getMultiplier3Man(count); |
||||
case 5: return getMultiplier5Man(count); |
||||
case 10: return getMultiplier10Man(count); |
||||
case 20: return getMultiplier20Man(count); |
||||
case 30: return getMultiplier30Man(count); |
||||
case 40: return getMultiplier40Man(count); |
||||
default: return 1.0f; //unlimited
|
||||
} |
||||
} |
||||
public static float getMultiplier3Man(int count) { |
||||
if(count < 4) |
||||
return 1.0f; |
||||
|
||||
if(count > 6) |
||||
return 0.0f; |
||||
|
||||
switch(count){ |
||||
case 4: return 0.63f; |
||||
case 5: return 0.40f; |
||||
case 6: return 0.25f; |
||||
default: return 1.0f; |
||||
} |
||||
} |
||||
public static float getMultiplier5Man(int count) { |
||||
if(count < 6) |
||||
return 1.0f; |
||||
|
||||
if(count > 10) |
||||
return 0.0f; |
||||
|
||||
switch(count){ |
||||
case 6: return 0.75f; |
||||
case 7: return 0.57f; |
||||
case 8: return 0.44f; |
||||
case 9: return 0.33f; |
||||
case 10: return 0.25f; |
||||
default: return 1.0f; |
||||
} |
||||
} |
||||
public static float getMultiplier10Man(int count) { |
||||
if(count < 11) |
||||
return 1.0f; |
||||
|
||||
if(count > 20) |
||||
return 0.0f; |
||||
|
||||
switch(count){ |
||||
case 11: return 0.86f; |
||||
case 12: return 0.75f; |
||||
case 13: return 0.65f; |
||||
case 14: return 0.57f; |
||||
case 15: return 0.50f; |
||||
case 16: return 0.44f; |
||||
case 17: return 0.38f; |
||||
case 18: return 0.33f; |
||||
case 19: return 0.29f; |
||||
case 20: return 0.25f; |
||||
default: return 1.0f; |
||||
} |
||||
} |
||||
public static float getMultiplier20Man(int count) { |
||||
if(count < 21) |
||||
return 1.0f; |
||||
|
||||
if(count > 40) |
||||
return 0.0f; |
||||
|
||||
switch (count) |
||||
{ |
||||
case 21: return 0.93f; |
||||
case 22: return 0.86f; |
||||
case 23: return 0.80f; |
||||
case 24: return 0.75f; |
||||
case 25: return 0.70f; |
||||
case 26: return 0.65f; |
||||
case 27: return 0.61f; |
||||
case 28: return 0.57f; |
||||
case 29: return 0.53f; |
||||
case 30: return 0.50f; |
||||
case 31: return 0.47f; |
||||
case 32: return 0.44f; |
||||
case 33: return 0.41f; |
||||
case 34: return 0.38f; |
||||
case 35: return 0.36f; |
||||
case 36: return 0.33f; |
||||
case 37: return 0.31f; |
||||
case 38: return 0.29f; |
||||
case 39: return 0.27f; |
||||
case 40: return 0.25f; |
||||
default: return 1.0f; |
||||
} |
||||
|
||||
} |
||||
public static float getMultiplier30Man(int count) { |
||||
if(count < 31) |
||||
return 1.0f; |
||||
|
||||
if(count > 60) |
||||
return 0.0f; |
||||
|
||||
switch (count) |
||||
{ |
||||
case 31: return 0.95f; |
||||
case 32: return 0.91f; |
||||
case 33: return 0.86f; |
||||
case 34: return 0.82f; |
||||
case 35: return 0.79f; |
||||
case 36: return 0.75f; |
||||
case 37: return 0.72f; |
||||
case 38: return 0.68f; |
||||
case 39: return 0.65f; |
||||
case 40: return 0.63f; |
||||
case 41: return 0.60f; |
||||
case 42: return 0.57f; |
||||
case 43: return 0.55f; |
||||
case 44: return 0.52f; |
||||
case 45: return 0.50f; |
||||
case 46: return 0.48f; |
||||
case 47: return 0.46f; |
||||
case 48: return 0.44f; |
||||
case 49: return 0.42f; |
||||
case 50: return 0.40f; |
||||
case 51: return 0.38f; |
||||
case 52: return 0.37f; |
||||
case 53: return 0.35f; |
||||
case 54: return 0.33f; |
||||
case 55: return 0.32f; |
||||
case 56: return 0.30f; |
||||
case 57: return 0.29f; |
||||
case 58: return 0.28f; |
||||
case 59: return 0.26f; |
||||
case 60: return 0.25f; |
||||
default: return 1.0f; |
||||
} |
||||
|
||||
} |
||||
public static float getMultiplier40Man(int count) { |
||||
if(count < 41) |
||||
return 1.0f; |
||||
|
||||
if(count > 80) |
||||
return 0.0f; |
||||
|
||||
switch (count) |
||||
{ |
||||
case 41: return 0.96f; |
||||
case 42: return 0.93f; |
||||
case 43: return 0.90f; |
||||
case 44: return 0.86f; |
||||
case 45: return 0.83f; |
||||
case 46: return 0.80f; |
||||
case 47: return 0.78f; |
||||
case 48: return 0.75f; |
||||
case 49: return 0.72f; |
||||
case 50: return 0.70f; |
||||
case 51: return 0.68f; |
||||
case 52: return 0.65f; |
||||
case 53: return 0.63f; |
||||
case 54: return 0.61f; |
||||
case 55: return 0.59f; |
||||
case 56: return 0.57f; |
||||
case 57: return 0.55f; |
||||
case 58: return 0.53f; |
||||
case 59: return 0.52f; |
||||
case 60: return 0.50f; |
||||
case 61: return 0.48f; |
||||
case 62: return 0.47f; |
||||
case 63: return 0.45f; |
||||
case 64: return 0.44f; |
||||
case 65: return 0.42f; |
||||
case 66: return 0.41f; |
||||
case 67: return 0.40f; |
||||
case 68: return 0.38f; |
||||
case 69: return 0.37f; |
||||
case 70: return 0.36f; |
||||
case 71: return 0.35f; |
||||
case 72: return 0.33f; |
||||
case 73: return 0.32f; |
||||
case 74: return 0.31f; |
||||
case 75: return 0.30f; |
||||
case 76: return 0.29f; |
||||
case 77: return 0.28f; |
||||
case 78: return 0.27f; |
||||
case 79: return 0.26f; |
||||
case 80: return 0.25f; |
||||
default: return 1.0f; |
||||
} |
||||
} |
||||
} |
@ -1,82 +0,0 @@
@@ -1,82 +0,0 @@
|
||||
package engine.objects; |
||||
|
||||
import engine.InterestManagement.WorldGrid; |
||||
import engine.gameManager.ArenaManager; |
||||
import engine.gameManager.ChatManager; |
||||
import engine.gameManager.MovementManager; |
||||
import engine.math.Vector3fImmutable; |
||||
import engine.server.MBServerStatics; |
||||
|
||||
import java.util.HashSet; |
||||
|
||||
public class Arena { |
||||
public PlayerCharacter player1; |
||||
public PlayerCharacter player2; |
||||
public Long startTime; |
||||
public Vector3fImmutable loc; |
||||
|
||||
public Arena(){ |
||||
|
||||
} |
||||
public Boolean disqualify() { |
||||
HashSet<AbstractWorldObject> inRange = WorldGrid.getObjectsInRangePartial(this.loc, 250f, MBServerStatics.MASK_PLAYER); |
||||
HashSet<AbstractWorldObject> warningRange = WorldGrid.getObjectsInRangePartial(this.loc, 500f, MBServerStatics.MASK_PLAYER); |
||||
for(AbstractWorldObject obj : warningRange){ |
||||
PlayerCharacter pc = (PlayerCharacter)obj; |
||||
if(pc.equals(this.player1) || pc.equals(this.player2)) |
||||
continue; |
||||
|
||||
ChatManager.chatSystemInfo(pc, "WARNING!! You are entering an arena zone!"); |
||||
} |
||||
//boot out all non competitors
|
||||
for(AbstractWorldObject obj : inRange){ |
||||
if(obj.equals(this.player1)) |
||||
continue; |
||||
|
||||
if(obj.equals(this.player2)) |
||||
continue; |
||||
|
||||
PlayerCharacter intruder = (PlayerCharacter)obj; |
||||
MovementManager.translocate(intruder,new Vector3fImmutable(88853,32,45079),Regions.GetRegionForTeleport(new Vector3fImmutable(88853,32,45079))); |
||||
} |
||||
|
||||
if (!inRange.contains(this.player1) && inRange.contains(this.player2)) { |
||||
ArenaManager.endArena(this,this.player2,this.player1,"Player Has Left Arena"); |
||||
return true; |
||||
} else if (!inRange.contains(this.player2) && inRange.contains(this.player1)) { |
||||
ArenaManager.endArena(this,this.player1,this.player2,"Player Has Left Arena"); |
||||
return true; |
||||
}else if (!inRange.contains(this.player2) && !inRange.contains(this.player1)) { |
||||
ArenaManager.endArena(this,null,null,"Both Parties Have Left The Arena"); |
||||
return true; |
||||
} |
||||
return false; |
||||
} |
||||
|
||||
public Boolean checkToComplete(){ |
||||
|
||||
if(this.startTime == null) |
||||
this.startTime = System.currentTimeMillis(); |
||||
|
||||
if(System.currentTimeMillis() - this.startTime < 10000L) |
||||
return false; |
||||
|
||||
if(this.disqualify()) |
||||
return true; |
||||
|
||||
if(!this.player1.isAlive() && this.player2.isAlive()){ |
||||
ArenaManager.endArena(this,this.player2,this.player1,"Player Has Died"); |
||||
return true; |
||||
} else if(this.player1.isAlive() && !this.player2.isAlive()){ |
||||
ArenaManager.endArena(this,this.player1,this.player2,"Player Has Died"); |
||||
return true; |
||||
} else if(!this.player1.isAlive() && !this.player2.isAlive()){ |
||||
ArenaManager.endArena(this,null,null,"Both Players Have Died"); |
||||
return true; |
||||
} else if(this.startTime + 300000L < System.currentTimeMillis()){ |
||||
ArenaManager.endArena(this,null,null,"Time Has Elapsed"); |
||||
return true; |
||||
} |
||||
return false; |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -1,752 +0,0 @@
@@ -1,752 +0,0 @@
|
||||
package engine.objects; |
||||
|
||||
import engine.Enum; |
||||
import engine.powers.effectmodifiers.AbstractEffectModifier; |
||||
import engine.server.MBServerStatics; |
||||
import org.pmw.tinylog.Logger; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.HashMap; |
||||
import java.util.concurrent.ConcurrentHashMap; |
||||
|
||||
public class PlayerCombatStats { |
||||
|
||||
public PlayerCharacter owner; |
||||
//main hand data
|
||||
public int minDamageHandOne; |
||||
public int maxDamageHandOne; |
||||
public float attackSpeedHandOne; |
||||
public float rangeHandOne; |
||||
public float atrHandOne; |
||||
//off hand data
|
||||
public int minDamageHandTwo; |
||||
public int maxDamageHandTwo; |
||||
public float attackSpeedHandTwo; |
||||
public float rangeHandTwo; |
||||
public float atrHandTwo; |
||||
//defense
|
||||
public int defense; |
||||
//regen rates
|
||||
public float healthRegen; |
||||
public float manaRegen; |
||||
public float staminaRegen; |
||||
|
||||
public PlayerCombatStats(PlayerCharacter pc) { |
||||
this.owner = pc; |
||||
this.update(); |
||||
} |
||||
|
||||
public void update() { |
||||
try { |
||||
this.calculateATR(true); |
||||
} catch (Exception e) { |
||||
Logger.error("FAILED TO CALCULATE ATR FOR: " + this.owner.getObjectUUID()); |
||||
} |
||||
try { |
||||
this.calculateATR(false); |
||||
} catch (Exception e) { |
||||
Logger.error("FAILED TO CALCULATE ATR FOR: " + this.owner.getObjectUUID()); |
||||
} |
||||
try { |
||||
this.calculateMin(true); |
||||
} catch (Exception e) { |
||||
Logger.error("FAILED TO CALCULATE Min FOR: " + this.owner.getObjectUUID()); |
||||
} |
||||
try { |
||||
this.calculateMin(false); |
||||
} catch (Exception e) { |
||||
Logger.error("FAILED TO CALCULATE Min FOR: " + this.owner.getObjectUUID()); |
||||
} |
||||
try { |
||||
this.calculateMax(true); |
||||
} catch (Exception e) { |
||||
Logger.error("FAILED TO CALCULATE Max FOR: " + this.owner.getObjectUUID()); |
||||
} |
||||
try { |
||||
this.calculateMax(false); |
||||
} catch (Exception e) { |
||||
Logger.error("FAILED TO CALCULATE Max FOR: " + this.owner.getObjectUUID()); |
||||
} |
||||
try { |
||||
this.calculateAttackSpeed(true); |
||||
} catch (Exception e) { |
||||
Logger.error("FAILED TO CALCULATE Attack Speed FOR: " + this.owner.getObjectUUID()); |
||||
} |
||||
try { |
||||
this.calculateAttackSpeed(false); |
||||
} catch (Exception e) { |
||||
Logger.error("FAILED TO CALCULATE Attack Speed FOR: " + this.owner.getObjectUUID()); |
||||
} |
||||
try { |
||||
this.calculateAttackRange(true); |
||||
} catch (Exception e) { |
||||
Logger.error("FAILED TO CALCULATE Attack Range FOR: " + this.owner.getObjectUUID()); |
||||
} |
||||
try { |
||||
this.calculateAttackRange(false); |
||||
} catch (Exception e) { |
||||
Logger.error("FAILED TO CALCULATE Attack Range FOR: " + this.owner.getObjectUUID()); |
||||
} |
||||
try { |
||||
this.calculateRegen(); |
||||
} catch (Exception e) { |
||||
Logger.error("FAILED TO CALCULATE Regen FOR: " + this.owner.getObjectUUID()); |
||||
} |
||||
try { |
||||
this.calculateDefense(); |
||||
} catch (Exception e) { |
||||
Logger.error("FAILED TO CALCULATE Defense FOR: " + this.owner.getObjectUUID()); |
||||
} |
||||
} |
||||
|
||||
public void calculateATR(boolean mainHand) { |
||||
Item weapon; |
||||
float atr; |
||||
|
||||
if(mainHand) { |
||||
weapon = this.owner.charItemManager.getEquipped(1); |
||||
}else { |
||||
weapon = this.owner.charItemManager.getEquipped(2); |
||||
} |
||||
|
||||
String skill = "Unarmed Combat"; |
||||
String mastery = "Unarmed Combat Mastery"; |
||||
int primaryStat = getDexAfterPenalty(this.owner); |
||||
if(weapon != null) { |
||||
skill= weapon.getItemBase().getSkillRequired(); |
||||
mastery = weapon.getItemBase().getMastery(); |
||||
if(weapon.getItemBase().isStrBased()) |
||||
primaryStat = this.owner.statStrCurrent; |
||||
} |
||||
|
||||
float skillLevel = 0; |
||||
float masteryLevel = 0; |
||||
|
||||
if(this.owner.skills.containsKey(skill)) { |
||||
skillLevel = this.owner.skills.get(skill).getModifiedAmount(); |
||||
} |
||||
if(this.owner.skills.containsKey(mastery)) |
||||
masteryLevel = this.owner.skills.get(mastery).getModifiedAmount(); |
||||
|
||||
float stanceValue = 0.0f; |
||||
float atrEnchants = 0; |
||||
|
||||
for(String effID : this.owner.effects.keySet()) { |
||||
if (effID.contains("Stance")) { |
||||
for (AbstractEffectModifier mod : this.owner.effects.get(effID).getEffectModifiers()) { |
||||
if (mod.modType.equals(Enum.ModType.OCV)) { |
||||
float percent = mod.getPercentMod(); |
||||
int trains = this.owner.effects.get(effID).getTrains(); |
||||
float modValue = percent + (trains * mod.getRamp()); |
||||
stanceValue += modValue * 0.01f; |
||||
} |
||||
} |
||||
} else { |
||||
for (AbstractEffectModifier mod : this.owner.effects.get(effID).getEffectModifiers()) { |
||||
if (mod.modType.equals(Enum.ModType.OCV)) { |
||||
float value = mod.getMinMod(); |
||||
int trains = this.owner.effects.get(effID).getTrains(); |
||||
float modValue = value + (trains * mod.getRamp()); |
||||
atrEnchants += modValue; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
float prefixValues = 0.0f; |
||||
if(weapon != null){ |
||||
if(this.owner.charItemManager.getEquipped(1) != null){ |
||||
for(Effect eff : this.owner.charItemManager.getEquipped(1).effects.values()){ |
||||
for(AbstractEffectModifier mod : eff.getEffectModifiers()){ |
||||
if(mod.modType.equals(Enum.ModType.OCV)){ |
||||
prefixValues += mod.minMod + (eff.getTrains() * mod.getRamp()); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
if(this.owner.charItemManager.getEquipped(2) != null){ |
||||
for(Effect eff : this.owner.charItemManager.getEquipped(2).effects.values()){ |
||||
for(AbstractEffectModifier mod : eff.getEffectModifiers()){ |
||||
if(mod.modType.equals(Enum.ModType.OCV)){ |
||||
prefixValues += mod.minMod + (eff.getTrains() * mod.getRamp()); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
float preciseRune = 1.0f; |
||||
for(CharacterRune rune : this.owner.runes){ |
||||
if(rune.getRuneBase().getName().equals("Precise")) |
||||
preciseRune += 0.05f; |
||||
} |
||||
|
||||
if(weapon != null && weapon.getItemBase().isStrBased()){ |
||||
atr = (((primaryStat / 2) + (skillLevel * 4 + masteryLevel * 3) + prefixValues) * preciseRune + atrEnchants) * (1.0f + stanceValue); |
||||
atr = (float) Math.round(atr); |
||||
}else { |
||||
float dexterity = getDexAfterPenalty(this.owner); |
||||
atr = dexterity / 2; |
||||
atr += skillLevel * 4; |
||||
atr += masteryLevel * 3; |
||||
atr += prefixValues; |
||||
atr *= preciseRune; |
||||
atr += atrEnchants; |
||||
atr *= 1.0f + stanceValue; |
||||
atr = (float) Math.round(atr); |
||||
} |
||||
|
||||
|
||||
|
||||
if(mainHand){ |
||||
this.atrHandOne = atr; |
||||
}else{ |
||||
this.atrHandTwo = atr; |
||||
if(this.owner.charItemManager.getEquipped(1) == null && this.owner.charItemManager.getEquipped(2) != null){ |
||||
if(!this.owner.charItemManager.getEquipped(2).getItemBase().isShield()) |
||||
this.atrHandOne = 0.0f; |
||||
}else if(this.owner.charItemManager.getEquipped(2) == null && this.owner.charItemManager.getEquipped(1) != null){ |
||||
this.atrHandTwo = 0.0f; |
||||
} |
||||
} |
||||
} //perfect DO NOT TOUCH
|
||||
|
||||
public void calculateMin(boolean mainHand) { |
||||
Item weapon; |
||||
float specialDex = this.owner.statDexBase; |
||||
specialDex += this.owner.bonuses.getFloat(Enum.ModType.Attr, Enum.SourceType.Dexterity); |
||||
float baseDMG = 1; |
||||
float primaryStat = specialDex;//getDexAfterPenalty(this.owner);
|
||||
float secondaryStat = this.owner.statStrCurrent; |
||||
double weaponSkill = 5; |
||||
double weaponMastery = 5; |
||||
|
||||
if (mainHand) { |
||||
weapon = this.owner.charItemManager.getEquipped(1); |
||||
} else { |
||||
weapon = this.owner.charItemManager.getEquipped(2); |
||||
} |
||||
|
||||
String skill = "Unarmed Combat"; |
||||
String mastery = "Unarmed Combat Mastery"; |
||||
|
||||
if (weapon != null) { |
||||
baseDMG = weapon.getItemBase().getMinDamage(); |
||||
skill = weapon.getItemBase().getSkillRequired(); |
||||
mastery = weapon.getItemBase().getMastery(); |
||||
if (weapon.getItemBase().isStrBased()) { |
||||
primaryStat = this.owner.statStrCurrent; |
||||
secondaryStat = specialDex;//getDexAfterPenalty(this.owner);
|
||||
} |
||||
for(Effect eff : weapon.effects.values()){ |
||||
for(AbstractEffectModifier mod : eff.getEffectModifiers()){ |
||||
if(mod.modType.equals(Enum.ModType.MinDamage)){ |
||||
baseDMG += mod.minMod + (mod.getRamp() * eff.getTrains()); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
if (this.owner.skills.containsKey(skill)) { |
||||
weaponSkill = this.owner.skills.get(skill).getTotalSkillPercet(); |
||||
} |
||||
|
||||
if (this.owner.skills.containsKey(mastery)) { |
||||
weaponMastery = this.owner.skills.get(mastery).getTotalSkillPercet(); |
||||
} |
||||
|
||||
double minDMG = baseDMG * ( |
||||
0.0048 * primaryStat + |
||||
0.049 * Math.sqrt(primaryStat - 0.75) + |
||||
0.0066 * secondaryStat + |
||||
0.064 * Math.sqrt(secondaryStat - 0.75) + |
||||
0.01 * (weaponSkill + weaponMastery) |
||||
); |
||||
if(this.owner.bonuses != null){ |
||||
minDMG += this.owner.bonuses.getFloat(Enum.ModType.MinDamage, Enum.SourceType.None); |
||||
minDMG *= 1 + this.owner.bonuses.getFloatPercentAll(Enum.ModType.MeleeDamageModifier, Enum.SourceType.None); |
||||
} |
||||
|
||||
if(this.owner.charItemManager != null){ |
||||
if(this.owner.charItemManager.getEquipped(1) != null && this.owner.charItemManager.getEquipped(2) != null && !this.owner.charItemManager.getEquipped(2).getItemBase().isShield()){ |
||||
minDMG *= 0.7f; |
||||
} |
||||
} |
||||
|
||||
int roundedMin = (int)Math.round(minDMG); |
||||
|
||||
if (mainHand) { |
||||
this.minDamageHandOne = roundedMin; |
||||
} else { |
||||
this.minDamageHandTwo = roundedMin; |
||||
if(this.owner.charItemManager.getEquipped(1) == null && this.owner.charItemManager.getEquipped(2) != null){ |
||||
if(!this.owner.charItemManager.getEquipped(2).getItemBase().isShield()) |
||||
this.minDamageHandOne = 0; |
||||
}else if(this.owner.charItemManager.getEquipped(2) == null && this.owner.charItemManager.getEquipped(1) != null){ |
||||
this.minDamageHandTwo = 0; |
||||
} |
||||
} |
||||
} |
||||
|
||||
public void calculateMax(boolean mainHand) { |
||||
//Weapon Max DMG = BaseDMG * (0.0124*Primary Stat + 0.118*(Primary Stat -0.75)^0.5
|
||||
// + 0.0022*Secondary Stat + 0.028*(Secondary Stat-0.75)^0.5 + 0.0075*(Weapon Skill + Weapon Mastery))
|
||||
Item weapon; |
||||
float specialDex = this.owner.statDexBase; |
||||
specialDex += this.owner.bonuses.getFloat(Enum.ModType.Attr, Enum.SourceType.Dexterity); |
||||
double baseDMG = 5; |
||||
float primaryStat = specialDex;//getDexAfterPenalty(this.owner);
|
||||
float secondaryStat = this.owner.statStrCurrent; |
||||
double weaponSkill = 5; |
||||
double weaponMastery = 5; |
||||
|
||||
|
||||
if (mainHand) { |
||||
weapon = this.owner.charItemManager.getEquipped(1); |
||||
} else { |
||||
weapon = this.owner.charItemManager.getEquipped(2); |
||||
} |
||||
|
||||
String skill = "Unarmed Combat"; |
||||
String mastery = "Unarmed Combat Mastery"; |
||||
if (weapon != null) { |
||||
baseDMG = weapon.getItemBase().getMaxDamage(); |
||||
skill = weapon.getItemBase().getSkillRequired(); |
||||
mastery = weapon.getItemBase().getMastery(); |
||||
if (weapon.getItemBase().isStrBased()) { |
||||
primaryStat = this.owner.statStrCurrent; |
||||
secondaryStat = specialDex;//getDexAfterPenalty(this.owner);
|
||||
} |
||||
for(Effect eff : weapon.effects.values()){ |
||||
for(AbstractEffectModifier mod : eff.getEffectModifiers()){ |
||||
if(mod.modType.equals(Enum.ModType.MaxDamage)){ |
||||
baseDMG += mod.minMod + (mod.getRamp() * eff.getTrains()); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
if (this.owner.skills.containsKey(skill)) { |
||||
weaponSkill = this.owner.skills.get(skill).getModifiedAmount(); |
||||
} |
||||
|
||||
if (this.owner.skills.containsKey(mastery)) { |
||||
weaponMastery = this.owner.skills.get(mastery).getModifiedAmount(); |
||||
} |
||||
|
||||
double maxDMG = baseDMG * ( |
||||
0.0124 * primaryStat + |
||||
0.118 * Math.sqrt(primaryStat - 0.75) + |
||||
0.0022 * secondaryStat + |
||||
0.028 * Math.sqrt(secondaryStat - 0.75) + |
||||
0.0075 * (weaponSkill + weaponMastery) |
||||
); |
||||
|
||||
if(this.owner.bonuses != null){ |
||||
maxDMG += this.owner.bonuses.getFloat(Enum.ModType.MaxDamage, Enum.SourceType.None); |
||||
maxDMG *= 1 + this.owner.bonuses.getFloatPercentAll(Enum.ModType.MeleeDamageModifier, Enum.SourceType.None); |
||||
} |
||||
|
||||
if(this.owner.charItemManager != null){ |
||||
if(this.owner.charItemManager.getEquipped(1) != null && this.owner.charItemManager.getEquipped(2) != null && !this.owner.charItemManager.getEquipped(2).getItemBase().isShield()){ |
||||
maxDMG *= 0.7f; |
||||
} |
||||
} |
||||
|
||||
int roundedMax = (int)(maxDMG); |
||||
|
||||
if(mainHand){ |
||||
this.maxDamageHandOne = roundedMax; |
||||
}else{ |
||||
this.maxDamageHandTwo = roundedMax; |
||||
if(this.owner.charItemManager.getEquipped(1) == null && this.owner.charItemManager.getEquipped(2) != null){ |
||||
if(!this.owner.charItemManager.getEquipped(2).getItemBase().isShield()) |
||||
this.maxDamageHandOne = 0; |
||||
}else if(this.owner.charItemManager.getEquipped(2) == null && this.owner.charItemManager.getEquipped(1) != null){ |
||||
this.maxDamageHandTwo = 0; |
||||
} |
||||
} |
||||
} |
||||
|
||||
public void calculateAttackSpeed(boolean mainHand){ |
||||
Item weapon; |
||||
float speed; |
||||
if(mainHand) { |
||||
weapon = this.owner.charItemManager.getEquipped(1); |
||||
}else { |
||||
weapon = this.owner.charItemManager.getEquipped(2); |
||||
} |
||||
float delayExtra = 0; |
||||
if(weapon == null) { |
||||
speed = 20.0f; |
||||
}else{ |
||||
speed = weapon.getItemBase().getSpeed(); |
||||
for(Effect eff : weapon.effects.values()){ |
||||
for(AbstractEffectModifier mod : eff.getEffectModifiers()){ |
||||
if(mod.modType.equals(Enum.ModType.WeaponSpeed) || mod.modType.equals(Enum.ModType.AttackDelay)){ |
||||
float percent = mod.getPercentMod(); |
||||
int trains = eff.getTrains(); |
||||
float modValue = percent + (trains * mod.getRamp()); |
||||
speed *= 1 + (modValue * 0.01f); |
||||
if(mod.modType.equals(Enum.ModType.AttackDelay)){ |
||||
delayExtra += modValue * 0.01f; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
float stanceValue = 0.0f; |
||||
for(String effID : this.owner.effects.keySet()){ |
||||
if(effID.contains("Stance")){ |
||||
if(this.owner.effects != null) { |
||||
for (AbstractEffectModifier mod : this.owner.effects.get(effID).getEffectModifiers()) { |
||||
if (mod.modType.equals(Enum.ModType.AttackDelay)) { |
||||
float percent = mod.getPercentMod(); |
||||
int trains = this.owner.effects.get(effID).getTrains(); |
||||
float modValue = percent + (trains * mod.getRamp()); |
||||
stanceValue += modValue * 0.01f; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
float bonusValues = 1 + this.owner.bonuses.getFloatPercentAll(Enum.ModType.AttackDelay,Enum.SourceType.None);//1.0f;
|
||||
bonusValues -= stanceValue + delayExtra; // take away stance modifier from alac bonus values
|
||||
speed *= 1 + stanceValue; // apply stance bonus
|
||||
speed *= bonusValues; // apply alac bonuses without stance mod
|
||||
|
||||
if(speed < 10.0f) |
||||
speed = 10.0f; |
||||
|
||||
if(mainHand){ |
||||
this.attackSpeedHandOne = speed; |
||||
}else{ |
||||
this.attackSpeedHandTwo = speed; |
||||
if(this.owner.charItemManager.getEquipped(1) == null && this.owner.charItemManager.getEquipped(2) != null){ |
||||
if(!this.owner.charItemManager.getEquipped(2).getItemBase().isShield()) |
||||
this.attackSpeedHandOne = 0.0f; |
||||
}else if(this.owner.charItemManager.getEquipped(2) == null && this.owner.charItemManager.getEquipped(1) != null){ |
||||
this.attackSpeedHandTwo = 0.0f; |
||||
} |
||||
} |
||||
} |
||||
|
||||
public void calculateAttackRange(boolean mainHand){ |
||||
Item weapon; |
||||
float range; |
||||
if(mainHand) { |
||||
weapon = this.owner.charItemManager.getEquipped(1); |
||||
}else { |
||||
weapon = this.owner.charItemManager.getEquipped(2); |
||||
} |
||||
|
||||
if(weapon == null) { |
||||
range = 6.0f; |
||||
}else{ |
||||
range = weapon.getItemBase().getRange(); |
||||
} |
||||
if(owner.bonuses != null){ |
||||
range *= 1 + this.owner.bonuses.getFloatPercentAll(Enum.ModType.WeaponRange, Enum.SourceType.None); |
||||
} |
||||
if(mainHand){ |
||||
this.rangeHandOne = range; |
||||
}else{ |
||||
this.rangeHandTwo = range; |
||||
if(this.owner.charItemManager.getEquipped(1) == null && this.owner.charItemManager.getEquipped(2) != null){ |
||||
if(!this.owner.charItemManager.getEquipped(2).getItemBase().isShield()) |
||||
this.rangeHandOne = 0.0f; |
||||
}else if(this.owner.charItemManager.getEquipped(2) == null && this.owner.charItemManager.getEquipped(1) != null){ |
||||
this.rangeHandTwo = 0.0f; |
||||
} |
||||
} |
||||
} |
||||
|
||||
public void calculateRegen(){ |
||||
if(owner.bonuses != null){ |
||||
this.healthRegen = 1.0f + this.owner.bonuses.getFloatPercentAll(Enum.ModType.HealthRecoverRate, Enum.SourceType.None); |
||||
this.manaRegen = 1.0f + this.owner.bonuses.getFloatPercentAll(Enum.ModType.ManaRecoverRate, Enum.SourceType.None); |
||||
this.staminaRegen = 1.0f + this.owner.bonuses.getFloatPercentAll(Enum.ModType.StaminaRecoverRate, Enum.SourceType.None); |
||||
|
||||
}else{ |
||||
this.healthRegen = 1.0f; |
||||
this.manaRegen = 1.0f; |
||||
this.staminaRegen = 1.0f; |
||||
} |
||||
} |
||||
|
||||
public void calculateDefense() { |
||||
//Defense = (1+Armor skill / 50) * Armor defense + (1 + Block skill / 100) * Shield defense + (Primary weapon skill / 2)
|
||||
// + (Weapon mastery skill/ 2) + Dexterity * 2 + Flat bonuses from rings or cloth
|
||||
float armorSkill = 0.0f; |
||||
float armorDefense = 0.0f; |
||||
ArrayList<String> armorsUsed = new ArrayList<>(); |
||||
for(Item equipped : this.owner.charItemManager.getEquipped().values()){ |
||||
ItemBase ib = equipped.getItemBase(); |
||||
if(ib.isHeavyArmor() || ib.isMediumArmor() || ib.isLightArmor() || ib.isClothArmor()){ |
||||
armorDefense += ib.getDefense(); |
||||
for(Effect eff : equipped.effects.values()){ |
||||
for(AbstractEffectModifier mod : eff.getEffectModifiers()){ |
||||
if(mod.modType.equals(Enum.ModType.DR)){ |
||||
armorDefense += mod.minMod + (mod.getRamp() * eff.getTrains()); |
||||
} |
||||
} |
||||
} |
||||
if(!ib.isClothArmor() && !armorsUsed.contains(ib.getSkillRequired())) { |
||||
armorsUsed.add(ib.getSkillRequired()); |
||||
} |
||||
} |
||||
} |
||||
for(String armorUsed : armorsUsed){ |
||||
if(this.owner.skills.containsKey(armorUsed)) { |
||||
armorSkill += calculateModifiedSkill(armorUsed,this.owner); |
||||
} |
||||
} |
||||
if(armorsUsed.size() > 0) |
||||
armorSkill = armorSkill / armorsUsed.size(); |
||||
|
||||
float blockSkill = 0.0f; |
||||
if(this.owner.skills.containsKey("Block")) |
||||
blockSkill = calculateModifiedSkill("Block",this.owner); |
||||
|
||||
float shieldDefense = 0.0f; |
||||
if(this.owner.charItemManager.getEquipped(2) != null && this.owner.charItemManager.getEquipped(2).getItemBase().isShield()){ |
||||
Item shield = this.owner.charItemManager.getEquipped(2); |
||||
shieldDefense += shield.getItemBase().getDefense(); |
||||
for(Effect eff : shield.effects.values()){ |
||||
for(AbstractEffectModifier mod : eff.getEffectModifiers()){ |
||||
if(mod.modType.equals(Enum.ModType.DR)){ |
||||
shieldDefense += mod.minMod + (mod.getRamp() * eff.getTrains()); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
float weaponSkill = 0.0f; |
||||
float masterySkill = 0.0f; |
||||
Item weapon = this.owner.charItemManager.getEquipped(1); |
||||
if(weapon == null){ |
||||
weapon = this.owner.charItemManager.getEquipped(2); |
||||
} |
||||
if(weapon != null && weapon.getItemBase().isShield()) |
||||
weapon = null; |
||||
|
||||
String skillName = "Unarmed Combat"; |
||||
String masteryName = "Unarmed Combat Mastery"; |
||||
|
||||
if(weapon != null){ |
||||
skillName = weapon.getItemBase().getSkillRequired(); |
||||
masteryName = weapon.getItemBase().getMastery(); |
||||
} |
||||
if(this.owner.skills.containsKey(skillName)) |
||||
weaponSkill = this.owner.skills.get(skillName).getModifiedAmount();//calculateModifiedSkill(skillName,this.owner);//this.owner.skills.get(skillName).getModifiedAmount();
|
||||
|
||||
if(this.owner.skills.containsKey(masteryName)) |
||||
masterySkill = this.owner.skills.get(masteryName).getModifiedAmount();//calculateModifiedSkill(masteryName,this.owner);//this.owner.skills.get(masteryName).getModifiedAmount();
|
||||
|
||||
float dexterity = getDexAfterPenalty(this.owner); |
||||
|
||||
float luckyRune = 1.0f; |
||||
for(CharacterRune rune : this.owner.runes){ |
||||
if(rune.getRuneBase().getName().equals("Lucky")) |
||||
luckyRune += 0.05f; |
||||
} |
||||
|
||||
float flatBonuses = 0.0f; |
||||
float stanceMod = 1.0f; |
||||
for(String effID : this.owner.effects.keySet()) { |
||||
if (effID.contains("Stance")) { |
||||
for (AbstractEffectModifier mod : this.owner.effects.get(effID).getEffectModifiers()) { |
||||
if (mod.modType.equals(Enum.ModType.DCV)) { |
||||
float percent = mod.getPercentMod(); |
||||
int trains = this.owner.effects.get(effID).getTrains(); |
||||
float modValue = percent + (trains * mod.getRamp()); |
||||
stanceMod += modValue * 0.01f; |
||||
} |
||||
} |
||||
} else { |
||||
for (AbstractEffectModifier mod : this.owner.effects.get(effID).getEffectModifiers()) { |
||||
if (mod.modType.equals(Enum.ModType.DCV)) { |
||||
float value = mod.getMinMod(); |
||||
int trains = this.owner.effects.get(effID).getTrains(); |
||||
float modValue = value + (trains * mod.getRamp()); |
||||
flatBonuses += modValue; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
if(this.owner.charItemManager.getEquipped(2) == null) |
||||
blockSkill = 0; |
||||
else if(this.owner.charItemManager != null && this.owner.charItemManager.getEquipped(2) != null && !this.owner.charItemManager.getEquipped(2).getItemBase().isShield()) |
||||
blockSkill = 0; |
||||
|
||||
//Defense = (1+Armor skill / 50) * Armor defense + (1 + Block skill / 100) * Shield defense
|
||||
// + (Primary weapon skill / 2) + (Weapon mastery skill/ 2) + ROUND((Dexterity-Dex penalty),0) * 2 + Flat bonuses from rings or cloth
|
||||
float defense = 0; |
||||
for(Item equipped : this.owner.charItemManager.getEquippedList()){ |
||||
ItemBase ib = equipped.getItemBase(); |
||||
if(ib.getType().equals(Enum.ItemType.ARMOR) && !ib.isShield()){ |
||||
defense += getArmorDefense(equipped,this.owner); |
||||
} |
||||
} |
||||
//float defense = (1 + armorSkill / 50) * armorDefense;
|
||||
defense += (1 + blockSkill / 100) * shieldDefense; |
||||
defense += (weaponSkill / 2); |
||||
defense += (masterySkill / 2); |
||||
defense += dexterity * 2; |
||||
defense += flatBonuses; |
||||
defense *= luckyRune; |
||||
defense *= stanceMod; |
||||
|
||||
defense = Math.round(defense); |
||||
|
||||
this.defense = (int) defense; |
||||
} |
||||
|
||||
public static float calculateModifiedSkill(String skillName, PlayerCharacter pc) { |
||||
|
||||
CharacterSkill skill = null; |
||||
if (pc.skills.containsKey(skillName)) { |
||||
skill = pc.skills.get(skillName); |
||||
} |
||||
SkillsBase skillBase = skill.getSkillsBase(); |
||||
if(skillBase == null) |
||||
return 0; |
||||
|
||||
//Get any rune bonus
|
||||
float bonus = 0f; |
||||
if (pc.getBonuses() != null) { |
||||
//Get bonuses from runes
|
||||
bonus = pc.getBonuses().getSkillBonus(skillBase.sourceType); |
||||
} |
||||
|
||||
//Get Base skill for modified stats
|
||||
float base = 7f; |
||||
if(skillBase.getToken() == -660435875){ |
||||
base = 0; |
||||
} |
||||
float statMod = 0.5f; |
||||
if (skillBase.getStrMod() > 0) |
||||
statMod += (float) skillBase.getStrMod() * (float) pc.getStatStrCurrent() / 100f; |
||||
if (skillBase.getDexMod() > 0) |
||||
statMod += (float) skillBase.getDexMod() * (float) getDexAfterPenalty(pc) / 100f; |
||||
if (skillBase.getConMod() > 0) |
||||
statMod += (float) skillBase.getConMod() * (float) pc.getStatConCurrent() / 100f; |
||||
if (skillBase.getIntMod() > 0) |
||||
statMod += (float) skillBase.getIntMod() * (float) pc.getStatIntCurrent() / 100f; |
||||
if (skillBase.getSpiMod() > 0) |
||||
statMod += (float) skillBase.getSpiMod() * (float) pc.getStatSpiCurrent() / 100f; |
||||
|
||||
if (statMod < 1) |
||||
statMod = 1f; |
||||
|
||||
if(skillBase.getToken() == -660435875){ |
||||
statMod = 0; |
||||
} |
||||
base += CharacterSkill.baseSkillValues[(int) statMod]; |
||||
Enum.SourceType sourceType = Enum.SourceType.GetSourceType(skillBase.getNameNoSpace()); |
||||
|
||||
//Get any rune, effect and item bonus
|
||||
|
||||
if (pc.getBonuses() != null) { |
||||
//add bonuses from effects/items and runes
|
||||
base += bonus + pc.getBonuses().getFloat(Enum.ModType.Skill, sourceType); |
||||
} |
||||
float baseAmount; |
||||
if (base < 1f && skillBase.getToken() != -660435875) |
||||
baseAmount = 1f; |
||||
else |
||||
baseAmount = base; |
||||
|
||||
int amount; |
||||
|
||||
int trains = skill.getNumTrains(); |
||||
if (trains < 10) |
||||
amount = (trains * 2); |
||||
else if (trains < 90) |
||||
amount = 10 + trains; |
||||
else if (trains < 134) |
||||
amount = 100 + ((trains - 90) / 2); |
||||
else |
||||
amount = 122 + ((trains - 134) / 3); |
||||
|
||||
float modAmount = baseAmount + amount; |
||||
|
||||
if (pc.getBonuses() != null) { |
||||
//Multiply any percent bonuses
|
||||
modAmount *= (1 + pc.getBonuses().getFloatPercentAll(Enum.ModType.Skill, sourceType)); |
||||
} |
||||
|
||||
float modifiedAmount = (float) Math.round(modAmount); |
||||
|
||||
return modifiedAmount; |
||||
} |
||||
|
||||
public static int getDexAfterPenalty(PlayerCharacter pc){ |
||||
if(pc.charItemManager == null) |
||||
return pc.statDexCurrent; |
||||
|
||||
float dex = pc.statDexBase; |
||||
if(pc.bonuses != null) |
||||
dex += pc.bonuses.getFloat(Enum.ModType.Attr, Enum.SourceType.Dexterity); |
||||
|
||||
float penaltyFactor = 0.0f; |
||||
for(Item equipped : pc.charItemManager.getEquipped().values()){ |
||||
ItemBase ib = equipped.getItemBase(); |
||||
if(ib.isHeavyArmor() || ib.isLightArmor() || ib.isMediumArmor()){ |
||||
penaltyFactor += ib.dexReduction; |
||||
} |
||||
} |
||||
|
||||
if(penaltyFactor > 0) |
||||
penaltyFactor *= 0.01f; |
||||
|
||||
float totalPenalty = dex * penaltyFactor; |
||||
float returnedDex = Math.round(dex - totalPenalty); |
||||
return (int) returnedDex; |
||||
|
||||
} |
||||
|
||||
private static float getArmorDefense(Item armor, PlayerCharacter pc) { |
||||
|
||||
if (armor == null) |
||||
return 0; |
||||
|
||||
ItemBase ib = armor.getItemBase(); |
||||
|
||||
if (ib == null) |
||||
return 0; |
||||
|
||||
if (!ib.getType().equals(Enum.ItemType.ARMOR)) |
||||
return 0; |
||||
|
||||
if (ib.getSkillRequired().isEmpty()) |
||||
return ib.getDefense(); |
||||
|
||||
CharacterSkill armorSkill = pc.skills.get(ib.getSkillRequired()); |
||||
if (armorSkill == null) { |
||||
Logger.error("Player " + pc.getObjectUUID() |
||||
+ " has armor equipped without the nescessary skill to equip it"); |
||||
return ib.getDefense(); |
||||
} |
||||
|
||||
float def = ib.getDefense(); |
||||
//apply item defense bonuses
|
||||
if (armor != null) { |
||||
|
||||
for(Effect eff : armor.effects.values()){ |
||||
for(AbstractEffectModifier mod : eff.getEffectModifiers()){ |
||||
if(mod.modType.equals(Enum.ModType.DR)){ |
||||
def += mod.minMod * (1+(eff.getTrains() * mod.getRamp())); |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
//def += armor.getBonus(ModType.DR, SourceType.None);
|
||||
//def *= (1 + armor.getBonusPercent(ModType.DR, SourceType.None));
|
||||
} |
||||
return (def * (1 + ((int) armorSkill.getModifiedAmount() / 50f))); |
||||
} |
||||
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue