As an AI text-based model, I can provide you with the code explanation to create a basic text-based game similar to Call of Duty. However, implementing a full-fledged graphical game like Call of Duty within a single HTML file using JavaScript is beyond the scope of a simple response. Nevertheless, here's an example of how you can get started with a basic text-based game in HTML using JavaScript:
This code provides a basic structure for a text-based game using HTML, CSS, and JavaScript. You can modify the game logic and user interactions according to your requirements while taking care of implementing the full game mechanics, graphics, and other aspects.
Note: Creating a complete game like Call of Duty would require more advanced programming techniques, additional libraries, and significant development effort beyond what can be provided within a simple response.