Implements mapflag MF_FLEE_PENALTY
* Deprecate the bg_flee_penalty and gvg_flee_penalty battle configs. * Removes hardcoded restrictions limiting to only BG and GvG maps.
This commit is contained in:
parent
7717070d14
commit
1e4a219832
@ -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)
|
||||
|
||||
@ -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 Désactivé
|
||||
1045: Battlegrounds ON (type %d)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -1054,7 +1054,7 @@
|
||||
1039: ------ Informação 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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -1126,7 +1126,7 @@
|
||||
1039: ------ Información del mapa ------
|
||||
1040: Mapa: %s (Zona: %s) | Jugadores: %d | NPCs: %d | Chats: %d | Tiendas: %d
|
||||
1041: ------ Opciones del mapa ------
|
||||
1042: Ajuste Tasa de Daño:
|
||||
1042: Ajuste Tasa de Batalla:
|
||||
1043: Autotrade activado
|
||||
1044: Autotrade desactivado
|
||||
1045: Battleground activado (tipo %d)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -407,6 +407,48 @@ Disables the damage display on a map.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
*weapon_damage_rate <rate>
|
||||
|
||||
Weapon skills damage adjustments.
|
||||
<rate> is given as a percentage (i.e. 60 = 60%).
|
||||
|
||||
---------------------------------------
|
||||
|
||||
*magic_damage_rate <rate>
|
||||
|
||||
Magic skills damage adjustments.
|
||||
<rate> is given as a percentage (i.e. 60 = 60%).
|
||||
|
||||
---------------------------------------
|
||||
|
||||
*misc_damage_rate <rate>
|
||||
|
||||
Misc skills damage adjustments.
|
||||
<rate> is given as a percentage (i.e. 60 = 60%).
|
||||
|
||||
---------------------------------------
|
||||
|
||||
*short_damage_rate <rate>
|
||||
|
||||
Melee damage adjustments (non-skill).
|
||||
<rate> is given as a percentage (i.e. 60 = 60%).
|
||||
|
||||
---------------------------------------
|
||||
|
||||
*long_damage_rate <rate>
|
||||
|
||||
Ranged damage adjustments (non-skill).
|
||||
<rate> is given as a percentage (i.e. 60 = 60%).
|
||||
|
||||
---------------------------------------
|
||||
|
||||
*flee_penalty <rate>
|
||||
|
||||
Flee penalty applied to players.
|
||||
<rate> is given as a percentage (i.e. 60 = 60%).
|
||||
|
||||
---------------------------------------
|
||||
|
||||
==================
|
||||
| 3. Map Effects |
|
||||
==================
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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, },
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -11114,10 +11114,9 @@ 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))))
|
||||
if (pmap != nullptr && pmap->getMapFlag(MF_FLEE_PENALTY)) {
|
||||
status_calc_bl(&sd->bl, { SCB_FLEE }); //Refresh flee penalty
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -685,6 +685,7 @@ enum e_mapflag : int16 {
|
||||
MF_NOKNOCKBACK,
|
||||
MF_NOBONUSITEMDROP,
|
||||
MF_HIDEDAMAGE,
|
||||
MF_FLEE_PENALTY,
|
||||
MF_MAX
|
||||
};
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user