Esempio n. 1
0
        public void haizichusheng(Person person, Person father, Person muqin, bool doAffect)
        {
            person.Available = true;
            foreach (Treasure treasure in person.Treasures)
            {
                treasure.Available = true;
            }

            person.LocationArchitecture = muqin.BelongedArchitecture;
            person.ChangeFaction(muqin.BelongedFaction);

            if (muqin.IsCaptive)
            {
                person.Loyalty = muqin.Loyalty;
                Captive c = Captive.Create(this, person, muqin.BelongedCaptive.BelongedFaction);
            }
            else
            {
                if (GlobalVariables.lockChildrenLoyalty && father != null && father.BelongedFaction == person.LocationArchitecture.BelongedFaction)
                {
                    person.Loyalty = 120;
                }
                if (GameObject.Chance(father.childrenLoyaltyRate))
                {
                    person.Loyalty = father.childrenLoyalty;
                }
                else if (GameObject.Chance(muqin.childrenLoyaltyRate))
                {
                    person.Loyalty = muqin.childrenLoyalty;
                }
            }

            if (doAffect)
            {
                person.muqinyingxiangnengli(muqin);
            }
            if (person.BaseCommand < 1) person.BaseCommand = 1;
            if (person.BaseStrength < 1) person.BaseStrength = 1;
            if (person.BaseIntelligence < 1) person.BaseIntelligence = 1;
            if (person.BasePolitics < 1) person.BasePolitics = 1;
            if (person.BaseGlamour < 1) person.BaseGlamour = 1;
            this.GameScreen.haizizhangdachengren(person, person);
        }