private static boolean isFiringFromArmAlready(IGame game, int weaponId, final Entity attacker, int armLoc) { for (Enumeration i = game.getActions(); i.hasMoreElements();) { Object o = i.nextElement(); if (!(o instanceof WeaponAttackAction)) { continue;
private static boolean isFiringFromArmAlready(IGame game, int weaponId, final Entity attacker, int armLoc) { for (Enumeration i = game.getActions(); i.hasMoreElements();) { Object o = i.nextElement(); if (!(o instanceof WeaponAttackAction)) { continue; } WeaponAttackAction prevAttack = (WeaponAttackAction) o;  if (prevAttack.getEntityId() == attacker.getId() && prevAttack.getWeaponId() == weaponId) { break; } if (prevAttack.getEntityId() == attacker.getId() && attacker.getEquipment(prevAttack.getWeaponId()) .getLocation() == armLoc) { return true; }
  private static boolean isFiringFromArmAlready(IGame game, int weaponId, final Entity attacker, int armLoc) {    for (Enumeration i = game.getActions(); i.hasMoreElements();) {        Object o = i.nextElement();        if (!(o instanceof WeaponAttackAction)) {            continue;        }        WeaponAttackAction prevAttack = (WeaponAttackAction)o;        // stop when we get to this weaponattack (does this always work?)        if (prevAttack.getEntityId() == attacker.getId() && prevAttack.getWeaponId() == weaponId) {            break;        }        if (prevAttack.getEntityId() == attacker.getId() && attacker.getEquipment(prevAttack.getWeaponId()).getLocation() == armLoc) {          return true;        }    }    return false;  }