diff --git a/conf/battle/skill.conf b/conf/battle/skill.conf index f28e41b6d4..91428bd3f1 100644 --- a/conf/battle/skill.conf +++ b/conf/battle/skill.conf @@ -375,3 +375,11 @@ banana_bomb_duration: 0 // Official: no // Legacy rAthena logic: yes skill_drop_items_full: no + +// EDP setting: (Note 3) +// When switching/unequipping a right hand weapon, should EDP be removed? EDP can't be used with bare hand. +// 0: Disabled (rAthena legacy and pre-renewal behavior). +// 1: Enabled on pre-renewal. +// 2: Enabled on renewal. +// 3: 1+2 +switch_remove_edp: 2 diff --git a/src/map/battle.cpp b/src/map/battle.cpp index 6368da40d6..a351f7d461 100644 --- a/src/map/battle.cpp +++ b/src/map/battle.cpp @@ -8522,6 +8522,7 @@ static const struct _battle_data { { "autoloot_adjust", &battle_config.autoloot_adjust, 0, 0, 1, }, { "broadcast_hide_name", &battle_config.broadcast_hide_name, 2, 0, NAME_LENGTH, }, { "skill_drop_items_full", &battle_config.skill_drop_items_full, 0, 0, 1, }, + { "switch_remove_edp", &battle_config.switch_remove_edp, 2, 0, 3, }, { "feature.homunculus_autofeed", &battle_config.feature_homunculus_autofeed, 1, 0, 1, }, { "summoner_trait", &battle_config.summoner_trait, 3, 0, 3, }, { "homunculus_autofeed_always", &battle_config.homunculus_autofeed_always, 1, 0, 1, }, diff --git a/src/map/battle.hpp b/src/map/battle.hpp index d89de0e90b..1a7e3e55ae 100644 --- a/src/map/battle.hpp +++ b/src/map/battle.hpp @@ -643,6 +643,7 @@ struct Battle_Config int autoloot_adjust; int broadcast_hide_name; int skill_drop_items_full; + int switch_remove_edp; int feature_homunculus_autofeed; int summoner_trait; int homunculus_autofeed_always; diff --git a/src/map/pc.cpp b/src/map/pc.cpp index ac5561063a..9181d282f9 100755 --- a/src/map/pc.cpp +++ b/src/map/pc.cpp @@ -10113,6 +10113,13 @@ bool pc_unequipitem(struct map_session_data *sd, int n, int flag) { clif_changelook(&sd->bl,LOOK_WEAPON,sd->status.weapon); if( !battle_config.dancing_weaponswitch_fix ) status_change_end(&sd->bl, SC_DANCING, INVALID_TIMER); // Unequipping => stop dancing. +#ifdef RENEWAL + if (battle_config.switch_remove_edp&2) { +#else + if (battle_config.switch_remove_edp&1) { +#endif + status_change_end(&sd->bl, SC_EDP, INVALID_TIMER); + } } if(pos & EQP_HAND_L) { if (sd->status.shield && battle_getcurrentskill(&sd->bl) == LG_SHIELDSPELL) diff --git a/src/map/skill.cpp b/src/map/skill.cpp index f9f91020f4..e6e56c24f4 100755 --- a/src/map/skill.cpp +++ b/src/map/skill.cpp @@ -15114,6 +15114,16 @@ bool skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_i return false; } break; + case ASC_EDP: +#ifdef RENEWAL + if (sd->weapontype1 == W_FIST && battle_config.switch_remove_edp&2) { +#else + if (sd->weapontype1 == W_FIST && battle_config.switch_remove_edp&1) { +#endif + clif_skill_fail(sd,skill_id,USESKILL_FAIL_THIS_WEAPON,0); + return false; + } + break; case TK_READYCOUNTER: case TK_READYDOWN: case TK_READYSTORM: