Follow up to e27aa8b2d82620aa461291b293e00afb7c79e0cb (#4509)
* Additional configs for boss idle AI
This commit is contained in:
parent
fb8a752320
commit
78a02330b2
@ -269,8 +269,10 @@ monster_stuck_warning: no
|
|||||||
// On small-medium sized servers this can cause all monsters like eggs and Fabre/Pupa to metamorph.
|
// On small-medium sized servers this can cause all monsters like eggs and Fabre/Pupa to metamorph.
|
||||||
// To switch it off, set it to 0.
|
// To switch it off, set it to 0.
|
||||||
mob_nopc_idleskill_rate: 100
|
mob_nopc_idleskill_rate: 100
|
||||||
|
boss_nopc_idleskill_rate: 100
|
||||||
|
|
||||||
// Rate at which monsters move when there are no players nearby (Note 2)
|
// Rate at which monsters move when there are no players nearby (Note 2)
|
||||||
// On official servers monsters always move if they have been spotted once, even if there are no players nearby anymore.
|
// On official servers monsters always move if they have been spotted once, even if there are no players nearby anymore.
|
||||||
// To switch it off, set it to 0.
|
// To switch it off, set it to 0.
|
||||||
mob_nopc_move_rate: 100
|
mob_nopc_move_rate: 100
|
||||||
|
boss_nopc_move_rate: 100
|
||||||
|
@ -8557,8 +8557,10 @@ static const struct _battle_data {
|
|||||||
{ "feature.equipswitch", &battle_config.feature_equipswitch, 1, 0, 1, },
|
{ "feature.equipswitch", &battle_config.feature_equipswitch, 1, 0, 1, },
|
||||||
{ "pet_walk_speed", &battle_config.pet_walk_speed, 1, 1, 3, },
|
{ "pet_walk_speed", &battle_config.pet_walk_speed, 1, 1, 3, },
|
||||||
{ "blacksmith_fame_refine_threshold", &battle_config.blacksmith_fame_refine_threshold,10, 1, MAX_REFINE, },
|
{ "blacksmith_fame_refine_threshold", &battle_config.blacksmith_fame_refine_threshold,10, 1, MAX_REFINE, },
|
||||||
{ "mob_nopc_idleskill_rate", &battle_config.mob_nopc_idleskill_rate, 100, 0, 100, },
|
{ "mob_nopc_idleskill_rate", &battle_config.mob_nopc_idleskill_rate, 100, 0, 100, },
|
||||||
{ "mob_nopc_move_rate", &battle_config.mob_nopc_move_rate, 100, 0, 100, },
|
{ "mob_nopc_move_rate", &battle_config.mob_nopc_move_rate, 100, 0, 100, },
|
||||||
|
{ "boss_nopc_idleskill_rate", &battle_config.boss_nopc_idleskill_rate, 100, 0, 100, },
|
||||||
|
{ "boss_nopc_move_rate", &battle_config.boss_nopc_move_rate, 100, 0, 100, },
|
||||||
|
|
||||||
#include "../custom/battle_config_init.inc"
|
#include "../custom/battle_config_init.inc"
|
||||||
};
|
};
|
||||||
|
@ -661,6 +661,8 @@ struct Battle_Config
|
|||||||
int blacksmith_fame_refine_threshold;
|
int blacksmith_fame_refine_threshold;
|
||||||
int mob_nopc_idleskill_rate;
|
int mob_nopc_idleskill_rate;
|
||||||
int mob_nopc_move_rate;
|
int mob_nopc_move_rate;
|
||||||
|
int boss_nopc_idleskill_rate;
|
||||||
|
int boss_nopc_move_rate;
|
||||||
|
|
||||||
#include "../custom/battle_config_struct.inc"
|
#include "../custom/battle_config_struct.inc"
|
||||||
};
|
};
|
||||||
|
@ -2048,7 +2048,9 @@ static int mob_ai_sub_lazy(struct mob_data *md, va_list args)
|
|||||||
{
|
{
|
||||||
// Move probability for mobs away from players
|
// Move probability for mobs away from players
|
||||||
// In Aegis, this is 100% for mobs that have been activated by players and none otherwise.
|
// In Aegis, this is 100% for mobs that have been activated by players and none otherwise.
|
||||||
if( mob_is_spotted(md) && rnd()%100 < battle_config.mob_nopc_move_rate )
|
if( mob_is_spotted(md) &&
|
||||||
|
((!status_has_mode(&md->status,MD_STATUS_IMMUNE) && rnd()%100 < battle_config.mob_nopc_move_rate) ||
|
||||||
|
(status_has_mode(&md->status,MD_STATUS_IMMUNE) && rnd()%100 < battle_config.boss_nopc_move_rate)))
|
||||||
mob_randomwalk(md, tick);
|
mob_randomwalk(md, tick);
|
||||||
}
|
}
|
||||||
else if( md->ud.walktimer == INVALID_TIMER )
|
else if( md->ud.walktimer == INVALID_TIMER )
|
||||||
@ -2058,7 +2060,9 @@ static int mob_ai_sub_lazy(struct mob_data *md, va_list args)
|
|||||||
|
|
||||||
// Probability for mobs far from players from doing their IDLE skill.
|
// Probability for mobs far from players from doing their IDLE skill.
|
||||||
// In Aegis, this is 100% for mobs that have been activated by players and none otherwise.
|
// In Aegis, this is 100% for mobs that have been activated by players and none otherwise.
|
||||||
if( mob_is_spotted(md) && rnd()%100 < battle_config.mob_nopc_idleskill_rate )
|
if( mob_is_spotted(md) &&
|
||||||
|
((!status_has_mode(&md->status,MD_STATUS_IMMUNE) && rnd()%100 < battle_config.mob_nopc_idleskill_rate) ||
|
||||||
|
(status_has_mode(&md->status,MD_STATUS_IMMUNE) && rnd()%100 < battle_config.boss_nopc_idleskill_rate)))
|
||||||
mobskill_use(md, tick, -1);
|
mobskill_use(md, tick, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user