aboutsummaryrefslogtreecommitdiff
path: root/data/help/attack.yaml
blob: 8ba664c5ba5d59bd1ead58f226133fdb44e3836d (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
name: "attack"
category: "Combat"
description: |
  Attack a mob in the current room.

  Usage: attack <mob>, kill <mob>
         attack 1.man, kill 2.man

  Enter combat with the named mob. If multiple mobs with different names
  match your input, you'll be asked "Which one?" — type a more specific
  name. Prefix with a number to target a specific instance of the same
  name (e.g. "attack 1.man"). Plain "attack man" targets the first.

  Attacks occur at weapon speed on the 600ms tick. Use "style" to change
  combat style. Move in any direction to wait for an opening to flee
  combat. If the mob misses its next attack you escape; if it hits,
  the escape fails and combat resumes. Issuing an attack or "stop"
  command abandons a pending flee attempt.

  Damage formula (OSRS-standard):
    Max hit = (EffectiveStrength * (StrBonus + 64) + 320) / 640
    Attack roll = EffectiveAttack * (AttackBonus + 64)
    Defense roll = (mob.Defense + 9) * (mobDefBonus + 64)
    Hit chance: if AtkRoll > DefRoll: 1 - (Def+2)/(2*Atk), else Atk/(2*Def)
    Damage: roll [0, MaxHit], 0 becomes 1

  Effective level = base_level + style_bonus + tech_boosts + 8 (player)
                    base_level + 9 (NPC/defense)
                    base_level + 9 (science, no style bonus)

  See 'combat', 'stats', 'style', and 'science' for details.