示例#1
0
    protected virtual void HitTarget(Character TargetCharacter)
    {
        if (MaxNumberOfTargets > 0 && MaxNumberOfTargetsCounter >= MaxNumberOfTargets)
        {
            return;
        }

        if (!CanHitSameTargetMultipleTime && AlreadyHitCharacters.Contains(TargetCharacter))
        {
            return;
        }

        if (HitObjectAlignment != TargetCharacter.GetAlignment() &&
            HitObjectAlignment != Character.TeamAlignment.ALL)
        {
            return;
        }

        if (!AlreadyHitCharacters.Contains(TargetCharacter))
        {
            AlreadyHitCharacters.Add(TargetCharacter);
        }

        if (FixedLevel >= 0)
        {
            SourceSkill.ApplyEffects(Owner, SourceItemSkill, TargetCharacter, FixedLevel);
        }
        else
        {
            SourceSkill.ApplyEffects(Owner, SourceItemSkill, TargetCharacter);
        }



        /*     if (MaxNumberOfTargets > 0
         *       && MaxNumberOfTargets >= AlreadyHitCharacters.Count)
         *   {
         *       ReachedMaxNumberOfTargets();
         *   }*/
        if (MaxNumberOfTargets > 0)
        {
            MaxNumberOfTargetsCounter++;

            if (MaxNumberOfTargetsCounter >= MaxNumberOfTargets)
            {
                ReachedMaxNumberOfTargets();
            }
        }
    }
示例#2
0
 private void CheckIfTargetLegit(Character TargetCharacter)
 {
     if (ProjectileAlignment == Character.TeamAlignment.ALL ||
         ProjectileAlignment == TargetCharacter.GetAlignment())
     {
         SourceSkill.ApplyEffects(Owner, SourceItemSkill, TargetCharacter);
         Destroy(this.gameObject);
         // TODO : PIERCE TARGETS : SAVE ALL HIT CHARACTERS SO THEY CAN NOT BE HIT AGAIN!
     }
 }
示例#3
0
    private void ApplyCurrentSkillEffectsToCharacter(Character HitCharacter)
    {
        if (MaxHittableCharactersCounter >= MaxHittableCharacters)
        {
            return;
        }

        if (CurrentItemHitBoxAlignment == Character.TeamAlignment.ALL ||
            CurrentItemHitBoxAlignment == HitCharacter.GetAlignment())
        {
            if (MaxHittableCharactersCounter >= 0)
            {
                MaxHittableCharactersCounter++;
            }

            SkillCurrentlyUsingItemHitBox.ApplyEffects(CurrentOwner, ItemSkillCurrentlyUsingItemHitBox, HitCharacter);
        }
    }