summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-12-25 13:14:01 +0000
committerrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-12-25 13:14:01 +0000
commit6ab86d910d20796d5b4a4759af133e7bc608b035 (patch)
tree04324a5f6c41b23fe0b32ba72a51a787d2ce45a5 /src/map/status.c
parentea1a321438e75b66b3fc8148b6eaa41d049761dd (diff)
downloadhercules-6ab86d910d20796d5b4a4759af133e7bc608b035.tar.gz
hercules-6ab86d910d20796d5b4a4759af133e7bc608b035.tar.bz2
hercules-6ab86d910d20796d5b4a4759af133e7bc608b035.tar.xz
hercules-6ab86d910d20796d5b4a4759af133e7bc608b035.zip
Fixed bugreport:7015 missing base aspd for High Priest wearing knuckles.
Fixed bugreport:7033 where fixed cast time reduction bonuses affect variable cast time. Fixed bugreport:7034 stats display should now display properly when skill debuffs/buffs are used. Fixed bugreport:6840 where Fire Cloak and Wind Curtain accidentally changed elemental damage resistance. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17043 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c74
1 files changed, 61 insertions, 13 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 2e208567b..de1dde6ae 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -3035,7 +3035,7 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
if( sc->data[SC_FIRE_CLOAK_OPTION] ) {
i = sc->data[SC_FIRE_CLOAK_OPTION]->val2;
sd->subele[ELE_FIRE] += i;
- sd->subele[ELE_EARTH] -= i;
+ sd->subele[ELE_WATER] -= i;
}
if( sc->data[SC_WATER_DROP_OPTION] ) {
i = sc->data[SC_WATER_DROP_OPTION]->val2;
@@ -3045,7 +3045,7 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
if( sc->data[SC_WIND_CURTAIN_OPTION] ) {
i = sc->data[SC_WIND_CURTAIN_OPTION]->val2;
sd->subele[ELE_WIND] += i;
- sd->subele[ELE_WATER] -= i;
+ sd->subele[ELE_EARTH] -= i;
}
if( sc->data[SC_STONE_SHIELD_OPTION] ) {
i = sc->data[SC_STONE_SHIELD_OPTION]->val2;
@@ -3526,7 +3526,11 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag)
if(flag&SCB_AGI) {
status->agi = status_calc_agi(bl, sc, b_status->agi);
- flag|=SCB_FLEE;
+ flag|=SCB_FLEE
+#ifdef RENEWAL
+ |SCB_DEF2
+#endif
+ ;
if( bl->type&(BL_PC|BL_HOM) )
flag |= SCB_ASPD|SCB_DSPD;
}
@@ -3551,7 +3555,11 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag)
if(flag&SCB_DEX) {
status->dex = status_calc_dex(bl, sc, b_status->dex);
- flag|=SCB_BATK|SCB_HIT;
+ flag|=SCB_BATK|SCB_HIT
+#ifdef RENEWAL
+ |SCB_MATK|SCB_MDEF2
+#endif
+ ;
if( bl->type&(BL_PC|BL_HOM) )
flag |= SCB_ASPD;
if( bl->type&BL_HOM )
@@ -3560,7 +3568,11 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag)
if(flag&SCB_LUK) {
status->luk = status_calc_luk(bl, sc, b_status->luk);
- flag|=SCB_BATK|SCB_CRI|SCB_FLEE2;
+ flag|=SCB_BATK|SCB_CRI|SCB_FLEE2
+#ifdef RENEWAL
+ |SCB_MATK|SCB_HIT|SCB_FLEE
+#endif
+ ;
}
if(flag&SCB_BATK && b_status->batk) {
@@ -3601,17 +3613,33 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag)
}
if(flag&SCB_HIT) {
- if (status->dex == b_status->dex)
+ if (status->dex == b_status->dex
+#ifdef RENEWAL
+ && status->luk == b_status->luk
+#endif
+ )
status->hit = status_calc_hit(bl, sc, b_status->hit);
else
- status->hit = status_calc_hit(bl, sc, b_status->hit +(status->dex - b_status->dex));
+ status->hit = status_calc_hit(bl, sc, b_status->hit + (status->dex - b_status->dex)
+#ifdef RENEWAL
+ + (status->luk/3 - b_status->luk/3)
+#endif
+ );
}
if(flag&SCB_FLEE) {
- if (status->agi == b_status->agi)
+ if (status->agi == b_status->agi
+#ifdef RENEWAL
+ && status->luk == b_status->luk
+#endif
+ )
status->flee = status_calc_flee(bl, sc, b_status->flee);
else
- status->flee = status_calc_flee(bl, sc, b_status->flee +(status->agi - b_status->agi));
+ status->flee = status_calc_flee(bl, sc, b_status->flee +(status->agi - b_status->agi)
+#ifdef RENEWAL
+ + (status->luk/5 - b_status->luk/5)
+#endif
+ );
}
if(flag&SCB_DEF)
@@ -3623,10 +3651,20 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag)
}
if(flag&SCB_DEF2) {
- if (status->vit == b_status->vit)
+ if (status->vit == b_status->vit
+#ifdef RENEWAL
+ && status->agi == b_status->agi
+#endif
+ )
status->def2 = status_calc_def2(bl, sc, b_status->def2);
else
- status->def2 = status_calc_def2(bl, sc, b_status->def2 + (status->vit - b_status->vit));
+ status->def2 = status_calc_def2(bl, sc, b_status->def2
+#ifdef RENEWAL
+ + (int)( ((float)status->vit/2 + (float)b_status->vit/2) + ((float)status->agi/5 + (float)b_status->agi/5) )
+#else
+ + (status->vit - b_status->vit)
+#endif
+ );
}
if(flag&SCB_MDEF)
@@ -3638,10 +3676,20 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag)
}
if(flag&SCB_MDEF2) {
- if (status->int_ == b_status->int_ && status->vit == b_status->vit)
+ if (status->int_ == b_status->int_ && status->vit == b_status->vit
+#ifdef RENEWAL
+ && status->dex == b_status->dex
+#endif
+ )
status->mdef2 = status_calc_mdef2(bl, sc, b_status->mdef2);
else
- status->mdef2 = status_calc_mdef2(bl, sc, b_status->mdef2 +(status->int_ - b_status->int_) +((status->vit - b_status->vit)>>1));
+ status->mdef2 = status_calc_mdef2(bl, sc, b_status->mdef2 +(status->int_ - b_status->int_)
+#ifdef RENEWAL
+ + (int)( ((float)status->dex/5 - (float)b_status->dex/5) + ((float)status->vit/5 + (float)b_status->vit/5) )
+#else
+ + ((status->vit - b_status->vit)>>1)
+#endif
+ );
}
if(flag&SCB_SPEED) {