Exemple #1
0
    private BuildingGS modifyGameStateForPersonality(BuildingGS targetGsHuman, AIPersonalityType aiPersonality)
    {
        switch (aiPersonality)
        {
        case AIPersonalityType.GoldDigger:
            targetGsHuman.setStockpile(ResourceType.Gold, targetGsHuman.getStockpile(ResourceType.Gold) * 2);
            targetGsHuman.addResourcePerTick(ResourceType.Gold, targetGsHuman.getChangePerTick(ResourceType.Gold) * 2);
            break;

        case AIPersonalityType.Pragmatist:
            foreach (ResourceType rt in targetGsHuman.getStockpileResourceTypes())
            {
                targetGsHuman.setStockpile(rt, (int)(targetGsHuman.getStockpile(rt) * 1.3));
            }
            break;

        case AIPersonalityType.Warrior:
        case AIPersonalityType.ScienceGeek:
        case AIPersonalityType.Conservative:
        default:
            break;
        }
        return(targetGsHuman);
    }