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

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

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

Loading…
Cancel
Save