Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Seeking help in solving real life Calculus problem

  1. Jul 26, 2011 #1
    I am currently trying to use calculus to solve a problem that I have been trying to determine for some time.

    I will present what I have determined so far.

    The Problem: A hero in a popular video game (In this case LoL) regenerates 7.5% of his attack damage as mana every time he damages a target (So if his damage is 100, and he hits them, then he regenerates 7.5 mana). The question then, is how much total mana the hero regenerates during the course of a match.

    There are two things that first must be considered

    1. The hero's damage is a function of his level
    2. For the sake of simplicity, The hero's level is a function of time

    I decided to hold some things constant and to treat these two things as linear functions.

    1. The damage function came out to be D(L) = 68 + 2L
    2. I artificially decided to assume that the hero would level once every 2 minutes, so the level function is L(T) = .5T + 1

    After this I am sort of at a loss. I have thought of graphing the D(L) function in regular X,Y fashion, and then graphing the Level function as the Z, but am not sure.

    I am not looking for an outright answer to this, I very much want to figure this out on my own, but I am quite confused.

    Also, if it matters I have taken up to Multivariable calculus, so I am pretty familiar with some methods used.

    Thank you.
     
  2. jcsd
  3. Jul 26, 2011 #2

    Mute

    User Avatar
    Homework Helper

    If you have a function for D(L) and a function for L(T), then you can plug L(T) into D(L) to get a function of the damage that can be dealt at a given time T. (Note that you've made an approximation you didn't explicitly acknowledge in your post: the level of your character changes continuously as a function of time, so the level of a character can be any real number: e.g., 2, 3.14157265...*, 3.3333..., 4.4249034903, 5.6656543269999...). If you wanted to keep the levels as integers, you could write your function as [itex]L(T) = \lfloor T/2 \rfloor + 1[/itex], where [itex]\lfloor x \rfloor[/itex] gives the first integer less than x.)

    Anywho, so you have D(T), the damage that will be dealt at time T, and you know how much mana the character recovers when he deals damage, so the mana recovered at time T will just be (7.5/100)*D(T).

    So, that expression gives the mana that will be recovered if your character deals damage at time T. What you have to do next is tell us at what times the character actually deals damage. The total amount of mana recovered would then be the sum of (7.5/100)D(T) terms at each time the character does damage.

    You may have to make some more approximations or estimates regarding how often your character deals damage.

    Also, some other complications you might wish to consider when you've done that; presumably there is a maximum amount of mana the character can have, so you will recover less than 7.5% if you are near that maximum. That's more complicated, so you might want to think about it after solving your current simplified model.

    (*Yes, I mean [itex]\pi - 0.00002[/itex]. I did not make a typo or forget the digits of pi. =P)
     
  4. Jul 26, 2011 #3
    What exactly do I need to do to the equation in order to give it integer values?

    Another problem I am encountering is that damage occurs once every 2 seconds, so the damage done between say 2 seconds and 4 second is 0, since damage would only be done on the 2nd second and 4th second. This is causing a serious issue. The function is not continuous and therefore cannot be integrated right?

    Now that I think about it, there isn't any need to use calculus for this problem is there?
     
    Last edited: Jul 26, 2011
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Seeking help in solving real life Calculus problem
Loading...