Comments (6)
You can easily manage this 20th anniversary WoD but you need another approach.
I write down in multi line format with comment for better understanding.
4d10; # roll dice
$1c10; # count 10s
$1c1; # count 1s
$1c[>=6&<10]; # count success but does not count 10s
$2-$3; # substract the 1s count to 10s count
$5i:[>0]{$5}{0}; # useful if 1s take away only 10s
$6+$6+$4; # sum twice the 10s rest and the successes count.
$7i:[>0]{"$7 Successes [%2]"}{"You fail [%2]"} # display
so now in one line:
!4d10;$1c10;$1c1;$1c[>=6&<10];$2-$3;$5i:[>0]{$5}{0};$6+$6+$4;$7i:[>0]{"$7 Successes [%2]"}{"You fail [%2]"}
then you may want to make macro:
!macro ([0-9]+)w([0-9]+) \1d10;$1c10;$1c1;$1c[>=\2&<10];$2-$3;$5i:[>0]{$5}{0};$6+$6+$4;$7i:[>0]{"$7 Successes [%2]"}{"You fail [%2]"} 1
To call it:
!4w6
First parameter is the number of dice, the second is the difficulty.
from diceparser.
I think it isn't activating the $-2-$3 part as it's not taking away successes with ones
Iker LarreaToday at 6:44 AM
!4d10;$1c10;$1c1;$1c[>=6&<10];$2-$3;$5i:[>0]{$5}{0};$6+$6+$4;$7i:[>0]{"$7 Successes [%2]"}{"You fail [%2]"}
TroileBOTToday at 6:44 AM
2 Successes [9,5,1,9]
Edit: Further testing lands me this as well
!4d10;$1c10;$1c1;$1c[>=6&<10];$2-$3;$5i:[>0]{$5}{0};$6+$6+$4;$7i:[>0]{"$7 Successes [%2]"}{"You fail [%2]"}
DiceParserBOTToday at 10:05 AM
1 Successes [7,1,10,1]
Where it calculated 3 successes (one for the 7 and two for the 10), removed two for each 1, when it should have showed 0 successes by removing both the 7 and 10 before counting the 10 for two.
Edit 2: I've been working on this some more but it seems the real issue is that you can't activate an IF on a $X besides $1. Every other number it causes the command to be ignored. Also there doesn't seem to exist an & or AND command
Edit 3: I'm in a rabbit hole now. The IFs statement do work on $X and the & command does exist. What doesn't seem to work is an if statement that compares two previous results.
IE $3i:[>0&$4>0]
from diceparser.
yes, if only compare value in front of him.
I did not try my examples, I just make them as i would do it. But your second example, is normal because I was not sure 1s remove only 10s or 10s first and then normal successes.
I have to fix the command to manage that. Are there any other rules I should know about ?
from diceparser.
!4d10;$1c10;$1c1;$1c[>=6&<10];$2-$3;$5i:[>0]{$5}{0};$6+$6+$4;$7i:[>0]{"$7 Successes [%2][$1,$2,$3,$4,$5,$6,$7]"}{"You fail [%2][$1,$2,$3,$4,$5,$6,$7]"}
1 Successes [5,3,8,3][19,0,0,1,0,0,1
This example is correct, right ?
from diceparser.
2 Successes [8,5,1,8][22,0,1,2,-1,0,2]
This example is wrong given your rules.
Let's fix it.
from diceparser.
!4d10;$1c10;$1c1;$1c[>=6&<10];$2-$3;$5i:[>0]{$5+$5}{$5};$6+$4;$7i:[>0]{"$7 Successes [%2][$1,$2,$3,$4,$5,$6,$7]"}{"You fail [%2]"}
(I fixed the command)
1 Successes [1,8,10,3] -- Inner result [22,1,1,1,0,0,1]
it seems correct to me.
4 Successes [5,8,7,10] -- Inner result [30,1,0,2,1,2,4]
Right ?
from diceparser.
Related Issues (20)
- Problems with rerolling HOT 3
- Macros activated from comment (#) and sentence display ("") HOT 1
- Exploding Doubles HOT 1
- No valid value at index HOT 5
- Question re: Syntax for an IF statement based on an Entered Number and a Dice Roll. HOT 2
- Bot stopped working with Discord's latest version HOT 6
- Prefix not working HOT 3
- All dice prefix commands not working HOT 3
- Diceparser not working with webhook
- DiceParser not working September 2022 HOT 1
- /r works but ! does not HOT 5
- Help Noob please! Bot Setup steps for RPG HOT 2
- Weird handling of numbers in lists
- Bot frequently does not respond
- Bot Not Responding In Any Server
- bot does not allow users below the rank of admin to roll HOT 3
- Broken example in HelpMe.md HOT 1
- List weight doesn't seem to work
- Dice Parse offline? HOT 2
- Ambiguous licensing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diceparser.