summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/battle.c16
-rw-r--r--src/map/config/Data/Const.h1
-rw-r--r--src/map/skill.c13
-rw-r--r--src/map/status.c24
-rw-r--r--src/map/status.h5
5 files changed, 49 insertions, 10 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index fe637a5ce..efcf199aa 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -544,7 +544,14 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag
//Reduction: 6% + 6% every 20%
damage -= damage * 6 * (1+per) / 100;
}
-
+/**
+ * In renewal steel body reduces all incoming damage by 1/10
+ **/
+#if REMODE
+ if( sc->data[SC_STEELBODY] ) {
+ damage = damage > 10 ? damage / 10 : 1;
+ }
+#endif
// FIXME:
// So Reject Sword calculates the redirected damage before calculating WoE/BG reduction? This is weird. [Inkfish]
if((sce=sc->data[SC_REJECTSWORD]) && flag&BF_WEAPON &&
@@ -727,7 +734,7 @@ int battle_calc_gvg_damage(struct block_list *src,struct block_list *bl,int dama
if(class_ == MOBID_EMPERIUM && flag&BF_SKILL) {
//Skill immunity.
switch (skill_num) {
-#if REMODE == 0
+#if isOFF(REMODE)
case MO_TRIPLEATTACK:
#endif
case HW_GRAVITATION:
@@ -2862,9 +2869,14 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
case MG_FIREWALL:
skillratio -= 50;
break;
+ /**
+ * in Renewal Thunder Storm boost is 100% (in pre-re, 80%)
+ **/
+ #if isOFF(REMODE)
case MG_THUNDERSTORM:
skillratio -= 20;
break;
+ #endif
case MG_FROSTDIVER:
skillratio += 10*skill_lv;
break;
diff --git a/src/map/config/Data/Const.h b/src/map/config/Data/Const.h
index f8da4c90b..498e05c17 100644
--- a/src/map/config/Data/Const.h
+++ b/src/map/config/Data/Const.h
@@ -26,6 +26,7 @@
#define CONST_CASTRATE_CALC (status_get_dex(bl))
#endif
+#define isOFF(def) (def == 0)
/**
* "Sane Checks" to save you from compiling with cool bugs
diff --git a/src/map/skill.c b/src/map/skill.c
index 81ffb2333..3179853c2 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -800,6 +800,12 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
break;
case WZ_STORMGUST:
+ /**
+ * Storm Gust counter was dropped in renewal
+ **/
+ #if REMODE
+ sc_start(bl,SC_FREEZE,20+(5*skilllv),skilllv,skill_get_time2(skillid,skilllv));
+ #else
//Tharis pointed out that this is normal freeze chance with a base of 300%
if(tsc->sg_counter >= 3 &&
sc_start(bl,SC_FREEZE,300,skilllv,skill_get_time2(skillid,skilllv)))
@@ -809,6 +815,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
**/
else if( tsc->sg_counter > 250 )
tsc->sg_counter = 0;
+ #endif
break;
case WZ_METEOR:
@@ -9564,13 +9571,17 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
++count < SKILLUNITTIMER_INTERVAL/sg->interval && !status_isdead(bl) );
}
break;
+ /**
+ * The storm gust counter was dropped in renewal
+ **/
+ #if isOFF(REMODE)
case WZ_STORMGUST: //SG counter does not reset per stormgust. IE: One hit from a SG and two hits from another will freeze you.
if (tsc)
tsc->sg_counter++; //SG hit counter.
if (skill_attack(skill_get_type(sg->skill_id),ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0) <= 0 && tsc)
tsc->sg_counter=0; //Attack absorbed.
break;
-
+ #endif
case GS_DESPERADO:
if (rnd()%100 < src->val1)
skill_attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
diff --git a/src/map/status.c b/src/map/status.c
index 44fdb3401..c745bad51 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -2635,7 +2635,7 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
status->def = cap_value(i, CHAR_MIN, CHAR_MAX);
#endif
}
-#if REMODE == 0
+#if isOFF(REMODE)
/**
* The following setting does not affect Renewal Mode
**/
@@ -2658,7 +2658,7 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
status->mdef = cap_value(i, CHAR_MIN, CHAR_MAX);
#endif
}
-#if REMODE == 0
+#if isOFF(REMODE)
/**
* The following setting does not affect Renewal Mode
**/
@@ -3387,14 +3387,14 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag)
if( bl->type&BL_PC && sd->matk_rate != 100 )
{
//Bonuses from previous matk
- #if REMODE == 0 //Only changed in non-re [RRInd]
+ #if isOFF(REMODE) //Only changed in non-re [RRInd]
status->matk_max = status->matk_max * sd->matk_rate/100;
#endif
status->matk_min = status->matk_min * sd->matk_rate/100;
}
status->matk_min = status_calc_matk(bl, sc, status->matk_min);
- #if REMODE == 0 //Only changed in non-re [RRInd]
+ #if isOFF(REMODE) //Only changed in non-re [RRInd]
status->matk_max = status_calc_matk(bl, sc, status->matk_max);
#endif
@@ -4136,8 +4136,13 @@ static signed short status_calc_flee2(struct block_list *bl, struct status_chang
return 100;
if(sc->data[SC_KEEPING])
return 90;
+/**
+ * In renewal it no longer provides 90 def
+ **/
+#if isOFF(REMODE)
if(sc->data[SC_STEELBODY])
return 90;
+#endif
if(sc->data[SC_ARMORCHANGE])
def += sc->data[SC_ARMORCHANGE]->val2;
if(sc->data[SC_DRUMBATTLE])
@@ -4252,8 +4257,13 @@ static signed short status_calc_def2(struct block_list *bl, struct status_change
return 0;
if(sc->data[SC_BARRIER])
return 100;
+/**
+ * In renewal it no longer provides 90 mdef
+ **/
+#if isOFF(REMODE)
if(sc->data[SC_STEELBODY])
return 90;
+#endif
if(sc->data[SC_ARMORCHANGE])
mdef += sc->data[SC_ARMORCHANGE]->val3;
if(sc->data[SC_STONE] && sc->opt1 == OPT1_STONE)
@@ -4472,7 +4482,7 @@ static unsigned short status_calc_speed(struct block_list *bl, struct status_cha
/// Note that the scale of aspd_rate is 1000 = 100%.
static short status_calc_aspd_rate(struct block_list *bl, struct status_change *sc, int aspd_rate)
{
-#if REMODE == 0
+#if isOFF(REMODE)
/**
* this variable is not used unless in non-RE
**/
@@ -4546,7 +4556,7 @@ static short status_calc_aspd_rate(struct block_list *bl, struct status_change *
else if(sc->data[SC_MADNESSCANCEL])
aspd_rate -= 200;
}
-#if REMODE == 0
+#if isOFF(REMODE)
/**
* in RE they give a fixed boost -- we do so along SERVICE4U in status_base_amotion_pc
**/
@@ -6205,7 +6215,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_EXPLOSIONSPIRITS:
val2 = 75 + 25*val1; //Cri bonus
break;
-#if REMODE == 0
+#if isOFF(REMODE)
/**
* Only in non-RE it's var is changed
**/
diff --git a/src/map/status.h b/src/map/status.h
index 03310c3e3..1e72f9b5f 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -1446,7 +1446,12 @@ struct status_change {
unsigned short mp_matk_min, mp_matk_max; //Previous matk min/max for ground spells (Amplify magic power)
//int sg_id; //ID of the previous Storm gust that hit you
short comet_x, comet_y; // Point where src casted Comet - required to calculate damage from this point
+/**
+ * The Storm Gust counter was dropped in renewal
+ **/
+#if isOFF(REMODE)
unsigned char sg_counter; //Storm gust counter (previous hits from storm gust)
+#endif
struct status_change_entry *data[SC_MAX];
};