> For the complete documentation index, see [llms.txt](https://paw-studio.gitbook.io/paw-studio-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://paw-studio.gitbook.io/paw-studio-docs/litesize/attack-logic.md).

# ⚔️Attack Logic

### Attack Logic

```yml
attack_logic:
  enable: true
  can_attack_list: 
    - ALL
  cant_attack_list: 
    - CHICKEN
  target_radius: 10
  limit: 2
```

The `attack_logic` setting allows creatures summoned from a **Splash Bottle** to automatically attack nearby entities.

When enabled, the summoned creature searches for nearby entities of type `Mob` and attacks valid targets according to the configured target list.

#### Can Attack List

Defines which entities the summoned creature is allowed to attack.

```yml
can_attack_list:
  - ALL
cant_attack_list: 
  - CURRENT
```

The creature attacks all valid entities from the list, except for its **owner**.

You can use:

* `ALL` — allows the creature to attack all valid mobs.
* `CURRENT` — does not attack its own type of entity.
* Specific entity types — limits attacks to the selected entity types.

#### Target Radius

Defines the maximum distance in blocks at which the creature can find targets.

```
target_radius: 10
```

For example, `10` means the creature can attack valid targets within a **10-block radius**.

#### Limit

Defines how many entities the summoned creature can kill before it stops attacking.

```
limit: 2
```

For example, with `limit: 2`, the creature will attack and kill up to **2 targets**, then stop attacking.

The limit applies to the number of entities killed by the summoned creature, not the number of attacks performed.
