Skip to content
Permalink
Browse files

Removed jAthena 1082 legacy code regarding castle defense rate. (#4400)

Fixes #4399
  • Loading branch information...
kisuka authored and Lemongrass3110 committed Oct 9, 2019
1 parent e54b68a commit 3c78691d2d4c74a96cd4715c2cf689a76597bfea
Showing with 3 additions and 11 deletions.
  1. +0 −3 conf/battle/guild.conf
  2. +3 −7 src/map/battle.cpp
  3. +0 −1 src/map/battle.hpp
@@ -20,9 +20,6 @@ guild_max_castles: 0
// Official setting is 5 minutes (300000 ms), otherwise allow guild leaders to relog to cancel the 5 minute delay.
guild_skill_relog_delay: 300000

// Damage adjustments for WOE battles against defending Guild monsters (Note 2)
castle_defense_rate: 100

// Melee damage adjustments (non skills) for WoE battles (Guild Vs Guild) (Note 2)
gvg_short_attack_damage_rate: 80

@@ -640,7 +640,7 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li
if( sd && !(nk&NK_NO_CARDFIX_ATK) ) {
cardfix = cardfix * (100 + sd->magic_addrace[tstatus->race] + sd->magic_addrace[RC_ALL] + sd->magic_addrace2[t_race2]) / 100;
if( !(nk&NK_NO_ELEFIX) ) { // Affected by Element modifier bonuses
cardfix = cardfix * (100 + sd->magic_addele[tstatus->def_ele] + sd->magic_addele[ELE_ALL] +
cardfix = cardfix * (100 + sd->magic_addele[tstatus->def_ele] + sd->magic_addele[ELE_ALL] +
sd->magic_addele_script[tstatus->def_ele] + sd->magic_addele_script[ELE_ALL]) / 100;
cardfix = cardfix * (100 + sd->magic_atk_ele[rh_ele] + sd->magic_atk_ele[ELE_ALL]) / 100;
}
@@ -1709,10 +1709,7 @@ int64 battle_calc_gvg_damage(struct block_list *src,struct block_list *bl,int64

if (skill_get_inf2(skill_id)&INF2_NO_GVG_DMG) //Skills with no gvg damage reduction.
return damage;
/* Uncomment if you want god-mode Emperiums at 100 defense. [Kisuka]
if (md && md->guardian_data)
damage -= damage * (md->guardian_data->castle->defense/100) * battle_config.castle_defense_rate/100;
*/

if (flag & BF_SKILL) { //Skills get a different reduction than non-skills. [Skotlex]
if (flag&BF_WEAPON)
damage = damage * battle_config.gvg_weapon_damage_rate / 100;
@@ -6576,7 +6573,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
struct Damage atk = battle_calc_weapon_attack(src, target, skill_id, skill_lv, 0);
struct Damage matk = battle_calc_magic_attack(src, target, skill_id, skill_lv, 0);
md.damage = 7 * ((atk.damage/skill_lv + matk.damage/skill_lv) * tstatus->vit / 100 );

// AD benefits from endow/element but damage is forced back to neutral
md.damage = battle_attr_fix(src, target, md.damage, ELE_NEUTRAL, tstatus->def_ele, tstatus->ele_lv);
}
@@ -8207,7 +8204,6 @@ static const struct _battle_data {
{ "skill_removetrap_type", &battle_config.skill_removetrap_type, 0, 0, 1, },
{ "disp_experience", &battle_config.disp_experience, 0, 0, 1, },
{ "disp_zeny", &battle_config.disp_zeny, 0, 0, 1, },
{ "castle_defense_rate", &battle_config.castle_defense_rate, 100, 0, 100, },
{ "bone_drop", &battle_config.bone_drop, 0, 0, 2, },
{ "buyer_name", &battle_config.buyer_name, 1, 0, 1, },
{ "skill_wall_check", &battle_config.skill_wall_check, 1, 0, 1, },
@@ -368,7 +368,6 @@ struct Battle_Config
int skill_removetrap_type;
int disp_experience;
int disp_zeny;
int castle_defense_rate;
int backstab_bow_penalty;
int hp_rate;
int sp_rate;

0 comments on commit 3c78691

Please sign in to comment.
You can’t perform that action at this time.