Armada/bots/librarian.yaml
2024-05-27 15:31:49 -07:00

152 lines
6.4 KiB
YAML

templates:
page:
type: m.room.message
content:
msgtype: m.notice
body: $${message}
formatted_body: $${formatted_message}
format: org.matrix.custom.html
default_flags:
- ignorecase
antispam:
room:
max: 1
delay: 15
user:
max: 5
delay: 15
rules:
purpose:
matches: [^\!lib$]
template: page
variables:
message: |
I am the [*Librarian*](https://wiki.starlord.zip/books/armada/page/the-librarian). Use any of these commands to get information:
### Commands:
- `!wiki` - Open the full Wiki.
- `!rules` - Go straight to the Rulebook.
- `!dice` - Get quick information on using the Dice Bot.
- `!ships` - See the ship sizes.
- `!atk` - Refresher on the rules for targeting/attacking ships.
- `!def` - How to defend your ship from attacks.
formatted_message: |
I am the <a href="https://wiki.starlord.zip/books/armada/page/the-librarian"><b>Librarian</b></a>. Use any of these commands to get information:
<h3>Commands:</h3>
<ul>
<li><code>!wiki</code> - Open the full Wiki.</li>
<li><code>!rules</code> - Go straight to the Rulebook.</li>
<li><code>!dice</code> - Get quick information on using the Dice Bot.</li>
<li><code>!ships</code> - See the ship sizes.</li>
<li><code>!atk</code> - Refresher on the rules for targeting/attacking ships.</li>
<li><code>!def</code> - How to defend your ship from attacks.</li>
</ul>
wiki:
matches: [^\!wiki$]
template: page
variables:
message: |
[Click here](https://wiki.starlord.zip/books/armada) to visit the wiki, or [download as a PDF](https://wiki.starlord.zip/books/armada/export/pdf).
formatted_message: |
<a href="https://wiki.starlord.zip/books/armada">Click here</a> to visit the wiki, or <a href="https://wiki.starlord.zip/books/armada/export/pdf">download as a PDF</a>.
rules:
matches: [^\!rules$]
template: page
variables:
message: |
[Click here](https://wiki.starlord.zip/books/armada/chapter/rulebook) to go directly to the rulebook, or [download the full Wiki as a PDF](https://wiki.starlord.zip/books/armada/export/pdf).
formatted_message: |
<a href="https://wiki.starlord.zip/books/armada/chapter/rulebook">Click here</a> to go directly to the rulebook, or <a href="https://wiki.starlord.zip/books/armada/export/pdf">download the full Wiki as a PDF</a>.
dice:
matches: [^\!dice$]
template: page
variables:
message: |
### Using the Dice Bot
To roll some dice, use the command as follows: `!roll` `XdY` `+|-` `Z`
> For example: `!roll 2d8 + 5`
Note: If only rolling 1 die, the `X` can be omitted.
Also: using `!roll` alone will roll **1d6**
formatted_message: |-
<h3>Using the Dice Bot</h3>
To roll some dice, use the command as follows: <code>!roll</code> <code>XdY</code> <code>+|-</code> <code>Z</code><br /><br />
<blockquote>For example: <code>!roll 2d8 + 5</code></blockquote><br />
Note: If only rolling 1 die, the <code>X</code> can be omitted.<br />
Also: using <code>!roll</code> alone will roll <b>1d6</b>
ships:
matches: [^\!ships$]
template: page
variables:
message: |
Here are the ship sizes:
Ship | Hull Die | Code
:--- | :---: | :---:
Frigate | d12 | FGT
Carrier | d10 | CAR
Destroyer | d8 | DST
Cruiser | d6 | CRU
Fighter | d4 | FGT
formatted_message: |
Here are the ship sizes:<br /><br />
<table>
<tr>
<th>Ship</th>
<th>Hull Die</th>
<th>Code</th>
</tr>
<tr>
<td>Frigate</td>
<td>d12</td>
<td>FGT</td>
</tr>
<tr>
<td>Carrier</td>
<td>d10</td>
<td>CAR</td>
</tr>
<tr>
<td>Destroyer</td>
<td>d8</td>
<td>DST</td>
</tr>
<tr>
<td>Cruiser</td>
<td>d6</td>
<td>CRU</td>
</tr>
<tr>
<td>Fighter</td>
<td>d4</td>
<td>FGT</td>
</tr>
</table>
atk:
matches: [^\!atk$]
template: page
variables:
message: |
To attack a targeted ship, roll the attacking ship's Hull Die for your **Attack Strength** and compare the result to the targeted ship's **Target Difficulty** for the turn. If the Attack Strength **excedes** the Target Difficulty, a hit is scored.
formatted_message: |
To attack a targeted ship, roll the attacking ship's Hull Die for your <b>Attack Strength</b> and compare the result to the targeted ship's <b>Target Difficulty</b> for the turn. If the Attack Strength <b>excedes</b> the Target Difficulty, a hit is scored.
def:
matches: [^\!def$]
template: page
variables:
message: |
If your ship has been targeted this turn, roll it's Hull Die to determine its **Target Difficulty** for all attacks made on it this turn. The attacker's **Attack Strength** must **excede** your Target Difficulty to score a hit on this ship.
formatted_message: |
If your ship has been targeted this turn, roll it's Hull Die to determine its <b>Target Difficulty</b> for all attacks made on it this turn. The attacker's <b>Attack Strength</b> must <b>excede</b> your Target Difficulty to score a hit on this ship.