Browse Source

zerg mechanic overhaul

lakebane-master
FatBoy-DOTC 8 months ago
parent
commit
ab5943e4b2
  1. 42
      src/engine/gameManager/ZergManager.java
  2. 1
      src/engine/objects/Mine.java
  3. 1
      src/engine/objects/PlayerCharacter.java

42
src/engine/gameManager/ZergManager.java

@ -2,6 +2,7 @@ package engine.gameManager; @@ -2,6 +2,7 @@ package engine.gameManager;
import engine.objects.Bane;
import engine.objects.Guild;
import engine.objects.Mine;
import engine.objects.PlayerCharacter;
public class ZergManager {
@ -9,33 +10,33 @@ public class ZergManager { @@ -9,33 +10,33 @@ public class ZergManager {
float multiplier = 1.0f;
switch(count){
case 1:
multiplier += 0.80f;
break;
case 2:
case 5:
multiplier += 0.0f;
multiplier += 0.80f;
break;
case 3:
multiplier += 0.55f;
multiplier += 0.50f;
break;
case 4:
multiplier += 0.2f;
multiplier += 0.20f;
break;
case 5:
multiplier += 0.0f;
break;
case 6:
multiplier -= 0.2f;
multiplier -= 0.20f;
break;
case 7:
multiplier -= 0.35f;
multiplier -= 0.40f;
break;
case 8:
multiplier -= 0.50f;
break;
case 9:
multiplier -= 0.750f;
multiplier -= 0.60f;
break;
default:
multiplier -= 1.0f;
multiplier -= 0.80f;
break;
}
ChatManager.chatSystemInfo(pc,"Zerg Multiplier Set: " + multiplier);
if(multiplier == 0.0f)
return 1.0f;
else
@ -232,10 +233,19 @@ public class ZergManager { @@ -232,10 +233,19 @@ public class ZergManager {
}
public static float getReducedZergMultiplier(PlayerCharacter source, PlayerCharacter target){
if(source.ZergMultiplier == 0.0f)
source.ZergMultiplier = 1.0f;
if(target.ZergMultiplier == 0.0f)
target.ZergMultiplier = 1.0f;
if(source.ZergMultiplier == 0.0f) {
if(Mine.getMine(source.mineAppliedID)._playerMemory.contains(source.getObjectUUID()) == false ){
source.ZergMultiplier = 1.0f;
}
}
if(target.ZergMultiplier == 0.0f) {
if(Mine.getMine(source.mineAppliedID)._playerMemory.contains(target.getObjectUUID()) == false){
target.ZergMultiplier = 1.0f;
}
}
if(source.ZergMultiplier == target.ZergMultiplier){
return 1.0f;
}
if(source.ZergMultiplier > 0 && target.ZergMultiplier > 0){
if(source.ZergMultiplier > target.ZergMultiplier) {
return 1 + (target.ZergMultiplier - source.ZergMultiplier);

1
src/engine/objects/Mine.java

@ -735,6 +735,7 @@ public class Mine extends AbstractGameObject { @@ -735,6 +735,7 @@ public class Mine extends AbstractGameObject {
player.ZergMultiplier = ZergManager.getMultiplier20Man(count,player);
break;
}
player.mineAppliedID = this.getObjectUUID();
} else{
player.ZergMultiplier = 1.0f; //something went wrong reset to default until next cycle
}

1
src/engine/objects/PlayerCharacter.java

@ -177,6 +177,7 @@ public class PlayerCharacter extends AbstractCharacter { @@ -177,6 +177,7 @@ public class PlayerCharacter extends AbstractCharacter {
public boolean isBoxed = false;
public float ZergMultiplier = 1.0f;
public int mineAppliedID = 0;
/**
* No Id Constructor
*/

Loading…
Cancel
Save