|
|
@ -1,9 +1,7 @@ |
|
|
|
package engine.gameManager; |
|
|
|
package engine.gameManager; |
|
|
|
|
|
|
|
|
|
|
|
import engine.objects.Bane; |
|
|
|
import engine.Enum; |
|
|
|
import engine.objects.Guild; |
|
|
|
import engine.objects.*; |
|
|
|
import engine.objects.Mine; |
|
|
|
|
|
|
|
import engine.objects.PlayerCharacter; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class ZergManager { |
|
|
|
public class ZergManager { |
|
|
|
public static float getMultiplier5Man(int count, PlayerCharacter pc){ |
|
|
|
public static float getMultiplier5Man(int count, PlayerCharacter pc){ |
|
|
@ -232,7 +230,13 @@ public class ZergManager { |
|
|
|
return multiplier; |
|
|
|
return multiplier; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static float getReducedZergMultiplier(PlayerCharacter source, PlayerCharacter target){ |
|
|
|
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(source.ZergMultiplier == 0.0f) { |
|
|
|
if(Mine.getMine(source.mineAppliedID) != null && Mine.getMine(source.mineAppliedID)._playerMemory.contains(source.getObjectUUID()) == false ){ |
|
|
|
if(Mine.getMine(source.mineAppliedID) != null && Mine.getMine(source.mineAppliedID)._playerMemory.contains(source.getObjectUUID()) == false ){ |
|
|
|
source.ZergMultiplier = 1.0f; |
|
|
|
source.ZergMultiplier = 1.0f; |
|
|
@ -246,19 +250,24 @@ public class ZergManager { |
|
|
|
if(source.ZergMultiplier == target.ZergMultiplier){ |
|
|
|
if(source.ZergMultiplier == target.ZergMultiplier){ |
|
|
|
return 1.0f; |
|
|
|
return 1.0f; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
float returnMultiplier = 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); |
|
|
|
returnMultiplier = 1 + (target.ZergMultiplier - source.ZergMultiplier); |
|
|
|
} else{ |
|
|
|
} else{ |
|
|
|
return 1.0f; |
|
|
|
returnMultiplier = 1.0f; |
|
|
|
} |
|
|
|
} |
|
|
|
}else if(source.ZergMultiplier < 0 && target.ZergMultiplier > 0){ |
|
|
|
}else if(source.ZergMultiplier < 0 && target.ZergMultiplier > 0){ |
|
|
|
return source.ZergMultiplier; |
|
|
|
returnMultiplier = source.ZergMultiplier; |
|
|
|
} else if(source.ZergMultiplier < 0 && target.ZergMultiplier < 0){ |
|
|
|
} else if(source.ZergMultiplier < 0 && target.ZergMultiplier < 0){ |
|
|
|
return source.ZergMultiplier; |
|
|
|
returnMultiplier = source.ZergMultiplier; |
|
|
|
} else if(source.ZergMultiplier > 0 && target.ZergMultiplier < 0){ |
|
|
|
} else if(source.ZergMultiplier > 0 && target.ZergMultiplier < 0){ |
|
|
|
return source.ZergMultiplier; |
|
|
|
returnMultiplier = source.ZergMultiplier; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(returnMultiplier == 0.0f) |
|
|
|
|
|
|
|
return 1.0f; |
|
|
|
|
|
|
|
else{ |
|
|
|
|
|
|
|
return returnMultiplier; |
|
|
|
} |
|
|
|
} |
|
|
|
return 1.0f; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|