29012 {
29013
29014
29015
29016
29017
29018
29019
29020
29021
29022
29023
29024
29025
29027 {
29028 return;
29029 }
29030 Rectangle
rectangle =
default(Rectangle);
29032 Rectangle
npcRect =
default(Rectangle);
29033 for (int i = 0; i < 200; i++)
29034 {
29035 if (!Main.npc[i].active || Main.npc[i].friendly || Main.npc[i].damage <= 0)
29036 {
29037 continue;
29038 }
29040 switch (Main.npc[i].type)
29041 {
29042 case 396:
29043 case 397:
29044 case 398:
29045 case 400:
29046 case 401:
29048 break;
29049 case 636:
29051 if (Main.npc[i].ai[0] == 0
f || Main.npc[i].ai[0] == 10
f)
29052 {
29053 continue;
29054 }
29055 break;
29056 }
29058 {
29059 continue;
29060 }
29063 obj.position += Main.npc[i].netOffset;
29064 ((Rectangle)(
ref npcRect)).
_002Ector((
int)Main.npc[i].position.X, (int)Main.npc[i].position.Y, Main.npc[i].width, Main.npc[i].height);
29067 {
29069 {
29070 continue;
29071 }
29073 bool flag2 =
false;
29076 float knockback = 10
f;
29078 {
29080 }
29082 {
29087 }
29089 if (Main.npc[i].position.X + (
float)(Main.npc[i].width / 2) <
position.X + (
float)(
width / 2))
29090 {
29092 }
29096 {
29098 }
29099 if (
whoAmI == Main.myPlayer &&
num2 > 0
f &&
flag3 && !Main.npc[i].dontTakeDamage)
29100 {
29103 {
29105 }
29107 }
29109 {
29110 int damage = 15;
29111 if (Main.masterMode)
29112 {
29113 damage = 45;
29114 }
29115 else if (Main.expertMode)
29116 {
29117 damage = 30;
29118 }
29120 }
29122 {
29124 }
29126 {
29129 }
29130 }
29132 obj2.position -= Main.npc[i].netOffset;
29133 }
29134 }
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 bool CanNPCHitPlayer(NPC nPC, Player player, ref int specialHitSetter)
int dash
The current vanilla dash that the player is VISIBLY using. Unlike F:Terraria.Player....
double Hurt(PlayerDeathReason damageSource, int Damage, int hitDirection, bool pvp, bool quiet, bool Crit, int cooldownCounter, bool dodgeable=true, float armorPenetration=0f)
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....
bool CanParryAgainst(Rectangle blockingPlayerRect, Rectangle enemyRect, Vector2 enemyVelocity)
void ApplyDamageToNPC(NPC npc, int damage, float knockback, int direction, bool crit=false, DamageClass? damageType=null, bool damageVariation=false)
Deals damage to an NPC (and syncs the hit in multiplayer). The damage will be affected by modifiers...
void StatusFromNPC(NPC npc)
void GiveImmuneTimeForCollisionAttack(int time)