Esempio n. 1
0
        public override void PostAI()
        {
            base.PostAI();

            projectile.Center = projectile.Center.ClampLength(Owner.Center, Range * 64f);

            if (BaseDPS == -1)
            {
                if (Owner.HeldItem.GetDamageType() == TBARPlayer.Get(Owner).PlayerStand.StandDamageType)
                {
                    BaseDPS = Owner.HeldItem.GetDamageData(Owner).DPS;
                }
                else
                {
                    BaseDPS = 5;
                }
            }

            ElapsedTime++;

            HitNPCs.RemoveAll(x => x.IsTimed && (x.TimeOfHit + AttackSpeed) < ElapsedTime);

            if (CanPunch && Owner.controlUseItem && Owner.whoAmI == Main.myPlayer)
            {
                SetState(PunchState, GetPunchVariation());
            }
        }
Esempio n. 2
0
 private void Idle(StandState sender)
 {
     projectile.GetGlobal().HitRoadRollerInLifeTime = false;
     NonTimedAttack = false;
     HitNPCs.RemoveAll(x => !x.IsTimed);
     SpriteFX          = Owner.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally;
     projectile.Center = Vector2.SmoothStep(projectile.Center, Owner.Center + new Vector2(-30 * Owner.direction, -32), 0.18f);
 }
Esempio n. 3
0
 private void Idle(StandState sender)
 {
     ClearOnHitEffects();
     NonTimedAttack = false;
     HitNPCs.RemoveAll(x => !x.IsTimed);
     SpriteFX          = Owner.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally;
     projectile.Center = Vector2.SmoothStep(projectile.Center, Owner.Center + new Vector2(-30 * Owner.direction, -32), 0.15f);
 }
Esempio n. 4
0
        public override bool?CanHitNPC(NPC target)
        {
            if (HitNPCs.Count(x => x.Index == target.whoAmI) > 0)
            {
                return(false);
            }

            return(base.CanHitNPC(target));
        }
Esempio n. 5
0
        public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection)
        {
            TBARPlayer.Get(Owner).AddStylePoints(10);

            projectile.penetrate++;

            OnHit?.Invoke(this, target);

            HitNPCs.Add(new HitEntityData(target.whoAmI, ElapsedTime, !NonTimedAttack));
        }
Esempio n. 6
0
        private void Idle_OnStateUpdate(StandState sender)
        {
            ClearOnHitEffects();
            NonTimedAttack = false;
            HitNPCs.RemoveAll(x => !x.IsTimed);
            SpriteFX          = Owner.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally;
            projectile.Center = Vector2.SmoothStep(projectile.Center, Owner.Center + new Vector2(-30 * Owner.direction, -24), 0.15f);

            if (Owner.whoAmI == Main.myPlayer && TBARInputs.SummonStand.JustPressed && IsIdle)
            {
                SetState(HieroAI.Despawn.ToString());
            }

            if (Owner.controlUseTile && Owner.whoAmI == Main.myPlayer)
            {
                SetState(HieroAI.HentaiAttack, GetPunchVariation());
            }
        }