viewing paste high_healfinal | C

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
Index: src/map/skill.c
===================================================================
--- src/map/skill.c (revision 17294)
+++ src/map/skill.c (working copy)
@@ -367,13 +367,13 @@
    struct status_change* sc;
 
    switch( skill_id ) {
-   case BA_APPLEIDUN:
-   #ifdef RENEWAL
-       hp = 100+5*skill_lv+5*(status_get_vit(src)/10); // HP recovery
-   #else
-       hp = 30+5*skill_lv+5*(status_get_vit(src)/10); // HP recovery
-   #endif
-       if( sd )
+       case BA_APPLEIDUN:
+       #ifdef RENEWAL
+           hp = 100+5*skill_lv+5*(status_get_vit(src)/10); // HP recovery
+       #else
+           hp = 30+5*skill_lv+5*(status_get_vit(src)/10); // HP recovery
+       #endif
+           if( sd )
                hp += 5*pc_checkskill(sd,BA_MUSICALLESSON);
            break;
        case PR_SANCTUARY:
@@ -385,23 +385,27 @@
        default:
            if (skill_lv >= battle_config.max_heal_lv)
                return battle_config.max_heal;
-       #ifdef RENEWAL
-            /**
-             * Renewal Heal Formula
-             * Formula: ( [(Base Level + INT) / 5] x 30 ) x (Heal Level / 10) x (Modifiers) + MATK
-             **/
-            hp = (status_get_lv(src) + status_get_int(src)) / 5 * 30  * skill_lv / 10;
-       #else
-           hp = ( status_get_lv(src) + status_get_int(src) ) / 8 * (4 + ( skill_id == AB_HIGHNESSHEAL ? ( sd ? pc_checkskill(sd,AL_HEAL) : 10 ) : skill_lv ) * 8);
-       #endif
+           #ifdef RENEWAL
+               /**
+               * Renewal Heal Formula
+               * Formula: ( [(Base Level + INT) / 5] x 30 ) x (Heal Level / 10) x (Modifiers) + MATK
+               **/
+               hp = (status_get_lv(src) + status_get_int(src)) / 5 * 30  * (skill_id == AB_HIGHNESSHEAL ? (sd ? pc_checkskill(sd,AL_HEAL) : 10 ) : skill_lv) / 10;
+           #else
+               hp = (status_get_lv(src) + status_get_int(src)) / 8 * (4 + ( (skill_id == AB_HIGHNESSHEAL ? (sd ? pc_checkskill(sd,AL_HEAL) : 10 ) : skill_lv) * 8));
+           #endif
+           if (skill_id == AB_HIGHNESSHEAL)
+               hp *= ( 17 + 3 * skill_lv ) / 10;
            if( sd && ((skill = pc_checkskill(sd, HP_MEDITATIO)) > 0) )
                hp += hp * skill * 2 / 100;
            else if( src->type == BL_HOM && (skill = merc_hom_checkskill(((TBL_HOM*)src), HLIF_BRAIN)) > 0 )
                hp += hp * skill * 2 / 100;
+           if( sd && tsd && sd->status.partner_id == tsd->status.char_id && (sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE && sd->status.sex == 0 )
+               hp *= 2;
            break;
    }
 
-   if( ( (target && target->type == BL_MER) || !heal ) && skill_id != NPC_EVILLAND )
+   if( (!heal || (target && target->type == BL_MER)) && skill_id != NPC_EVILLAND )
        hp >>= 1;
 
    if( sd && (skill = pc_skillheal_bonus(sd, skill_id)) )
@@ -423,8 +427,8 @@
    }
 
 #ifdef RENEWAL
-    // MATK part of the RE heal formula [malufett]
-    // Note: in this part matk bonuses from items or skills are not applied
+   // MATK part of the RE heal formula [malufett]
+   // Note: in this part matk bonuses from items or skills are not applied
    switch( skill_id ) {
        case BA_APPLEIDUN:  case PR_SANCTUARY:
        case NPC_EVILLAND:  break;
@@ -433,6 +437,7 @@
                struct status_data *status = status_get_status_data(src);
                int min, max;
 
+               sc = status_get_sc(src);
                min = max = status_base_matk(status, status_get_lv(src));
                if( status->rhw.matk > 0 ){
                    int wMatk, variance;
@@ -4928,20 +4933,13 @@
     **/
    case AB_HIGHNESSHEAL:
        {
-           int heal = skill_calc_heal(src, bl, (skill_id == AB_HIGHNESSHEAL)?AL_HEAL:skill_id, (skill_id == AB_HIGHNESSHEAL)?10:skill_lv, true);
+           int heal = skill_calc_heal(src, bl, skill_id, skill_lv, true);
            int heal_get_jobexp;
-           //Highness Heal: starts at 1.7 boost + 0.3 for each level
-           if( skill_id == AB_HIGHNESSHEAL ) {
-               heal = heal * ( 17 + 3 * skill_lv ) / 10;
-           }
            if( status_isimmune(bl) ||
                    (dstmd && (dstmd->class_ == MOBID_EMPERIUM || mob_is_battleground(dstmd))) ||
                    (dstsd && pc_ismadogear(dstsd)) )//Mado is immune to heal
                heal=0;
 
-           if( sd && dstsd && sd->status.partner_id == dstsd->status.char_id && (sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE && sd->status.sex == 0 )
-               heal = heal*2;
-
            if( tsc && tsc->count )
            {
                if( tsc->data[SC_KAITE] && !(sstatus->mode&MD_BOSS) )
Viewed 695 times, submitted by Guest.