Yuka Posted April 22, 2014 Group: Members Topic Count: 100 Topics Per Day: 0.02 Content Count: 333 Reputation: 7 Joined: 03/01/14 Last Seen: May 6, 2020 Share Posted April 22, 2014 Hi, I have figured out that Final Strike isn't influenced by MaxHP. How can I change it to the official formula? I am using (one of) the latest rAthena rev. and set it to pre-renewal. My src/map/battle.c says this: #ifdef RENEWAL case LK_SPIRALPIERCE: case ML_SPIRALPIERCE: if (sd) { short index = sd->equip_index[EQI_HAND_R]; if (index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == IT_WEAPON) wd.equipAtk += sd->inventory_data[index]->weight/20; // weight from spear is treated as equipment ATK on official [helvetica] wd = battle_calc_damage_parts(wd, src, target, skill_id, skill_lv); wd.masteryAtk = 0; // weapon mastery is ignored for spiral } else { wd.damage = battle_calc_base_damage(sstatus, &sstatus->rhw, sc, tstatus->size, sd, 0); //Monsters have no weight and use ATK instead } switch (tstatus->size) { //Size-fix. Is this modified by weapon perfection? case SZ_SMALL: //Small: 125% ATK_RATE(wd.damage, wd.damage2, 125); RE_ALLATK_RATE(wd, 125); break; //case SZ_MEDIUM: //Medium: 100% case SZ_BIG: //Large: 75% ATK_RATE(wd.damage, wd.damage2, 75); RE_ALLATK_RATE(wd, 75); break; } #else case NJ_ISSEN: wd.damage = 40 * sstatus->str + (8 / 100) * skill_lv * sstatus->hp; wd.damage2 = 0; break; case LK_SPIRALPIERCE: case ML_SPIRALPIERCE: if (sd) { short index = sd->equip_index[EQI_HAND_R]; if (index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == IT_WEAPON) wd.damage = sd->inventory_data[index]->weight*8/100; //80% of weight ATK_ADDRATE(wd.damage, wd.damage2, 50*skill_lv); //Skill modifier applies to weight only. } else { wd.damage = battle_calc_base_damage(sstatus, &sstatus->rhw, sc, tstatus->size, sd, 0); //Monsters have no weight and use ATK instead } i = sstatus->str/10; i*=i; ATK_ADD(wd.damage, wd.damage2, i); //Add str bonus. switch (tstatus->size) { //Size-fix. Is this modified by weapon perfection? case SZ_SMALL: //Small: 125% ATK_RATE(wd.damage, wd.damage2, 125); break; //case SZ_MEDIUM: //Medium: 100% case SZ_BIG: //Large: 75% ATK_RATE(wd.damage, wd.damage2, 75); break; } #ifdef RENEWAL case NJ_ISSEN: // Official Renewal formula [helvetica] // base damage = currenthp + ((atk * currenthp * skill level) / maxhp) // final damage = base damage + ((mirror image count + 1) / 5 * base damage) - (edef + sdef) // modified def formula { short totaldef; struct Damage atk = battle_calc_weapon_attack(src, target, skill_id, skill_lv, 0); struct status_change *sc = status_get_sc(src); md.damage = (int64)sstatus->hp + (atk.damage * (int64)sstatus->hp * skill_lv) / (int64)sstatus->max_hp; if (sc && sc->data[SC_BUNSINJYUTSU] && (i=sc->data[SC_BUNSINJYUTSU]->val2) > 0) { // mirror image bonus only occurs if active md.div_ = -( i + 2 ); // mirror image count + 2 md.damage += (md.damage * (((i + 1) * 10) / 5)) / 10; } // modified def reduction, final damage = base damage - (edef + sdef) totaldef = tstatus->def2 + (short)status_get_def(target); md.damage -= totaldef; } break; #ifdef RENEWAL break; case NJ_ISSEN: // Final Strike will MISS on "plant"-type mobs [helvetica] md.damage = 0; md.dmg_lv=ATK_FLEE; break; What do I need to change to get the official damage formula? Thanks! Quote Link to comment Share on other sites More sharing options...
Squishyyy Posted April 23, 2014 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 60 Reputation: 19 Joined: 11/20/11 Last Seen: March 9, 2024 Share Posted April 23, 2014 (edited) case NJ_ISSEN: wd.damage = 40 * sstatus->str + (8 / 100) * skill_lv * sstatus->hp; wd.damage2 = 0; break; you want to look at the 'sstatus->hp' and change that to 'sstatus->max_hp'. Now it's affected by max hp. PS, it already was 'official' formula. Edited April 23, 2014 by Squishyyy Quote Link to comment Share on other sites More sharing options...
Yuka Posted April 23, 2014 Group: Members Topic Count: 100 Topics Per Day: 0.02 Content Count: 333 Reputation: 7 Joined: 03/01/14 Last Seen: May 6, 2020 Author Share Posted April 23, 2014 case NJ_ISSEN: wd.damage = 40 * sstatus->str + (8 / 100) * skill_lv * sstatus->hp; wd.damage2 = 0; break; you want to look at the 'sstatus->hp' and change that to 'sstatus->max_hp'. Now it's affected by max hp. PS, it already was 'official' formula. Hm, when I use it ingame with 4k HP, it's the same as using it with 20k HP. Sorry, I meant the current HP, I just want the official damage formula. If that already is the official one, it seems to use some other formula, since I am using pre-renewal settings. D: Quote Link to comment Share on other sites More sharing options...
Squishyyy Posted April 23, 2014 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 60 Reputation: 19 Joined: 11/20/11 Last Seen: March 9, 2024 Share Posted April 23, 2014 sstatus->hp means the current hp. It's already doing it :X. The skill itself is also affected by strength. I played a killing stroke ninja on iRO chaos ....idunno if that counts ..pre and post renewal. according to iRO wiki classic: http://irowiki.org/classic/Killing_Stroke (STR*40) + (HP*8%) * SkillLevel The code seems to say just that. Quote Link to comment Share on other sites More sharing options...
Yuka Posted April 23, 2014 Group: Members Topic Count: 100 Topics Per Day: 0.02 Content Count: 333 Reputation: 7 Joined: 03/01/14 Last Seen: May 6, 2020 Author Share Posted April 23, 2014 sstatus->hp means the current hp. It's already doing it :X. The skill itself is also affected by strength. I played a killing stroke ninja on iRO chaos ....idunno if that counts ..pre and post renewal. according to iRO wiki classic: http://irowiki.org/classic/Killing_Stroke(STR*40) + (HP*8%) * SkillLevelThe code seems to say just that. Hm, well it does 4k damage to a Poring with 4k HP and with 10k HP.. so current HP doesn't seem to influence the damage. The code I have posted is under renewal features I think, I'll check if I can find some under pre-renewal. I hve set the rAthena variable for renewal features to false. #else case NJ_ISSEN: wd.damage = 40 * sstatus->str + (8 / 100) * skill_lv * sstatus->hp; wd.damage2 = 0; break; I think that's the code that kicks in, right? Since #ifdef RENEWAL should be false. Quote Link to comment Share on other sites More sharing options...
Squishyyy Posted April 24, 2014 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 60 Reputation: 19 Joined: 11/20/11 Last Seen: March 9, 2024 Share Posted April 24, 2014 yes. that's the code that kicks in: 40 * str * 8/100 * skilllv * hp. It's probably something else then. Did you make other changes? Quote Link to comment Share on other sites More sharing options...
Yuka Posted April 24, 2014 Group: Members Topic Count: 100 Topics Per Day: 0.02 Content Count: 333 Reputation: 7 Joined: 03/01/14 Last Seen: May 6, 2020 Author Share Posted April 24, 2014 yes. that's the code that kicks in: 40 * str * 8/100 * skilllv * hp. It's probably something else then. Did you make other changes? No, I haven't done any changes in the skill source code.. I have just changed the RENEWAL variable to false to have my server on pre-renewal features. D: Quote Link to comment Share on other sites More sharing options...
Yuka Posted April 27, 2014 Group: Members Topic Count: 100 Topics Per Day: 0.02 Content Count: 333 Reputation: 7 Joined: 03/01/14 Last Seen: May 6, 2020 Author Share Posted April 27, 2014 Bump. :/ Quote Link to comment Share on other sites More sharing options...
Squishyyy Posted April 27, 2014 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 60 Reputation: 19 Joined: 11/20/11 Last Seen: March 9, 2024 Share Posted April 27, 2014 I haven't seen any evidence to indicate that the formula is messed up. It might be the way wd.damage is calced, but you'd have to take that up with a core dev. Quote Link to comment Share on other sites More sharing options...
Yuka Posted April 28, 2014 Group: Members Topic Count: 100 Topics Per Day: 0.02 Content Count: 333 Reputation: 7 Joined: 03/01/14 Last Seen: May 6, 2020 Author Share Posted April 28, 2014 (edited) Hm.. so it's not the code I stated, but what is it then? :/Anyone got an idea about that? Still not fixed. :sBump. Bump. D:Is it really just me?I haven't touched anything at the skill.. Edited June 16, 2014 by Emistry Merged bump posts. Quote Link to comment Share on other sites More sharing options...
Antares Posted June 13, 2014 Group: Members Topic Count: 74 Topics Per Day: 0.02 Content Count: 420 Reputation: 89 Joined: 01/30/12 Last Seen: April 29, 2023 Share Posted June 13, 2014 I checked in battle.c. Both the pre and the re part seems to be correct. Try to update your server. If the issue persists, please send u a report in the Bug tracker. Quote Link to comment Share on other sites More sharing options...
Question
Yuka
Hi,
I have figured out that Final Strike isn't influenced by MaxHP.
How can I change it to the official formula?
I am using (one of) the latest rAthena rev. and set it to pre-renewal.
My src/map/battle.c says this:
What do I need to change to get the official damage formula?
Thanks!
Link to comment
Share on other sites
10 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.