D&D Mathematic equation. Function?

bbgun2821

New member
Joined
May 24, 2020
Messages
4
Hello all!

I'm definitely stuck trying to find an equation for this. I've got some college under my belt but haven't had algebra in 7 years! Here we go:

I'm trying to create an equation to use to explain the functionality of a spell I'm creating for a homebrew campaign. This spell allows to control ammunition fired from a weapon and change it's path of travel, hitting as many enemies as desired, much like the blue "iron mohawk" guy from Avengers with his whistling arrow. There are 3 ammo types required to build in order to activate certain variables.

The logistics of the spell go like this. Mithril tipped ammunition allow a 2d10 roll (for you non D&D fellas out there, that's two 10 sided dice) added damage to targets. For each target hit after the initial it loses 5 damage until it reaches 0, then it dissolves. With this, I feel like I needed to start at something like f(x)=(2d10)-5y, where y=target. (starting at 0 being initial, then 1, then 2.) I feel like this is close, but I tried and wasn't that confident.

Let's assume based on the above that we roll two 10's, so our value is 20. So now our function is f(x)=20. What I want to do is create a mathematic equation to explain that for each target after the initial target, the value loses 5. I can explain in words that if f(x) is > or equal to 0, bullet dissolves.


Hope someone can help out with my rusty brain trying to calculate some algebra! Thanks in advanced!
 
EDIT/UPDATE: I've made some progress and have developed something to work with, as well as adding a single additional parameter.

f(x)=(hit die)-5y
y=# of target after initial target. (for each additional target, add 1 to y)

The change I need to make is adding the damage roll for the initial attack. Only for the first target, I want the player's damage roll to be applied. This is a separate roll and only applies to the first target. I think this is how to explain it:

f(x)=((hit die)-5y)+"initial damage roll"

Hopefully I'm doing this right, but I'd like some guidance as to make this seamless as able. Thanks so much again and I promise this was no bump, I didn't know how to edit the original post!
 
The explanation is very confusing. First you say you want an equation. Then you talk about a function. You also mention an initial value, which indicates there is a sequence involved. Which is it?
Equation is something you solve, e.g. x+2=7. I guess it doesn't apply here.
A function transforms input value (e.g. x) into an output value y. E.g. f(x) = 3x2+1.
A sequence is an ordered set of numbers: a0, a1, ...an, where ai can be defined in terms of i and/or previous members.
So, which one are you trying to construct?
 
I apologize for the confusion. Again, it’s been over half a decade since I’ve taken algebra in college and I used the terms equation and function interchangeably. The overall goal is to have some sort of mathematic... “algebra”... to summarize my output. Whether it’s an equation, function, sequence, I couldn’t tell you. I’ll try to put it to words with variables. For this explanation please disregard any of the above posts I’ve made regarding numbers.

I need a way to explain the nature of this. When I roll a die, it represents a value that will be the damage dealt. For the first enemy hit, this will be the value of damage dealt. For each enemy after the first, the damage dealt will decrease by 5, until it reaches zero, then it stops. As of now, I have the value 5 in variation based off other parameters related to skill, so over time this will decrease. Let’s say that value is 2, this means that my hit die will hit 2 less damage each enemy the spell attacks, until it reaches zero, then it will stop.

I apologize if I’m not explaining this right, I’m definitely trying my best to work with you. Forgive me in advance for improper terminology as well, hopefully you can see through these imperfections.
 
Mithril tipped ammunition allow a 2d10 roll added damage to targets.
Hi bbgun. I removed the parenthetical thought, from your sentence above.

Can you rephrase the English? I cannot understand what you're trying to say. (If you're using compound adjectives, please insert proper hyphenation.)

Also, if you choose symbol x for a function's input variable, then I expect to see symbol x in the function's definition (i.e., the expression on the right-hand side of the equals sign). You wrote:

f(x) = (2d10) - 5y

f(x) = (hit die) - 5y

Are you using the expressions '2d10' and 'hit die' as additional names for the number x? That is, are you thinking:

f(x) = x - 5y

If not, then you need to define those expressions in terms of x.

2d10 = some expression containing x

or

hit die = some expression containing x

Posting a completely-worked example (providing values for each symbol in the process) of a specific scenario might help us understand what you're doing.

?
 
To be honest sir, the explanation above is the best I can do, I broke it down as easy as I can. The problem I think everyone is having is my use of vocabulary is incorrect. At the end of the day I have no idea what mathematical formula I should be utilizing. My last post summarized exactly what I’m looking for and disregards the function talk, as I think it isn’t a function that I’m actually in need of.

if you need more specific clarification please let me know, based on what people are saying I think my math is wrong entirely and I don’t actually need a function, I need something else, and I don’t know what that something else is.

thanks!
 
Top