コード例 #1
0
        //----------------------------------------------------------------------------
        //             AddSingleDeathEvent
        //----------------------------------------------------------------------------

        #region AddSingleDeathEvent

        public void AddSingleDeathEvent(IHasTurn hasTurn, IDeathEvent deathEvent)
        {
            if (!DeathEventDict.ContainsKey(hasTurn))
            {
                DeathEventDict[hasTurn] = new List <IDeathEvent>();
            }

            DeathEventDict[hasTurn].Add(deathEvent);
        }
        public bool HandleDeathEvent(IDeathEvent E)
        {
            // AddPlayerMessage("Starting Scio Grab.");

            var DyingEgo  = E.Dying.Statistics["Ego"].Modifier;
            var KillerEgo = ParentObject.Statistics["Ego"].Modifier;

            // AddPlayerMessage("Got Ego Parameters.");

            var OwnersLevel  = ParentObject.Statistics["Level"].Value;
            var TargetsLevel = E.Dying.Statistics["Level"].Value;

            // AddPlayerMessage("Got Level Parameters.");

            var LevelDifference = TargetsLevel - OwnersLevel;
            var DevourNumerator = Stat.Random(1, 100);
            var DevourChance    = DevourNumerator <= 9 + Level + (LevelDifference * 0.50);

            // AddPlayerMessage("Setting Varitability.");

            var Killed = E.Dying;

            // AddPlayerMessage("Got target");
            // AddPlayerMessage("Devour Roll: " + DevourNumerator);

            if (E.Killer == ParentObject && E.Killer.IsPlayer() && DyingEgo > KillerEgo)
            {
                // AddPlayerMessage("Setting Kill Bool.");
                if (DevourChance)
                {
                    // AddPlayerMessage("Devour Chance Procced");

                    if (Popup.ShowYesNo("&yAt the moment of victory, your swelling ego curves the psychic aether and causes the psyche of " + Killed.the + Killed.ShortDisplayName + "&y, to collide with your own. As the weaker of the two, its binding energy is exceeded and it explodes. Would you like to encode its psionic bits on the holographic boundary of your own psyche? \n\n(+1 Ego permanently)") == DialogResult.Yes)
                    {
                        // AddPlayerMessage("You Chose Yes");
                        IComponent <GameObject> .ThePlayer.Statistics["Ego"].BaseValue += 1;
                        Popup.Show("&yYou encode the psyche of " + Killed.the + Killed.DisplayNameOnlyDirect + " and gain +&C1 &YEgo&y!");
                        JournalAPI.AddAccomplishment("You slew " + Killed.the + Killed.DisplayNameOnlyDirect + " and encoded their psyche's psionic bits on the holographic boundary of your own psyche.", "After a climactic battle of wills, =name= slew " + Killed.the + Killed.DisplayNameOnlyDirect + " and absorbed " + Killed.its + " psyche, thickening toward Godhood.", "general", JournalAccomplishment.MuralCategory.Slays, JournalAccomplishment.MuralWeight.High, null, -1L);
                    }
                    else
                    {
                        Popup.Show("&yYou pause as the psyche of " + Killed.the + Killed.DisplayNameOnlyDirect + " radiates into nothingness.");
                        JournalAPI.AddAccomplishment("You slew " + Killed.the + Killed.DisplayNameOnlyDirect + " and watched their psyche radiate into nothingness.", "After a climactic battle of wills, =name= slew " + Killed.the + Killed.DisplayNameOnlyDirect + " and watched " + Killed.its + " their psyche radiate into nothingness.", "general", JournalAccomplishment.MuralCategory.Slays, JournalAccomplishment.MuralWeight.Medium, null, -1L);
                    }
                }
                else
                {
                    JournalAPI.AddAccomplishment("You slew " + Killed.DisplayNameOnly + ".", "After a climactic battle of wills, =name= slew " + Killed.the + Killed.DisplayNameOnlyDirect + ".", "general", JournalAccomplishment.MuralCategory.Slays, JournalAccomplishment.MuralWeight.Medium, null, -1L);
                }
            }
            else if (E.Dying == ParentObject && ParentObject.IsPlayer())
            {
                if (DevourChance)
                {
                    string value = (E.Killer.pBrain.GetPrimaryFaction() == "Seekers") ? "You were resorbed into the Mass Mind." : ((!DevourChance) ? ("You were killed by " + ParentObject.DisplayNameOnly + "&Y.") : ("Your psyche exploded, and its psionic bits were encoded on the holographic boundary surrounding the psyche of " + Grammar.MakePossessive(ParentObject.DisplayNameOnly) + "&Y."));
                    E.Reason = value;
                }
            }
            else if (E.Killer == ParentObject && !E.Killer.IsPlayer() && DyingEgo > KillerEgo)
            {
                if (DevourChance)
                {
                    ParentObject.Statistics["Ego"].BaseValue += 1;
                    ParentObject.ParticleBlip("{{violet|*}}", 1, true);
                }
            }
            return(true);
        }
コード例 #3
0
        //----------------------------------------------------------------------------
        //             AddGlobalDeathEvent
        //----------------------------------------------------------------------------


        #region AddGlobalDeathEvent

        public void AddGlobalDeathEvent(IDeathEvent deathEvent)
        {
            GlobalDeathEvents.Add(deathEvent);
        }