DICE PACKS BUNDLE
  1. #1

    How do I make Damage rolls for weapons and spells do roll X and keep Y highest/lowest

    I know that the dice roller in Unity works just fine with the command:

    /roll 2d4k1
    (roll two D-fours and keep the highest one)


    or

    /roll 3d6kl2
    (roll three D-sixes and keep the lowest two)

    But, when I add these details to NPC attacks or damage descriptions Unity doesn't recognize them.

    Is there a special quoting system I have to use or is there a way to get this to work?

  2. #2

  3. #3
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,756
    Blog Entries
    1
    Quote Originally Posted by Pearman565 View Post
    I'd suggest rolling two random numbers: One for the chance to hit and another for the actual damage dealt. You could also combine them with player attributes. Example:

    if random.uniform(0, 100) < player.chance_to_hit:
    damage = random.uniform(weapon.min_damage, weapon.max_damage)
    Bye bye Miss Amercican Pie...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
FG Spreadshirt Swag

Log in

Log in