aboutsummaryrefslogtreecommitdiff
path: root/worldbuilding_guide/mobs.md
blob: 70afa6aad86d3b2bed0df038735265557bd44ed6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
## Mobs

Basic combat mob with per-type defense bonuses:
```yaml
id: "man"
name: "man"
description: "A shabby-looking man."
attack: 1
strength: 1
defense: 1
hp: 7
speed: 5
aggressive: false
respawn_ticks: 30
attack_type: crush            # stab/slash/crush/ranged/science (default: crush)
stab_defense: 0               # per-type defense bonuses
slash_defense: 0
crush_defense: 0
science_defense: 0
ranged_defense: 0
drops:
  remains: "bones"             # always dropped on death
  loot:
    - item_id: "credits"
      weight: 98
      quantity: 10
    - item_id: "credits"
      weight: 2
      quantity: 150
idle_descriptions:
  - "scribbles something in a small notebook"
  - "gazes skyward at the clouds"
combat_descriptions:
  - "is engaged in a fight to the death with %s"
```

### Aggressive Mobs

Mobs with `aggressive: true` auto-attack players entering their room (1-tick delay). Only aggros if the player's combat level is at most double the mob's combat level. Checked on room enter and login.

```yaml
id: goblin
name: goblin
aggressive: true              # attacks players on sight
attack: 1
strength: 3
defense: 3
hp: 12
attack_type: slash
attack_bonus: 3               # equipment-equivalent attack bonus for mob's attack roll
strength_bonus: 2             # equipment-equivalent strength bonus for mob's max hit
stab_defense: 4
slash_defense: 3
crush_defense: -2             # weak to crush — negative defense is valid
science_defense: 0
ranged_defense: 3
```

### Mob Attack/Defense Fields

| Field | Description |
|---|---|
| `attack` | Attack level (base accuracy) |
| `strength` | Strength level (base max hit) |
| `defense` | Defense level (base defense) |
| `hp` | Hit points |
| `ranged` | Ranged level (for ranged/science mobs) |
| `science` | Science level |
| `attack_bonus` | Equipment-equivalent attack bonus (added to attack roll) |
| `strength_bonus` | Equipment-equivalent strength bonus (added to max hit) |
| `attack_type` | Determines which player defense is used against this mob |
| `stab_defense` through `ranged_defense` | Per-type defense bonuses |
| `weakness` | Elemental weakness (solar/hydro/eco/bio) — for future Science combat |

### Protected/Unique Mobs

Mob with talk behavior — can be talked to via `talk:` inline config:
```yaml
id: "guard"
name: "Guard"
talk:                           # inline talk config (no separate behavior file)
    nodes:
        start:
            message: "\"Halt! Who goes there?\""
            options:
                - text: "\"Just passing through.\""
                  end: true
unique: true                    # displays as "Guard" not "a guard"
protected: true                 # cannot be attacked
attack: 5
strength: 5
defense: 5
hp: 30
speed: 5
aggressive: false
respawn_ticks: 60
attack_type: slash
attack_bonus: 8
strength_bonus: 6
stab_defense: 12
slash_defense: 15
crush_defense: 10
science_defense: -5
ranged_defense: 12
idle_descriptions:
  - "scans the area with a watchful eye"
  - "adjusts the grip on his weapon"
```

Note: `wander_rooms` and `wander_interval` are NOT set on the mob definition. Wander config
is per-instance in the room YAML (see Rooms > Mobs section above).

### Stealable Mobs

Mobs can be stealable via the `steal` command. On failure, the mob turns hostile and attacks.

```yaml
id: farmer
name: Farmer
steal_table: farmer_steal       # Drop table for steal loot
steal_level: 10                 # Required thieving level
steal_xp: 15                    # XP per successful steal
steal_speed: 4                  # Ticks per steal attempt
```

| Field | Description |
|---|---|
| `steal_table` | Drop table ID for loot when stealing |
| `steal_level` | Required thieving level |
| `steal_xp` | XP awarded per successful steal |
| `steal_speed` | Ticks per steal attempt (base wait) |

### Assassin Mobs

Assassin (Slayer) mobs restrict combat by assassin level and introduce finishing blows and protective equipment:

```yaml
id: slug
name: slug
assassin_level: 1              # required assassin level to attack
finishing_blow: salt           # item required to kill (mob stays at 1 HP otherwise)
attack: 3
strength: 3
defense: 1
hp: 15
speed: 6
drops:
  remains: slug_mucus
  loot:
    - item_id: credits
      weight: 100
      quantity: 15
```

Damage-without mobs deal 1.5x damage unless the player has the specified item equipped:
```yaml
id: drone
name: drone
assassin_level: 15
damage_without: insulated_gloves   # 1.5x damage without this item equipped
attack: 15
strength: 14
defense: 12
hp: 45
speed: 4
aggressive: true
```

| Field | Description |
|---|---|
| `assassin_level` | Required assassin skill level to attack this mob |
| `finishing_blow` | Item ID required to kill this mob (mob stays at 1 HP until used via `use <item> on <target>`) |
| `damage_without` | Item ID for protection — mob deals 1.5x damage if player doesn't have it equipped |

Mobs without these fields work normally (assassin_level defaults to 0, finishing_blow and damage_without default to empty).

---