EDP renewal change (#3485)

This setting only affects renewal mode:
- Switch to a different weapon or unequip a weapon now cancel EDP
- EDP can't be used with fist (right hand check only)

Thanks to @aleos89 and @cydh !
This commit is contained in:
Atemo 2018-09-19 00:33:45 +02:00 committed by GitHub
parent 0d77398385
commit a12f1ce02f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 27 additions and 0 deletions

View File

@ -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

View File

@ -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, },

View File

@ -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;

View File

@ -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)

View File

@ -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: