summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-29 16:03:55 +0000
committerrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-29 16:03:55 +0000
commit9b02e0156ddee963d690b21fb98549cea0a0ccda (patch)
treef04c584a31c88cbbebbb065ede74d0d615da2e0c /src/map/skill.c
parent696d2aea3b88758811b275f28a9ea555747e3d6b (diff)
downloadhercules-9b02e0156ddee963d690b21fb98549cea0a0ccda.tar.gz
hercules-9b02e0156ddee963d690b21fb98549cea0a0ccda.tar.bz2
hercules-9b02e0156ddee963d690b21fb98549cea0a0ccda.tar.xz
hercules-9b02e0156ddee963d690b21fb98549cea0a0ccda.zip
Fixed bugreport:5689 recoded/reimplement RE Matk formula(including RE Heal)
Fixed bugreport:5745 WL_RECOGNIZED us now functional. Fixed bugreport:5663 where HW_MAGICPOWER shows glitch in status window. Fixed bugreport:6759 where items granting matk bonus didn't work. Follow up r16980 small performance enhancement...:) Done some TODO in skill_cast_db.txt git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16981 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c60
1 files changed, 52 insertions, 8 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 63f4af5e4..7815bbe5e 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -532,12 +532,10 @@ int skill_calc_heal(struct block_list *src, struct block_list *target, int skill
return battle_config.max_heal;
#ifdef RENEWAL
/**
- * Renewal Heal Formula (from Doddler)
- * TODO: whats that( 1+ %Modifier / 100 ) ? currently using 'x1' (100/100) until found out
- * - Min = ( [ ( BaseLvl + INT ) / 5 ] * 30 ) * (1+( %Modifier / 100)) * (HealLvl * 0.1) + StatusMATK + EquipMATK - [(WeaponMATK * WeaponLvl) / 10]
- * - Max = ( [ ( BaseLvl + INT ) / 5 ] * 30 ) * (1+( %Modifier / 100)) * (HealLvl * 0.1) + StatusMATK + EquipMATK + [(WeaponMATK * WeaponLvl) / 10]
+ * Renewal Heal Formula
+ * Formula: ( [(Base Level + INT) / 5] × 30 ) × (Heal Level / 10) × (Modifiers) + MATK
**/
- hp = ((((status_get_lv(src) + status_get_int(src)) / 5) * 3) * skill_lv + status_get_matk_min(src) + status_get_matk_max(src) - ((status_get_matk_max(src) * status_get_wlv(src)) / 10)) + rnd()%((((status_get_lv(src) + status_get_int(src)) / 5) * 3) * skill_lv + status_get_matk_min(src) + status_get_matk_max(src) + ((status_get_matk_max(src) * status_get_wlv(src)) / 10));
+ 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
@@ -568,7 +566,41 @@ int skill_calc_heal(struct block_list *src, struct block_list *target, int skill
if (sc->data[SC_WATER_INSIGNIA] && sc->data[SC_WATER_INSIGNIA]->val1 == 2)
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, wMatk, variance;
+
+ min = max = status_base_matk(status, status_get_lv(src));
+ if( status->rhw.matk > 0 ){
+ 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;
}
@@ -7523,7 +7555,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, int
clif_skill_nodamage(src,bl,skillid,skilllv,
sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
status_heal(bl,heal,0,1);
- status_change_clear_buffs(bl,6);
+ status_change_clear_buffs(bl,4);
}
break;
@@ -8714,10 +8746,22 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, int
case SO_EL_ACTION:
if (sd) {
+ int duration = 3000;
if (!sd->ed)
break;
elemental_action(sd->ed, bl, tick);
clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ switch(sd->ed->db->class_){
+ case 2115:case 2124:
+ case 2118:case 2121:
+ duration = 6000;
+ break;
+ case 2116:case 2119:
+ case 2122:case 2125:
+ duration = 9000;
+ break;
+ }
+ skill_blockpc_start(sd, skillid, duration);
}
break;
@@ -11564,7 +11608,7 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, unsi
status_heal(bl,heal,0,0);
break;
case 1: // End all negative status
- status_change_clear_buffs(bl,2);
+ status_change_clear_buffs(bl,6);
if (tsd) clif_gospel_info(tsd, 0x15);
break;
case 2: // Immunity to all status