Beispiel #1
0
        //玩家行为
        public int active_Preach(uint peo_id)
        {
            lc_Seer     seer           = GetObject <lc_Seer>(peo_id);
            uint        rel_id         = GetRelShip <STU_PEO_REL>(peo_id).rel_id;
            lc_Religion rel            = GetObject <lc_Religion>(rel_id);
            uint        city_id        = GetRelShip <STU_PEO_CITY>(peo_id).city_id;
            lc_City     city           = GetObject <lc_City>(city_id);
            uint        country_id     = GetRelShip <STU_CITY_COUNTRY>(city_id).country_id;
            lc_Country  country        = GetObject <lc_Country>(country_id);
            int         city_rel_index = GetRelShip <STU_CITY_INF>(city_id).rel_rat.FindIndex(delegate(SUBSTU_REL_RAT temp) { return(temp.rel_id == DEFREL); });
            int         city_rel_num   = GetRelShip <STU_CITY_INF>(city_id).rel_rat[city_rel_index].rel_num;
            //效果 = 口才*4000+(宗教吸引力-王权)*2000-组织度*1000
            int attr_num = seer.m_eloquence * 4000 + (rel.m_attraction - country.m_crown) * 2000 - rel.m_organization * 1000;

            //减少对应无信仰人数,增加对应宗教人数
            if (attr_num > city_rel_num)
            {
                attr_num = city_rel_num;
            }
            SetCityRel(city.obj_id, DEFREL, -attr_num);
            SetCityRel(city.obj_id, rel.obj_id, attr_num);

            return(1);
        } //传教
Beispiel #2
0
        }//构造函数

        public lc_Country(lc_Country srcTag) : base(srcTag)
        {
            this.m_military = srcTag.m_military; //军事力
            this.m_crown    = srcTag.m_crown;    //王权
        }