summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormalufett <malufett.eat.my.binaries@gmail.com>2013-06-28 09:51:58 -0700
committermalufett <malufett.eat.my.binaries@gmail.com>2013-06-28 09:51:58 -0700
commitce5085a000ee7babb05b9e6a86410e13a75d7606 (patch)
tree02010821095b55a8b889f955c2ac6edf1c14b9a4 /src
parent203e44e51c8cb133bf3fb20b372d16ea92be7667 (diff)
downloadhercules-ce5085a000ee7babb05b9e6a86410e13a75d7606.tar.gz
hercules-ce5085a000ee7babb05b9e6a86410e13a75d7606.tar.bz2
hercules-ce5085a000ee7babb05b9e6a86410e13a75d7606.tar.xz
hercules-ce5085a000ee7babb05b9e6a86410e13a75d7606.zip
Fixed Bug#6991
-Where cardfix is not working properly. Thanks Kyeme Renewal Update: -updated/completed mastery fix damage factor(skills and sc). -initial implementation for new NPC skills (note: not yet functional dbs not yet updated).
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c178
-rw-r--r--src/map/skill.c47
-rw-r--r--src/map/status.c94
-rw-r--r--src/map/status.h2
-rw-r--r--src/map/unit.c2
5 files changed, 193 insertions, 130 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index d67684e7b..1242d62ae 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -367,8 +367,8 @@ int battle_attr_fix(struct block_list *src, struct block_list *target, int damag
status_change_end(target, SC_THORNS_TRAP, INVALID_TIMER);
if( tsc->data[SC_FIRE_CLOAK_OPTION])
damage -= damage * tsc->data[SC_FIRE_CLOAK_OPTION]->val2 / 100;
- if( tsc->data[SC_CRYSTALIZE] && target->type != BL_MOB)
- status_change_end(target, SC_CRYSTALIZE, INVALID_TIMER);
+ if( tsc->data[SC_COLD] && target->type != BL_MOB)
+ status_change_end(target, SC_COLD, INVALID_TIMER);
if( tsc->data[SC_EARTH_INSIGNIA]) damage += damage/2;
if( tsc->data[SC_VOLCANIC_ASH]) damage += damage/2; //150%
break;
@@ -379,7 +379,7 @@ int battle_attr_fix(struct block_list *src, struct block_list *target, int damag
if( tsc->data[SC_VENOMIMPRESS]) ratio += tsc->data[SC_VENOMIMPRESS]->val2;
break;
case ELE_WIND:
- if( tsc->data[SC_CRYSTALIZE] && target->type != BL_MOB) damage += damage/2;
+ if( tsc->data[SC_COLD] && target->type != BL_MOB) damage += damage/2;
if( tsc->data[SC_WATER_INSIGNIA]) damage += damage/2;
break;
case ELE_WATER:
@@ -704,17 +704,21 @@ int battle_addmastery(struct map_session_data *sd,struct block_list *target,int
*------------------------------------------*/
int battle_calc_masteryfix(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int damage, int div, bool left, bool weapon){
int skill, i;
- struct map_session_data *sd;
struct status_change *sc;
+ struct map_session_data *sd;
+ struct status_data *tstatus;
nullpo_ret(src);
nullpo_ret(target);
-
- sd = BL_CAST(BL_PC, src);
+
sc = status_get_sc(src);
+ sd = BL_CAST(BL_PC, src);
+ tstatus = status_get_status_data(target);
if ( !sd )
return damage;
+
+ damage = battle->add_mastery(sd, target, damage, left);
switch( skill_id ){ // specific skill masteries
case MO_INVESTIGATE:
@@ -737,29 +741,48 @@ int battle_calc_masteryfix(struct block_list *src, struct block_list *target, ui
damage += 60;
break;
#endif
- case RA_WUGDASH:
+ case RA_WUGDASH://(Caster Current Weight x 10 / 8)
+ if( sd->weight )
+ damage += sd->weight / 8 ;
case RA_WUGSTRIKE:
case RA_WUGBITE:
damage += 30*pc->checkskill(sd, RA_TOOTHOFWUG);
break;
- }
-
- if ( sc && sc->data[SC_MIRACLE] ) i = 2; //Star anger
- else
- ARR_FIND(0, MAX_PC_FEELHATE, i, status_get_class(target) == sd->hate_mob[i]);
- if ( i < MAX_PC_FEELHATE && (skill=pc->checkskill(sd,sg_info[i].anger_id)) && weapon ){
- int ratio = sd->status.base_level + status_get_dex(src) + status_get_luk(src);
- if ( i == 2 ) ratio += status_get_str(src); //Star Anger
- if (skill < 4 )
- ratio /= (12 - 3 * skill);
- damage += damage * ratio / 100;
+ case HT_FREEZINGTRAP:
+ damage += 40 * pc->checkskill(sd, RA_RESEARCHTRAP);
+ break;
}
- if( sc ){
+ if( sc ){ // sc considered as masteries
if(sc->data[SC_GN_CARTBOOST])
damage += 10 * sc->data[SC_GN_CARTBOOST]->val1;
if(sc->data[SC_CAMOUFLAGE])
damage += 30 * ( 10 - sc->data[SC_CAMOUFLAGE]->val4 );
+#ifdef RENEWAL
+ if(sc->data[SC_NIBELUNGEN] && weapon)
+ damage += sc->data[SC_NIBELUNGEN]->val2;
+ if(sc->data[SC_IMPOSITIO])
+ damage += sc->data[SC_IMPOSITIO]->val2;
+ if(sc->data[SC_DRUMBATTLE]){
+ if(tstatus->size == SZ_SMALL)
+ damage += sc->data[SC_DRUMBATTLE]->val2;
+ else if(tstatus->size == SZ_MEDIUM)
+ damage += 10 * sc->data[SC_DRUMBATTLE]->val1;
+ //else no bonus for large target
+ }
+ if(sc->data[SC_GS_MADNESSCANCEL])
+ damage += 100;
+ if(sc->data[SC_GS_GATLINGFEVER]){
+ if(tstatus->size == SZ_SMALL)
+ damage += 10 * sc->data[SC_GS_GATLINGFEVER]->val1;
+ else if(tstatus->size == SZ_MEDIUM)
+ damage += -5 * sc->data[SC_GS_GATLINGFEVER]->val1;
+ else
+ damage += sc->data[SC_GS_GATLINGFEVER]->val1;
+ }
+ //if(sc->data[SC_SPECIALZONE])
+ // damage += sc->data[SC_SPECIALZONE]->val2 >> 4;
+#endif
}
// general skill masteries
@@ -770,18 +793,35 @@ int battle_calc_masteryfix(struct block_list *src, struct block_list *target, ui
damage += div * sd->spiritball * 3;
if( skill_id != CR_SHIELDBOOMERANG ) // Only Shield boomerang doesn't takes the Star Crumbs bonus.
damage += div * (left ? sd->left_weapon.star : sd->right_weapon.star);
+
+ if(sd->status.party_id && (skill=pc->checkskill(sd,TK_POWER)) > 0){
+ if( (i = party_foreachsamemap(party->sub_count, sd, 0)) > 1 )
+ damage += 2 * skill * i * (damage /*+ unknown value*/) / 100 /*+ unknown value*/;
+ }
#else
if( skill_id != ASC_BREAKER && weapon ) // Adv Katar Mastery is does not applies to ASC_BREAKER, but other masteries DO apply >_>
if( sd->status.weapon == W_KATAR && (skill=pc->checkskill(sd,ASC_KATAR)) > 0 )
damage += damage * (10 + 2 * skill) / 100;
#endif
+ // percentage factor masteries
+ if ( sc && sc->data[SC_MIRACLE] )
+ i = 2; //Star anger
+ else
+ ARR_FIND(0, MAX_PC_FEELHATE, i, status_get_class(target) == sd->hate_mob[i]);
+ if ( i < MAX_PC_FEELHATE && (skill=pc->checkskill(sd,sg_info[i].anger_id)) && weapon ){
+ int ratio = sd->status.base_level + status_get_dex(src) + status_get_luk(src);
+ if ( i == 2 ) ratio += status_get_str(src); //Star Anger
+ if (skill < 4 )
+ ratio /= (12 - 3 * skill);
+ damage += damage * ratio / 100;
+ }
- damage = battle->add_mastery(sd, target, damage, left);
-
- if((skill = pc->checkskill(sd,AB_EUCHARISTICA)) > 0 &&
- (status_get_status_data(target)->race == RC_DEMON || status_get_status_data(target)->def_ele == ELE_DARK) )
- damage += damage * skill / 100;
+ if( sd->status.class_ == JOB_ARCH_BISHOP_T || sd->status.class_ == JOB_ARCH_BISHOP ){
+ if((skill = pc->checkskill(sd,AB_EUCHARISTICA)) > 0 &&
+ (tstatus->race == RC_DEMON || tstatus->def_ele == ELE_DARK) )
+ damage += damage * skill / 100;
+ }
return damage;
}
@@ -918,16 +958,15 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li
break;
case BF_WEAPON:
t_race2 = status_get_race2(target);
- if( cflag&2 && sd && !(nk&NK_NO_CARDFIX_ATK) )
- {
+ if( sd ){
short cardfix_ = 1000;
- if(sd->state.arrow_atk)
- {
+ if( !(nk&NK_NO_CARDFIX_ATK) || !(cflag&2) )
+ break;
+ if( sd->state.arrow_atk ){
cardfix = cardfix * (100 + sd->right_weapon.addrace[tstatus->race] + sd->arrow_addrace[tstatus->race]) / 100;
- if (!(nk&NK_NO_ELEFIX))
- {
+ if( !(nk&NK_NO_ELEFIX) ){
int ele_fix = sd->right_weapon.addele[tstatus->def_ele] + sd->arrow_addele[tstatus->def_ele];
- for (i = 0; ARRAYLENGTH(sd->right_weapon.addele2) > i && sd->right_weapon.addele2[i].rate != 0; i++) {
+ for(i = 0; ARRAYLENGTH(sd->right_weapon.addele2) > i && sd->right_weapon.addele2[i].rate != 0; i++){
if (sd->right_weapon.addele2[i].ele != tstatus->def_ele) continue;
if(!(sd->right_weapon.addele2[i].flag&wflag&BF_WEAPONMASK &&
sd->right_weapon.addele2[i].flag&wflag&BF_RANGEMASK &&
@@ -942,13 +981,10 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li
cardfix = cardfix * (100 + sd->right_weapon.addrace[is_boss(target)?RC_BOSS:RC_NONBOSS] + sd->arrow_addrace[is_boss(target)?RC_BOSS:RC_NONBOSS]) / 100;
if( tstatus->race != RC_DEMIHUMAN )
cardfix = cardfix * (100 + sd->right_weapon.addrace[RC_NONDEMIHUMAN]+sd->arrow_addrace[RC_NONDEMIHUMAN]) / 100;
- }
- else
- { // Melee attack
- if( !battle_config.left_cardfix_to_right )
- {
+ }else{ // Melee attack
+ if( !battle_config.left_cardfix_to_right ){
cardfix=cardfix*(100+sd->right_weapon.addrace[tstatus->race])/100;
- if (!(nk&NK_NO_ELEFIX)) {
+ if( !(nk&NK_NO_ELEFIX) ){
int ele_fix = sd->right_weapon.addele[tstatus->def_ele];
for (i = 0; ARRAYLENGTH(sd->right_weapon.addele2) > i && sd->right_weapon.addele2[i].rate != 0; i++) {
if (sd->right_weapon.addele2[i].ele != tstatus->def_ele) continue;
@@ -966,10 +1002,9 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li
if( tstatus->race != RC_DEMIHUMAN )
cardfix = cardfix * (100 + sd->right_weapon.addrace[RC_NONDEMIHUMAN]) / 100;
- if( cflag&1 )
- {
- cardfix_=cardfix_*(100+sd->left_weapon.addrace[tstatus->race])/100;
- if (!(nk&NK_NO_ELEFIX)) {
+ if( cflag&1 ){
+ cardfix_ = cardfix_*(100+sd->left_weapon.addrace[tstatus->race])/100;
+ if (!(nk&NK_NO_ELEFIX)){
int ele_fix_lh = sd->left_weapon.addele[tstatus->def_ele];
for (i = 0; ARRAYLENGTH(sd->left_weapon.addele2) > i && sd->left_weapon.addele2[i].rate != 0; i++) {
if (sd->left_weapon.addele2[i].ele != tstatus->def_ele) continue;
@@ -985,13 +1020,11 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li
cardfix_ = cardfix_ * (100+sd->left_weapon.addrace2[t_race2]) / 100;
cardfix_ = cardfix_ * (100+sd->left_weapon.addrace[is_boss(target)?RC_BOSS:RC_NONBOSS]) / 100;
if( tstatus->race != RC_DEMIHUMAN )
- cardfix_=cardfix_*(100+sd->left_weapon.addrace[RC_NONDEMIHUMAN])/100;
+ cardfix_ = cardfix_*(100+sd->left_weapon.addrace[RC_NONDEMIHUMAN])/100;
}
- }
- else
- {
+ }else{
int ele_fix = sd->right_weapon.addele[tstatus->def_ele] + sd->left_weapon.addele[tstatus->def_ele];
- for (i = 0; ARRAYLENGTH(sd->right_weapon.addele2) > i && sd->right_weapon.addele2[i].rate != 0; i++) {
+ for (i = 0; ARRAYLENGTH(sd->right_weapon.addele2) > i && sd->right_weapon.addele2[i].rate != 0; i++){
if (sd->right_weapon.addele2[i].ele != tstatus->def_ele) continue;
if(!(sd->right_weapon.addele2[i].flag&wflag&BF_WEAPONMASK &&
sd->right_weapon.addele2[i].flag&wflag&BF_RANGEMASK &&
@@ -999,7 +1032,7 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li
continue;
ele_fix += sd->right_weapon.addele2[i].rate;
}
- for (i = 0; ARRAYLENGTH(sd->left_weapon.addele2) > i && sd->left_weapon.addele2[i].rate != 0; i++) {
+ for (i = 0; ARRAYLENGTH(sd->left_weapon.addele2) > i && sd->left_weapon.addele2[i].rate != 0; i++){
if (sd->left_weapon.addele2[i].ele != tstatus->def_ele) continue;
if(!(sd->left_weapon.addele2[i].flag&wflag&BF_WEAPONMASK &&
sd->left_weapon.addele2[i].flag&wflag&BF_RANGEMASK &&
@@ -1018,21 +1051,16 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li
}
}
- for( i = 0; i < ARRAYLENGTH(sd->right_weapon.add_dmg) && sd->right_weapon.add_dmg[i].rate; i++ )
- {
- if( sd->right_weapon.add_dmg[i].class_ == t_class )
- {
+ for( i = 0; i < ARRAYLENGTH(sd->right_weapon.add_dmg) && sd->right_weapon.add_dmg[i].rate; i++ ){
+ if( sd->right_weapon.add_dmg[i].class_ == t_class ){
cardfix = cardfix * (100 + sd->right_weapon.add_dmg[i].rate) / 100;
break;
}
}
- if( cflag&1 )
- {
- for( i = 0; i < ARRAYLENGTH(sd->left_weapon.add_dmg) && sd->left_weapon.add_dmg[i].rate; i++ )
- {
- if( sd->left_weapon.add_dmg[i].class_ == t_class )
- {
+ if( cflag&1 ){
+ for( i = 0; i < ARRAYLENGTH(sd->left_weapon.add_dmg) && sd->left_weapon.add_dmg[i].rate; i++ ){
+ if( sd->left_weapon.add_dmg[i].class_ == t_class ){
cardfix_ = cardfix_ * (100 + sd->left_weapon.add_dmg[i].rate) / 100;
break;
}
@@ -1050,10 +1078,8 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li
break; // end Attacker side
}
// Target side
- if( tsd && !(nk&NK_NO_CARDFIX_DEF) )
- {
- if( !(nk&NK_NO_ELEFIX) )
- {
+ if( tsd && !(nk&NK_NO_CARDFIX_DEF) ){
+ if( !(nk&NK_NO_ELEFIX) ){
int ele_fix = tsd->subele[s_ele];
for (i = 0; ARRAYLENGTH(tsd->subele2) > i && tsd->subele2[i].rate != 0; i++)
{
@@ -1064,12 +1090,10 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li
continue;
ele_fix += tsd->subele2[i].rate;
}
- cardfix=cardfix*(100-ele_fix)/100;
- if( cflag&1 && s_ele_ != s_ele )
- {
+ cardfix = cardfix * (100-ele_fix) / 100;
+ if( cflag&1 && s_ele_ != s_ele ){
int ele_fix_lh = tsd->subele[s_ele_];
- for (i = 0; ARRAYLENGTH(tsd->subele2) > i && tsd->subele2[i].rate != 0; i++)
- {
+ for (i = 0; ARRAYLENGTH(tsd->subele2) > i && tsd->subele2[i].rate != 0; i++){
if(tsd->subele2[i].ele != s_ele_) continue;
if(!(tsd->subele2[i].flag&wflag&BF_WEAPONMASK &&
tsd->subele2[i].flag&wflag&BF_RANGEMASK &&
@@ -1087,8 +1111,7 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li
if( sstatus->race != RC_DEMIHUMAN )
cardfix = cardfix * (100-tsd->subrace[RC_NONDEMIHUMAN]) / 100;
- for( i = 0; i < ARRAYLENGTH(tsd->add_def) && tsd->add_def[i].rate;i++ )
- {
+ for( i = 0; i < ARRAYLENGTH(tsd->add_def) && tsd->add_def[i].rate;i++ ){
if( tsd->add_def[i].class_ == s_class )
{
cardfix = cardfix * (100 - tsd->add_def[i].rate) / 100;
@@ -1489,7 +1512,7 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block
skillratio += 300 + 100 * skill_lv + status_get_int(src);
RE_LVL_DMOD(100);
break;
- case WL_FROSTMISTY: // MATK [{( Skill Level x 100 ) + 200 } x ( Caster�s Base Level / 100 )] %
+ case WL_FROSTMISTY: // MATK [{( Skill Level x 100 ) + 200 } x ( Caster?s Base Level / 100 )] %
skillratio += 100 + 100 * skill_lv;
RE_LVL_DMOD(100);
break;
@@ -2712,7 +2735,7 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag
damage += damage / 2; // 1.5 times more damage while in Deep Sleep.
status_change_end(bl,SC_DEEP_SLEEP,INVALID_TIMER);
}
- if( tsd && sd && sc->data[SC_CRYSTALIZE] && flag&BF_WEAPON ){
+ if( tsd && sd && sc->data[SC_COLD] && flag&BF_WEAPON ){
switch(tsd->status.weapon){
case W_MACE:
case W_2HMACE:
@@ -3358,7 +3381,8 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
//Constant/misc additions from skills
if (skill_id == WZ_FIREPILLAR)
MATK_ADD(50);
- if( sd && (i=pc->checkskill(sd,AB_EUCHARISTICA)) > 0 &&
+ if( sd && ( sd->status.class_ == JOB_ARCH_BISHOP_T || sd->status.class_ == JOB_ARCH_BISHOP ) &&
+ (i=pc->checkskill(sd,AB_EUCHARISTICA)) > 0 &&
(tstatus->race == RC_DEMON || tstatus->def_ele == ELE_DARK) )
MATK_ADDRATE(i);
}
@@ -4492,11 +4516,12 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
if(flag.cri && sd->bonus.crit_atk_rate)
ATK_ADDRATE(sd->bonus.crit_atk_rate);
-
+#ifndef RENEWAL
if(sd->status.party_id && (temp=pc->checkskill(sd,TK_POWER)) > 0){
if( (i = party_foreachsamemap(party->sub_count, sd, 0)) > 1 ) // exclude the player himself [Inkfish]
ATK_ADDRATE(2*temp*i);
}
+#endif
}
break;
} //End default case
@@ -4595,14 +4620,6 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
ATK_ADD(4*skill_lv);
#endif
break;
- case HT_FREEZINGTRAP:
- if(sd)
- ATK_ADD( 40 * pc->checkskill(sd, RA_RESEARCHTRAP) );
- break;
- case RA_WUGDASH ://(Caster Current Weight x 10 / 8)
- if( sd && sd->weight )
- ATK_ADD( sd->weight / 8 );
- break;
case GC_COUNTERSLASH:
ATK_ADD( status_get_agi(src) * 2 + (sd?sd->status.job_level:0) * 4 );
break;
@@ -4848,6 +4865,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
ATK_ADD(wd.div_*sd->spiritball*3);
}
//Card Fix, sd side
+
wd.damage = battle->calc_cardfix(BF_WEAPON, src, target, nk, s_ele, s_ele_, wd.damage, 2, wd.flag);
if( flag.lh )
wd.damage2 = battle->calc_cardfix(BF_WEAPON, src, target, nk, s_ele, s_ele_, wd.damage2, 3, wd.flag);
diff --git a/src/map/skill.c b/src/map/skill.c
index 8c12b55ba..8cb82e3a6 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -851,11 +851,9 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, uint
break;
case SM_BASH:
- if( sd && skill_lv > 5 && pc->checkskill(sd,SM_FATALBLOW)>0 ){
- //TODO: How much % per base level it actually is?
- sc_start(bl,SC_STUN,(5*(skill_lv-5)+(int)sd->status.base_level/10),
- skill_lv,skill->get_time2(SM_FATALBLOW,skill_lv));
- }
+ if( sd && skill_lv > 5 && pc->checkskill(sd,SM_FATALBLOW)>0 )
+ status_change_start(bl,SC_STUN,500*(skill_lv-5)*sd->status.base_level/50,
+ skill_lv,0,0,0,skill->get_time2(SM_FATALBLOW,skill_lv),0);
break;
case MER_CRASH:
@@ -949,8 +947,8 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, uint
break;
case TF_THROWSTONE:
- sc_start(bl,SC_STUN,3,skill_lv,skill->get_time(skill_id,skill_lv));
- sc_start(bl,SC_BLIND,3,skill_lv,skill->get_time2(skill_id,skill_lv));
+ if( !sc_start(bl,SC_STUN,3,skill_lv,skill->get_time(skill_id,skill_lv)) )
+ sc_start(bl,SC_BLIND,3,skill_lv,skill->get_time2(skill_id,skill_lv));
break;
case NPC_DARKCROSS:
@@ -1182,7 +1180,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, uint
sc_start4(bl,SC_BURNING,5+5*skill_lv,skill_lv,0,src->id,0,skill->get_time(skill_id,skill_lv));
break;
case RK_DRAGONBREATH_WATER:
- sc_start4(bl,SC_FROSTMISTY,5+5*skill_lv,skill_lv,0,src->id,0,skill->get_time(skill_id,skill_lv));
+ sc_start(bl,SC_FROSTMISTY,5+5*skill_lv,skill_lv,skill->get_time(skill_id,skill_lv));
break;
case AB_ADORAMUS:
if( tsc && !tsc->data[SC_DEC_AGI] ) //Prevent duplicate agi-down effect.
@@ -1344,7 +1342,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, uint
rate = 5 + 5 * skill_lv;
if( sc && sc->data[SC_COOLER_OPTION] )
rate += rate * sc->data[SC_COOLER_OPTION]->val2 / 100;
- sc_start(bl, SC_CRYSTALIZE, rate, skill_lv, skill->get_time2(skill_id, skill_lv));
+ sc_start(bl, SC_COLD, rate, skill_lv, skill->get_time2(skill_id, skill_lv));
break;
case SO_VARETYR_SPEAR:
sc_start(bl, SC_STUN, 5 + 5 * skill_lv, skill_lv, skill->get_time2(skill_id, skill_lv));
@@ -7676,9 +7674,24 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
case NPC_WIDESTUN:
case NPC_SLOWCAST:
case NPC_WIDEHELLDIGNITY:
- if (flag&1)
- sc_start2(bl,type,100,skill_lv,src->id,skill->get_time2(skill_id,skill_lv));
- else {
+ case NPC_WIDEHEALTHFEAR:
+ case NPC_WIDEBODYBURNNING:
+ case NPC_WIDEFROSTMISTY:
+ case NPC_WIDECOLD:
+ case NPC_WIDE_DEEP_SLEEP:
+ case NPC_WIDESIREN:
+ if (flag&1){
+ switch( type ){
+ case SC_BURNING:
+ sc_start4(bl,type,100,skill_lv,0,src->id,0,skill->get_time2(skill_id,skill_lv));
+ break;
+ case SC_SIREN:
+ sc_start2(bl,type,100,skill_lv,src->id,skill->get_time2(skill_id,skill_lv));
+ break;
+ default:
+ sc_start2(bl,type,100,skill_lv,src->id,skill->get_time2(skill_id,skill_lv));
+ }
+ }else {
skill_area_temp[2] = 0; //For SD_PREAMBLE
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
iMap->foreachinrange(skill->area_sub, bl,
@@ -7939,7 +7952,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
case AB_LAUDAAGNUS:
if( flag&1 || sd == NULL ) {
if( tsc && (tsc->data[SC_FREEZE] || tsc->data[SC_STONE] || tsc->data[SC_BLIND] ||
- tsc->data[SC_BURNING] || tsc->data[SC_FROSTMISTY] || tsc->data[SC_CRYSTALIZE])) {
+ tsc->data[SC_BURNING] || tsc->data[SC_FROSTMISTY] || tsc->data[SC_COLD])) {
// Success Chance: (40 + 10 * Skill Level) %
if( rnd()%100 > 40+10*skill_lv ) break;
status_change_end(bl, SC_FREEZE, INVALID_TIMER);
@@ -7947,7 +7960,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
status_change_end(bl, SC_BLIND, INVALID_TIMER);
status_change_end(bl, SC_BURNING, INVALID_TIMER);
status_change_end(bl, SC_FROSTMISTY, INVALID_TIMER);
- status_change_end(bl, SC_CRYSTALIZE, INVALID_TIMER);
+ status_change_end(bl, SC_COLD, INVALID_TIMER);
}else //Success rate only applies to the curing effect and not stat bonus. Bonus status only applies to non infected targets
clif->skill_nodamage(bl, bl, skill_id, skill_lv,
sc_start(bl, type, 100, skill_lv, skill->get_time(skill_id, skill_lv)));
@@ -8451,7 +8464,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
case SC_BLOODING: case SC_CURSE:
case SC_CONFUSION: case SC_ILLUSION:
case SC_SILENCE: case SC_BURNING:
- case SC_CRYSTALIZE: case SC_FROSTMISTY:
+ case SC_COLD: case SC_FROSTMISTY:
case SC_DEEP_SLEEP: case SC_FEAR:
case SC_MANDRAGORA:
status_change_end(bl, (sc_type)i, INVALID_TIMER);
@@ -8556,7 +8569,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
status_change_end(bl, SC_POISON, INVALID_TIMER);
status_change_end(bl, SC_SILENCE, INVALID_TIMER);
status_change_end(bl, SC_BLIND, INVALID_TIMER);
- status_change_end(bl, SC_ILLUSION, INVALID_TIMER);
+ status_change_end(bl, SC_ILLUSION, INVALID_TIMER);
status_change_end(bl, SC_BURNING, INVALID_TIMER);
status_change_end(bl, SC_FROSTMISTY, INVALID_TIMER);
}
@@ -11801,7 +11814,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
if( battle->check_target(&src->bl,bl,BCT_ENEMY) > 0 ){
switch( sg->unit_id ){
case UNT_ZENKAI_WATER:
- sc_start(bl, SC_CRYSTALIZE, sg->val1*5, sg->skill_lv, skill->get_time2(sg->skill_id, sg->skill_lv));
+ sc_start(bl, SC_COLD, sg->val1*5, sg->skill_lv, skill->get_time2(sg->skill_id, sg->skill_lv));
sc_start(bl, SC_FREEZE, sg->val1*5, sg->skill_lv, skill->get_time2(sg->skill_id, sg->skill_lv));
sc_start(bl, SC_FROSTMISTY, sg->val1*5, sg->skill_lv, skill->get_time2(sg->skill_id, sg->skill_lv));
break;
diff --git a/src/map/status.c b/src/map/status.c
index dc5d5c5bd..64c591b3b 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -214,7 +214,12 @@ void initChangeTables(void) {
add_sc( TF_POISON , SC_POISON );
set_sc( KN_TWOHANDQUICKEN , SC_TWOHANDQUICKEN , SI_TWOHANDQUICKEN , SCB_ASPD );
add_sc( KN_AUTOCOUNTER , SC_AUTOCOUNTER );
- set_sc( PR_IMPOSITIO , SC_IMPOSITIO , SI_IMPOSITIO , SCB_WATK );
+ set_sc( PR_IMPOSITIO , SC_IMPOSITIO , SI_IMPOSITIO ,
+#ifdef RENEWAL
+ SCB_NONE );
+#else
+ SCB_WATK );
+#endif
set_sc( PR_SUFFRAGIUM , SC_SUFFRAGIUM , SI_SUFFRAGIUM , SCB_NONE );
set_sc( PR_ASPERSIO , SC_ASPERSIO , SI_ASPERSIO , SCB_ATK_ELE );
set_sc( PR_BENEDICTIO , SC_BENEDICTIO , SI_BENEDICTIO , SCB_DEF_ELE );
@@ -427,10 +432,20 @@ void initChangeTables(void) {
add_sc( GS_CRACKER , SC_STUN );
add_sc( GS_DISARM , SC_NOEQUIPWEAPON );
add_sc( GS_PIERCINGSHOT , SC_BLOODING );
- set_sc( GS_MADNESSCANCEL , SC_GS_MADNESSCANCEL , SI_GS_MADNESSCANCEL , SCB_BATK|SCB_ASPD );
+ set_sc( GS_MADNESSCANCEL , SC_GS_MADNESSCANCEL , SI_GS_MADNESSCANCEL , SCB_ASPD
+#ifndef RENEWAL
+ |SCB_BATK );
+#else
+ );
+#endif
set_sc( GS_ADJUSTMENT , SC_GS_ADJUSTMENT , SI_GS_ADJUSTMENT , SCB_HIT|SCB_FLEE );
set_sc( GS_INCREASING , SC_GS_ACCURACY , SI_GS_ACCURACY , SCB_AGI|SCB_DEX|SCB_HIT );
- set_sc( GS_GATLINGFEVER , SC_GS_GATLINGFEVER , SI_GS_GATLINGFEVER , SCB_BATK|SCB_FLEE|SCB_SPEED|SCB_ASPD );
+ set_sc( GS_GATLINGFEVER , SC_GS_GATLINGFEVER , SI_GS_GATLINGFEVER , SCB_FLEE|SCB_SPEED|SCB_ASPD
+#ifndef RENEWAL
+ |SCB_BATK );
+#else
+ );
+#endif
set_sc( NJ_TATAMIGAESHI , SC_NJ_TATAMIGAESHI , SI_BLANK , SCB_NONE );
set_sc( NJ_SUITON , SC_NJ_SUITON , SI_NJ_SUITON , SCB_AGI|SCB_SPEED );
add_sc( NJ_HYOUSYOURAKU , SC_FREEZE );
@@ -691,7 +706,7 @@ void initChangeTables(void) {
set_sc( SO_FIREWALK , SC_PROPERTYWALK , SI_PROPERTYWALK , SCB_NONE );
set_sc( SO_ELECTRICWALK , SC_PROPERTYWALK , SI_PROPERTYWALK , SCB_NONE );
set_sc( SO_SPELLFIST , SC_SPELLFIST , SI_SPELLFIST , SCB_NONE );
- set_sc_with_vfx( SO_DIAMONDDUST , SC_CRYSTALIZE , SI_COLD , SCB_NONE ); // it does show the snow icon on mobs but doesn't affect it.
+ set_sc_with_vfx( SO_DIAMONDDUST , SC_COLD , SI_COLD , SCB_NONE ); // it does show the snow icon on mobs but doesn't affect it.
add_sc( SO_CLOUD_KILL , SC_POISON );
set_sc( SO_STRIKING , SC_STRIKING , SI_STRIKING , SCB_WATK|SCB_CRI );
set_sc( SO_WARMER , SC_WARMER , SI_WARMER , SCB_NONE );
@@ -759,6 +774,13 @@ void initChangeTables(void) {
add_sc( ALL_REVERSEORCISH , SC_ORCISH );
set_sc( ALL_ANGEL_PROTECT , SC_ANGEL_PROTECT , SI_ANGEL_PROTECT , SCB_REGEN );
+
+ add_sc( NPC_WIDEHEALTHFEAR , SC_FEAR );
+ add_sc( NPC_WIDEBODYBURNNING , SC_BURNING );
+ add_sc( NPC_WIDEFROSTMISTY , SC_FROSTMISTY );
+ add_sc( NPC_WIDECOLD , SC_COLD );
+ add_sc( NPC_WIDE_DEEP_SLEEP , SC_DEEP_SLEEP );
+ add_sc( NPC_WIDESIREN , SC_SIREN );
// Storing the target job rather than simply SC_SOULLINK simplifies code later on.
SkillStatusChangeTable[SL_ALCHEMIST] = (sc_type)MAPID_ALCHEMIST,
@@ -1019,7 +1041,7 @@ void initChangeTables(void) {
StatusDisplayType[SC_HALLUCINATIONWALK] = true;
StatusDisplayType[SC_ROLLINGCUTTER] = true;
StatusDisplayType[SC_BANDING] = true;
- StatusDisplayType[SC_CRYSTALIZE] = true;
+ StatusDisplayType[SC_COLD] = true;
StatusDisplayType[SC_DEEP_SLEEP] = true;
StatusDisplayType[SC_CURSEDCIRCLE_ATKER]= true;
StatusDisplayType[SC_CURSEDCIRCLE_TARGET]= true;
@@ -1533,7 +1555,7 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, uin
//on dead characters, said checks are left to skill.c [Skotlex]
if (target && status_isdead(target))
return 0;
- if( src && (sc = status_get_sc(src)) && sc->data[SC_CRYSTALIZE] && src->type != BL_MOB)
+ if( src && (sc = status_get_sc(src)) && sc->data[SC_COLD] && src->type != BL_MOB)
return 0;
}
@@ -1653,7 +1675,7 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, uin
sc->data[SC_OBLIVIONCURSE] ||
sc->data[SC_WHITEIMPRISON] ||
sc->data[SC__INVISIBILITY] ||
- (sc->data[SC_CRYSTALIZE] && src->type != BL_MOB) ||
+ (sc->data[SC_COLD] && src->type != BL_MOB) ||
sc->data[SC__IGNORANCE] ||
sc->data[SC_DEEP_SLEEP] ||
sc->data[SC_SATURDAY_NIGHT_FEVER] ||
@@ -3026,7 +3048,11 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
sd->subele[ELE_FIRE] += skill*10;
}
if((skill=pc->checkskill(sd,SA_DRAGONOLOGY))>0 ){
+#ifdef RENEWAL
+ skill = skill*2;
+#else
skill = skill*4;
+#endif
sd->right_weapon.addrace[RC_DRAGON]+=skill;
sd->left_weapon.addrace[RC_DRAGON]+=skill;
sd->magic_addrace[RC_DRAGON]+=skill;
@@ -4419,13 +4445,13 @@ static unsigned short status_calc_batk(struct block_list *bl, struct status_chan
#ifndef RENEWAL
if(sc->data[SC_PLUSATTACKPOWER])
batk += sc->data[SC_PLUSATTACKPOWER]->val1;
+ if(sc->data[SC_GS_MADNESSCANCEL])
+ batk += 100;
+ if(sc->data[SC_GS_GATLINGFEVER])
+ batk += sc->data[SC_GS_GATLINGFEVER]->val3;
#endif
if(sc->data[SC_BATKFOOD])
batk += sc->data[SC_BATKFOOD]->val1;
- if(sc->data[SC_GS_GATLINGFEVER])
- batk += sc->data[SC_GS_GATLINGFEVER]->val3;
- if(sc->data[SC_GS_MADNESSCANCEL])
- batk += 100;
if(sc->data[SC_FIRE_INSIGNIA] && sc->data[SC_FIRE_INSIGNIA]->val1 == 2)
batk += 50;
if(bl->type == BL_ELEM
@@ -4498,13 +4524,14 @@ static unsigned short status_calc_watk(struct block_list *bl, struct status_chan
watk += sc->data[SC_GENTLETOUCH_CHANGE]->val2;
return (unsigned short)cap_value(watk,0,USHRT_MAX);
}
-
+#ifndef RENEWAL
if(sc->data[SC_IMPOSITIO])
watk += sc->data[SC_IMPOSITIO]->val2;
- if(sc->data[SC_WATKFOOD])
- watk += sc->data[SC_WATKFOOD]->val1;
if(sc->data[SC_DRUMBATTLE])
watk += sc->data[SC_DRUMBATTLE]->val2;
+#endif
+ if(sc->data[SC_WATKFOOD])
+ watk += sc->data[SC_WATKFOOD]->val1;
if(sc->data[SC_VOLCANO])
watk += sc->data[SC_VOLCANO]->val2;
if(sc->data[SC_MER_ATK])
@@ -4525,19 +4552,18 @@ static unsigned short status_calc_watk(struct block_list *bl, struct status_chan
watk -= sc->data[SC_WATER_BARRIER]->val3;
if( sc->data[SC_PYROTECHNIC_OPTION] )
watk += sc->data[SC_PYROTECHNIC_OPTION]->val2;
+
+#ifndef RENEWAL
if(sc->data[SC_NIBELUNGEN]) {
if (bl->type != BL_PC)
watk += sc->data[SC_NIBELUNGEN]->val2;
else {
- #ifndef RENEWAL
TBL_PC *sd = (TBL_PC*)bl;
int index = sd->equip_index[sd->state.lr_flag?EQI_HAND_L:EQI_HAND_R];
if(index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->wlv == 4)
- #endif
watk += sc->data[SC_NIBELUNGEN]->val2;
}
}
-#ifndef RENEWAL
if(sc->data[SC_STRIKING])
watk += sc->data[SC_STRIKING]->val2;
if(sc->data[SC_GENTLETOUCH_CHANGE] && sc->data[SC_GENTLETOUCH_CHANGE]->val2)
@@ -6309,7 +6335,7 @@ int status_get_sc_def(struct block_list *bl, enum sc_type type, int rate, int ti
break;
case SC_FROSTMISTY:
tick -= 1000 * ((status->vit + status->dex) / 20);
- tick = max(tick,6000); // Minimum Duration 10s.
+ tick = max(tick,6000); // Minimum Duration 6s.
break;
case SC_OBLIVIONCURSE: // 100% - (100 - 0.8 x INT)
sc_def = 100 - ( 100 - status->int_* 8 / 10 );
@@ -6323,9 +6349,13 @@ int status_get_sc_def(struct block_list *bl, enum sc_type type, int rate, int ti
if( bl->type == BL_MOB )
tick -= 1000 * (status->agi/10);
break;
- case SC_CRYSTALIZE:
+ case SC_COLD:
tick -= (1000*(status->vit/10))+(status_get_lv(bl)/50);
break;
+ case SC_SIREN:
+ tick -= 1000 * ((status_get_lv(bl) / 10) + ((sd?sd->status.job_level:0) / 5));
+ tick = max(tick,10000);
+ break;
case SC_MANDRAGORA:
sc_def = (status->vit+status->luk)/5;
break;
@@ -6545,7 +6575,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_PYREXIA:
case SC_OBLIVIONCURSE:
case SC_LEECHESEND:
- case SC_CRYSTALIZE: ////08/31/2011 - Class Balance Changes
+ case SC_COLD: ////08/31/2011 - Class Balance Changes
case SC_DEEP_SLEEP:
case SC_MANDRAGORA:
return 0;
@@ -6612,10 +6642,10 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_SLEEP:
case SC_STUN:
case SC_FROSTMISTY:
- case SC_CRYSTALIZE:
+ case SC_COLD:
if (sc->opt1)
return 0; //Cannot override other opt1 status changes. [Skotlex]
- if((type == SC_FREEZE || type == SC_FROSTMISTY || type == SC_CRYSTALIZE) && sc->data[SC_WARMER])
+ if((type == SC_FREEZE || type == SC_FROSTMISTY || type == SC_COLD) && sc->data[SC_WARMER])
return 0; //Immune to Frozen and Freezing status if under Warmer status. [Jobbie]
break;
@@ -6903,7 +6933,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_ADORAMUS:
case SC_NEEDLE_OF_PARALYZE:
case SC_DEEP_SLEEP:
- case SC_CRYSTALIZE:
+ case SC_COLD:
// Exploit prevention - kRO Fix
case SC_PYREXIA:
@@ -7937,8 +7967,10 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
// gs_something1 [Vicious]
case SC_GS_GATLINGFEVER:
val2 = 20*val1; //Aspd increase
- val3 = 20+10*val1; //Batk increase
val4 = 5*val1; //Flee decrease
+#ifndef RENEWAL
+ val3 = 20+10*val1; //Batk increase
+#endif
break;
case SC_FLING:
@@ -8244,7 +8276,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
}
break;
case SC_ELECTRICSHOCKER:
- case SC_CRYSTALIZE:
+ case SC_COLD:
case SC_MEIKYOUSISUI:
val4 = tick / 1000;
if( val4 < 1 )
@@ -8331,7 +8363,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_WARMER:
status_change_end(bl, SC_FREEZE, INVALID_TIMER);
status_change_end(bl, SC_FROSTMISTY, INVALID_TIMER);
- status_change_end(bl, SC_CRYSTALIZE, INVALID_TIMER);
+ status_change_end(bl, SC_COLD, INVALID_TIMER);
break;
case SC_STRIKING:
val1 = 6 - val1;//spcost = 6 - level (lvl1:5 ... lvl 5: 1)
@@ -8805,7 +8837,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_WUGBITE:
case SC_THORNS_TRAP:
case SC__MANHOLE:
- case SC_CRYSTALIZE:
+ case SC_COLD:
case SC_CURSEDCIRCLE_ATKER:
case SC_CURSEDCIRCLE_TARGET:
case SC_FEAR:
@@ -8867,7 +8899,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_SLEEP: sc->opt1 = OPT1_SLEEP; break;
case SC_BURNING: sc->opt1 = OPT1_BURNING; break; // Burning need this to be showed correctly. [pakpil]
case SC_WHITEIMPRISON: sc->opt1 = OPT1_IMPRISON; break;
- case SC_CRYSTALIZE: sc->opt1 = OPT1_CRYSTALIZE; break;
+ case SC_COLD: sc->opt1 = OPT1_CRYSTALIZE; break;
//OPT2
case SC_POISON: sc->opt2 |= OPT2_POISON; break;
case SC_CURSE: sc->opt2 |= OPT2_CURSE; break;
@@ -9728,7 +9760,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
case SC_DEEP_SLEEP:
case SC_BURNING:
case SC_WHITEIMPRISON:
- case SC_CRYSTALIZE:
+ case SC_COLD:
sc->opt1 = 0;
break;
@@ -10613,7 +10645,7 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data)
}
break;
- case SC_CRYSTALIZE:
+ case SC_COLD:
if( --(sce->val4) > 0 )
{ // Drains 2% of HP and 1% of SP every seconds.
if( bl->type != BL_MOB) // doesn't work on mobs
@@ -11032,7 +11064,7 @@ int status_change_clear_buffs (struct block_list* bl, int type)
switch (i) {
case SC_DEEP_SLEEP:
case SC_FROSTMISTY:
- case SC_CRYSTALIZE:
+ case SC_COLD:
case SC_TOXIN:
case SC_PARALYSE:
case SC_VENOMBLEED:
diff --git a/src/map/status.h b/src/map/status.h
index a469dc71f..380b49879 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -462,7 +462,7 @@ typedef enum sc_type {
* Sorcerer
**/
SC_SPELLFIST,
- SC_CRYSTALIZE,
+ SC_COLD,
SC_STRIKING,
SC_WARMER,
SC_VACUUM_EXTREME,
diff --git a/src/map/unit.c b/src/map/unit.c
index 5e836dc2e..e5affb0c2 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -945,7 +945,7 @@ int unit_can_move(struct block_list *bl) {
|| sc->data[SC__MANHOLE]
|| sc->data[SC_CURSEDCIRCLE_ATKER]
|| sc->data[SC_CURSEDCIRCLE_TARGET]
- || (sc->data[SC_CRYSTALIZE] && bl->type != BL_MOB)
+ || (sc->data[SC_COLD] && bl->type != BL_MOB)
|| sc->data[SC_NETHERWORLD]
|| (sc->data[SC_CAMOUFLAGE] && sc->data[SC_CAMOUFLAGE]->val1 < 3 && !(sc->data[SC_CAMOUFLAGE]->val3&1))
|| sc->data[SC_MEIKYOUSISUI]