diff --git a/conf/msg_conf/map_msg_chn.conf b/conf/msg_conf/map_msg_chn.conf index d8a15df3ca..fd0093f85e 100644 --- a/conf/msg_conf/map_msg_chn.conf +++ b/conf/msg_conf/map_msg_chn.conf @@ -873,7 +873,7 @@ 1039: ------ 地圖資訊 ------ 1040: 地圖名: %s (Zone: %s) | 地圖玩家數量: %d | 地圖NPC數量: %d | 地圖聊天室數量: %d | Vendings: %d 1041: ------ 地圖旗標 ------ -1042: Damage Rate Adjustments: +1042: Battle Rate Adjustments: 1043: 可離線掛店 1044: 不可離線掛店 1045: 戰場 (類型 %d) diff --git a/conf/msg_conf/map_msg_frn.conf b/conf/msg_conf/map_msg_frn.conf index 04ffaedaf6..97c0e45895 100644 --- a/conf/msg_conf/map_msg_frn.conf +++ b/conf/msg_conf/map_msg_frn.conf @@ -885,7 +885,7 @@ 1039: ------ Map Info ------ 1040: Nom de la Map: %s (Zone: %s) | Joueurs sur la Map: %d | NPCs sur la Map: %d | Chats sur la Map: %d | Vendings: %d 1041: ------ Map Flags ------ -1042: Damage Rate Adjustments: +1042: Battle Rate Adjustments: 1043: Autotrade Activ 1044: Autotrade Dsactiv 1045: Battlegrounds ON (type %d) diff --git a/conf/msg_conf/map_msg_idn.conf b/conf/msg_conf/map_msg_idn.conf index e0763f786b..53fdf6d852 100644 --- a/conf/msg_conf/map_msg_idn.conf +++ b/conf/msg_conf/map_msg_idn.conf @@ -972,7 +972,7 @@ 1039: ------ Map Info ------ 1040: Map: %s (Zone: %s) | Pemain: %d | NPC: %d | Ruang Chat: %d | Toko: %d 1041: ------ Map Flags ------ -1042: Damage Rate Adjustments: +1042: Battle Rate Adjustments: 1043: Autotrade diaktifkan 1044: Autotrade dinonaktifkan 1045: Battleground ON (tipe %d) diff --git a/conf/msg_conf/map_msg_por.conf b/conf/msg_conf/map_msg_por.conf index def720f061..7c56061980 100644 --- a/conf/msg_conf/map_msg_por.conf +++ b/conf/msg_conf/map_msg_por.conf @@ -1054,7 +1054,7 @@ 1039: ------ Informao do Mapa ------ 1040: Mapa: %s (Zone: %s) | Jogadores: %d | NPCs: %d | Chats: %d | Vendas: %d 1041: ------ Map Flags ------ -1042: Damage Rate Adjustments: +1042: Battle Rate Adjustments: 1043: Autotrade Habilitado 1044: Autotrade Desabilitado 1045: Battlegrounds Habilitado (tipo %d) diff --git a/conf/msg_conf/map_msg_rus.conf b/conf/msg_conf/map_msg_rus.conf index efa2ac8c5a..41c2569edf 100644 --- a/conf/msg_conf/map_msg_rus.conf +++ b/conf/msg_conf/map_msg_rus.conf @@ -886,7 +886,7 @@ 1039: ------ ------ 1040: : %s (Zone: %s) | : %d | : %d | : %d | Vendings: %d 1041: ------ ------ -1042: Damage Rate Adjustments: +1042: Battle Rate Adjustments: 1043: Autotrade 1044: Autotrade 1045: Battlegrounds ( %d) diff --git a/conf/msg_conf/map_msg_spn.conf b/conf/msg_conf/map_msg_spn.conf index 09c54251fb..98d10937ce 100644 --- a/conf/msg_conf/map_msg_spn.conf +++ b/conf/msg_conf/map_msg_spn.conf @@ -1126,7 +1126,7 @@ 1039: ------ Informacin del mapa ------ 1040: Mapa: %s (Zona: %s) | Jugadores: %d | NPCs: %d | Chats: %d | Tiendas: %d 1041: ------ Opciones del mapa ------ -1042: Ajuste Tasa de Dao: +1042: Ajuste Tasa de Batalla: 1043: Autotrade activado 1044: Autotrade desactivado 1045: Battleground activado (tipo %d) diff --git a/conf/msg_conf/map_msg_tha.conf b/conf/msg_conf/map_msg_tha.conf index 4211f34466..4b326730dd 100644 --- a/conf/msg_conf/map_msg_tha.conf +++ b/conf/msg_conf/map_msg_tha.conf @@ -879,7 +879,7 @@ 1039: ------ ´Ἱ ------ 1040: Ἱ: %s (Zone: %s) | : %d | NPCs: %d | Chats: %d | Vendings: %d 1041: ------ Map Flags ------ -1042: Damage Rate Adjustments: +1042: Battle Rate Adjustments: 1043: Autotrade Enabled 1044: Autotrade Disabled 1045: Battlegrounds ON (type %d) diff --git a/db/pre-re/map_zones.yml b/db/pre-re/map_zones.yml index c08ce13c22..44325f673a 100644 --- a/db/pre-re/map_zones.yml +++ b/db/pre-re/map_zones.yml @@ -844,6 +844,8 @@ Body: Maps: guild_vs5: true Mapflags: + - Flag: Flee_Penalty + Value: 20 - Flag: GvG - Flag: GvG_NoParty - Flag: HideDamage @@ -949,6 +951,8 @@ Body: prtg_cas04: true prtg_cas05: true Mapflags: + - Flag: Flee_Penalty + Value: 20 - Flag: GuildLock - Flag: GvG_Castle - Flag: HideDamage @@ -1049,6 +1053,8 @@ Body: pvp_n_1-4: true pvp_n_1-5: true Mapflags: + - Flag: Flee_Penalty + Value: 20 - Flag: HideMobHpBar - Flag: NoCostume - Flag: PvP @@ -1102,6 +1108,8 @@ Body: turbo_n_4: true turbo_n_8: true Mapflags: + - Flag: Flee_Penalty + Value: 20 - Flag: HideMobHpBar - Flag: Long_Damage_Rate Value: 80 @@ -1179,6 +1187,8 @@ Body: turbo_e_8: true turbo_e_16: true Mapflags: + - Flag: Flee_Penalty + Value: 20 - Flag: HideMobHpBar - Flag: Long_Damage_Rate Value: 80 @@ -1282,6 +1292,8 @@ Body: Maps: poring_w02: true Mapflags: + - Flag: Flee_Penalty + Value: 20 - Flag: HideMobHpBar - Flag: Long_Damage_Rate Value: 80 @@ -1357,6 +1369,8 @@ Body: schg_cas04: true schg_cas05: true Mapflags: + - Flag: Flee_Penalty + Value: 20 - Flag: GuildLock - Flag: GvG_Castle - Flag: HideDamage @@ -1458,6 +1472,8 @@ Body: bat_c02: true bat_c03: true Mapflags: + - Flag: Flee_Penalty + Value: 20 - Flag: HideMobHpBar - Flag: Long_Damage_Rate Value: 85 @@ -1604,6 +1620,8 @@ Body: DisabledStatuses: Endure: 100 Mapflags: + - Flag: Flee_Penalty + Value: 20 # !TODO: Block party formation; PartyLock is too restrictive - Flag: HideDamage - Flag: Long_Damage_Rate @@ -1700,6 +1718,8 @@ Body: te_prtcas04: true te_prtcas05: true Mapflags: + - Flag: Flee_Penalty + Value: 20 - Flag: HideDamage - Flag: HideMobHpBar - Flag: Invincible_Time diff --git a/db/re/map_zones.yml b/db/re/map_zones.yml index a4668ecc14..23f25dc2f6 100644 --- a/db/re/map_zones.yml +++ b/db/re/map_zones.yml @@ -2092,6 +2092,8 @@ Body: Maps: guild_vs5: true Mapflags: + - Flag: Flee_Penalty + Value: 20 - Flag: GvG - Flag: GvG_NoParty - Flag: HideDamage @@ -2267,6 +2269,8 @@ Body: prtg_cas04: true prtg_cas05: true Mapflags: + - Flag: Flee_Penalty + Value: 20 - Flag: GuildLock - Flag: GvG_Castle - Flag: HideDamage @@ -2609,6 +2613,8 @@ Body: pvp_n_1-4: true pvp_n_1-5: true Mapflags: + - Flag: Flee_Penalty + Value: 20 - Flag: HideMobHpBar - Flag: Long_Damage_Rate Value: 70 @@ -2792,6 +2798,8 @@ Body: turbo_n_4: true turbo_n_8: true Mapflags: + - Flag: Flee_Penalty + Value: 20 - Flag: HideMobHpBar - Flag: Long_Damage_Rate Value: 80 @@ -3065,6 +3073,8 @@ Body: turbo_e_8: true turbo_e_16: true Mapflags: + - Flag: Flee_Penalty + Value: 20 - Flag: HideMobHpBar - Flag: Long_Damage_Rate Value: 80 @@ -3490,6 +3500,8 @@ Body: Maps: poring_w02: true Mapflags: + - Flag: Flee_Penalty + Value: 20 - Flag: HideMobHpBar - Flag: Long_Damage_Rate Value: 80 @@ -3631,6 +3643,8 @@ Body: schg_cas04: true schg_cas05: true Mapflags: + - Flag: Flee_Penalty + Value: 20 - Flag: GuildLock - Flag: GvG_Castle - Flag: HideDamage @@ -3798,6 +3812,8 @@ Body: bat_c02: true bat_c03: true Mapflags: + - Flag: Flee_Penalty + Value: 20 - Flag: HideMobHpBar - Flag: Long_Damage_Rate Value: 75 @@ -4321,6 +4337,8 @@ Body: DisabledStatuses: Endure: 100 Mapflags: + - Flag: Flee_Penalty + Value: 20 # !TODO: Block party formation; PartyLock is too restrictive - Flag: HideDamage - Flag: Long_Damage_Rate @@ -5360,6 +5378,8 @@ Body: te_prtcas04: true te_prtcas05: true Mapflags: + - Flag: Flee_Penalty + Value: 20 - Flag: GuildLock - Flag: GvG_Te - Flag: GvG_Te_Castle diff --git a/doc/mapflags.txt b/doc/mapflags.txt index ffffeb543f..28293f8200 100644 --- a/doc/mapflags.txt +++ b/doc/mapflags.txt @@ -407,6 +407,48 @@ Disables the damage display on a map. --------------------------------------- +*weapon_damage_rate + +Weapon skills damage adjustments. + is given as a percentage (i.e. 60 = 60%). + +--------------------------------------- + +*magic_damage_rate + +Magic skills damage adjustments. + is given as a percentage (i.e. 60 = 60%). + +--------------------------------------- + +*misc_damage_rate + +Misc skills damage adjustments. + is given as a percentage (i.e. 60 = 60%). + +--------------------------------------- + +*short_damage_rate + +Melee damage adjustments (non-skill). + is given as a percentage (i.e. 60 = 60%). + +--------------------------------------- + +*long_damage_rate + +Ranged damage adjustments (non-skill). + is given as a percentage (i.e. 60 = 60%). + +--------------------------------------- + +*flee_penalty + +Flee penalty applied to players. + is given as a percentage (i.e. 60 = 60%). + +--------------------------------------- + ================== | 3. Map Effects | ================== diff --git a/src/map/atcommand.cpp b/src/map/atcommand.cpp index 36d356bf44..3dd047b23b 100644 --- a/src/map/atcommand.cpp +++ b/src/map/atcommand.cpp @@ -4469,15 +4469,16 @@ ACMD_FUNC(mapinfo) { } } - if (mapdata->getMapFlag(MF_WEAPON_DAMAGE_RATE) || mapdata->getMapFlag(MF_MAGIC_DAMAGE_RATE) || mapdata->getMapFlag(MF_MISC_DAMAGE_RATE) || mapdata->getMapFlag(MF_SHORT_DAMAGE_RATE) || mapdata->getMapFlag(MF_LONG_DAMAGE_RATE)) { + if (mapdata->getMapFlag(MF_WEAPON_DAMAGE_RATE) || mapdata->getMapFlag(MF_MAGIC_DAMAGE_RATE) || mapdata->getMapFlag(MF_MISC_DAMAGE_RATE) || mapdata->getMapFlag(MF_SHORT_DAMAGE_RATE) || mapdata->getMapFlag(MF_LONG_DAMAGE_RATE) || mapdata->getMapFlag(MF_FLEE_PENALTY)) { uint16 weapon = mapdata->getMapFlag(MF_WEAPON_DAMAGE_RATE), magic = mapdata->getMapFlag(MF_MAGIC_DAMAGE_RATE), misc = mapdata->getMapFlag(MF_MISC_DAMAGE_RATE), short_ = mapdata->getMapFlag(MF_SHORT_DAMAGE_RATE), - long_ = mapdata->getMapFlag(MF_LONG_DAMAGE_RATE); + long_ = mapdata->getMapFlag(MF_LONG_DAMAGE_RATE), + flee = mapdata->getMapFlag(MF_FLEE_PENALTY); - clif_displaymessage(fd, msg_txt(sd, 1042)); // Damage Rate Adjustments: - sprintf(atcmd_output, " Weapon: %d%% | Magic: %d%% | Misc: %d%% | Short: %d%% | Long: %d%%", weapon > 0 ? weapon : 100, magic > 0 ? magic : 100, misc > 0 ? misc : 100, short_ > 0 ? short_ : 100, long_ > 0 ? long_ : 100); + clif_displaymessage(fd, msg_txt(sd, 1042)); // Battle Rate Adjustments: + sprintf(atcmd_output, " Weapon: %d%% | Magic: %d%% | Misc: %d%% | Short: %d%% | Long: %d%% | Flee: %d%%", weapon > 0 ? weapon : 100, magic > 0 ? magic : 100, misc > 0 ? misc : 100, short_ > 0 ? short_ : 100, long_ > 0 ? long_ : 100, flee != 0 ? flee * -1 : 0); clif_displaymessage(fd, atcmd_output); } diff --git a/src/map/battle.cpp b/src/map/battle.cpp index 2804805c52..acf16daaad 100644 --- a/src/map/battle.cpp +++ b/src/map/battle.cpp @@ -10276,7 +10276,6 @@ static const struct _battle_data { { "player_cloak_check_type", &battle_config.pc_cloak_check_type, 1, 0, 1|2|4, }, { "monster_cloak_check_type", &battle_config.monster_cloak_check_type, 4, 0, 1|2|4, }, { "sense_type", &battle_config.estimation_type, 1|2, 0, 1|2, }, - { "gvg_flee_penalty", &battle_config.gvg_flee_penalty, 20, 0, INT_MAX, }, { "mob_changetarget_byskill", &battle_config.mob_changetarget_byskill, 0, 0, 1, }, { "attack_direction_change", &battle_config.attack_direction_change, BL_ALL, BL_NUL, BL_ALL, }, { "land_skill_limit", &battle_config.land_skill_limit, BL_ALL, BL_NUL, BL_ALL, }, @@ -10479,7 +10478,6 @@ static const struct _battle_data { { "npc_emotion_behavior", &battle_config.npc_emotion_behavior, 0, 0, 1, }, // BattleGround Settings { "bg_update_interval", &battle_config.bg_update_interval, 1000, 100, INT_MAX, }, - { "bg_flee_penalty", &battle_config.bg_flee_penalty, 20, 0, INT_MAX, }, // rAthena { "max_third_parameter", &battle_config.max_third_parameter, 135, 10, SHRT_MAX, }, { "max_baby_third_parameter", &battle_config.max_baby_third_parameter, 108, 10, SHRT_MAX, }, diff --git a/src/map/battle.hpp b/src/map/battle.hpp index 40ddb4e1f4..4dffafb3ad 100644 --- a/src/map/battle.hpp +++ b/src/map/battle.hpp @@ -296,7 +296,6 @@ struct Battle_Config int pc_cloak_check_type; int monster_cloak_check_type; int estimation_type; - int gvg_flee_penalty; int mob_changetarget_byskill; int attack_direction_change; int land_skill_limit; @@ -500,12 +499,6 @@ struct Battle_Config // [BattleGround Settings] int bg_update_interval; - int bg_short_damage_rate; - int bg_long_damage_rate; - int bg_weapon_damage_rate; - int bg_magic_damage_rate; - int bg_misc_damage_rate; - int bg_flee_penalty; // rAthena int max_third_parameter; diff --git a/src/map/clif.cpp b/src/map/clif.cpp index dcc32761d0..e022fef4f5 100644 --- a/src/map/clif.cpp +++ b/src/map/clif.cpp @@ -11114,11 +11114,10 @@ void clif_parse_LoadEndAck(int fd,map_session_data *sd) guild_notice = false; // Do not display it twice } - if (battle_config.bg_flee_penalty != 100 || battle_config.gvg_flee_penalty != 100) { - struct map_data *pmap = map_getmapdata(sd->state.pmap); + map_data *pmap = map_getmapdata(sd->state.pmap); - if ((pmap != nullptr && (mapdata_flag_gvg(pmap) || pmap->getMapFlag(MF_BATTLEGROUND))) || (mapdata != nullptr && (mapdata_flag_gvg(mapdata) || mapdata->getMapFlag(MF_BATTLEGROUND)))) - status_calc_bl(&sd->bl, { SCB_FLEE }); //Refresh flee penalty + if (pmap != nullptr && pmap->getMapFlag(MF_FLEE_PENALTY)) { + status_calc_bl(&sd->bl, { SCB_FLEE }); //Refresh flee penalty } if( night_flag && mapdata->getMapFlag(MF_NIGHTENABLED) ) diff --git a/src/map/map.cpp b/src/map/map.cpp index f6f463fc5e..8f020b5ab8 100644 --- a/src/map/map.cpp +++ b/src/map/map.cpp @@ -5093,6 +5093,7 @@ bool map_setmapflag_sub(int16 m, enum e_mapflag mapflag, bool status, union u_ma case MF_MISC_DAMAGE_RATE: case MF_LONG_DAMAGE_RATE: case MF_SHORT_DAMAGE_RATE: + case MF_FLEE_PENALTY: if (status) { nullpo_retr(false, args); diff --git a/src/map/map.hpp b/src/map/map.hpp index 1ae0eb9fbf..399bcdb6cf 100644 --- a/src/map/map.hpp +++ b/src/map/map.hpp @@ -685,6 +685,7 @@ enum e_mapflag : int16 { MF_NOKNOCKBACK, MF_NOBONUSITEMDROP, MF_HIDEDAMAGE, + MF_FLEE_PENALTY, MF_MAX }; diff --git a/src/map/script_constants.hpp b/src/map/script_constants.hpp index 159a959069..79536778fd 100644 --- a/src/map/script_constants.hpp +++ b/src/map/script_constants.hpp @@ -545,6 +545,7 @@ export_constant(MF_NOKNOCKBACK); export_constant(MF_NOBONUSITEMDROP); export_constant(MF_HIDEDAMAGE); + export_constant(MF_FLEE_PENALTY); /* setcell types */ export_constant(CELL_WALKABLE); diff --git a/src/map/status.cpp b/src/map/status.cpp index f124711efa..bf0120fa8c 100644 --- a/src/map/status.cpp +++ b/src/map/status.cpp @@ -7478,10 +7478,7 @@ static signed short status_calc_flee(struct block_list *bl, status_change *sc, i if( bl->type == BL_PC ) { struct map_data *mapdata = map_getmapdata(bl->m); - if( mapdata_flag_gvg(mapdata) ) - flee -= flee * battle_config.gvg_flee_penalty/100; - else if( mapdata->getMapFlag(MF_BATTLEGROUND) ) - flee -= flee * battle_config.bg_flee_penalty/100; + flee -= flee * mapdata->getMapFlag(MF_FLEE_PENALTY) / 100; } if(!sc || !sc->count)