<commit_before>package com.skelril.aurora.prayer.PrayerFX;

import com.skelril.aurora.prayer.PrayerType;
import com.skelril.aurora.util.ArrowUtil;
import com.skelril.aurora.util.EnvironmentUtil;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;

/**
 * Author: Turtle9598
 */
public class DeadlyDefenseFX extends AbstractPrayer {

    @Override
    public PrayerType getType() {

        return PrayerType.DEADLYDEFENSE;
    }

    @Override
    public void add(Player player) {

        short arrow = 0;
        for (Entity entity : player.getNearbyEntities(8, 3, 8)) {

            if (arrow > 10) break;
            if (EnvironmentUtil.isHostileEntity(entity)) {
                ArrowUtil.shootArrow(player, (LivingEntity) entity, 1.6F, 0F);
            }
        }
    }

    @Override
    public void clean(Player player) {

        // Nothing to do here
    }
}<commit_msg>Ensure there is a line of sight before shooting an arrow in the deadly defense prayer<commit_after>package com.skelril.aurora.prayer.PrayerFX;

import com.skelril.aurora.prayer.PrayerType;
import com.skelril.aurora.util.ArrowUtil;
import com.skelril.aurora.util.EnvironmentUtil;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;

/**
 * Author: Turtle9598
 */
public class DeadlyDefenseFX extends AbstractPrayer {

    @Override
    public PrayerType getType() {

        return PrayerType.DEADLYDEFENSE;
    }

    @Override
    public void add(Player player) {

        short arrow = 0;
        for (Entity entity : player.getNearbyEntities(8, 3, 8)) {

            if (arrow > 10) break;
            if (EnvironmentUtil.isHostileEntity(entity)) {
                if (!player.hasLineOfSight(entity)) {
                    arrow--;
                    continue;
                }
                ArrowUtil.shootArrow(player, (LivingEntity) entity, 1.6F, 0F);
            }
        }
    }

    @Override
    public void clean(Player player) {

        // Nothing to do here
    }
}
{'fraction_non_alphanumeric': 0.09850313858039594, 'fraction_numerical': 0.012554321583775953, 'mean_word_length': 2.447587354409318, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2371184', 'n_tokens_mistral': 689, 'n_tokens_neox': 636, 'n_words': 141}