summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/re/job_db1.txt2
-rw-r--r--src/map/skill.c3
-rw-r--r--src/map/status.c74
3 files changed, 63 insertions, 16 deletions
diff --git a/db/re/job_db1.txt b/db/re/job_db1.txt
index c2395fbcb..767621cac 100644
--- a/db/re/job_db1.txt
+++ b/db/re/job_db1.txt
@@ -72,7 +72,7 @@
// Lord Knight
4008, 28000,150 ,500 ,300 ,440 ,530 ,490 ,560 ,590 ,690 ,540 ,590 ,490 ,490 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490
// High Priest
-4009, 26000,75 ,500 ,800 ,440 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,470 ,470 ,640 ,2000 ,2000 ,2000 ,2000 ,480 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,640 ,490
+4009, 26000,75 ,500 ,800 ,440 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,470 ,470 ,640 ,2000 ,640 ,2000 ,2000 ,480 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,640 ,490
// High Wizard
4010, 24000,55 ,500 ,900 ,540 ,580 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,570 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,570 ,620
// Whitesmith
diff --git a/src/map/skill.c b/src/map/skill.c
index 2ea3ceaa2..1fb0b4fcc 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -13837,9 +13837,8 @@ int skill_vfcastfix (struct block_list *bl, double time, int skill_id, int skill
if( !(skill_get_castnodex(skill_id, skill_lv)&1) )// reduction from status point
time = (1 - sqrt( ((float)(status_get_dex(bl)*2 + status_get_int(bl)) / battle_config.vcast_stat_scale) )) * time;
// underflow checking/capping
- time = max(time, 0) + (1 - (float)min(fixcast_r, 100) / 100) * fixed;
+ time = max(time, 0) + (1 - (float)min(fixcast_r, 100) / 100) * max(fixed,0);
- // ShowInfo("Casttime vfcastfix = %d\n",time);
return (int)time;
}
#endif
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) {