DragonDice

Check-in [cd3a5dcd87]
Login

Check-in [cd3a5dcd87]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Renamed /addhp command to /bolster
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: cd3a5dcd871ef3a61a5e0fb1509dae4473a3d84f2d66554d3e9bdb640c3881cb
User & Date: murphy 2020-04-28 22:34:43.000
Context
2020-04-28
22:55
Commands to edit professions check-in: 7560d20b5b user: murphy tags: trunk
22:34
Renamed /addhp command to /bolster check-in: cd3a5dcd87 user: murphy tags: trunk
22:31
Command to show the proficiency bonus check-in: d5d4231cd7 user: murphy tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to DragonDice.Bot/Session.fs.
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210

<b>Character State:</b>
/select [<i>NAME</i>] — Select the active character for the user who is asking.
/show|stat — Display a summary of the active character's statistics.
/talk — Display the set of common languages for all the active characters selected in the conversation.
/heal <i>HP</i> — Restore <i>HP</i> hit points up to the maximum of the active character. 
/hurt|damage <i>HP</i> [, <i>DAMAGE</i>] — Deal <i>HP</i> damage to the active character. If a damage type is specified, the character's defenses may apply.
/addhp <i>HP</i> — Add temporary hit points to the active character.
/rest[ore] — Restore hit points to maximum and remove temporary hit points from the active character.
/gain <i>GP</i> — Add an amount of currency to the active character.
/spend <i>GP</i> — Remove an amount of currency to the active character.

<b>Hit Points:</b>
The <i>HP</i> argument to the health management commands may be a dice roll specification or a constant non-negative integer.








|







196
197
198
199
200
201
202
203
204
205
206
207
208
209
210

<b>Character State:</b>
/select [<i>NAME</i>] — Select the active character for the user who is asking.
/show|stat — Display a summary of the active character's statistics.
/talk — Display the set of common languages for all the active characters selected in the conversation.
/heal <i>HP</i> — Restore <i>HP</i> hit points up to the maximum of the active character. 
/hurt|damage <i>HP</i> [, <i>DAMAGE</i>] — Deal <i>HP</i> damage to the active character. If a damage type is specified, the character's defenses may apply.
/bolster <i>HP</i> — Add temporary hit points to the active character.
/rest[ore] — Restore hit points to maximum and remove temporary hit points from the active character.
/gain <i>GP</i> — Add an amount of currency to the active character.
/spend <i>GP</i> — Remove an amount of currency to the active character.

<b>Hit Points:</b>
The <i>HP</i> argument to the health management commands may be a dice roll specification or a constant non-negative integer.

535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
          .Append("<b>").Append(chr.CurrentHitPoints).Append("</b>")
        |> ignore
        if chr.TemporaryHitPoints > 0 then
          buffer.Append(" + ").Append(chr.TemporaryHitPoints) |> ignore
        buffer.Append(" / ").Append(chr.MaxHitPoints) |> ignore
        return Markup (buffer.ToString(), List.empty)
          
      | ["/addhp"; hp] ->
        let chr = selectedCharacter user
        let hp =
          match Dice.tryParse hp with
          | Some dice -> lock random (fun () -> Dice.simulate random dice)
          | None      -> int hp
        chr.AddTemporaryHitPoints(hp)
        let buffer = Text.StringBuilder("<i>").Append(HttpUtility.HtmlEncode chr.Name).Append("</i> : HP + ")







|







535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
          .Append("<b>").Append(chr.CurrentHitPoints).Append("</b>")
        |> ignore
        if chr.TemporaryHitPoints > 0 then
          buffer.Append(" + ").Append(chr.TemporaryHitPoints) |> ignore
        buffer.Append(" / ").Append(chr.MaxHitPoints) |> ignore
        return Markup (buffer.ToString(), List.empty)
          
      | ["/bolster"; hp] ->
        let chr = selectedCharacter user
        let hp =
          match Dice.tryParse hp with
          | Some dice -> lock random (fun () -> Dice.simulate random dice)
          | None      -> int hp
        chr.AddTemporaryHitPoints(hp)
        let buffer = Text.StringBuilder("<i>").Append(HttpUtility.HtmlEncode chr.Name).Append("</i> : HP + ")