taxes collected are wrong

Issue #605 resolved
victor sosa created an issue

The taxes collected for the houses and population in this map is wrong. It should be more collected by the tax collector. Actually is only collecting around 83 denaris a year. The houses are all big mansion.

Comments (4)

  1. victor sosa reporter

    fixed calc tax method per house

    void House::_updateTax()
    {
          int difficulty = SETTINGS_VALUE(difficulty);
          float multiply = 1.0f;
          switch (difficulty)
          {
            case 0: multiply = 3.0f; break;
            case 1: multiply = 2.0f; break;
            case 2: multiply = 1.5f; break;
            case 3: multiply = 1.0f; break;
            case 4: multiply = 0.75f; break;
          }
    
        float cityTax = _city()->funds().taxRate() / 100.f;
        cityTax = (multiply * _d->habitants.count( CitizenGroup::mature ) / _d->spec.taxRate()) * cityTax;
    
      _d->money -= cityTax;
      _d->tax += cityTax;
    }
    

    now is working as expected

  2. Log in to comment