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

◆ AllowShimmerDodge()

static bool Terraria.Player.AllowShimmerDodge ( PlayerDeathReason damageSource,
int cooldownCounter,
bool dodgeable )
inlinestaticprivate

Definition at line 37573 of file Player.cs.

37574 {
37575 if (!dodgeable)
37576 {
37577 return false;
37578 }
37579 if (cooldownCounter == 1)
37580 {
37581 return false;
37582 }
37583 Entity entity = null;
37584 if (!damageSource.TryGetCausingEntity(out entity))
37585 {
37586 return true;
37587 }
37588 if (entity is NPC { active: not false } nPC && (nPC.boss || NPC.GetNPCInvasionGroup(nPC.type) != 0 || NPCID.Sets.CanHitPastShimmer[nPC.type]))
37589 {
37590 return false;
37591 }
37592 if (entity is Projectile { active: not false } projectile && ProjectileID.Sets.CanHitPastShimmer[projectile.type])
37593 {
37594 return false;
37595 }
37596 return true;
37597 }
bool active
If true, the Entity actually exists within the game world. Within the specific entity array,...
Definition Entity.cs:21
static bool[] CanHitPastShimmer
If true for a given NPC type (F:Terraria.NPC.type), then that NPC can hit players that are submerged ...
Definition NPCID.cs:611
static bool[] CanHitPastShimmer
If true for a given projectile type (F:Terraria.Projectile.type), then that projectile can hit player...

References Terraria.Entity.active, Terraria.ID.NPCID.Sets.CanHitPastShimmer, Terraria.ID.ProjectileID.Sets.CanHitPastShimmer, and Terraria.NPC.GetNPCInvasionGroup().

Referenced by Terraria.Player.Hurt().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: