Terraria.Lang.deathMsg C# (CSharp) Method

deathMsg() public static method

public static deathMsg ( int plr = -1, int npc = -1, int proj = -1, int other = -1 ) : string
plr int
npc int
proj int
other int
return string
        public static string deathMsg(int plr = -1, int npc = -1, int proj = -1, int other = -1)
        {
            if (Lang.lang <= 1)
            {
                string result = "";
                int num = Main.rand.Next(26);
                string text = "";
                if (num == 0)
                {
                    text = " was slain";
                }
                else if (num == 1)
                {
                    text = " was eviscerated";
                }
                else if (num == 2)
                {
                    text = " was murdered";
                }
                else if (num == 3)
                {
                    text = "'s face was torn off";
                }
                else if (num == 4)
                {
                    text = "'s entrails were ripped out";
                }
                else if (num == 5)
                {
                    text = " was destroyed";
                }
                else if (num == 6)
                {
                    text = "'s skull was crushed";
                }
                else if (num == 7)
                {
                    text = " got massacred";
                }
                else if (num == 8)
                {
                    text = " got impaled";
                }
                else if (num == 9)
                {
                    text = " was torn in half";
                }
                else if (num == 10)
                {
                    text = " was decapitated";
                }
                else if (num == 11)
                {
                    text = " let their arms get torn off";
                }
                else if (num == 12)
                {
                    text = " watched their innards become outards";
                }
                else if (num == 13)
                {
                    text = " was brutally dissected";
                }
                else if (num == 14)
                {
                    text = "'s extremities were detached";
                }
                else if (num == 15)
                {
                    text = "'s body was mangled";
                }
                else if (num == 16)
                {
                    text = "'s vital organs were ruptured";
                }
                else if (num == 17)
                {
                    text = " was turned into a pile of flesh";
                }
                else if (num == 18)
                {
                    text = " was removed from " + Main.worldName;
                }
                else if (num == 19)
                {
                    text = " got snapped in half";
                }
                else if (num == 20)
                {
                    text = " was cut down the middle";
                }
                else if (num == 21)
                {
                    text = " was chopped up";
                }
                else if (num == 22)
                {
                    text = "'s plead for death was answered";
                }
                else if (num == 23)
                {
                    text = "'s meat was ripped off the bone";
                }
                else if (num == 24)
                {
                    text = "'s flailing about was finally stopped";
                }
                else if (num == 25)
                {
                    text = " had their head removed";
                }
                if (plr >= 0 && plr < 255)
                {
                    if (proj >= 0 && Main.projectile[proj].name != "")
                    {
                        result = string.Concat(new string[]
						{
							text,
							" by ",
							Main.player[plr].name,
							"'s ",
							Main.projectile[proj].name,
							"."
						});
                    }
                    else
                    {
                        result = string.Concat(new string[]
						{
							text,
							" by ",
							Main.player[plr].name,
							"'s ",
							Main.player[plr].inventory[Main.player[plr].selectedItem].name,
							"."
						});
                    }
                }
                else if (npc >= 0 && Main.npc[npc].displayName != "")
                {
                    result = text + " by " + Main.npc[npc].displayName + ".";
                }
                else if (proj >= 0 && Main.projectile[proj].name != "")
                {
                    result = text + " by " + Main.projectile[proj].name + ".";
                }
                else if (other >= 0)
                {
                    if (other == 0)
                    {
                        if (Main.rand.Next(2) == 0)
                        {
                            result = " fell to their death.";
                        }
                        else
                        {
                            result = " didn't bounce.";
                        }
                    }
                    else if (other == 1)
                    {
                        int num2 = Main.rand.Next(4);
                        if (num2 == 0)
                        {
                            result = " forgot to breathe.";
                        }
                        else if (num2 == 1)
                        {
                            result = " is sleeping with the fish.";
                        }
                        else if (num2 == 2)
                        {
                            result = " drowned.";
                        }
                        else if (num2 == 3)
                        {
                            result = " is shark food.";
                        }
                    }
                    else if (other == 2)
                    {
                        int num3 = Main.rand.Next(4);
                        if (num3 == 0)
                        {
                            result = " got melted.";
                        }
                        else if (num3 == 1)
                        {
                            result = " was incinerated.";
                        }
                        else if (num3 == 2)
                        {
                            result = " tried to swim in lava.";
                        }
                        else if (num3 == 3)
                        {
                            result = " likes to play in magma.";
                        }
                    }
                    else if (other == 3)
                    {
                        result = text + ".";
                    }
                    else if (other == 4)
                    {
                        result = " was slain.";
                    }
                    else if (other == 5)
                    {
                        int num4 = Main.rand.Next(4);
                        if (num4 == 0)
                        {
                            result = " shattered into pieces";
                        }
                        else if (num4 == 1)
                        {
                            result = " cant be put back together again.";
                        }
                        else if (num4 == 2)
                        {
                            result = " needs to be swept up.";
                        }
                        else if (num4 == 3)
                        {
                            result = " just became another dirt pile.";
                        }
                    }
                }
                return result;
            }
            if (Lang.lang == 2)
            {
                string result2 = "";
                int num5 = Main.rand.Next(15);
                string str;
                if (num5 == 0)
                {
                    str = " wurde durch";
                }
                else if (num5 == 1)
                {
                    str = " wurde vernichtet";
                }
                else if (num5 == 2)
                {
                    str = " wurde ermordet";
                }
                else if (num5 == 3)
                {
                    str = " wurde zerstoert";
                }
                else if (num5 == 4)
                {
                    str = " wurde massakriert";
                }
                else if (num5 == 5)
                {
                    str = " wurde aufgespiesst";
                }
                else if (num5 == 6)
                {
                    str = " wurde in zwei Haelften gerissen";
                }
                else if (num5 == 7)
                {
                    str = " wurde gekoepft";
                }
                else if (num5 == 8)
                {
                    str = " liess sich die Arme wegreissen";
                }
                else if (num5 == 9)
                {
                    str = " sah die eigenen Innereien herausquellen";
                }
                else if (num5 == 10)
                {
                    str = " wurde brutal seziert";
                }
                else if (num5 == 11)
                {
                    str = " wurde in Hackfleisch verwandelt";
                }
                else if (num5 == 12)
                {
                    str = " wurde laengs gefaltet";
                }
                else if (num5 == 13)
                {
                    str = " wurde um die Haelfte gekuerzt";
                }
                else
                {
                    str = " liess sich den Kopf wegreissen";
                }
                if ((plr >= 0 && plr < 255) || (npc >= 0 && Main.npc[npc].displayName != "") || (proj >= 0 && Main.projectile[proj].name != ""))
                {
                    result2 = str + ".";
                }
                else if (other >= 0)
                {
                    if (other == 0)
                    {
                        if (Main.rand.Next(2) == 0)
                        {
                            result2 = " stuerzte in den Tod.";
                        }
                        else
                        {
                            result2 = " ist nicht gesprungen.";
                        }
                    }
                    else if (other == 1)
                    {
                        int num6 = Main.rand.Next(4);
                        if (num6 == 0)
                        {
                            result2 = " hat vergessen zu atmen.";
                        }
                        else if (num6 == 1)
                        {
                            result2 = " hat jetzt ein feuchtes Grab bei den Fischen.";
                        }
                        else if (num6 == 2)
                        {
                            result2 = " ist ertrunken.";
                        }
                        else if (num6 == 3)
                        {
                            result2 = " ist jetzt Fischfutter.";
                        }
                    }
                    else if (other == 2)
                    {
                        int num7 = Main.rand.Next(4);
                        if (num7 == 0)
                        {
                            result2 = " ist geschmolzen.";
                        }
                        else if (num7 == 1)
                        {
                            result2 = " wurde eingeaeschert.";
                        }
                        else if (num7 == 2)
                        {
                            result2 = " versuchte, in Lava zu baden.";
                        }
                        else if (num7 == 3)
                        {
                            result2 = " spielt gern mit Magma.";
                        }
                    }
                    else if (other == 3)
                    {
                        result2 = str + ".";
                    }
                }
                return result2;
            }
            if (Lang.lang == 3)
            {
                string result3 = "";
                int num8 = Main.rand.Next(13);
                string str2;
                if (num8 == 0)
                {
                    str2 = " è stato ucciso";
                }
                else if (num8 == 1)
                {
                    str2 = " è stato sventrato";
                }
                else if (num8 == 2)
                {
                    str2 = " è stato assassinato";
                }
                else if (num8 == 3)
                {
                    str2 = " è stato distrutto";
                }
                else if (num8 == 4)
                {
                    str2 = " è stato massacrato";
                }
                else if (num8 == 5)
                {
                    str2 = " è stato trafitto";
                }
                else if (num8 == 6)
                {
                    str2 = " è stato diviso in due";
                }
                else if (num8 == 7)
                {
                    str2 = " è stato decapitato";
                }
                else if (num8 == 8)
                {
                    str2 = " ha visto uscire le sue interiora ";
                }
                else if (num8 == 9)
                {
                    str2 = " è stato brutalmente sezionato";
                }
                else if (num8 == 10)
                {
                    str2 = " è diventato un mucchio di carne";
                }
                else if (num8 == 11)
                {
                    str2 = " è stato spezzato a metà";
                }
                else
                {
                    str2 = " è stato tagliato a metà";
                }
                if ((plr >= 0 && plr < 255) || (npc >= 0 && Main.npc[npc].displayName != "") || (proj >= 0 && Main.projectile[proj].name != ""))
                {
                    result3 = str2 + ".";
                }
                else if (other >= 0)
                {
                    if (other == 0)
                    {
                        if (Main.rand.Next(2) == 0)
                        {
                            result3 = " sente la sua morte.";
                        }
                        else
                        {
                            result3 = " non poteva rimbalzare.";
                        }
                    }
                    else if (other == 1)
                    {
                        int num9 = Main.rand.Next(4);
                        if (num9 == 0)
                        {
                            result3 = " ha dimenticato di respirare.";
                        }
                        else if (num9 == 1)
                        {
                            result3 = " sta dormendo con i pesci.";
                        }
                        else if (num9 == 2)
                        {
                            result3 = " è affogato.";
                        }
                        else if (num9 == 3)
                        {
                            result3 = " è un pasto dello squalo.";
                        }
                    }
                    else if (other == 2)
                    {
                        int num10 = Main.rand.Next(4);
                        if (num10 == 0)
                        {
                            result3 = " si è sciolto.";
                        }
                        else if (num10 == 1)
                        {
                            result3 = " si è incenerito.";
                        }
                        else if (num10 == 2)
                        {
                            result3 = " ha provato a nuotare nella lava.";
                        }
                        else if (num10 == 3)
                        {
                            result3 = " piace giocare nel magma.";
                        }
                    }
                    else if (other == 3)
                    {
                        result3 = str2 + ".";
                    }
                }
                return result3;
            }
            if (Lang.lang == 4)
            {
                string result4 = "";
                int num11 = Main.rand.Next(14);
                string str3;
                if (num11 == 0)
                {
                    str3 = " s'est fait éviscérer";
                }
                else if (num11 == 1)
                {
                    str3 = " s'est fait assassiner";
                }
                else if (num11 == 2)
                {
                    str3 = " s'est fait détruire";
                }
                else if (num11 == 3)
                {
                    str3 = " s'est fait massacrer";
                }
                else if (num11 == 4)
                {
                    str3 = " s'est fait empaler";
                }
                else if (num11 == 5)
                {
                    str3 = " s'est fait couper en deux";
                }
                else if (num11 == 6)
                {
                    str3 = " s'est fait arracher la tête";
                }
                else if (num11 == 7)
                {
                    str3 = " s'est fait déchiqueter les bras";
                }
                else if (num11 == 8)
                {
                    str3 = " a vu ses entrailles tomber à ses pieds";
                }
                else if (num11 == 9)
                {
                    str3 = " s'est fait brutalement découper";
                }
                else if (num11 == 10)
                {
                    str3 = " a fini en chair à pâtée";
                }
                else if (num11 == 11)
                {
                    str3 = " s'est fait couper en deux";
                }
                else if (num11 == 12)
                {
                    str3 = " s'est fait couper en tranches";
                }
                else
                {
                    str3 = " a perdu la tête";
                }
                if ((plr >= 0 && plr < 255) || (npc >= 0 && Main.npc[npc].displayName != "") || (proj >= 0 && Main.projectile[proj].name != ""))
                {
                    result4 = str3 + ".";
                }
                else if (other >= 0)
                {
                    if (other == 0)
                    {
                        if (Main.rand.Next(2) == 0)
                        {
                            result4 = " a cassé sa pipe.";
                        }
                        else
                        {
                            result4 = " ne bouge plus.";
                        }
                    }
                    else if (other == 1)
                    {
                        int num12 = Main.rand.Next(4);
                        if (num12 == 0)
                        {
                            result4 = " a cessé de respirer.";
                        }
                        else if (num12 == 1)
                        {
                            result4 = " mange les pissenlits par la racine.";
                        }
                        else if (num12 == 2)
                        {
                            result4 = " a coulé à pic.";
                        }
                        else if (num12 == 3)
                        {
                            result4 = " nourrit les requins.";
                        }
                    }
                    else if (other == 2)
                    {
                        int num13 = Main.rand.Next(4);
                        if (num13 == 0)
                        {
                            result4 = " a fondu.";
                        }
                        else if (num13 == 1)
                        {
                            result4 = " s'est fait incinérer.";
                        }
                        else if (num13 == 2)
                        {
                            result4 = " a tenté de nager dans la lave.";
                        }
                        else if (num13 == 3)
                        {
                            result4 = " aime barboter dans le magma.";
                        }
                    }
                    else if (other == 3)
                    {
                        result4 = str3 + ".";
                    }
                }
                return result4;
            }
            if (Lang.lang == 5)
            {
                string result5 = "";
                string str4 = " fue asesinado";
                if ((plr >= 0 && plr < 255) || (npc >= 0 && Main.npc[npc].displayName != "") || (proj >= 0 && Main.projectile[proj].name != ""))
                {
                    result5 = str4 + ".";
                }
                else if (other >= 0)
                {
                    if (other == 0)
                    {
                        if (Main.rand.Next(2) == 0)
                        {
                            result5 = " le ha llegado la hora.";
                        }
                        else
                        {
                            result5 = " no saltó a tiempo.";
                        }
                    }
                    else if (other == 1)
                    {
                        int num14 = Main.rand.Next(4);
                        if (num14 == 0)
                        {
                            result5 = " se olvidó de respirar.";
                        }
                        else if (num14 == 1)
                        {
                            result5 = " duerme con los peces.";
                        }
                        else if (num14 == 2)
                        {
                            result5 = " se ha ahogado.";
                        }
                        else if (num14 == 3)
                        {
                            result5 = " es pasto de los tiburones.";
                        }
                    }
                    else if (other == 2)
                    {
                        int num15 = Main.rand.Next(4);
                        if (num15 == 0)
                        {
                            result5 = " se ha calcinado.";
                        }
                        else if (num15 == 1)
                        {
                            result5 = " se ha chamuscado.";
                        }
                        else if (num15 == 2)
                        {
                            result5 = " ha intentado nadar en lava.";
                        }
                        else if (num15 == 3)
                        {
                            result5 = " le gusta jugar con el magma.";
                        }
                    }
                    else if (other == 3)
                    {
                        result5 = str4 + ".";
                    }
                }
                return result5;
            }
            return "";
        }
    }