Browse Source

zerg mechanic overhaul

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

38
src/engine/gameManager/ZergManager.java

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

1
src/engine/objects/Mine.java

@ -735,6 +735,7 @@ public class Mine extends AbstractGameObject {
player.ZergMultiplier = ZergManager.getMultiplier20Man(count,player); player.ZergMultiplier = ZergManager.getMultiplier20Man(count,player);
break; break;
} }
player.mineAppliedID = this.getObjectUUID();
} else{ } else{
player.ZergMultiplier = 1.0f; //something went wrong reset to default until next cycle 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 {
public boolean isBoxed = false; public boolean isBoxed = false;
public float ZergMultiplier = 1.0f; public float ZergMultiplier = 1.0f;
public int mineAppliedID = 0;
/** /**
* No Id Constructor * No Id Constructor
*/ */

Loading…
Cancel
Save