|
|
|
package engine.gameManager;
|
|
|
|
|
|
|
|
import engine.Enum;
|
|
|
|
import engine.objects.*;
|
|
|
|
|
|
|
|
public class ZergManager {
|
|
|
|
public static float getMultiplier5Man(int count, PlayerCharacter pc){
|
|
|
|
float multiplier = 1.0f;
|
|
|
|
switch(count){
|
|
|
|
case 1:
|
|
|
|
multiplier += 0.80f;
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
multiplier += 0.80f;
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
multiplier += 0.50f;
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
multiplier += 0.20f;
|
|
|
|
break;
|
|
|
|
case 5:
|
|
|
|
multiplier += 0.0f;
|
|
|
|
break;
|
|
|
|
case 6:
|
|
|
|
multiplier -= 0.20f;
|
|
|
|
break;
|
|
|
|
case 7:
|
|
|
|
multiplier -= 0.40f;
|
|
|
|
break;
|
|
|
|
case 8:
|
|
|
|
multiplier -= 0.60f;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
multiplier -= 0.80f;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if(multiplier == 0.0f)
|
|
|
|
return 1.0f;
|
|
|
|
else
|
|
|
|
return multiplier;
|
|
|
|
}
|
|
|
|
public static float getMultiplier10Man(int count, PlayerCharacter pc){
|
|
|
|
float multiplier = 1.0f;
|
|
|
|
if(count <=4)
|
|
|
|
return 0.0f;
|
|
|
|
switch(count){
|
|
|
|
case 5:
|
|
|
|
multiplier += 0.5f;
|
|
|
|
break;
|
|
|
|
case 6:
|
|
|
|
multiplier += 0.4f;
|
|
|
|
break;
|
|
|
|
case 7:
|
|
|
|
multiplier += 0.3f;
|
|
|
|
break;
|
|
|
|
case 8:
|
|
|
|
multiplier += 0.2f;
|
|
|
|
break;
|
|
|
|
case 9:
|
|
|
|
multiplier += 0.1f;
|
|
|
|
break;
|
|
|
|
case 10:
|
|
|
|
multiplier += 0.0f;
|
|
|
|
break;
|
|
|
|
case 11:
|
|
|
|
multiplier -= 0.1f;
|
|
|
|
break;
|
|
|
|
case 12:
|
|
|
|
multiplier -= 0.2f;
|
|
|
|
break;
|
|
|
|
case 13:
|
|
|
|
multiplier -= 0.3f;
|
|
|
|
break;
|
|
|
|
case 14:
|
|
|
|
multiplier -= 0.4f;
|
|
|
|
break;
|
|
|
|
case 15:
|
|
|
|
multiplier -= 0.5f;
|
|
|
|
break;
|
|
|
|
case 16:
|
|
|
|
multiplier -= 0.65f;
|
|
|
|
break;
|
|
|
|
case 17:
|
|
|
|
multiplier -= 0.75f;
|
|
|
|
break;
|
|
|
|
case 18:
|
|
|
|
multiplier -= 0.85f;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
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, PlayerCharacter pc){
|
|
|
|
float multiplier = 1.0f;
|
|
|
|
if(count < 10){
|
|
|
|
multiplier += 1.25f;
|
|
|
|
}else {
|
|
|
|
switch (count) {
|
|
|
|
case 10:
|
|
|
|
multiplier += 0.8f;
|
|
|
|
break;
|
|
|
|
case 11:
|
|
|
|
multiplier += 0.65f;
|
|
|
|
break;
|
|
|
|
case 12:
|
|
|
|
multiplier += 0.54f;
|
|
|
|
break;
|
|
|
|
case 13:
|
|
|
|
multiplier += 0.46f;
|
|
|
|
break;
|
|
|
|
case 14:
|
|
|
|
multiplier += 0.36f;
|
|
|
|
break;
|
|
|
|
case 15:
|
|
|
|
multiplier += 0.28f;
|
|
|
|
break;
|
|
|
|
case 16:
|
|
|
|
multiplier += 0.21f;
|
|
|
|
break;
|
|
|
|
case 17:
|
|
|
|
multiplier += 0.15f;
|
|
|
|
break;
|
|
|
|
case 18:
|
|
|
|
multiplier += 0.09f;
|
|
|
|
break;
|
|
|
|
case 19:
|
|
|
|
multiplier += 0.04f;
|
|
|
|
break;
|
|
|
|
case 20:
|
|
|
|
multiplier += 0.00f;
|
|
|
|
break;
|
|
|
|
case 21:
|
|
|
|
multiplier -= 0.04f;
|
|
|
|
break;
|
|
|
|
case 22:
|
|
|
|
multiplier -= 0.09f;
|
|
|
|
break;
|
|
|
|
case 23:
|
|
|
|
multiplier -= 0.15f;
|
|
|
|
break;
|
|
|
|
case 24:
|
|
|
|
multiplier -= 0.21f;
|
|
|
|
break;
|
|
|
|
case 25:
|
|
|
|
multiplier -= 0.28f;
|
|
|
|
break;
|
|
|
|
case 26:
|
|
|
|
multiplier -= 0.36f;
|
|
|
|
break;
|
|
|
|
case 27:
|
|
|
|
multiplier -= 0.46f;
|
|
|
|
break;
|
|
|
|
case 28:
|
|
|
|
multiplier -= 0.54f;
|
|
|
|
break;
|
|
|
|
case 29:
|
|
|
|
multiplier -= 0.65f;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
multiplier -= 0.75f;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ChatManager.chatSystemInfo(pc,"Zerg Multiplier Set: " + multiplier);
|
|
|
|
if(multiplier == 0.0f)
|
|
|
|
return 1.0f;
|
|
|
|
else
|
|
|
|
return multiplier;
|
|
|
|
}
|
|
|
|
public static int getBaneCapSize(Guild defender){
|
|
|
|
int treesInNation = defender.getNation().getSubGuildList().size() + 1;
|
|
|
|
int capSize;
|
|
|
|
switch(treesInNation){
|
|
|
|
case 1:
|
|
|
|
case 2:
|
|
|
|
case 3:
|
|
|
|
case 4:
|
|
|
|
case 5:
|
|
|
|
case 6:
|
|
|
|
capSize = 20;
|
|
|
|
break;
|
|
|
|
case 7:
|
|
|
|
case 8:
|
|
|
|
case 9:
|
|
|
|
case 10:
|
|
|
|
capSize = 30;
|
|
|
|
break;
|
|
|
|
case 11:
|
|
|
|
case 12:
|
|
|
|
case 13:
|
|
|
|
case 14:
|
|
|
|
capSize = 40;
|
|
|
|
break;
|
|
|
|
default: capSize = 9999999;
|
|
|
|
}
|
|
|
|
return capSize;
|
|
|
|
}
|
|
|
|
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, 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, 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 getReducedZergMultiplier(AbstractCharacter sourceABS, AbstractCharacter targetABS){
|
|
|
|
if(sourceABS.getObjectType().equals(Enum.GameObjectType.PlayerCharacter) == false || targetABS.getObjectType().equals(Enum.GameObjectType.PlayerCharacter) == false)
|
|
|
|
return 1.0f;
|
|
|
|
|
|
|
|
PlayerCharacter source = (PlayerCharacter) sourceABS;
|
|
|
|
PlayerCharacter target = (PlayerCharacter) targetABS;
|
|
|
|
|
|
|
|
if(source.ZergMultiplier == 0.0f) {
|
|
|
|
if(Mine.getMine(source.mineAppliedID) != null && Mine.getMine(source.mineAppliedID)._playerMemory.contains(source.getObjectUUID()) == false ){
|
|
|
|
source.ZergMultiplier = 1.0f;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(target.ZergMultiplier == 0.0f) {
|
|
|
|
if(Mine.getMine(target.mineAppliedID) != null && Mine.getMine(target.mineAppliedID)._playerMemory.contains(target.getObjectUUID()) == false){
|
|
|
|
target.ZergMultiplier = 1.0f;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(source.ZergMultiplier == target.ZergMultiplier){
|
|
|
|
return 1.0f;
|
|
|
|
}
|
|
|
|
float returnMultiplier = 1.0f;
|
|
|
|
if(source.ZergMultiplier > 0 && target.ZergMultiplier > 0){
|
|
|
|
if(source.ZergMultiplier > target.ZergMultiplier) {
|
|
|
|
returnMultiplier = 1 + (source.ZergMultiplier - target.ZergMultiplier);
|
|
|
|
} else{
|
|
|
|
returnMultiplier = 1.0f;
|
|
|
|
}
|
|
|
|
}else if(source.ZergMultiplier < 0 && target.ZergMultiplier > 0){
|
|
|
|
returnMultiplier = source.ZergMultiplier;
|
|
|
|
} else if(source.ZergMultiplier < 0 && target.ZergMultiplier < 0){
|
|
|
|
returnMultiplier = source.ZergMultiplier;
|
|
|
|
} else if(source.ZergMultiplier > 0 && target.ZergMultiplier < 0){
|
|
|
|
returnMultiplier = source.ZergMultiplier;
|
|
|
|
}
|
|
|
|
if(returnMultiplier == 0.0f)
|
|
|
|
return 1.0f;
|
|
|
|
else{
|
|
|
|
return returnMultiplier;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|