Exemple #1
0
 private void ApplySkill(Player player, SkillEntry skillEntry, Skill skill, IAttackable target)
 {
     if (target.CheckSkillTargetRestrictions(player, skill))
     {
         target.AttackBy(player, skillEntry);
         target.ApplyElementalEffects(player, skillEntry);
     }
 }
Exemple #2
0
 private void ApplySkill(Player player, SkillEntry skillEntry, IAttackable target, Point targetAreaCenter)
 {
     if (target.CheckSkillTargetRestrictions(player, skillEntry.Skill))
     {
         target.AttackBy(player, skillEntry);
         target.ApplyElementalEffects(player, skillEntry);
         player.GameContext.PlugInManager.GetStrategy <short, IAreaSkillPlugIn>(skillEntry.Skill.Number)?.AfterTargetGotAttacked(player, target, skillEntry, targetAreaCenter);
     }
 }
        /// <summary>
        /// Attacks the target by the player with the specified skill.
        /// </summary>
        /// <param name="player">The player who is performing the skill.</param>
        /// <param name="target">The target.</param>
        /// <param name="skill">The skill.</param>
        public void AttackTarget(Player player, IAttackable target, SkillEntry skill)
        {
            if (skill.Skill.SkillType != SkillType.AreaSkillExplicitHits ||
                target is null ||
                !target.IsAlive)
            {
                return;
            }

            if (target.CheckSkillTargetRestrictions(player, skill.Skill))
            {
                target.AttackBy(player, skill);
                target.ApplyElementalEffects(player, skill);
            }
        }