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

◆ DoDeathEvents_SummonDungeonSpirit()

void Terraria.NPC.DoDeathEvents_SummonDungeonSpirit ( Player closestPlayer)
inlineprivate

Definition at line 84701 of file NPC.cs.

84702 {
84703 //IL_0083: Unknown result type (might be due to invalid IL or missing references)
84704 //IL_0092: Unknown result type (might be due to invalid IL or missing references)
84705 //IL_00b8: Unknown result type (might be due to invalid IL or missing references)
84706 //IL_00c4: Unknown result type (might be due to invalid IL or missing references)
84707 if (lifeMax > 100 && type != 288 && value > 0f && HasPlayerTarget && Main.hardMode && downedPlantBoss && Main.player[target].ZoneDungeon)
84708 {
84709 int range = 13;
84710 if (Main.expertMode)
84711 {
84712 range = 9;
84713 }
84714 if (closestPlayer.RollLuck(range) == 0 && Main.wallDungeon[Main.tile[(int)base.Center.X / 16, (int)base.Center.Y / 16].wall])
84715 {
84716 NewNPC(GetSpawnSource_NPCHurt(), (int)base.Center.X, (int)base.Center.Y, 288);
84717 }
84718 }
84719 }
int lifeMax
The maximum life of this NPC.
Definition NPC.cs:1077
IEntitySource GetSpawnSource_NPCHurt()
Definition NPC.cs:107553
bool HasPlayerTarget
Definition NPC.cs:1365
float value
How many copper coins the NPC will drop when killed (100 copper coins = 1 silver coin etc....
Definition NPC.cs:1156
int type
The NPC ID of this NPC. The NPC ID is a unique number assigned to each NPC loaded into the game....
Definition NPC.cs:990
static int NewNPC(IEntitySource source, int X, int Y, int Type, int Start=0, float ai0=0f, float ai1=0f, float ai2=0f, float ai3=0f, int Target=255)
Spawns an NPC into the game world with the given type. This method should not be called on multipla...
Definition NPC.cs:91239
static bool downedPlantBoss
Denotes whether or not Plantera has been defeated at least once in the current world.
Definition NPC.cs:837
int target
Definition NPC.cs:1019

References Terraria.NPC.downedPlantBoss, Terraria.Main.expertMode, Terraria.NPC.GetSpawnSource_NPCHurt(), Terraria.Main.hardMode, Terraria.NPC.HasPlayerTarget, Terraria.NPC.lifeMax, Terraria.NPC.NewNPC(), Terraria.Main.player, Terraria.NPC.target, Terraria.Main.tile, Terraria.NPC.type, Terraria.NPC.value, and Terraria.Main.wallDungeon.

Referenced by Terraria.NPC.DoDeathEvents().

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