示例#1
0
 public override void UpdateLifeRegen(NPC npc, ref int damage)
 {
     if (npc.GetModInfo<NPCData>(mod).DoomDestiny)
     {
         if (npc.lifeRegen > 0)
         {
             npc.lifeRegen = 0;
         }
         npc.lifeRegen -= 16;
         if (damage < 10)
         {
             damage = 10;
         }
     }
 }
示例#2
0
		public override void UpdateLifeRegen(NPC npc, ref int damage)
		{
			ExampleNPCInfo info = (ExampleNPCInfo)npc.GetModInfo(mod, "ExampleNPCInfo");
			if (info.eFlames)
			{
				if (npc.lifeRegen > 0)
				{
					npc.lifeRegen = 0;
				}
				npc.lifeRegen -= 16;
				if (damage < 2)
				{
					damage = 2;
				}
			}
		}
 public override void DrawEffects(NPC npc, ref Color drawColor)
 {
     if (npc.GetModInfo<ExampleNPCInfo>(mod).eFlames)
     {
         if (Main.rand.Next(4) < 3)
         {
             int dust = Dust.NewDust(npc.position - new Vector2(2f, 2f), npc.width + 4, npc.height + 4, mod.DustType("EtherealFlame"), npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default(Color), 3.5f);
             Main.dust[dust].noGravity = true;
             Main.dust[dust].velocity *= 1.8f;
             Main.dust[dust].velocity.Y -= 0.5f;
             if (Main.rand.Next(4) == 0)
             {
                 Main.dust[dust].noGravity = false;
                 Main.dust[dust].scale *= 0.5f;
             }
         }
         Lighting.AddLight(npc.position, 0.1f, 0.2f, 0.7f);
     }
 }
示例#4
0
 public override void Update(NPC npc, ref int buffIndex)
 {
     npc.GetModInfo<GlobalNPCInfo>(mod).DoomDestiny = true;
 }
示例#5
0
		public override void Update(NPC npc, ref int buffIndex)
		{
			npc.GetModInfo<ExampleNPCInfo>(mod).eFlames = true;
		}
示例#6
0
		public override void ResetEffects(NPC npc)
		{
			ExampleNPCInfo info = (ExampleNPCInfo)npc.GetModInfo(mod, "ExampleNPCInfo");
			info.eFlames = false;
		}
示例#7
0
 public override void ResetEffects(NPC npc)
 {
     NPCData info = npc.GetModInfo<NPCData>(mod);
     info.DoomDestiny = false;
 }
示例#8
0
		public override void Update(NPC npc, ref int buffIndex)
		{
			((ExampleNPCInfo)npc.GetModInfo(mod, "ExampleNPCInfo")).eFlames = true;
		}
 public override void UpdateLifeRegen(NPC npc, ref int damage)
 {
     if (npc.GetModInfo<ExampleNPCInfo>(mod).eFlames)
     {
         if (npc.lifeRegen > 0)
         {
             npc.lifeRegen = 0;
         }
         npc.lifeRegen -= 16;
         if (damage < 2)
         {
             damage = 2;
         }
     }
 }
示例#10
0
 public override void ResetEffects(NPC npc)
 {
     npc.GetModInfo<ExampleNPCInfo>(mod).eFlames = false;
 }