Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ DropTombstone()

void Terraria.Player.DropTombstone ( long coinsOwned,
NetworkText deathText,
int hitDirection )
inline

Definition at line 36910 of file Player.cs.

36911 {
36912 if (Main.netMode != 1)
36913 {
36914 float num;
36915 for (num = (float)Main.rand.Next(-35, 36) * 0.1f; num < 2f && num > -2f; num += (float)Main.rand.Next(-30, 31) * 0.1f)
36916 {
36917 }
36918 int num2 = Main.rand.Next(6);
36919 if (coinsOwned <= 100000)
36920 {
36921 num2 = ((num2 != 0) ? (200 + num2) : 43);
36922 }
36923 else
36924 {
36925 num2 = Main.rand.Next(5);
36926 num2 += 527;
36927 }
36929 int damage = 0;
36930 int num3 = 0;
36931 if (Main.getGoodWorld)
36932 {
36933 damage = 70;
36934 num3 = 10;
36935 }
36936 int num4 = whoAmI;
36937 int num5 = ((!Main.getGoodWorld) ? Projectile.NewProjectile(projectileSource_Misc, position.X + (float)(width / 2), position.Y + (float)(height / 2), (float)Main.rand.Next(10, 30) * 0.1f * (float)hitDirection + num, (float)Main.rand.Next(-40, -20) * 0.1f, num2, damage, num3, Main.myPlayer, num4) : Projectile.NewProjectile(projectileSource_Misc, position.X + (float)(width / 2), position.Y + (float)(height / 2), ((float)Main.rand.Next(10, 30) * 0.1f * (float)hitDirection + num) * 1.5f, (float)Main.rand.Next(-40, -20) * 0.1f * 1.5f, num2, damage, num3, Main.myPlayer, num4));
36939 string text = now.ToString("D");
36940 if (GameCulture.FromCultureName(GameCulture.CultureName.English).IsActive)
36941 {
36942 text = now.ToString("MMMM d, yyy");
36943 }
36944 string miscText = deathText.ToString() + "\n" + text;
36945 Main.projectile[num5].miscText = miscText;
36946 }
36947 }
Vector2 position
Definition Entity.cs:14
static GameCulture FromCultureName(CultureName name)
IEntitySource GetProjectileSource_Misc(int projectileSourceId)
Definition Player.cs:9317
static DateTime Now
Definition DateTime.cs:103

References Terraria.Localization.GameCulture.FromCultureName(), Terraria.Main.getGoodWorld, Terraria.Main.myPlayer, Terraria.Main.netMode, Terraria.Projectile.NewProjectile(), System.DateTime.Now, Terraria.Main.projectile, Terraria.Main.rand, and System.text.