> 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/edmortars/mortars/shots-rewards.md).

# Shots & Rewards

## When it fires

Every block the owner mines (by hand, or by AFK block with `trigger.afk-block: true`) rolls the `chance` upgrade's value in percent. A hit fires the mortar unless it is reloading, has `max-active-shells` in the air already, or the mine is empty.

```yaml
fire:
  cooldown: 3                 # seconds between shots
  max-active-shells: 1
  launch-delay: 7             # ticks from the recoil to the shell leaving
  sound: 'entity.generic.explode;0.8;1.6'
  particles:                  # PARTICLE;count;spread;speed[;#RRGGBB;size], 'A|B' = try A, then B
    - 'CLOUD;14;0.25;0.05'
  message: ''                 # chat line to the owner when it fires
  actions: []                 # PinnaPrison action lines
```

## The flight

```yaml
shell:
  type: block                 # block, item or model
  material: COAL_BLOCK
  scale: 0.55
  spin: 22                    # degrees per tick
  arc-height: 14
  flight-time: 1600           # milliseconds
  keyframe-ticks: 2           # 2 = smoothest, 3 on laggy networks
  flight-sound: 'entity.firework_rocket.launch;1;0.6'
  trail: [ 'LARGE_SMOKE|SMOKE_LARGE;1;0.03;0', 'FLAME;1;0.02;0' ]
  trail-interval: 2
target:
  mode: top                   # top = the mine's top layer, surface = the highest block left in a random column
  edge-margin: 1
  attempts: 16
  marker:                     # spinning ring on the landing spot (radius = explosion size)
    enabled: true
    particle: 'DUST|REDSTONE;1;0;0;#FF4020;1.2'
    points: 12
    interval: 4
    spin: 0.12
```

## The blast

The blast is a `sphere` (or a `cylinder` crater `depth` blocks deep) with the `radius` upgrade's size. It breaks the blocks in the owner's mine and pays like a PinnaPrison enchant. Every channel is a multiplier: `true`/`1` pays normally, `0`/`false` pays nothing, `0.5` half, `2` double.

```yaml
explosion:
  shape: sphere
  affect-block-currencies: 1          # or per currency: { pickaxexp: 1, rankupxp: 0.5, default: 0 }
  affect-autosell: 1                  # blocks sent to the backpack / autosold
  affect-instant-currencies: 1        # autosell.yml instant currencies (beacons...)
  affect-tokengreed: 0.5              # any greed enchant: affect-<enchant id>
  affect-gemgreed: 0.25
  rewards-per-block:                  # flat amount per broken block (boosters apply, in the reward summary)
    tokens: 5
  sound: 'entity.generic.explode;1.4;0.7'
  particles: [ ... ]
  debris:                             # chunks of the real blown-up blocks flying out
    count: 5
    flight-time: 750
    height: 3.5
    distance: 5
    scale: 0.4
  message: '&6&lBOOM! &7Your {mortar} &7blew up &e{blocks} &7blocks.'
  actions: []
```

The `multiplier` upgrade multiplies the channels listed in `upgrades.multiplier.affects`.

Tokens in `fire.message`, `explosion.message` and the action lists: `{player}`, `{mortar}`, `{blocks}` (explosion only) and the stat tokens (`{chance}`, `{multiplier}`, `{radius}`, `{<upgrade>-level}`...).
