Example #1
0
 public override void OnSkillByteHit(BattleNPC collisionNPC, float damageMultiplier = 1.0f)
 {
     base.OnSkillByteHit(collisionNPC, damageMultiplier);
     ParentSkill.SkillOwner.FlipBattleNPCSpriteX();
     ParentSkill.SkillSpriteRenderer.enabled = false;
     ParentSkill.AdvanceToNextByte();
 }
    public override void DoByte()
    {
        ApplyOnCastBuffs();

        // Check if byte should end
        bool interrupted = CheckInterruptedByDamage();
        bool channelOver = CheckChannelTime();

        if (interrupted || !channelOver)
        {
            ParentSkill.SkillSpriteRenderer.enabled = false;
            ParentSkill.AdvanceToNextByte();
            return;
        }

        bool intervalTime = _channelInterval(m_GlobalPreviousHit);

        if (intervalTime)
        {
            foreach (Target tempSignature in NPCTargets)
            {
                OnSkillByteHit(tempSignature.Focus, tempSignature.Multiplier);
            }
            m_GlobalPreviousHit = Time.fixedTime;
        }
    }
Example #3
0
    public override void DoByte()
    {
        Hero owner = (Hero)ParentSkill.SkillOwner;

        owner.NPCCaretaker.IncrementMana(owner.HeroPiety);

        ParentSkill.AdvanceToNextByte();
    }
Example #4
0
    public override void DoByte()
    {
        AnimateOwner(BattleGlobals.ANIMATE_NPC_ATTACK);

        ApplyOnCastBuffs();

        foreach (Target tempSignature in NPCTargets)
        {
            OnSkillByteHit(tempSignature.Focus, tempSignature.Multiplier);
        }

        ParentSkill.AdvanceToNextByte();
    }
Example #5
0
    public override void DoByte()
    {
        AnimateOwner(BattleGlobals.ANIMATE_NPC_ATTACK);

        ApplyOnCastBuffs();

        // Check if byte should end
        bool interrupted = CheckInterruptedByDamage();
        bool channelOver = CheckChannelTime();

        if (interrupted || !channelOver)
        {
            ParentSkill.SkillSpriteRenderer.enabled = false;
            ParentSkill.AdvanceToNextByte();
            return;
        }

        if (Homing)
        {
            m_TargetPosition = NPCTargets[BEAM_PRIMARY_TARGET].Focus.transform.position;
        }

        RaycastHit2D[] hit         = Physics2D.LinecastAll(m_BeamStart.transform.position, m_TargetPosition, m_TargetMask);
        Vector3        endPosition = m_TargetPosition;

        foreach (RaycastHit2D r in hit)
        {
            if (r.collider != null)
            {
                BattleNPC b = GameGlobals.AttachCheckComponentChildren <BattleNPC>(r.collider.gameObject);
                if ((b != null) && b.Alive)
                {
                    endPosition = r.point;
                    _checkConditionsOnSkillHit(b);
                    break;
                }
            }
        }
        GameGlobals.Stretch(m_BeamMiddle.gameObject, m_BeamStart.transform.position,
                            endPosition, m_PositiveDirection);
        m_BeamEnd.transform.position = endPosition;

        if (Homing)
        {
            _updateRotation();
        }
    }
    public override void DoByte()
    {
        Rigidbody2D parentRigid = ParentSkill.SkillOwner.NPCRigidBody2D;

        ApplyOnCastBuffs();

        // Whenever we're roughly where we started
        float absoluteDistance = Mathf.Abs(parentRigid.transform.position.sqrMagnitude -
                                           m_TargetPosition.sqrMagnitude);

        if (absoluteDistance < V3_EQUALS_THRESHOLD)
        {
            ParentSkill.SkillOwner.FlipBattleNPCSpriteX();
            ParentSkill.AdvanceToNextByte();
        }
        else
        {
            BattleGlobals.HomingMovement(parentRigid, m_TargetPosition,
                                         (ParentSkill.SkillOwner.NPCMoveSpeedMultiplier.GetBuffAffectedValue() * ByteSpeed));
        }
    }
 protected virtual void EndProjectileByte()
 {
     ParentSkill.SkillSpriteRenderer.enabled = false;
     ParentSkill.AdvanceToNextByte();
 }
Example #8
0
    private IEnumerator _activateWait(float time)
    {
        yield return(new WaitForSeconds(time));

        ParentSkill.AdvanceToNextByte();
    }