예제 #1
0
    public void alterPrioritiesBasedOnProvinceGain(Nation player, MyEnum.Resources res)
    {
        TopLevel aiTopLevel = player.getAI().GetTopLevel();

        aiTopLevel.alterResPriority(player, res, -0.65f);


        if (res == MyEnum.Resources.coal)
        {
            aiTopLevel.alterFactPriority(player, MyEnum.Goods.arms, 0.15f);
            aiTopLevel.alterFactPriority(player, MyEnum.Goods.steel, 0.25f);
            aiTopLevel.alterFactPriority(player, MyEnum.Goods.parts, 0.15f);
            aiTopLevel.alterFactPriority(player, MyEnum.Goods.chemicals, 0.5f);

            aiTopLevel.alterProductionPriorities(player, MyEnum.Goods.arms, 0.25f);
            aiTopLevel.alterProductionPriorities(player, MyEnum.Goods.steel, 0.4f);
            aiTopLevel.alterProductionPriorities(player, MyEnum.Goods.parts, 0.3f);
            aiTopLevel.alterProductionPriorities(player, MyEnum.Goods.chemicals, 0.4f);

            aiTopLevel.alterTechnologyPriority(player, "chemistry", 0.65f);
            aiTopLevel.alterTechnologyPriority(player, "fertilizer", 0.5f);
            aiTopLevel.alterTechnologyPriority(player, "medicine", 0.4f);
            aiTopLevel.alterTechnologyPriority(player, "synthetic_dyes", 0.5f);
            aiTopLevel.alterTechnologyPriority(player, "bessemer_process", 0.33f);
            aiTopLevel.alterTechnologyPriority(player, "steel_plows", 0.45f);
            aiTopLevel.alterTechnologyPriority(player, "square_timbering", 0.45f);
            aiTopLevel.alterTechnologyPriority(player, "steam_engine", 0.45f);
            aiTopLevel.alterTechnologyPriority(player, "compound_steam_engine", 0.45f);
        }

        if (res == MyEnum.Resources.cotton)
        {
            aiTopLevel.alterFactPriority(player, MyEnum.Goods.fabric, 0.6f);
            aiTopLevel.alterFactPriority(player, MyEnum.Goods.clothing, 0.45f);
            aiTopLevel.alterFactPriority(player, MyEnum.Goods.furniture, 0.25f);

            aiTopLevel.alterProductionPriorities(player, MyEnum.Goods.clothing, 0.5f);
            aiTopLevel.alterProductionPriorities(player, MyEnum.Goods.fabric, 0.55f);

            aiTopLevel.alterProductionPriorities(player, MyEnum.Goods.furniture, 0.25f);
            aiTopLevel.alterTechnologyPriority(player, "cotton_gin", 0.5f);
            aiTopLevel.alterTechnologyPriority(player, "power_loom", 0.5f);
            aiTopLevel.alterTechnologyPriority(player, "sewing_machine", 0.5f);
            aiTopLevel.alterTechnologyPriority(player, "spinning_jenny", 0.5f);
        }

        if (res == MyEnum.Resources.dyes)
        {
            aiTopLevel.alterFactPriority(player, MyEnum.Goods.clothing, 0.4f);
            aiTopLevel.alterProductionPriorities(player, MyEnum.Goods.clothing, 0.35f);

            aiTopLevel.alterTechnologyPriority(player, "synthetic_dyes", -0.5f);
            aiTopLevel.alterTechnologyPriority(player, "sewing_machine", 0.25f);
            aiTopLevel.alterTechnologyPriority(player, "spinning_jenny", 0.25f);
            aiTopLevel.alterTechnologyPriority(player, "fertilizer", 0.2f);
        }

        if (res == MyEnum.Resources.iron)
        {
            aiTopLevel.alterFactPriority(player, MyEnum.Goods.arms, 0.25f);
            aiTopLevel.alterFactPriority(player, MyEnum.Goods.steel, 0.4f);
            aiTopLevel.alterFactPriority(player, MyEnum.Goods.parts, 0.25f);
            aiTopLevel.alterFactPriority(player, MyEnum.Goods.gear, 0.2f);

            aiTopLevel.alterProductionPriorities(player, MyEnum.Goods.arms, 0.35f);
            aiTopLevel.alterProductionPriorities(player, MyEnum.Goods.steel, 0.6f);
            aiTopLevel.alterProductionPriorities(player, MyEnum.Goods.parts, 0.3f);
            aiTopLevel.alterProductionPriorities(player, MyEnum.Goods.gear, 0.3f);

            aiTopLevel.alterTechnologyPriority(player, "bessemer_process", 0.55f);
            aiTopLevel.alterTechnologyPriority(player, "advanced_metalworking", 0.33f);
            aiTopLevel.alterTechnologyPriority(player, "steam_engine", 0.34f);
            aiTopLevel.alterTechnologyPriority(player, "automobile", 0.25f);
            aiTopLevel.alterTechnologyPriority(player, "flight", 0.25f);
            aiTopLevel.alterTechnologyPriority(player, "square_timbering", 0.45f);
            aiTopLevel.alterTechnologyPriority(player, "dynamite", 0.25f);
            aiTopLevel.alterTechnologyPriority(player, "steam_locomotive", 0.2f);
        }

        if (res == MyEnum.Resources.oil)
        {
            aiTopLevel.alterFactPriority(player, MyEnum.Goods.auto, 0.5f);

            aiTopLevel.alterProductionPriorities(player, MyEnum.Goods.auto, 0.6f);

            aiTopLevel.alterTechnologyPriority(player, "oil_drilling", 0.75f);
            aiTopLevel.alterTechnologyPriority(player, "automobile", 0.35f);
            aiTopLevel.alterTechnologyPriority(player, "flight", 0.35f);
        }

        if (res == MyEnum.Resources.rubber)
        {
            aiTopLevel.alterFactPriority(player, MyEnum.Goods.gear, 0.6f);
            aiTopLevel.alterFactPriority(player, MyEnum.Goods.telephone, 0.45f);
            aiTopLevel.alterFactPriority(player, MyEnum.Goods.auto, 0.4f);

            aiTopLevel.alterProductionPriorities(player, MyEnum.Goods.gear, 0.85f);
            aiTopLevel.alterProductionPriorities(player, MyEnum.Goods.telephone, 0.65f);
            aiTopLevel.alterProductionPriorities(player, MyEnum.Goods.auto, 0.6f);

            aiTopLevel.alterTechnologyPriority(player, "electricity", 0.75f);
            aiTopLevel.alterTechnologyPriority(player, "automobile", 0.35f);
            aiTopLevel.alterTechnologyPriority(player, "flight", 0.25f);
            aiTopLevel.alterTechnologyPriority(player, "telephone", 0.55f);
            aiTopLevel.alterTechnologyPriority(player, "fertilizer", 0.2f);
        }

        if (res == MyEnum.Resources.wood)
        {
            aiTopLevel.alterFactPriority(player, MyEnum.Goods.lumber, 0.65f);
            aiTopLevel.alterFactPriority(player, MyEnum.Goods.paper, 0.55f);
            aiTopLevel.alterFactPriority(player, MyEnum.Goods.furniture, 0.35f);
            aiTopLevel.alterFactPriority(player, MyEnum.Goods.telephone, 0.2f);

            aiTopLevel.alterProductionPriorities(player, MyEnum.Goods.paper, 1.0f);
            aiTopLevel.alterProductionPriorities(player, MyEnum.Goods.lumber, 1.1f);

            aiTopLevel.alterProductionPriorities(player, MyEnum.Goods.furniture, 0.65f);
            aiTopLevel.alterProductionPriorities(player, MyEnum.Goods.telephone, 0.35f);


            aiTopLevel.alterTechnologyPriority(player, "pulping", 0.5f);
            aiTopLevel.alterTechnologyPriority(player, "compound_steam_engine", 0.35f);
            aiTopLevel.alterTechnologyPriority(player, "steam_engine", 0.35f);
        }

        if (res == MyEnum.Resources.wheat)
        {
            aiTopLevel.alterTechnologyPriority(player, "steel_plows", 0.35f);
            aiTopLevel.alterTechnologyPriority(player, "mechanical_reaper", 0.35f);
            aiTopLevel.alterTechnologyPriority(player, "fertilizer", 0.15f);
        }

        if (res == MyEnum.Resources.meat)
        {
            aiTopLevel.alterTechnologyPriority(player, "biology", 0.5f);
            aiTopLevel.alterTechnologyPriority(player, "barbed_wire", 0.5f);
        }

        if (res == MyEnum.Resources.fruit)
        {
            aiTopLevel.alterTechnologyPriority(player, "steel_plows", 0.35f);
            aiTopLevel.alterTechnologyPriority(player, "fertilizer", 0.25f);
        }
    }