Browse Source

zerg multiplier debug text

lakebane-master
FatBoy-DOTC 9 months ago
parent
commit
9ab286166e
  1. 38
      src/engine/gameManager/ZergManager.java
  2. 12
      src/engine/objects/City.java
  3. 6
      src/engine/objects/Mine.java

38
src/engine/gameManager/ZergManager.java

@ -2,9 +2,10 @@ package engine.gameManager; @@ -2,9 +2,10 @@ package engine.gameManager;
import engine.objects.Bane;
import engine.objects.Guild;
import engine.objects.PlayerCharacter;
public class ZergManager {
public static float getMultiplier5Man(int count){
public static float getMultiplier5Man(int count, PlayerCharacter pc){
float multiplier = 1.0f;
switch(count){
case 1:
@ -34,10 +35,14 @@ public class ZergManager { @@ -34,10 +35,14 @@ public class ZergManager {
multiplier -= 1.0f;
break;
}
ChatManager.chatSystemInfo(pc,"Zerg Multiplier Set: " + multiplier);
if(multiplier == 0.0f)
return 1.0f;
else
return multiplier;
}
public static float getMultiplier10Man(int count){
public static float getMultiplier10Man(int count, PlayerCharacter pc){
float multiplier = 1.0f;
if(count <=4)
return 0.0f;
@ -88,10 +93,14 @@ public class ZergManager { @@ -88,10 +93,14 @@ public class ZergManager {
multiplier -= 1.0f;
break;
}
ChatManager.chatSystemInfo(pc,"Zerg Multiplier Set: " + multiplier);
if(multiplier == 0.0f)
return 1.0f;
else
return multiplier;
}
public static float getMultiplier20Man(int count){
public static float getMultiplier20Man(int count, PlayerCharacter pc){
float multiplier = 1.0f;
if(count < 10){
multiplier += 1.25f;
@ -162,6 +171,10 @@ public class ZergManager { @@ -162,6 +171,10 @@ public class ZergManager {
break;
}
}
ChatManager.chatSystemInfo(pc,"Zerg Multiplier Set: " + multiplier);
if(multiplier == 0.0f)
return 1.0f;
else
return multiplier;
}
@ -193,18 +206,31 @@ public class ZergManager { @@ -193,18 +206,31 @@ public class ZergManager {
}
return capSize;
}
public static float getMultiplier30Man(int count){
public static float getMultiplier30Man(int count, PlayerCharacter pc){
float multiplier = 1.0f;
ChatManager.chatSystemInfo(pc,"Zerg Multiplier Set: " + multiplier);
if(multiplier == 0.0f)
return 1.0f;
else
return multiplier;
}
public static float getMultiplier40Man(int count){
public static float getMultiplier40Man(int count, PlayerCharacter pc){
float multiplier = 1.0f;
ChatManager.chatSystemInfo(pc,"Zerg Multiplier Set: " + multiplier);
if(multiplier == 0.0f)
return 1.0f;
else
return multiplier;
}
public static float getMultiplierUnlimited(int count){
public static float getMultiplierUnlimited(int count, PlayerCharacter pc){
float multiplier = 1.0f;
ChatManager.chatSystemInfo(pc,"Zerg Multiplier Set: " + multiplier);
if(multiplier == 0.0f)
return 1.0f;
else
return multiplier;
}
}

12
src/engine/objects/City.java

@ -1446,22 +1446,22 @@ public class City extends AbstractWorldObject { @@ -1446,22 +1446,22 @@ public class City extends AbstractWorldObject {
int count = this.dividedPlayers.get(player.getGuild().getNation()).size();
switch(this.getBane().capSize){
case 5:
player.ZergMultiplier = ZergManager.getMultiplier5Man(count);
player.ZergMultiplier = ZergManager.getMultiplier5Man(count,player);
break;
case 10:
player.ZergMultiplier = ZergManager.getMultiplier10Man(count);
player.ZergMultiplier = ZergManager.getMultiplier10Man(count,player);
break;
case 20:
player.ZergMultiplier = ZergManager.getMultiplier20Man(count);
player.ZergMultiplier = ZergManager.getMultiplier20Man(count,player);
break;
case 30:
player.ZergMultiplier = ZergManager.getMultiplier30Man(count);
player.ZergMultiplier = ZergManager.getMultiplier30Man(count,player);
break;
case 40:
player.ZergMultiplier = ZergManager.getMultiplier40Man(count);
player.ZergMultiplier = ZergManager.getMultiplier40Man(count,player);
break;
case 9999999:
player.ZergMultiplier = ZergManager.getMultiplierUnlimited(count);
player.ZergMultiplier = ZergManager.getMultiplierUnlimited(count,player);
break;
}
} else{

6
src/engine/objects/Mine.java

@ -642,13 +642,13 @@ public class Mine extends AbstractGameObject { @@ -642,13 +642,13 @@ public class Mine extends AbstractGameObject {
int count = this.dividedPlayers.get(player.getGuild().getNation()).size();
switch(this.capSize){
case 5:
player.ZergMultiplier = ZergManager.getMultiplier5Man(count);
player.ZergMultiplier = ZergManager.getMultiplier5Man(count,player);
break;
case 10:
player.ZergMultiplier = ZergManager.getMultiplier10Man(count);
player.ZergMultiplier = ZergManager.getMultiplier10Man(count,player);
break;
case 20:
player.ZergMultiplier = ZergManager.getMultiplier20Man(count);
player.ZergMultiplier = ZergManager.getMultiplier20Man(count,player);
break;
}
} else{

Loading…
Cancel
Save