Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

L5R roll and keep system style #71

Closed
TheZorker opened this issue Aug 2, 2017 · 7 comments
Closed

L5R roll and keep system style #71

TheZorker opened this issue Aug 2, 2017 · 7 comments

Comments

@TheZorker
Copy link

Is there a way that we can roll some X number of d 10s; keep the best Y of them; and have explosions added to the roll that exploded them? At this time 3d10k2! could return

5(X) - 8 -10 - 2(X) - 7 ; when we would like it to keep the 2 and never roll the seven.

@diorge-zz
Copy link

Is there any system that explodes and keep, like L5R, in which the rerolled exploded dice isn't added to the keep pool for "free"? I found really strange when I tried "5d10!k3" and it rolled 6 dice to keep 3, not adding the 6th roll. The rerolled dice shouldn't count towards the keep limit. Unless such a weird system exist somewhere, I would file this as a bug.

@ArtemGr
Copy link
Owner

ArtemGr commented Oct 12, 2019

and have explosions added to the roll that exploded them

I don't quite follow. Can you draw a step by step example for this?

@TheZorker
Copy link
Author

Sure. Consider six dice with exploding 10s, keep best 3.

You roll, a 4, a 10+6, 7, 9, 10+2, 8

Currently, this returns: [4], 10, [7], 9, 10, [8], 6, 2 = 37.
[Strikeouts]
Could you have it return [4], 16, [7], 9, 12, [8] = 37

@TheZorker
Copy link
Author

Or, alternatively, [4], 10+6, [7] , 9, 10+2, [8] = 37?

@ArtemGr ArtemGr removed the question label Oct 13, 2019
@ArtemGr
Copy link
Owner

ArtemGr commented Oct 13, 2019

Explosions are inserted after the exploded face now, like rerolls.
Explosions and rerolls are printed in italics.

Screenshot_2019-10-13 Discord - Free voice and text chat for gamers

^^ here 10 - first face, 4 - explosion, 10 - second face, 10 - explosion, 1 - explosion of explosion, 5 - third face

@ArtemGr
Copy link
Owner

ArtemGr commented Oct 13, 2019

Related unit test modifications:

   // Exploding dice.
   mock (&[20, 1, 4, 1]);
-  assert_eq! (dice (&"1d20! + 1d4!".into()) .unwrap(), "(20+1) + (4+1) = 26");
+  assert_eq! (dice (&"1d20! + 1d4!".into()) .unwrap(), "(20_+1_) + (4_+1_) = 26");
 
   // Explode after keep. https://github.com/ArtemGr/Sidekick/issues/23.
   mock (&[6, 6, 5]);
-  assert_eq! (dice (&"2d6k1!".into()) .unwrap(), "(~~6~~+6+5) = 11");  // Keep one six and explode it.
+  assert_eq! (dice (&"2d6k1!".into()) .unwrap(), "(~~6~~+6_+5_) = 11");  // Keep one six and explode it.
   mock (&[5, 6, 5]);
-  assert_eq! (dice (&"2d6k1!".into()) .unwrap(), "(~~5~~+6+5) = 11");  // Keep the six and explode it.
+  assert_eq! (dice (&"2d6k1!".into()) .unwrap(), "(~~5~~+6_+5_) = 11");  // Keep the six and explode it.
   mock (&[6, 5, 2]);
-  assert_eq! (dice (&"2d6k1!".into()) .unwrap(), "(6+~~5~~+2) = 8");  // Keep the six and explode it.
+  assert_eq! (dice (&"2d6k1!".into()) .unwrap(), "(6_+2_+~~5~~) = 8");  // Keep the six and explode it.
 
   // Recurrent explosion (https://github.com/ArtemGr/Sidekick/issues/7).
 
   mock (&[10, 10, 10, 10, 10, 9]);
-  assert_eq! (dice (&"1d10!".into()) .unwrap(), "(10+10+10+10+10+9) = 59");
+  assert_eq! (dice (&"1d10!".into()) .unwrap(), "(10_+10+10+10+10+9_) = 59");
 
   mock (&[10, 10, 10, 10, 10, 3]);
-  assert_eq! (dice (&"1d10!>=6".into()) .unwrap(), "(10 10 10 10 10 ~~3~~, 5 successes) = 5");
+  assert_eq! (dice (&"1d10!>=6".into()) .unwrap(), "(10 _10_ _10_ _10_ _10_ _~~3~~_, 5 successes) = 5");
 
   mock (&[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]);
-  assert_eq! (dice (&"1d1!".into()) .unwrap(), "(1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1) = 32");
+  assert_eq! (dice (&"1d1!".into()) .unwrap(), "(1_+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1_) = 32");

   // Halfling Luck.
 
   mock (&[1, 1, 1, 2]);
-  assert_eq! (dice (&"1d2!1".into()) .unwrap(), "(1+1+1+2) = 5");
+  assert_eq! (dice (&"1d2!1".into()) .unwrap(), "(1_+1+1+2_) = 5");
 
   mock (&[1, 20]);
-  assert_eq! (dice (&"1d20!1k1".into()) .unwrap(), "(~~1~~+20) = 20");
+  assert_eq! (dice (&"1d20!1k1".into()) .unwrap(), "(~~1~~_+20_) = 20");

   // Reroll, #31.
 
   mock (&[1, 2, 3, 4]);
-  assert_eq! (dice (&"3d6r=1".into()) .unwrap(), "(~~1~~+4+2+3) = 9");
+  assert_eq! (dice (&"3d6r=1".into()) .unwrap(), "(~~1~~_+4_+2+3) = 9");
 
   mock (&[6, 1, 1, 6]);
-  assert_eq! (dice (&"3d6r>5".into()) .unwrap(), "(~~6~~+6+1+1) = 8");}
+  assert_eq! (dice (&"3d6r>5".into()) .unwrap(), "(~~6~~_+6_+1+1) = 8");}

@ArtemGr
Copy link
Owner

ArtemGr commented Oct 13, 2019

#23, #7, #31, #2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants