diff --git a/common/ruletypes.h b/common/ruletypes.h index 9a18ff063..dc1a31c1f 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -556,12 +556,13 @@ RULE_REAL(Bots, ManaRegen, 2.0) // Adjust mana regen for bots, 1 is fast and hig RULE_BOOL(Bots, PreferNoManaCommandSpells, true) // Give sorting priority to newer no-mana spells (i.e., 'Bind Affinity') RULE_BOOL(Bots, QuestableSpawnLimit, false) // Optional quest method to manage bot spawn limits using the quest_globals name bot_spawn_limit, see: /bazaar/Aediles_Thrall.pl RULE_BOOL(Bots, QuestableSpells, false) // Anita Thrall's (Anita_Thrall.pl) Bot Spell Scriber quests. -RULE_INT(Bots, SpawnLimit, 71) // Number of bots a character can have spawned at one time, You + 71 bots is a 12 group raid +RULE_INT(Bots, SpawnLimit, 71) // Number of bots a character can have spawned at one time, You + 71 bots is a 12 group pseudo-raid (bots are not raidable at this time) RULE_BOOL(Bots, BotGroupXP, false) // Determines whether client gets xp for bots outside their group. RULE_BOOL(Bots, BotBardUseOutOfCombatSongs, true) // Determines whether bard bots use additional out of combat songs (optional script) RULE_BOOL(Bots, BotLevelsWithOwner, false) // Auto-updates spawned bots as owner levels/de-levels (false is original behavior) RULE_BOOL(Bots, BotCharacterLevelEnabled, false) // Enables required level to spawn bots RULE_INT(Bots, BotCharacterLevel, 0) // 0 as default (if level > this value you can spawn bots if BotCharacterLevelEnabled is true) +RULE_INT(Bots, CasterStopMeleeLevel, 13) // Level at which caster bots stop melee attacks RULE_CATEGORY_END() #endif diff --git a/utils/sql/git/bots/optional/2014_03_31_BotLevelsWithOwnerRule.sql b/utils/sql/git/bots/optional/2014_03_31_BotLevelsWithOwnerRule.sql deleted file mode 100644 index 4700d9abf..000000000 --- a/utils/sql/git/bots/optional/2014_03_31_BotLevelsWithOwnerRule.sql +++ /dev/null @@ -1,4 +0,0 @@ -INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'Bots:BotLevelsWithOwner', 'true', 'Auto-updates bots with ding.'); -INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (2, 'Bots:BotLevelsWithOwner', 'true', 'Auto-updates bots with ding.'); -INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (4, 'Bots:BotLevelsWithOwner', 'true', 'Auto-updates bots with ding.'); -INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (10, 'Bots:BotLevelsWithOwner', 'true', 'Auto-updates bots with ding.'); diff --git a/utils/sql/git/bots/optional/2014_03_31_bots_bot_levels_with_owner_rule.sql b/utils/sql/git/bots/optional/2014_03_31_bots_bot_levels_with_owner_rule.sql new file mode 100644 index 000000000..73a3c5b4c --- /dev/null +++ b/utils/sql/git/bots/optional/2014_03_31_bots_bot_levels_with_owner_rule.sql @@ -0,0 +1 @@ +INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'Bots:BotLevelsWithOwner', 'true', 'Auto-updates bots with ding.'); diff --git a/utils/sql/git/bots/optional/2016_12_09_bots_caster_stop_melee_level_rule.sql b/utils/sql/git/bots/optional/2016_12_09_bots_caster_stop_melee_level_rule.sql new file mode 100644 index 000000000..1e50c659e --- /dev/null +++ b/utils/sql/git/bots/optional/2016_12_09_bots_caster_stop_melee_level_rule.sql @@ -0,0 +1,2 @@ +INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'Bots:CasterStopMeleeLevel', '13', 'Level at which caster bots stop melee attacks'); + diff --git a/zone/bot.cpp b/zone/bot.cpp index 133932df7..056a55289 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -2391,7 +2391,7 @@ void Bot::AI_Process() { } } atCombatRange = true; - } else if(IsBotCaster() && GetLevel() > 12) { + } else if(IsBotCaster() && GetLevel() >= RuleI(Bots, CasterStopMeleeLevel)) { if(IsBotCasterCombatRange(GetTarget())) atCombatRange = true; } @@ -2440,7 +2440,7 @@ void Bot::AI_Process() { if(GetTarget()->GetHPRatio() <= 99.0f) BotRangedAttack(GetTarget()); } - else if(!IsBotArcher() && (!(IsBotCaster() && GetLevel() > 12)) && GetTarget() && !IsStunned() && !IsMezzed() && (GetAppearance() != eaDead)) { + else if(!IsBotArcher() && (!(IsBotCaster() && GetLevel() >= RuleI(Bots, CasterStopMeleeLevel))) && GetTarget() && !IsStunned() && !IsMezzed() && (GetAppearance() != eaDead)) { // we can't fight if we don't have a target, are stun/mezzed or dead.. // Stop attacking if the target is enraged if((IsEngaged() && !BehindMob(GetTarget(), GetX(), GetY()) && GetTarget()->IsEnraged()) || GetBotStance() == BotStancePassive)