예제 #1
0
 public override void ModifyHitByProjectile(NPC npc, Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection)
 {
     if (npc.boss && npc.HasBuff(ModContent.BuffType <EnragedBuff>()))
     {
         EnragedBuff.ModifyHitIf(npc, ref damage, ref knockback);
     }
 }
예제 #2
0
        ////////////////

        public override void ModifyHitByItem(NPC npc, Player player, Item item, ref int damage, ref float knockback, ref bool crit)
        {
            if (npc.boss && npc.HasBuff(ModContent.BuffType <EnragedBuff>()))
            {
                EnragedBuff.ModifyHitIf(npc, ref damage, ref knockback);
            }
        }
예제 #3
0
        ////////////////

        public override void DrawEffects(NPC npc, ref Color drawColor)
        {
            if (npc.boss)
            {
                if (npc.HasBuff(ModContent.BuffType <EnragedBuff>()))
                {
                    EnragedBuff.ApplyVisualFx(npc, ref drawColor, this.LastKnownDrawScale);
                }
                else
                {
                    this.LastKnownDrawScale = npc.scale;
                }
            }
        }
예제 #4
0
        ////////////////

        // private bool _IsUpdating = false;

        public override bool PreAI(NPC npc)
        {
            /*!this._IsUpdating*/
            if (npc.HasPlayerTarget)
            {
                Player player = Main.player[npc.target];
                if (player?.active == true)
                {
                    //this._IsUpdating = true;
                    this.UpdateRageGeneralSourcesIf(npc, player);
                    //this._IsUpdating = false;
                }
            }

            if (npc.HasBuff(ModContent.BuffType <EnragedBuff>()))
            {
                EnragedBuff.ApplyExternalEffectsIf(npc);
            }

            return(base.PreAI(npc));
        }