> For the complete documentation index, see [llms.txt](https://edseries-plugins.gitbook.io/p/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edseries-plugins.gitbook.io/p/edmobswords/features/sword-and-damage.md).

# Sword, skins & damage

The sword is a normal EdTools OmniTool: `plugins/EdTools/tools/sword-tool/config.yml` holds its item, lore, enchant format, `server-mobs` rewards and its skins (`skins/`). Everything EdTools does for a tool applies — skins, crystals, abilities, attributes, `/edtools omnitool`, `/edtools toolmax`...

## Where damage comes from

`combat.damage` in `config.yml` is a formula with placeholders and math:

```yaml
combat:
  damage: '{skin-damage} + %edtools_leveling_level_mob-level% * 2 + %edtools_leveling_level_mob-prestige% * 25'
  damage-booster: 'sword-damage'
```

* **`{skin-damage}`** — the `damage` of the player's equipped sword skin **tier**. Buying skins and tiers is what makes the sword hit harder.
* **Placeholders** — any PlaceholderAPI value: the mob level, the prestige, a rebirth, another plugin's stat.
* **Boosters** — the result is multiplied by the player's `sword-damage` boosters (see below) and by EdPerks perks that boost `damage`.

`server-mobs.damage` is the same for real mobs, on the vanilla health scale.

## Skin damage

Each skin file (`tools/sword-tool/skins/<skin>.yml`) sets a `damage` per tier — a skin-level `damage:` is the fallback for tiers that don't set one:

```yaml
color: '&6'
name: 'Golden Sword'
material: GOLDEN_SWORD
model-data: 0
damage: 25              # fallback for tiers without their own value
tiers:
  1:
    damage: 30
    multipliers:
      mob-coins: 2.5
    cost:
      currency: money
      amount: 50000
  2:
    damage: 35
    ...
```

The shipped skins go from 10 (wooden tier 1) to 120 (diamond tier 5). Use the sword's skins menu (`[tool-skins] sword-tool`) to buy them, exactly like pickaxe skins.

## Sword damage boosters

EdTools ships a `sword-damage-booster` item in `boosters.yml` (economy `sword-damage`, x2 for 5 minutes) and a `Sword Damage` line in the boosters menu. Give it with `/boosters give <player> sword-damage-booster`, start a server-wide one with `/boosters global sword-damage 2 600`, or plug a live multiplier in with EdTools' boost-provider API. Every swing (and every enchant hit that scales with `{damage}`) is multiplied.

On an EdTools install older than this addon, EdMobSwords appends the booster item to `boosters.yml` itself (active after `/edtools reload`).

`damage-booster` takes a comma-separated list of booster economies whose boosts add up; the default `'sword-damage, damage'` includes the `damage` key so [EdPerks](/p/edmobswords/features/perks.md) Attack Perks work on the sword.

## What a hit does

1. `SwordHitEvent` (cancellable, damage editable).
2. The mob's health drops — a server-side number; the name over its head updates for everyone who sees it, it flashes red, the attacker's boss bar updates, a damage number pops.
3. The sword enchants are rolled with the hit (player swings only — enchant hits never chain).
4. On a kill: death effect for everyone who sees the mob, `SwordKillEvent`, rewards for the killer (currencies with boosters, backpack drops, chance commands, `+1 mob-kills`), respawn timer.

Auto-hit (on by default) keeps swinging after one click until the mob dies, you walk out of reach, or you click another mob.
