Jump to content
  • 0

10 AGI = 1 ASPD.


Krenjeroth

Question


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  55
  • Reputation:   2
  • Joined:  08/18/13
  • Last Seen:  

Hey Guys. I was Wondering how to change or edit the ASPD formula.

as for every 10 AGI will give 1 ASPD.

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  74
  • Topics Per Day:  0.02
  • Content Count:  420
  • Reputation:   89
  • Joined:  01/30/12
  • Last Seen:  

Edit this part of the code as you want:

status.c

/// aspd = baseaspd + floor(sqrt((agi^2/2) + (dex^2/5))/4 + (potskillbonus*agi/200))
amotion -= (int)(sqrt( (pow(status->agi, 2) / 2) + (pow(status->dex, 2) / 5) ) / 4 + (status_calc_aspd(bl, sc, 1) * status->agi / 200)) * 10;

*note: The line 90 is a comment about the theoretical formula. The actual calculation is in line 91.

 

I'm not sure if it's needed to be edited elsewhere, but it might be neccessary. Just check through the calls and you can find it.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  45
  • Reputation:   1
  • Joined:  03/30/16
  • Last Seen:  

src/map/status.c

I use or the notepad ++, where I select 1000 and I went to play random values until I got an amount of ASPD that I found necessary and it worked.
if(flag&SCB_ASPD) {
        int amotion;

        if ( bl->type&BL_HOM ) {
#ifdef RENEWAL_ASPD
            amotion = ((TBL_HOM*)bl)->homunculusDB->baseASPD;
            amotion = amotion - amotion * status_get_homdex(bl) / 1000 - status_get_homagi(bl) * amotion / 250;
            amotion = (amotion * status_calc_aspd(bl, sc, true) + status_calc_aspd(bl, sc, false)) / - 100 + amotion;
#else
            amotion = (1000 - 4 * status->agi - status->dex) * ((TBL_HOM*)bl)->homunculusDB->baseASPD / 1000;

            amotion = status_calc_aspd_rate(bl, sc, amotion);
            amotion = amotion * status->aspd_rate / 1000;
#endif

            amotion = status_calc_fix_aspd(bl, sc, amotion);
            status->amotion = cap_value(amotion, battle_config.max_aspd, 2000);

            status->adelay = status->amotion;
        } else if ( bl->type&BL_PC ) {
            uint16 skill_lv;

            amotion = status_base_amotion_pc(sd,status);
#ifndef RENEWAL_ASPD
            status->aspd_rate = status_calc_aspd_rate(bl, sc, b_status->aspd_rate);
#endif
            // Absolute ASPD % modifiers
            amotion = amotion * status->aspd_rate / 1000;
            if (sd->ud.skilltimer != INVALID_TIMER && (skill_lv = pc_checkskill(sd, SA_FREECAST)) > 0)
#ifdef RENEWAL_ASPD
                amotion = amotion * 5 * (skill_lv + 10) / 100;
#else
                amotion += (2000 - amotion) * ( 55 - 5 * ( skill_lv + 1 ) ) / 100; //Increases amotion to reduce ASPD to the corresponding absolute percentage for each level (overriding other adjustments)
#endif

#ifdef RENEWAL_ASPD
            // RE ASPD % modifier
            amotion += (max(0xc3 - amotion, 2) * (status->aspd_rate2 + status_calc_aspd(bl, sc, false))) / 100;
            amotion = 10 * (200 - amotion);

            amotion += sd->bonus.aspd_add;
#endif
            amotion = status_calc_fix_aspd(bl, sc, amotion);
            status->amotion = cap_value(amotion,pc_maxaspd(sd),2000);

            status->adelay = 2 * status->amotion;
        } else { // Mercenary and mobs
            amotion = b_status->amotion;
            status->aspd_rate = status_calc_aspd_rate(bl, sc, b_status->aspd_rate);
            amotion = amotion*status->aspd_rate/1000;

            amotion = status_calc_fix_aspd(bl, sc, amotion);
            status->amotion = cap_value(amotion, battle_config.monster_max_aspd, 2000);

            temp = b_status->adelay*status->aspd_rate/1000;
            status->adelay = cap_value(temp, battle_config.monster_max_aspd*2, 4000);
        }
    }

 

Edited by Mabuhay
Please use codebox next time
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...