Min/Max Magic Skill Hit Calculator

Discussion in 'Help & Advice' started by TravisB, May 21, 2024.

  1. TravisB
    Offline

    TravisB Member

    Joined:
    Jan 10, 2023
    Messages:
    4
    Likes Received:
    3
    Gender:
    Male
    Country Flag:
    IGN:
    BigDabDaddy
    Level:
    103
    Guild:
    Exotic
    Hi All,

    I wanted to try my hands at C# WinForms. I created a little app here that will calculate the Min/Max hit of a skill given int, magic, and skill/skill level. I'm using the formulas from Ayumilove, so if this is incorrect, I apologize. I will attach my github repo so you can see it's not malware or anything sketchy, just a CS student building some shit. I appreciate any feedback and I hope at least one person can find my ~20 hours of time useful.

    This is like alpha v0.1, I haven't even implemented input validation or comments if I even will. I do like to think my code is verbose and simple enough to follow. Be aware, I used Visual Studio Designer for the GUI so a ton of the boilerplate code may be complex.

    If you have any improvement/feature suggestions, I am open ears. I'm also open to creating some software to solve your specific issues. If there is demand, I can extend this to all classes and skills, might even add input validation! Seriously though, I have never created anything in C# before. I thank you for even giving this a chance and hope to get some feedback regarding this piece.

    To run it, you will only need these three files from the github repo:

    upload_2024-5-20_22-35-15.png

    EDIT: .ZIP you can find by clicking here, this contains the .EXE:
    upload_2024-5-21_17-26-46.png

    REPO: tcbitt/MinMaxMagicCalculator (github.com)

    Some photography:

    upload_2024-5-20_22-42-39.png

    upload_2024-5-20_22-42-53.png

    upload_2024-5-20_22-43-13.png

    These are per-line damage.
     

    Attached Files:

    Last edited: May 21, 2024
    MrMikiMiki, Kheb and Sylafia like this.
  2. Sylafia
    Offline

    Sylafia Donator

    Joined:
    Jan 2, 2022
    Messages:
    1,416
    Likes Received:
    5,565
    Gender:
    Female
    Country Flag:
    IGN:
    Sylafia
    Level:
    200
    Guild:
    FlatEarth
    Usability:
    If a F/P or I/L (or neutral I guess, just not bishop) skill is selected, you should ask about elemental wand usage and elemental amplification level. Note that elem amp doesn't increase your TMA, it's just a flat multiplier.

    Code review:
    DRY, you've copied the formula to calculate for pretty much every skill. See if you can simplify your logic so you only need to write the formula once!
     
    Last edited: Jul 3, 2024
    TravisB and nomade like this.
  3. TravisB
    Offline

    TravisB Member

    Joined:
    Jan 10, 2023
    Messages:
    4
    Likes Received:
    3
    Gender:
    Male
    Country Flag:
    IGN:
    BigDabDaddy
    Level:
    103
    Guild:
    Exotic
    I will look into this. This was originally made for a buddy for Gene calculations but figured I'd go through and do them all while I was at it, not sure if he will even use it! Does elemental amp not affect Magic directly? I don't have any mages so not sure how the effects work, but I assumed fully buffed and such would be calculated into total Magic. If it's just a straight "1.2x" on the result or whatever that's cake. I also wanted to look into weakness multipliers too but still need to find the information.

    I haven't begun refactoring thankfully lol. If it functions, push to prod! As I was copying and pasting, I was cringing at the redundant code but wanted to keep scalability lmfao. I will dive into this spaghetti mess today. I know what the solution is, the implementation is the work haha.

    Thank you for the feedback, I do really appreciate it!
     
  4. Sylafia
    Offline

    Sylafia Donator

    Joined:
    Jan 2, 2022
    Messages:
    1,416
    Likes Received:
    5,565
    Gender:
    Female
    Country Flag:
    IGN:
    Sylafia
    Level:
    200
    Guild:
    FlatEarth
    The description says it's a multiplier on your magic but the actual effect is just a straight multiplier at the end, so no sneaky quadratic damage gains from it.

    Do note that it's adjusted in royals slightly, so might be best to use the royals skill library instead of bbb.

    Elemental wands provide a 25% boost to their primary element and a 15% boost (pretty sure) to their secondary element.

    1/5: Fire primary, poison secondary
    2/6: Poison primary, fire secondary
    3/7: Ice primary, lightning secondary
    4/8: Lightning primary, ice secondary

    Note that in GMS they used to nerf other elements but that's luckily not the case here as there's no holy option. The wand multiplier is another global multiplier, so it does stack multiplicatively with element amplification
     

Share This Page