Esempio n. 1
0
    private void RaiseSecurityLevel(MapSquare currentSquare)
    {
        if (currentSquare.GetIsVentilationMapped())
        {
            Debug.Log("Player Using Vents, Less or No Security Penalty");
            // TODO: THIS???
        }
        else
        {
            int            adjustedSecurityLevelRaiseAmount = securityLevelRaiseAmount;
            List <PowerUp> hackedTerminals = GetPowerUpsOfType(PowerUp.PowerUpType.HackedTerminal);
            foreach (PowerUp powerUp in hackedTerminals)
            {
                float multiplier = (float)powerUp.GetAmount2() / 100;
                adjustedSecurityLevelRaiseAmount -= Mathf.FloorToInt(securityLevelRaiseAmount * multiplier);
            }

            if (adjustedSecurityLevelRaiseAmount < 1)
            {
                adjustedSecurityLevelRaiseAmount = 1;
            }
            AdjustSecurityLevel(adjustedSecurityLevelRaiseAmount);
        }
    }