コード例 #1
0
        internal override void Export(string table)
        {
            base.Export(table);


            table = GetType().Name;



            var vals = new List <object> {
                ID, HFID, SlayerHFID, SlayerRace == null ? (object)DBNull.Value : SlayerRace.ToString(), HistoricalFigure.Castes[SlayerCaste], SlayerItemID, SlayerShooterItemID, Causes[Cause], SiteID, SubregionID, FeatureLayerID
            };


            Database.ExportWorldItem(table, vals);
        }
コード例 #2
0
        protected override string LegendsDescription()
        {
            var timestring = base.LegendsDescription();

            switch (Causes[Cause])
            {
            case "struck":
                return(string.Format("{0} the {1} {2} was struck down by \nthe {3} {4} in {5}.",
                                     timestring, HF.Race, HF,
                                     SlayerRace == null ? "" : SlayerRace.ToString(), SlayerHF == null ? SlayerHFID.ToString() : SlayerHF.ToString(),
                                     Site == null ? SiteID.ToString() : Site.AltName));

            case "shot":
                return(string.Format("{0} the {1} {2} was shot and killed by \nthe {3} {4} in {5}.",
                                     timestring, HF.Race, HF,
                                     SlayerRace == null ? "" : SlayerRace.ToString(), SlayerHF == null ? SlayerHFID.ToString() : SlayerHF.ToString(),
                                     Site == null ? SiteID.ToString() : Site.AltName));

            case "murdered":
                return(string.Format("{0} the {1} {2} was murdered by \nthe {3} {4} in {5}.",
                                     timestring, HF.Race, HF,
                                     SlayerRace == null ? "" : SlayerRace.ToString(), SlayerHF == null ? SlayerHFID.ToString() : SlayerHF.ToString(),
                                     Site == null ? SiteID.ToString() : Site.AltName));

            case "old age":
                return(string.Format("{0} the {1} {2} died of old age.",
                                     timestring, HF.Race, HF));

            case "infection":
                return(string.Format("{0} the {1} {2} succumbed to infection, slain by \nthe {3} {4} in {5}.",
                                     timestring, HF.Race, HF,
                                     SlayerRace == null ? "" : SlayerRace.ToString(), SlayerHF == null ? SlayerHFID.ToString() : SlayerHF.ToString(),
                                     Site == null ? SiteID.ToString() : Site.AltName));

            case "blood":
                if (SlayerHF == null)
                {
                    return(string.Format("{0} the {1} {2} bled to death in {3}.",
                                         timestring, HF.Race, HF,
                                         Site == null ? SiteID.ToString() : Site.AltName));
                }
                return(string.Format("{0} the {1} {2} bled to death, slain by the {3} {4} with ITEM: {5} in {6}.",
                                     timestring, HF.Race, HF, SlayerRace == null ? "" : SlayerRace.ToString(), SlayerHF == null ? SlayerHFID.ToString() : SlayerHF.ToString(), SlayerItemID,
                                     Site == null ? SiteID.ToString() : Site.AltName));

            case "thirst":
                return(string.Format("{0} the {1} {2} died of thirst in {3}.",
                                     timestring, HF.Race, HF,
                                     Site == null ? SiteID.ToString() : Site.AltName));

            case "collapsed":
                return(string.Format("{0} the {1} {2} collapsed, struck down by \nthe {3} {4} in {5}.",
                                     timestring, HF.Race, HF,
                                     SlayerRace == null ? "" : SlayerRace.ToString(), SlayerHF == null ? SlayerHFID.ToString() : SlayerHF.ToString(),
                                     Site == null ? SiteID.ToString() : Site.AltName));

            case "vanish":
                return(string.Format("{0} the {1} {2} vanished in {3}.",
                                     timestring, HF.Race, HF,
                                     Site == null ? SiteID.ToString() : Site.AltName));

            case "drown":
                return(string.Format("{0} the {1} {2} drowned in {3}.",
                                     timestring, HF.Race, HF,
                                     Site == null ? SiteID.ToString() : Site.AltName));

            case "crushed bridge":
                return(string.Format("{0} the {1} {2} was crushed by a drawbridge in {3}.",
                                     timestring, HF.Race, HF,
                                     Site == null ? SiteID.ToString() : Site.AltName));

            case "put to rest":
                return(string.Format("{0} the {1} {2} was put to rest in {3}.",
                                     timestring, HF.Race, HF,
                                     Site == null ? SiteID.ToString() : Site.AltName));

            case "quitdead":
                return(string.Format("{0} the {1} {2} starved to death in {3}.",
                                     timestring, HF.Race, HF,
                                     Site == null ? SiteID.ToString() : Site.AltName));

            case "exec beheaded":
                return(string.Format("{0} the {1} {2} was beheaded by \nthe {3} {4} in {5}.",
                                     timestring, HF.Race, HF,
                                     SlayerRace == null ? "" : SlayerRace.ToString(), SlayerHF == null ? SlayerHFID.ToString() : SlayerHF.ToString(),
                                     Site == null ? SiteID.ToString() : Site.AltName));

            case "exec burned alive":
                return(string.Format("{0} the {1} {2} burned \nthe {3} {4} alive in {5}.",
                                     timestring, HF.Race, HF,
                                     SlayerRace == null ? "" : SlayerRace.ToString(), SlayerHF == null ? SlayerHFID.ToString() : SlayerHF.ToString(),
                                     Site == null ? SiteID.ToString() : Site.AltName));

            case "exec fed to beasts":
                return(string.Format("{0} the {1} {2} fed \nthe {3} {4} to beasts in {5}.",
                                     timestring, HF.Race, HF,
                                     SlayerRace == null ? "" : SlayerRace.ToString(), SlayerHF == null ? SlayerHFID.ToString() : SlayerHF.ToString(),
                                     Site == null ? SiteID.ToString() : Site.AltName));

            case "exec hacked to pieces":
                return(string.Format("{0} the {1} {2} hacked \nthe {3} {4} to pieces in {5}.",
                                     timestring, HF.Race, HF,
                                     SlayerRace == null ? "" : SlayerRace.ToString(), SlayerHF == null ? SlayerHFID.ToString() : SlayerHF.ToString(),
                                     Site == null ? SiteID.ToString() : Site.AltName));

            case "exec drowned":
                return(string.Format("{0} the {1} {2} drowned \nthe {3} {4} in {5}.",
                                     timestring, HF.Race, HF,
                                     SlayerRace == null ? "" : SlayerRace.ToString(), SlayerHF == null ? SlayerHFID.ToString() : SlayerHF.ToString(),
                                     Site == null ? SiteID.ToString() : Site.AltName));

            case "exec buried alive":
                return(string.Format("{0} the {1} {2} buried \nthe {3} {4} alive in {5}.",
                                     timestring, HF.Race, HF,
                                     SlayerRace == null ? "" : SlayerRace.ToString(), SlayerHF == null ? SlayerHFID.ToString() : SlayerHF.ToString(),
                                     Site == null ? SiteID.ToString() : Site.AltName));

            case "exec crucified":
                return(string.Format("{0} the {1} {2} was crucified by \nthe {3} {4} alive in {5}.",
                                     timestring, HF.Race, HF,
                                     SlayerRace == null ? "" : SlayerRace.ToString(), SlayerHF == null ? SlayerHFID.ToString() : SlayerHF.ToString(),
                                     Site == null ? SiteID.ToString() : Site.AltName));

            case "air":
                return(string.Format("{0} the {1} {2} suffocated, slain by {3} {4} alive in {5}.",
                                     timestring, HF.Race, HF,
                                     SlayerRace == null ? "" : SlayerRace.ToString(), SlayerHF == null ? SlayerHFID.ToString() : SlayerHF.ToString(),
                                     Site == null ? SiteID.ToString() : Site.AltName));

            case "obstacle":
                return(string.Format("{0} the {1} {2} died after colliding with an obstacle, slain by {3} {4} in {5}.",
                                     timestring, HF.Race, HF,
                                     SlayerRace == null ? "" : SlayerRace.ToString(), SlayerHF == null ? SlayerHFID.ToString() : SlayerHF.ToString(),
                                     Site != null ? Site.AltName : (SiteID != null ? SiteID.ToString() : Subregion.ToString())));

            case "hunger":
                return(string.Format("{0} the {1} {2} starved to death in {3}.",
                                     timestring, HF.Race, HF,
                                     Site == null ? SiteID.ToString() : Site.AltName));

            case "scuttled":
                return(string.Format("{0} {2} a {1} was scuttled in {3}.",
                                     timestring, HF.Race, HF,
                                     Site == null ? SiteID.ToString() : Site.AltName));

            case "spikes":
                return(string.Format("{0} the {1} {2} was impaled on spikes in {3}.",
                                     timestring, HF.Race, HF,
                                     Site == null ? SiteID.ToString() : Site.AltName));

            case "scared to death":
                return(string.Format("{0} the {1} {2} was scared to death by \nthe {3} {4} in {5}.",
                                     timestring, HF.Race, HF,
                                     SlayerRace == null ? "" : SlayerRace.ToString(), SlayerHF == null ? SlayerHFID.ToString() : SlayerHF.ToString(),
                                     Site == null ? SiteID.ToString() : Site.AltName));

            case "slaughtered":
                return(string.Format("{0} {2} a {1} was slaughtered in {5} by {4} a {3}.",
                                     timestring, HF.Race, HF,
                                     SlayerRace == null ? "" : SlayerRace.ToString(), SlayerHF == null ? SlayerHFID.ToString() : SlayerHF.ToString(),
                                     Site == null ? SiteID.ToString() : Site.AltName));

            case "trap":
                return(string.Format("{0} the {1} {2} was killed by a trap in {3}.",
                                     timestring, HF.Race, HF,
                                     Site.AltName));

            case "blood drained":
                return(string.Format("{0} the {1} {2} was drained of blood by \nthe {3} {4} in {5}.",
                                     timestring, HF.Race, HF,
                                     SlayerRace == null ? "" : SlayerRace.ToString(), SlayerHF == null ? SlayerHFID.ToString() : SlayerHF.ToString(),
                                     Site != null ? Site.AltName : (SiteID != null ? SiteID.ToString() : Subregion.ToString())));
            }

            return(timestring);
        }
