Ejemplo n.º 1
0
 int checkPlagues()
 {
     for (int i = 0; i < plagueCount; i++)
     {
         Plague p = pm.getPlague(i);
         if (p.alreadyHappened())
         {
             continue;
         }
         if (p.getMonthIn() > tm.getCurrentMonth() + 1 || p.getMonthOut() < tm.getCurrentMonth() + 1)
         {
             continue;
         }
         int prob = Random.Range(1, 100);
         if (prob <= p.getSpawnChance() - InvestigationManager.GetInstance().getPlagueDecreaseBonus())
         {
             return(i);
         }
     }
     return(-1);
 }