> ## Documentation Index
> Fetch the complete documentation index at: https://transcension.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Attack

> Enables a ship to engage an enemy ship within its attack range, potentially dealing damage based on combat factors.



## OpenAPI

````yaml api-reference/cubic-api.json post /api/v1/cubic/attack
openapi: 3.0.0
info:
  title: Cubic Game API
  description: >-
    API documentation for the Cubic game, providing endpoints for game
    management, ship actions, and retrieving game state information.
  version: '1.0'
  contact:
    name: Cubic Game Support
servers:
  - url: http://50.187.81.221:4000
    description: Rendezvous Cubic Server.
  - url: https://cubic.ngrok.app
    description: Ender's Cubic Server.
security: []
tags:
  - name: Cubic
    description: Operations related to the Cubic game mechanics.
paths:
  /api/v1/cubic/attack:
    post:
      tags:
        - Cubic
      summary: Attack
      description: >-
        Enables a ship to engage an enemy ship within its attack range,
        potentially dealing damage based on combat factors.
      operationId: CubicController_attack
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AttackDTO'
            examples:
              attackExample:
                summary: Example of a ship attacking
                value:
                  gameID: uniqueGame123
                  direction: CURRENT
                  attackingShip:
                    teamName: RedTeam
                    shipName: RedDestroyer1
                  target:
                    teamName: BlueTeam
                    shipName: BlueScout1
        description: >-
          Details for a ship to perform an attack, including the game ID, the
          direction of attack, the attacking ship, and the target ship.
      responses:
        '201':
          description: Attack successfully executed.
components:
  schemas:
    AttackDTO:
      type: object
      properties:
        gameID:
          type: string
          description: The unique identifier of the game.
        direction:
          type: string
          enum:
            - CURRENT
            - UP
            - DOWN
            - LEFT
            - RIGHT
            - FORWARD
            - BACK
          description: >-
            The direction of the attack relative to the attacking ship.
            'CURRENT' means attacking at the same vertex.
        attackingShip:
          $ref: '#/components/schemas/ShipIdentifierDTO'
          description: The ship initiating the attack.
        target:
          $ref: '#/components/schemas/ShipIdentifierDTO'
          description: The ship being targeted by the attack.
      required:
        - gameID
        - direction
        - attackingShip
        - target
      description: >-
        Data transfer object for a ship to perform an attack action against
        another ship.
    ShipIdentifierDTO:
      type: object
      properties:
        teamName:
          type: string
          description: The name of the team to which the ship belongs.
        shipName:
          type: string
          description: The unique name of the ship.
      required:
        - teamName
        - shipName
      description: >-
        Data transfer object for uniquely identifying a ship by its team and
        name.

````