37318 {
37319
37320
37321
37322
37323
37324
37325
37326
37327
37328
37329
37330
37331
37332
37333
37334
37335
37336
37337
37338
37339
37340
37346 bool Crit = false;
37348 if (Main.netMode == 1 &&
whoAmI == Main.myPlayer && !
quiet)
37349 {
37351 {
37352 NetMessage.SendData(13, -1, -1,
null,
whoAmI);
37353 }
37354 NetMessage.SendData(16, -1, -1,
null,
whoAmI);
37356 }
37361 Color color = (Crit ? CombatText.DamagedFriendlyCrit : CombatText.DamagedFriendly);
37365 {
37366 case -1:
37367 {
37372 break;
37373 }
37374 case 0:
37376 {
37378 }
37379 else
37380 {
37382 }
37383 break;
37384 case 1:
37385 case 3:
37386 case 4:
37388 {
37390 }
37391 else
37392 {
37394 }
37395 break;
37396 }
37400 {
37402 }
37403 if (
whoAmI == Main.myPlayer)
37404 {
37406 {
37407 Vector2
vector =
default(Vector2);
37409 {
37410 float x = position.X + (float)Main.rand.Next(-400, 400);
37411 float y = position.Y - (float)Main.rand.Next(500, 800);
37415 num16 += (float)Main.rand.Next(-100, 101);
37420 int type = 726;
37423 {
37425 type = 725;
37426 }
37428 {
37430 type = 724;
37431 }
37433 {
37435 type = 723;
37436 }
37438 if (Main.masterMode)
37439 {
37441 }
37442 else if (Main.expertMode)
37443 {
37445 }
37446 Projectile.NewProjectile(
GetSource_Accessory_OnHurt(item,
info.DamageSource), x, y,
num16,
num17, type,
num19, 5
f,
whoAmI, 0
f,
position.Y);
37447 }
37448 }
37450 {
37452 if (Main.rand.Next(3) == 0)
37453 {
37455 }
37456 if (Main.rand.Next(3) == 0)
37457 {
37459 }
37461 {
37463 }
37466 {
37468 }
37469 if (Main.masterMode)
37470 {
37472 }
37473 else if (Main.expertMode)
37474 {
37476 }
37479 {
37480 float speedX = (float)Main.rand.Next(-35, 36) * 0.02f;
37481 float speedY = (float)Main.rand.Next(-35, 36) * 0.02f;
37483 }
37485 }
37486 }
37489 {
37491 velocity.Y = info.Knockback * -7
f / 9
f;
37493 }
37494 if (!
info.SoundDisabled)
37495 {
37497 {
37499 }
37501 {
37503 }
37505 {
37507 }
37509 {
37511 }
37513 {
37515 }
37516 else if (Main.dontStarveWorld && !Main.remixWorld)
37517 {
37520 }
37521 else
37522 {
37524 }
37525 }
37528 {
37529 if (!
info.DustDisabled)
37530 {
37535 {
37538 }
37540 {
37542 {
37544 }
37546 {
37549 }
37551 {
37554 }
37555 else
37556 {
37558 }
37559 }
37560 }
37562 }
37563 else
37564 {
37566 if (
whoAmI == Main.myPlayer)
37567 {
37569 }
37570 }
37571 }
static SlotId PlaySound(in SoundStyle? style, Vector2? position=null, SoundUpdateCallback? updateCallback=null)
Attempts to play a sound style with the provided sound style (if it's not null), and returns a valid ...
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Vector2 position
The position of this Entity in world coordinates.
int width
The width of this Entity's hitbox, in pixels.
int height
The height of this Entity's hitbox, in pixels.
static ArmorShaderDataSet Armor
static bool[] DismountsPlayersOnHit
If true for a given projectile type (F:Terraria.Projectile.type), then that projectile will forcibly ...
static readonly SoundStyle Item27
static readonly SoundStyle DSTFemaleHurt
static void OnHurt(Player player, Player.HurtInfo info)
static void PostHurt(Player player, Player.HurtInfo info)
This is where all ModPlayer hooks are gathered and called.
void Dismount(Player mountedPlayer)
int statLifeMax2
The maximum health this player can have, adjusted by buffs and equipment.
float lifeRegenTime
How effective this player's natural life regeneration should be. Resets whenever the player is hurt,...
bool strongBees
If true, then the bees created by F:Terraria.Player.honeyCombItem have a chance to be stronger.
int statLife
The current health of this player. Capped at F:Terraria.Player.statLifeMax2. If you increase this v...
void OnHurt_Part1(HurtInfo info)
void KillMe(PlayerDeathReason damageSource, double dmg, int hitDirection, bool pvp=false)
Item starCloakItem_beeCloakOverrideItem
void OnHurt_Part3(HurtInfo info)
void OnHurt_Part2(HurtInfo info)
Mount mount
This player's T:Terraria.Mount. Do not overwrite this value. Instead, call M:Terraria....
Item honeyCombItem
If not null, this player will create damaging bee projectiles when taking damage.
void StopVanityActions(bool multiplayerBroadcast=true)
void AddBuff(int type, int timeToAdd, bool quiet=true, bool foodHack=false)
Gives the player the provided buff. This accounts for if the player is immune to the buff....
PlayerEyeHelper eyeHelper
IEntitySource GetSource_Accessory_OnHurt(Item item, Entity? attacker, string? context=null)
Item starCloakItem_manaCloakOverrideItem
Item starCloakItem_starVeilOverrideItem
This object encapsulates context information about the source of a particular spawning event of an It...
This data type describes in detail how a sound should be played. Passable to the M:Terraria....
void BlinkBecausePlayerGotHurt()