Skip to content

D10 Additive Dicepool Vs DIe Target Number DIce Tallying Mechanic Icepool help. #217

Answered by HighDiceRoller
wmrobmuadib asked this question in Q&A
Discussion options

You must be logged in to vote

Alright, now we can look at the matches.

from icepool import d, multiset_function, Die

def compute_initial(dtn, matchn, stat, boost):
    if stat % 2:
        if boost > 0:
            return Die([compute_initial(dtn, matchn, stat + 1, boost),
                        compute_initial(dtn, matchn, stat + 1, boost - 1)])
        else:
            return Die([compute_initial(dtn, matchn, stat + 1, boost),
                        compute_initial(dtn, matchn, stat - 1, boost)])
    n = stat // 2
    die = d(10).map(lambda x: x if x <= dtn else -x)
    if boost >= 0:
        pool = die.pool(n + boost).highest(n)
    else:
        pool = die.pool(n - boost).lowest(n)
    @multiset_function
    def 

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@wmrobmuadib
Comment options

@HighDiceRoller
Comment options

@wmrobmuadib
Comment options

@HighDiceRoller
Comment options

Answer selected by wmrobmuadib
@wmrobmuadib
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants