Exemplo n.º 1
0
        public void AddBodyPart()
        {
            string gtype = ParentObject.GetTag("GlandLiquid");

            if (gtype != null)
            {
                //IPart.AddPlayerMessage("glandtype:"+gtype);
                this.GlandType = gtype;
            }

            Body part = ParentObject.GetPart <Body>();

            if (part != null)
            {
                BodyPart body = part.GetBody();

                if (body.GetFirstPart("Glands") != null)
                {
                    return;
                }

                BodyPart   firstPart    = body.AddPart(new BodyPart("Glands", part), "Back");
                GameObject GlandsObject = GameObjectFactory.Factory.CreateObject("DefaultGlands");
                GlandsObject.DisplayName = GlandType + " glands";
                GlandsObject.GetPart <LiquidProducer>().Liquid = GlandType;
                GlandsObject.GetPart <LiquidVolume>().Empty();
                GlandsObject.GetPart <LiquidVolume>().InitialLiquid = GlandType + "-1000";
                GlandsObject.GetPart <LiquidVolume>().Volume        = GlandsObject.GetPart <LiquidVolume>().StartVolume.RollCached();
                //GlandsObject.GetPart<acegiak_NoPour>().ProcessInitialLiquid(GlandType-"1000");


                Event @event = Event.New("CommandForceEquipObject");
                @event.AddParameter("Object", GlandsObject);
                @event.AddParameter("BodyPart", firstPart);
                @event.SetSilent(true);
                ParentObject.FireEvent(@event);
            }
        }
Exemplo n.º 2
0
        public bool Kiss(GameObject who)
        {
            if (!hasPart(ParentObject, "face"))
            {
                if (who.IsPlayer())
                {
                    Popup.Show(ParentObject.The + ParentObject.DisplayNameOnlyDirect + "&y doesn't have a face.");
                }
                return(true);
            }
            if (!hasPart(who, "face"))
            {
                if (who.IsPlayer())
                {
                    Popup.Show("You don't have a face.");
                }
                return(true);
            }

            string beguiled  = "";
            string hbeguiled = " &Mkissed you back&y.";

            if (ParentObject.GetIntProperty("BeguilingBonusApplied") > 0)
            {
                beguiled  = "\n" + ParentObject.It + ParentObject.GetVerb("quake") + " with fear and manic ecstasy.";
                hbeguiled = " could not resist.";
            }
            else
            {
                if (kissableIfPositiveFeeling && ParentObject.pBrain.GetFeeling(who) < 55)
                {
                    if (who.IsPlayer())
                    {
                        Popup.Show(ParentObject.The + ParentObject.DisplayNameOnlyDirect + "&y" + ParentObject.GetVerb("shy") + " away from you.");
                    }
                    ParentObject.pBrain.AdjustFeeling(who, -5);

                    if (ParentObject.pBrain.GetFeeling(who) < 0)
                    {
                        Popup.Show(ParentObject.The + ParentObject.DisplayNameOnlyDirect + "&Y is upset by your advances!");
                    }
                    return(true);
                }
                if (!isAttractedTo(who))
                {
                    if (who.IsPlayer())
                    {
                        Popup.Show(ParentObject.The + ParentObject.DisplayNameOnlyDirect + "&Y isn't attracted to you.");
                    }
                    ParentObject.pBrain.AdjustFeeling(who, -10);

                    if (ParentObject.pBrain.GetFeeling(who) < 0)
                    {
                        Popup.Show(ParentObject.The + ParentObject.DisplayNameOnlyDirect + "&Y is upset by your advances!");
                    }
                    return(true);
                }
            }

            if (ParentObject.GetPart <acegiak_Romancable>() != null)
            {
                if (ParentObject.GetPart <acegiak_Romancable>().patience <= 0)
                {
                    ParentObject.pBrain.AdjustFeeling(who, -5);
                    Popup.Show(ParentObject.The + ParentObject.DisplayNameOnlyDirect + "&Y doesn't want to kiss you right now.");

                    if (ParentObject.pBrain.GetFeeling(who) < 0)
                    {
                        Popup.Show(ParentObject.The + ParentObject.DisplayNameOnlyDirect + "&Y is upset by your advances!");
                    }
                }
                ParentObject.GetPart <acegiak_Romancable>().patience--;
            }



            string     verb         = "kiss";
            GameObject parentObject = ParentObject;

            IPart.XDidYToZ(who, verb, parentObject, null, null, true);
            if (who.IsPlayer())
            {
                if (ParentObject.HasPropertyOrTag("SpecialKissResponse"))
                {
                    Popup.Show(ParentObject.GetTag("SpecialKissResponse"));
                }
                else
                {
                    KissBuff(who);
                    Popup.Show(ParentObject.The + ParentObject.DisplayNameOnlyDirect + "&y " + ParentObject.GetPropertyOrTag("KissResponse", "&Mkisses you back") + "." + beguiled);
                    JournalAPI.AddAccomplishment("&y You kissed " + ParentObject.a + ParentObject.DisplayNameOnlyDirect + " and " + ParentObject.it + hbeguiled, "general", null, -1L);
                }
            }
            ParentObject.Heartspray();
            who.UseEnergy(1000, "Kissing");
            ParentObject.FireEvent(Event.New("ObjectKissed", "Object", ParentObject, "Kisser", who));
            return(true);
        }