Percentage thingy

I GENUINELY cant figure out what broke in my script

The idea is to take 5 from the first number in a list a redistribute it into smaller and smaller chunks throughout a list of four percentages (each percentages standing for the likeliness of an event happening). as the program progresses the likelihood of the later events occur more often. BUT, after around the second usage of this block, it starts just adding the first number to the last number. the list I had used was [100,0,0,0]


Note that the two highlighted expressions aren’t the same. One is right; the other is wrong.

P.S. Why didn’t this work?

Note that the two <span style="background-color: yellow;">highlighted</span> expressions aren't the same.

Because of discourse’s sanitization.

Use the <mark> element.

i just realized what had gone wrong, I placed the min outside of the item of… rather than length of list min

bloon tester script pic (1)

Thank you!