コード例 #3
0
        protected override string LegendsDescription()
        {
            var timestring = base.LegendsDescription();

            var locationText = "";

            if (Site != null)
            {
                locationText = Site.AltName;
            }
            else if (Subregion != null)
            {
                locationText = Subregion.ToString();
            }

            var hfText = Hf != null ? $"{Hf.Race} {Hf}" : "UNKNOWN";

            switch (Causes[Cause])
            {
            case "struck":
                if (ItemID == null)
                {
                    return
                        ($"{timestring} the {hfText} was struck down by \nthe {SlayerRace?.ToString() ?? ""} {Hf_Slayer?.ToString() ?? HfId_Slayer.ToString()} in {locationText}.");
                }
                if (Artifact_SlayerItem != null)
                {
                    return
                        ($"{timestring} the {hfText} was struck down by \n the {SlayerRace?.ToString() ?? ""} {Hf_Slayer?.ToString() ?? HfId_Slayer.ToString()} with {Artifact_SlayerItem} in {locationText}.");
                }
                if (ItemType != null && Item.ItemTypes[ItemType.Value] == "corpsepiece")
                {
                    return
                        ($"{timestring} the {hfText} was struck down by \nthe {SlayerRace?.ToString() ?? ""} {Hf_Slayer?.ToString() ?? HfId_Slayer.ToString()} {"with a body part"} in {locationText}.");
                }
                if (ItemType != null && Item.ItemTypes[ItemType.Value] == "corpse")
                {
                    return
                        ($"{timestring} the {hfText} was struck down by \nthe {SlayerRace?.ToString() ?? ""} {Hf_Slayer?.ToString() ?? HfId_Slayer.ToString()} {"with a corpse"} in {locationText}.");
                }
                if (Mat != null && ItemType != null && ItemSubType == null)     //Test
                {
                    return
                        ($"{timestring} the {hfText} was struck down by \nthe {SlayerRace?.ToString() ?? ""} {Hf_Slayer?.ToString() ?? HfId_Slayer.ToString()} {"with a " + Item.Materials[Mat.Value] + " " + Item.ItemTypes[ItemType.Value]} in {locationText}.");
                }
                if (Mat != null && ItemType != null && ItemSubType != null)
                {
                    return
                        ($"{timestring} the {hfText} was struck down by \nthe {SlayerRace?.ToString() ?? ""} {Hf_Slayer?.ToString() ?? HfId_Slayer.ToString()} {"with a " + Item.Materials[Mat.Value] + " " + Item.ItemSubTypes[ItemSubType.Value]} in {locationText}.");
                }
                return
                    ($"{timestring} the {hfText} was struck down by \nthe {SlayerRace?.ToString() ?? ""} {Hf_Slayer?.ToString() ?? HfId_Slayer.ToString()} {"with "} in {locationText}.");

            case "shot":
                if (BowItem == null)
                {
                    if (Mat != null && ItemType != null && ItemSubType != null)
                    {
                        return
                            ($"{timestring} the {hfText} was shot and killed by \nthe {SlayerRace?.ToString() ?? ""} {Hf_Slayer?.ToString() ?? HfId_Slayer.ToString()} {"with a " + Item.Materials[Mat.Value] + " " + Item.ItemSubTypes[ItemSubType.Value]} in {locationText}.");
                    }
                    return
                        ($"{timestring} the {hfText} was shot and killed by \nthe {SlayerRace?.ToString() ?? ""} {Hf_Slayer?.ToString() ?? HfId_Slayer.ToString()} in {locationText} " +
                         $"with a {(Mat.HasValue ? Item.Materials[Mat.Value] : "UNKNOWN")}  {(ItemSubType.HasValue ? Item.ItemSubTypes[ItemSubType.Value] : "UNKNOWN")}");
                }
                if (Artifact_SlayerShooterItem != null)
                {
                    return
                        ($"{timestring} the {hfText} was shot and killed by \n the {SlayerRace?.ToString() ?? ""} {Hf_Slayer?.ToString() ?? HfId_Slayer.ToString()} with {Artifact_SlayerShooterItem} in {locationText}.");
                }
                if (BowMat != null && BowItemType != null && BowItemSubType == null && ItemType != null && Mat != null)     //Test
                {
                    return
                        ($"{timestring} the {hfText} was shot and killed by \nthe {SlayerRace?.ToString() ?? ""} {Hf_Slayer?.ToString() ?? HfId_Slayer.ToString()} {"with a " + Item.Materials[Mat.Value] + " " + Item.ItemTypes[ItemType.Value]} in {locationText}.");
                }
                if (BowMat != null && BowItemType != null && BowItemSubType != null && Mat != null && ItemType != null && ItemSubType != null)
                {
                    return
                        ($"{timestring} the {hfText} was shot and killed by \nthe {SlayerRace?.ToString() ?? ""} {Hf_Slayer?.ToString() ?? HfId_Slayer.ToString()} {"with a " + Item.Materials[Mat.Value] + " " + Item.ItemSubTypes[ItemSubType.Value] + " from a " + Item.Materials[BowMat.Value] + " " + Item.ItemSubTypes[BowItemSubType.Value]} in {locationText}.");
                }
                return
                    ($"{timestring} the {hfText} was shot and killed by \nthe {SlayerRace?.ToString() ?? ""} {Hf_Slayer?.ToString() ?? HfId_Slayer.ToString()} {"with "} in {locationText}.");

            case "murdered":
                return
                    ($"{timestring} the {hfText} was murdered by \nthe {SlayerRace?.ToString() ?? ""} {Hf_Slayer?.ToString() ?? HfId_Slayer.ToString()} in {locationText}.");

            case "old age":
                return($"{timestring} the {hfText} died of old age.");

            case "infection":
                return
                    ($"{timestring} the {hfText} succumbed to infection, slain by \nthe {SlayerRace?.ToString() ?? ""} {Hf_Slayer?.ToString() ?? HfId_Slayer.ToString()} in {locationText}.");

            case "blood":
                return(Hf_Slayer == null ?
                       $"{timestring} the {hfText} bled to death in {locationText}." :
                       $"{timestring} the {hfText} bled to death, slain by the {SlayerRace?.ToString() ?? ""} {Hf_Slayer} with ITEM: {ArtifiactId_SlayerItem} in {locationText}.");

            case "thirst":
                return($"{timestring} the {hfText} died of thirst in {locationText}.");

            case "collapsed":
                return
                    ($"{timestring} the {hfText} collapsed, struck down by \nthe {SlayerRace?.ToString() ?? ""} {Hf_Slayer?.ToString() ?? HfId_Slayer.ToString()} in {locationText}.");

            case "vanish":
                return($"{timestring} the {hfText} vanished in {locationText}.");

            case "drown":
                return($"{timestring} the {hfText} drowned in {locationText}.");

            case "crushed bridge":
                return($"{timestring} the {hfText} was crushed by a drawbridge in {locationText}.");

            case "put to rest":
                return($"{timestring} the {hfText} was put to rest in {locationText}.");

            case "quitdead":
                return($"{timestring} the {hfText} starved to death in {locationText}.");

            case "exec beheaded":
                return
                    ($"{timestring} the {hfText} was beheaded by \nthe {SlayerRace?.ToString() ?? ""} {Hf_Slayer?.ToString() ?? HfId_Slayer.ToString()} in {locationText}.");

            case "exec burned alive":
                return
                    ($"{timestring} the {hfText} burned \nthe {(SlayerRace?.ToString() ?? "")} {(Hf_Slayer?.ToString() ?? HfId_Slayer.ToString())} alive in {locationText}.");

            case "exec fed to beasts":
                return
                    ($"{timestring} the {hfText} fed \nthe {(SlayerRace?.ToString() ?? "")} {(Hf_Slayer?.ToString() ?? HfId_Slayer.ToString())} to beasts in {locationText}.");

            case "exec hacked to pieces":
                return
                    ($"{timestring} the {hfText} hacked \nthe {(SlayerRace?.ToString() ?? "")} {(Hf_Slayer?.ToString() ?? HfId_Slayer.ToString())} to pieces in {locationText}.");

            case "exec drowned":
                return
                    ($"{timestring} the {hfText} drowned \nthe {(SlayerRace?.ToString() ?? "")} {(Hf_Slayer?.ToString() ?? HfId_Slayer.ToString())} in {locationText}.");

            case "exec buried alive":
                return
                    ($"{timestring} the {hfText} buried \nthe {(SlayerRace?.ToString() ?? "")} {(Hf_Slayer?.ToString() ?? HfId_Slayer.ToString())} alive in {locationText}.");

            case "exec crucified":
                return
                    ($"{timestring} the {hfText} was crucified by \nthe {(SlayerRace?.ToString() ?? "")} {(Hf_Slayer?.ToString() ?? HfId_Slayer.ToString())} alive in {locationText}.");

            case "air":
                return
                    ($"{timestring} the {hfText} suffocated, slain by {(SlayerRace?.ToString() ?? "")} {(Hf_Slayer?.ToString() ?? HfId_Slayer.ToString())} alive in {locationText}.");

            case "obstacle":
                return
                    ($"{timestring} the {hfText} died after colliding with an obstacle, slain by {(SlayerRace?.ToString() ?? "")} {(Hf_Slayer?.ToString() ?? HfId_Slayer.ToString())} in {locationText}.");

            case "hunger":
                return($"{timestring} the {hfText} starved to death in {locationText}.");

            case "scuttled":
                return($"{timestring} {hfText} was scuttled in {locationText}.");

            case "spikes":
                return($"{timestring} the {hfText} was impaled on spikes in {locationText}.");

            case "scared to death":
                return
                    ($"{timestring} the {hfText} was scared to death by \nthe {(SlayerRace?.ToString() ?? "")} {(Hf_Slayer?.ToString() ?? HfId_Slayer.ToString())} in {locationText}.");

            case "slaughtered":
                return($"{timestring} the {hfText} was slaughtered in {locationText} by {Hf_Slayer?.ToString() ?? HfId_Slayer.ToString()} a {SlayerRace?.ToString() ?? ""}.");

            case "trap":
                return($"{timestring} the {hfText} was killed by a trap in {locationText}.");

            case "blood drained":
                return
                    ($"{timestring} the {hfText} was drained of blood by \nthe {(SlayerRace?.ToString() ?? "")} {(Hf_Slayer?.ToString() ?? HfId_Slayer.ToString())} in {locationText}.");
            }

            return(timestring);
        }