Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Randomize #83

Closed
mrWh1te opened this issue Nov 12, 2020 · 3 comments
Closed

Randomize #83

mrWh1te opened this issue Nov 12, 2020 · 3 comments
Labels
botaction enhancement New feature or request proposal New feature or change

Comments

@mrWh1te
Copy link
Owner

mrWh1te commented Nov 12, 2020

Is your feature request related to a problem? Please describe.
I want to run some BotAction's randomly, like on the flip of a coin, or roll of a die.

Describe the solution you'd like
BotAction that can take a number to represent the probability of the following BotAction(s) to run. ie

chain(
   // 12 sided die where the botaction's run, if 1 specific side is landed in the param value sided die
   runOnRoll(12)(
      // ... botaction's
   )
)

Maybe a helper to generate a random number?

Describe alternatives you've considered
Nothing

Additional context
Make bot's more dynamic, less static in their actions.

@mrWh1te mrWh1te added enhancement New feature or request proposal New feature or change botaction labels Nov 12, 2020
@mrWh1te
Copy link
Owner Author

mrWh1te commented Mar 15, 2021

introduces new "branching" BotAction runOnDiceRoll()() #105

@mrWh1te mrWh1te mentioned this issue Mar 16, 2021
29 tasks
@mrWh1te
Copy link
Owner Author

mrWh1te commented Mar 17, 2021

currently exploring rollDice()() and probably()() in #105

rollDice()() limits the probability to 50% or lower with little variance
probably()() sets the probability directly without limitation

maybe consolidate?

@mrWh1te
Copy link
Owner Author

mrWh1te commented Apr 21, 2021

released in core v1.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
botaction enhancement New feature or request proposal New feature or change
Projects
None yet
Development

No branches or pull requests

1 participant