public void SW_Choke(Cell C)
        {
            TextConsole  textConsole = Look._TextConsole;
            ScreenBuffer scrapBuffer = TextConsole.ScrapBuffer;

            XRLCore.Core.RenderMapToBuffer(scrapBuffer);
            bool bDraw = C.IsVisible();

            int nBonus = Math.Max(ParentObject.Statistics["Ego"].Modifier, Level);

            if (C != null)
            {
                foreach (GameObject GO in C.GetObjectsInCell())
                {
                    if (GO.HasPart("Brain"))
                    {
                        //if(GO.HasTag("HeroNamePrefixes"))
                        if (GO.HasTag("CanBeChoked"))
                        {
                            ChokedObject = GO;
                            EquipForceGesture();
                            //Apply force choking effect to victim
                            GO.ApplyEffect((Effect) new XRL.World.Parts.Effects.ZD_Choking(Level, GetBaseDamage(Level), GetBonusDamage(Level), ParentObject, GetSaveBonus(Level), GetRange(Level), ForceGestureObject));
                        }
                        else
                        {
                            Popup.Show("The target does not have a throat for you to choke!", true);
                        }
                    }
                }
            }
            scrapBuffer.Goto(C.X, C.Y);
            scrapBuffer.Write("&Y#");
            if (bDraw)
            {
                textConsole.DrawBuffer(scrapBuffer, (IScreenBufferExtra)null, false);
            }
            if (!bDraw)
            {
                return;
            }
            Thread.Sleep(50);
        }
Esempio n. 2
0
        private static void CountBlazeInjectors()
        {
            int blazeInjectorCount = 0;

            XRLCore.Core.Game.Player.Body.GetPart <Inventory>().ForeachObject(delegate(GameObject GO)
            {
                if (GO.HasPart("Blaze_Tonic_Applicator"))
                {
                    blazeInjectorCount = GO.Count;
                }
            });
            if (blazeInjectorCount >= 3)
            {
                XRLCore.Core.Game.FinishQuestStep("The Iced Man", "Find Three Blaze Injectors");
            }
            else
            {
                MessageQueue.AddPlayerMessage("&cYou now have " + blazeInjectorCount + " Blaze Injectors.");
                XRLCore.Core.Game.Quests["The Iced Man"].StepsByID["Find Three Blaze Injectors"].Text = "Find Three Blaze Injectors. " + blazeInjectorCount + "/3 obtained";
            }
        }