示例#1
0
    void InitFarmValues(BuildMaterialType type)
    {
        switch (type)
        {
        case BuildMaterialType.basic:
            timeToHarvest  = 5f;
            harvestAmmount = 5;
            break;

        case BuildMaterialType.stone:
            timeToHarvest  = 90f;
            harvestAmmount = 8;
            break;

        case BuildMaterialType.metal:
            timeToHarvest  = 60f;
            harvestAmmount = 5;
            break;

        default:
            timeToHarvest  = 120f;
            harvestAmmount = 5;
            break;
        }
    }
示例#2
0
    // NOW HOUSES ADD TO HOUSING NOT VACANCY(this will make survivors more comfortable)
    void ApplyBonus(BuildMaterialType type)
    {
        switch (type)
        {
        case BuildMaterialType.basic:
            Debug.Log("Adding House bonuses!!");
            maxHabitants             = 1;
            intBonus1                = maxHabitants;
            townCentral.housingCount = townCentral.housingCount + maxHabitants;
            hpLoss                   = 5f;
            floatPenalty1            = hpLoss;
            townTProps.tileHitPoints = townTProps.tileHitPoints - hpLoss;
            break;

        case BuildMaterialType.stone:
            maxHabitants             = 2;
            intBonus1                = maxHabitants;
            townCentral.housingCount = townCentral.housingCount + maxHabitants;
            hpLoss                   = 3f;
            floatPenalty1            = hpLoss;
            townTProps.tileHitPoints = townTProps.tileHitPoints - hpLoss;
            break;

        case BuildMaterialType.metal:
            maxHabitants             = 3;
            intBonus1                = maxHabitants;
            townCentral.housingCount = townCentral.housingCount + maxHabitants;
            hpLoss                   = 1f;
            floatPenalty1            = hpLoss;
            townTProps.tileHitPoints = townTProps.tileHitPoints - hpLoss;
            break;

        default:
            maxHabitants             = 1;
            intBonus1                = maxHabitants;
            townCentral.housingCount = townCentral.housingCount + maxHabitants;
            hpLoss                   = 5f;
            floatPenalty1            = hpLoss;
            townTProps.tileHitPoints = townTProps.tileHitPoints - hpLoss;
            break;
        }
    }
示例#3
0
    void BoostTileHitPoints(BuildMaterialType type)
    {
        switch (type)
        {
        case BuildMaterialType.basic:
            hitPointsBoost           = 10f;
            floatBonus1              = hitPointsBoost;
            defenseRatingBoost       = 1;
            intBonus1                = defenseRatingBoost;
            townTProps.tileHitPoints = townTProps.tileHitPoints + hitPointsBoost;
            townTProps.defenseRating = townTProps.defenseRating + defenseRatingBoost;
            break;

        case BuildMaterialType.stone:
            hitPointsBoost           = 20f;
            floatBonus1              = hitPointsBoost;
            defenseRatingBoost       = 2;
            intBonus1                = defenseRatingBoost;
            townTProps.tileHitPoints = townTProps.tileHitPoints + hitPointsBoost;
            townTProps.defenseRating = townTProps.defenseRating + defenseRatingBoost;
            break;

        case BuildMaterialType.metal:
            hitPointsBoost           = 30f;
            floatBonus1              = hitPointsBoost;
            defenseRatingBoost       = 3;
            intBonus1                = defenseRatingBoost;
            townTProps.tileHitPoints = townTProps.tileHitPoints + hitPointsBoost;
            townTProps.defenseRating = townTProps.defenseRating + defenseRatingBoost;
            break;

        default:
            hitPointsBoost           = 10f;
            floatBonus1              = hitPointsBoost;
            defenseRatingBoost       = 1;
            intBonus1                = defenseRatingBoost;
            townTProps.tileHitPoints = townTProps.tileHitPoints + hitPointsBoost;
            townTProps.defenseRating = townTProps.defenseRating + defenseRatingBoost;
            break;
        }
    }
示例#4
0
    void ApplyBonus(BuildMaterialType type)
    {
        switch (type)
        {
        case BuildMaterialType.basic:
            maxGatherers  = 1;
            genGatherAmmt = 2;
            genGatherT    = -0.3f;
            intBonus1     = maxGatherers;
            intBonus2     = genGatherAmmt;
            floatBonus5   = genGatherT;
            // fill vars
            townCentral.maxGatherers  = townCentral.maxGatherers + maxGatherers;
            townCentral.gatherAmntGen = townCentral.gatherAmntGen + genGatherAmmt;
            townCentral.gatherTimeGen = townCentral.gatherTimeGen + genGatherT;
            // fill special upgrades
            if (woodGatherT > 0 || stoneGatherT > 0 || metalGatherT > 0 || grainGatherT > 0)
            {
                ApplySpecialBonuses();
            }
            break;

        case BuildMaterialType.stone:
            maxGatherers              = 1;
            genGatherAmmt             = 2;
            genGatherT                = -1f;
            intBonus1                 = maxGatherers;
            intBonus2                 = genGatherAmmt;
            floatBonus5               = genGatherT;
            townCentral.maxGatherers  = townCentral.maxGatherers + maxGatherers;
            townCentral.gatherAmntGen = townCentral.gatherAmntGen + genGatherAmmt;
            townCentral.gatherTimeGen = townCentral.gatherTimeGen + genGatherT;
            // fill special upgrades
            if (woodGatherT > 0 || stoneGatherT > 0 || metalGatherT > 0 || grainGatherT > 0)
            {
                ApplySpecialBonuses();
            }
            break;

        case BuildMaterialType.metal:
            maxGatherers              = 2;
            genGatherAmmt             = 2;
            genGatherT                = -2f;
            intBonus1                 = maxGatherers;
            intBonus2                 = genGatherAmmt;
            floatBonus5               = genGatherT;
            townCentral.maxGatherers  = townCentral.maxGatherers + maxGatherers;
            townCentral.gatherAmntGen = townCentral.gatherAmntGen + genGatherAmmt;
            townCentral.gatherTimeGen = townCentral.gatherTimeGen + genGatherT;
            // fill special upgrades
            if (woodGatherT > 0 || stoneGatherT > 0 || metalGatherT > 0 || grainGatherT > 0)
            {
                ApplySpecialBonuses();
            }
            break;

        default:
            maxGatherers              = 1;
            genGatherAmmt             = 2;
            genGatherT                = -0.3f;
            intBonus1                 = maxGatherers;
            intBonus2                 = genGatherAmmt;
            floatBonus5               = genGatherT;
            townCentral.maxGatherers  = townCentral.maxGatherers + maxGatherers;
            townCentral.gatherAmntGen = townCentral.gatherAmntGen + genGatherAmmt;
            townCentral.gatherTimeGen = townCentral.gatherTimeGen + genGatherT;
            // fill special upgrades
            if (woodGatherT > 0 || stoneGatherT > 0 || metalGatherT > 0 || grainGatherT > 0)
            {
                ApplySpecialBonuses();
            }
            break;
        }
    }