Browse Source

Project reformat.

postwipe-mines
MagicBot 5 months ago
parent
commit
c935ea1986
  1. 4
      src/engine/gameManager/CombatManager.java
  2. 17
      src/engine/powers/poweractions/OpenGatePowerAction.java

4
src/engine/gameManager/CombatManager.java

@ -12,7 +12,6 @@ import engine.job.JobContainer; @@ -12,7 +12,6 @@ import engine.job.JobContainer;
import engine.job.JobScheduler;
import engine.jobs.AttackJob;
import engine.jobs.DeferredPowerJob;
import engine.math.Vector3f;
import engine.mbEnums;
import engine.net.client.ClientConnection;
import engine.net.client.msg.TargetedActionMsg;
@ -621,6 +620,7 @@ public enum CombatManager { @@ -621,6 +620,7 @@ public enum CombatManager {
Logger.error("Unable to find Timers for Character " + attacker.getObjectUUID());
}
public static int calculatePetDamage(AbstractCharacter agent) {
//damage calc for pet
float range;
@ -635,6 +635,7 @@ public enum CombatManager { @@ -635,6 +635,7 @@ public enum CombatManager {
damage = min + ((ThreadLocalRandom.current().nextFloat() * range) + (ThreadLocalRandom.current().nextFloat() * range)) / 2;
return (int) (damage * dmgMultiplier);
}
public static double getMinDmg(double min, AbstractCharacter agent) {
int primary = agent.getStatStrCurrent();
int secondary = agent.getStatDexCurrent();
@ -642,6 +643,7 @@ public enum CombatManager { @@ -642,6 +643,7 @@ public enum CombatManager {
int masteryLevel = 0;
return min * (pow(0.0048 * primary + .049 * (primary - 0.75), 0.5) + pow(0.0066 * secondary + 0.064 * (secondary - 0.75), 0.5) + +0.01 * (focusLevel + masteryLevel));
}
public static double getMaxDmg(double max, AbstractCharacter agent) {
int primary = agent.getStatStrCurrent();
int secondary = agent.getStatDexCurrent();

17
src/engine/powers/poweractions/OpenGatePowerAction.java

@ -11,7 +11,6 @@ package engine.powers.poweractions; @@ -11,7 +11,6 @@ package engine.powers.poweractions;
import engine.math.Vector3fImmutable;
import engine.mbEnums;
import engine.mbEnums.BuildingGroup;
import engine.mbEnums.GameObjectType;
import engine.mbEnums.PortalType;
import engine.objects.AbstractCharacter;
@ -54,15 +53,17 @@ public class OpenGatePowerAction extends AbstractPowerAction { @@ -54,15 +53,17 @@ public class OpenGatePowerAction extends AbstractPowerAction {
return;
// Make sure target building is a runegate
if (targetBuilding.meshUUID != 24500) // runegate
return;
// Which runegate was clicked on?
Runegate runeGate = Runegate._runegates.get(targetBuilding.getObjectUUID());
if(runeGate == null){
if (runeGate == null)
return; // mob camp prop runegate cannot be opened
}
// Which portal was opened?
token = pb.getToken();
@ -72,41 +73,31 @@ public class OpenGatePowerAction extends AbstractPowerAction { @@ -72,41 +73,31 @@ public class OpenGatePowerAction extends AbstractPowerAction {
case 428937084: //Death Gate
portalType = PortalType.OBLIV;
break;
case 429756284: //Chaos Gate
portalType = PortalType.CHAOS;
break;
case 429723516: //Khar Gate
portalType = PortalType.MERCHANT;
break;
case 429559676: //Spirit Gate
portalType = PortalType.SPIRIT;
break;
case 429592444: //Water Gate
portalType = PortalType.WATER;
break;
case 429428604: //Fire Gate
portalType = PortalType.FIRE;
break;
case 429526908: //Air Gate
portalType = PortalType.AIR;
break;
case 429625212: //Earth Gate
portalType = PortalType.EARTH;
break;
default:
}
runeGate.activatePortal(portalType);
}
@Override

Loading…
Cancel
Save