option.tv.add(option.getDamage(enemy) + " Revised Damage " + e + " \n");
if(debug) option.tv.add(option.getDamage(enemy) + " Revised Damage " + e + " \n");
    private MoveOption[] fifthPass(CEntity self, ArrayList enemy_array) {        MoveOption[] move_array = self.pass.values().toArray(new MoveOption[0]);        self.pass.clear();        if (self.engaged) {            for (int j = 0; j < move_array.length; j++) {                MoveOption option = move_array[j];                option.setState();                GAAttack temp = this.bestAttack(option);                if (temp != null) {                    option.damage = (option.damage + temp.getFittestChromosomesFitness()) / 2;                } else {                    option.damage /= 2;                }                for (int e = 0; e < enemy_array.size(); e++) { // for each                    // enemy                    Entity en = (Entity) enemy_array.get(e);                    CEntity enemy = centities.get(en);                    if (!enemy.canMove()) {                        option.setThreat(enemy,                                (option.getThreat(enemy) + this.attackUtility(enemy.current, self)) / 2);                        option.tv.add(option.getThreat(enemy) + " Revised Threat " + e + " \n");                        if (!option.isPhysical) {                            if (temp != null) {                                option.setDamage(enemy, (option.getDamage(enemy) + temp.getDamageUtility(enemy)) / 2);                            } else {                                //probably zero, but just in case                                option.setDamage(enemy, option.getMinDamage(enemy));                            }                            option.tv.add(option.getDamage(enemy) + " Revised Damage " + e + " \n");                            //this needs to be reworked                            if (option.getFinalCoords().distance(enemy.current.getFinalCoords()) == 1) {                                PhysicalOption p =                                        PhysicalCalculator.getBestPhysicalAttack(option.getEntity(), enemy.getEntity(), game);                                if (p != null) {                                    option.setDamage(enemy, option.getDamage(enemy) + p.expectedDmg);                                    option.tv.add(p.expectedDmg + " Physical Damage " + e + " \n");                                }                                p = PhysicalCalculator.getBestPhysicalAttack(enemy.getEntity(), option.getEntity(), game);                                if (p != null) {                                    option.setThreat(enemy, option.getThreat(enemy) + .5 * p.expectedDmg);                                    option.tv.add(.5 * p.expectedDmg + " Physical Threat " + e + " \n");                                }                            }                        }                    } else if (!option.isPhysical) { //enemy can move (not                        if (temp != null) {                            option.setDamage(enemy, (2 * option.getDamage(enemy) + temp.getDamageUtility(enemy)) / 3);                        } else {                            option.setDamage(enemy, option.getMinDamage(enemy));                        }                    } else {                        //get a more accurate estimate                        option.setDamage(enemy,                                option.getDamage(enemy) / Math.sqrt((double) enemy.bv / (double) self.bv));                        option.damage = option.getDamage(enemy);                    }                }                option.threat = 0;                for (Iterator i = option.damageInfos.values().iterator(); i.hasNext();) {                    option.threat += ((MoveOption.DamageInfo) i.next()).threat;                }                option.tv.add(option.threat + " Revised Threat Utility\n");                option.tv.add(option.damage + " Revised Damage Utility\n");            }        }        Arrays.sort(move_array, new MoveOption.WeightedComparator(1, 1));        self.current.setState();        return move_array;    }