diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-04-07 13:42:03 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-04-07 13:42:03 +0000 |
commit | a37f1982ac7b798b1a696908d96059ed15d62065 (patch) | |
tree | 40a46eddd8be507719840a33a22017234a613ec7 /src | |
parent | 72131e08166ade4883ed5be548060030f7fe1ba6 (diff) | |
download | hercules-a37f1982ac7b798b1a696908d96059ed15d62065.tar.gz hercules-a37f1982ac7b798b1a696908d96059ed15d62065.tar.bz2 hercules-a37f1982ac7b798b1a696908d96059ed15d62065.tar.xz hercules-a37f1982ac7b798b1a696908d96059ed15d62065.zip |
* Fixed HP Conversion to properly not reduce HP if SP is full
* Updated Defender
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1427 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/skill.c | 22 | ||||
-rw-r--r-- | src/map/status.c | 20 |
2 files changed, 21 insertions, 21 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 1111ed293..c53a7a9d6 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -4380,17 +4380,17 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in case PF_HPCONVERSION: /* ライフ置き換え */ clif_skill_nodamage(src, bl, skillid, skilllv, 1); if (sd) { - int conv_hp, conv_sp; - conv_hp = sd->status.max_hp / 10; //基本はHPの10% - //sd->status.hp -= conv_hp; //HPを減らす - conv_sp = conv_hp * 10 * skilllv / 100; - if (sd->status.sp + conv_sp > sd->status.max_sp) - conv_hp = sd->status.max_sp - sd->status.sp; - if (pc_checkoversp(sd)) - conv_hp = conv_sp = 0; - //sd->status.sp += conv_sp; //SPを?やす - pc_heal(sd, -conv_hp, conv_sp); - clif_heal(sd->fd, SP_SP, conv_sp); + int hp, sp; + hp = sd->status.max_hp / 10; //基本はHPの10% + sp = hp * 10 * skilllv / 100; + if (sd->status.sp + sp > sd->status.max_sp) + sp = sd->status.max_sp - sd->status.sp; + // we need to check with the sp that was taken away when casting too + if (sd->status.sp + skill_get_sp(skillid, skilllv) >= sd->status.max_sp) + hp = sp = 0; + pc_heal(sd, -hp, sp); + clif_heal(sd->fd, SP_SP, sp); + clif_updatestatus(sd, SP_SP); } break; case HT_REMOVETRAP: /* リム?ブトラップ */ diff --git a/src/map/status.c b/src/map/status.c index c5100d8bb..a9967d956 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1247,9 +1247,9 @@ int status_calc_pc(struct map_session_data* sd,int first) sd->speed = (sd->speed * 125) / 100; } if(sd->sc_data[SC_DEFENDER].timer != -1) { - sd->aspd += (550 - sd->sc_data[SC_DEFENDER].val1*50); - // removed as of 12/14's patch [celest] - //sd->speed = (sd->speed * (155 - sd->sc_data[SC_DEFENDER].val1*5)) / 100; + //sd->aspd += (550 - sd->sc_data[SC_DEFENDER].val1*50); + aspd_rate += (25 - sd->sc_data[SC_DEFENDER].val1*5); + sd->speed = (sd->speed * (155 - sd->sc_data[SC_DEFENDER].val1*5)) / 100; } if(sd->sc_data[SC_ENCPOISON].timer != -1) sd->addeff[4] += sd->sc_data[SC_ENCPOISON].val2; @@ -1528,8 +1528,7 @@ int status_calc_speed (struct map_session_data *sd) sd->speed = (sd->speed * 125) / 100; } if(sd->sc_data[SC_DEFENDER].timer != -1) { - // removed as of 12/14's patch [celest] - //sd->speed = (sd->speed * (155 - sd->sc_data[SC_DEFENDER].val1*5)) / 100; + sd->speed = (sd->speed * (155 - sd->sc_data[SC_DEFENDER].val1*5)) / 100; } if( sd->sc_data[SC_DANCING].timer!=-1 ){ sd->speed = (int) ((double)sd->speed * (6.- 0.4 * pc_checkskill(sd, ((s_class.job == 19) ? BA_MUSICALLESSON : DC_DANCINGLESSON)))); @@ -2514,9 +2513,8 @@ int status_get_speed(struct block_list *bl) if(sc_data[SC_STEELBODY].timer!=-1) speed = speed*125/100; //ディフェンダー時は加算 - // removed as of 12/14's patch [celest] - /*if(sc_data[SC_DEFENDER].timer!=-1) - speed = (speed * (155 - sc_data[SC_DEFENDER].val1*5)) / 100;*/ + if(sc_data[SC_DEFENDER].timer!=-1) + speed = (speed * (155 - sc_data[SC_DEFENDER].val1*5)) / 100; //踊り状態は4倍遅い if(sc_data[SC_DANCING].timer!=-1 ) speed *= 6; @@ -2596,7 +2594,8 @@ int status_get_adelay(struct block_list *bl) aspd_rate -= sc_data[i].val2; //ディフェンダー時は加算 if(sc_data[SC_DEFENDER].timer != -1) - adelay += (1100 - sc_data[SC_DEFENDER].val1*100); + aspd_rate += (25 - sc_data[SC_DEFENDER].val1*5); + //adelay += (1100 - sc_data[SC_DEFENDER].val1*100); if(sc_data[SC_GOSPEL].timer!=-1 && sc_data[SC_GOSPEL].val4 == BCT_ENEMY && sc_data[SC_GOSPEL].val3 == 8) @@ -2652,7 +2651,8 @@ int status_get_amotion(struct block_list *bl) if( sc_data[i=SC_SPEEDPOTION3].timer!=-1 || sc_data[i=SC_SPEEDPOTION2].timer!=-1 || sc_data[i=SC_SPEEDPOTION1].timer!=-1 || sc_data[i=SC_SPEEDPOTION0].timer!=-1) aspd_rate -= sc_data[i].val2; if(sc_data[SC_DEFENDER].timer != -1) - amotion += (550 - sc_data[SC_DEFENDER].val1*50); + aspd_rate += (25 - sc_data[SC_DEFENDER].val1*5); + //amotion += (550 - sc_data[SC_DEFENDER].val1*50); } if(aspd_rate != 100) amotion = amotion*aspd_rate/100; |