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

◆ CanBeReflected()

bool Terraria.Projectile.CanBeReflected ( )
inline

Definition at line 20462 of file Projectile.cs.

20463 {
20464 if (active && friendly && !hostile && damage > 0)
20465 {
20466 if (type == 728 || type == 955)
20467 {
20468 return true;
20469 }
20470 if (aiStyle == 1 || aiStyle == 2 || aiStyle == 8 || aiStyle == 21 || aiStyle == 24 || aiStyle == 28 || aiStyle == 29 || aiStyle == 131)
20471 {
20472 return true;
20473 }
20474 }
20475 return false;
20476 }
bool active
If true, the Entity actually exists within the game world. Within the specific entity array,...
Definition Entity.cs:21
int aiStyle
Selects which vanilla code to use for the AI method. Vanilla projectile AI styles are enumerated in t...
int damage
This will always be set in Projectile.NewProjectile based on the weapons damage and player stat modif...
bool friendly
If True, this projectile will hurt enemies (!F:Terraria.NPC.friendly) Defaults to false.
int type
The Projectile ID of this projectile. The Projectile ID is a unique number assigned to each Projectil...
bool hostile
If True, this projectile will hurt players and friendly NPCs (F:Terraria.NPC.friendly) Defaults to ...

References Terraria.Entity.active, Terraria.Projectile.aiStyle, Terraria.Projectile.damage, Terraria.Projectile.friendly, Terraria.Projectile.hostile, and Terraria.Projectile.type.

Referenced by Terraria.Projectile.Damage().

+ Here is the caller graph for this function: