viewing paste high_healtest4 | 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 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156
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,56 @@
        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
+               // MATK part of the RE heal formula [malufett]
+               // Note: in this part matk bonuses from items or skills are not applied
+           {
+               struct status_data *status = status_get_status_data(src);
+               sc = status_get_sc(target);
+               int min, max;
+
+               min = max = status_base_matk(status, status_get_lv(src));
+               if( status->rhw.matk > 0 ){
+                   int wMatk, variance;
+                   wMatk = status->rhw.matk;
+                   variance = wMatk * status->rhw.wlv / 10;
+                   min += wMatk - variance;
+                   max += wMatk + variance;
+               }
+
+               if( sc && sc->data[SC_RECOGNIZEDSPELL] )
+                   min = max;
+
+               if( sd && sd->right_weapon.overrefine > 0 ){
+                   min++;
+                   max += sd->right_weapon.overrefine - 1;
+               }
+
+               if(max > min)
+                   hp += min+rnd()%(max-min);
+               else
+                   hp += min;
+           }
+               /**
+               * 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)) )
@@ -422,41 +455,6 @@
            hp += hp / 10;
    }
 
-#ifdef RENEWAL
-    // 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;
-       default:
-           {
-               struct status_data *status = status_get_status_data(src);
-               int min, max;
-
-               min = max = status_base_matk(status, status_get_lv(src));
-               if( status->rhw.matk > 0 ){
-                   int wMatk, variance;
-                   wMatk = status->rhw.matk;
-                   variance = wMatk * status->rhw.wlv / 10;
-                   min += wMatk - variance;
-                   max += wMatk + variance;
-               }
-
-               if( sc && sc->data[SC_RECOGNIZEDSPELL] )
-                   min = max;
-
-               if( sd && sd->right_weapon.overrefine > 0 ){
-                   min++;
-                   max += sd->right_weapon.overrefine - 1;
-               }
-
-               if(max > min)
-                   hp += min+rnd()%(max-min);
-               else
-                   hp += min;
-           }
-   }
-#endif
    return hp;
 }
 
@@ -4928,20 +4926,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 708 times, submitted by Guest.