if ( Targetable.TYPE_ENTITY != waa.getTargetType() ) { continue; }
    private void assignAMS() {                // sort all missile-based attacks by the target        Hashtable htAttacks = new Hashtable();        for (Enumeration i = attacks.elements(); i.hasMoreElements(); ) {            Object o = i.nextElement();            if (o instanceof WeaponAttackAction) {                WeaponAttackAction waa = (WeaponAttackAction)o;                Mounted weapon = game.getEntity(waa.getEntityId()).getEquipment(waa.getWeaponId());                if (((WeaponType)weapon.getType()).getDamage() == WeaponType.DAMAGE_MISSILE) {                    Entity target = game.getEntity(waa.getTargetId());                    Vector v = (Vector)htAttacks.get(target);                    if (v == null) {                        v = new Vector();                        htAttacks.put(target, v);                    }                    v.addElement(waa);                }            }        }                // let each target assign its AMS        for (Enumeration i = htAttacks.keys(); i.hasMoreElements(); ) {            Entity e = (Entity)i.nextElement();            Vector vAttacks = (Vector)htAttacks.get(e);            e.assignAMS(vAttacks, attacks);        }    }