diff --git a/d2bs/kolbot/libs/common/Attack.js b/d2bs/kolbot/libs/common/Attack.js index 35a1aa157..1cdf982dc 100644 --- a/d2bs/kolbot/libs/common/Attack.js +++ b/d2bs/kolbot/libs/common/Attack.js @@ -1113,6 +1113,11 @@ var Attack = { return true; } + if ((unit.spectype & 0x7) && Config.SkipException && Config.SkipException.indexOf(unit.name) > -1) { + print("\xFFc1Skip Exception: " + unit.name); + return true; + } + var i, j, rval, tempArray = []; @@ -1284,6 +1289,10 @@ AuraLoop: // Skip monsters with auras // Get a monster's resistance to specified element getResist: function (unit, type) { + if (!unit || !unit.getStat) { // some scripts pass empty units in throne room + return 100; + } + if (unit.type === 0) { // player return 0; } @@ -1332,7 +1341,7 @@ AuraLoop: // Skip monsters with auras return (unit.hp * 100 / 128) > Config.CastStatic; } - if (this.infinity && ["fire", "lightning", "cold"].indexOf(damageType) > -1) { + if (this.infinity && ["fire", "lightning", "cold"].indexOf(damageType) > -1 && unit.getState) { // baal in throne room doesn't have getState if (!unit.getState(28)) { return this.getResist(unit, damageType) < 117; } diff --git a/d2bs/kolbot/libs/common/Config.js b/d2bs/kolbot/libs/common/Config.js index 021ac7668..d5883dc2a 100644 --- a/d2bs/kolbot/libs/common/Config.js +++ b/d2bs/kolbot/libs/common/Config.js @@ -178,6 +178,7 @@ var Config = { SkipEnchant: [], SkipImmune: [], SkipAura: [], + SkipException: [], ScanShrines: [], Debug: false, diff --git a/d2bs/kolbot/libs/config/Amazon.js b/d2bs/kolbot/libs/config/Amazon.js index af810aa7c..0ad0549fc 100644 --- a/d2bs/kolbot/libs/config/Amazon.js +++ b/d2bs/kolbot/libs/config/Amazon.js @@ -445,6 +445,8 @@ function LoadConfig() { Config.SkipEnchant = []; // Skip monsters with auras. Possible options: "fanaticism", "might", "holy fire", "blessed aim", "holy freeze", "holy shock". Conviction is bugged, don't use it. Config.SkipAura = []; + // Uncomment the following line to always attempt to kill these bosses despite immunities and mods + //Config.SkipException = [getLocaleString(2851), getLocaleString(2852), getLocaleString(2853)]; // vizier, de seis, infector /* Attack config * To disable an attack, set it to -1 diff --git a/d2bs/kolbot/libs/config/Assassin.js b/d2bs/kolbot/libs/config/Assassin.js index a461e1fa8..da6d6ceb3 100644 --- a/d2bs/kolbot/libs/config/Assassin.js +++ b/d2bs/kolbot/libs/config/Assassin.js @@ -445,6 +445,8 @@ function LoadConfig() { Config.SkipEnchant = []; // Skip monsters with auras. Possible options: "fanaticism", "might", "holy fire", "blessed aim", "holy freeze", "holy shock". Conviction is bugged, don't use it. Config.SkipAura = []; + // Uncomment the following line to always attempt to kill these bosses despite immunities and mods + //Config.SkipException = [getLocaleString(2851), getLocaleString(2852), getLocaleString(2853)]; // vizier, de seis, infector /* Attack config * To disable an attack, set it to -1 diff --git a/d2bs/kolbot/libs/config/Barbarian.js b/d2bs/kolbot/libs/config/Barbarian.js index 6851a0c9b..ca7102b1c 100644 --- a/d2bs/kolbot/libs/config/Barbarian.js +++ b/d2bs/kolbot/libs/config/Barbarian.js @@ -445,6 +445,8 @@ function LoadConfig() { Config.SkipEnchant = []; // Skip monsters with auras. Possible options: "fanaticism", "might", "holy fire", "blessed aim", "holy freeze", "holy shock". Conviction is bugged, don't use it. Config.SkipAura = []; + // Uncomment the following line to always attempt to kill these bosses despite immunities and mods + //Config.SkipException = [getLocaleString(2851), getLocaleString(2852), getLocaleString(2853)]; // vizier, de seis, infector /* Attack config * To disable an attack, set it to -1 diff --git a/d2bs/kolbot/libs/config/Druid.js b/d2bs/kolbot/libs/config/Druid.js index e3aa8a577..6a48cd78b 100644 --- a/d2bs/kolbot/libs/config/Druid.js +++ b/d2bs/kolbot/libs/config/Druid.js @@ -445,6 +445,8 @@ function LoadConfig() { Config.SkipEnchant = []; // Skip monsters with auras. Possible options: "fanaticism", "might", "holy fire", "blessed aim", "holy freeze", "holy shock". Conviction is bugged, don't use it. Config.SkipAura = []; + // Uncomment the following line to always attempt to kill these bosses despite immunities and mods + //Config.SkipException = [getLocaleString(2851), getLocaleString(2852), getLocaleString(2853)]; // vizier, de seis, infector /* Attack config * To disable an attack, set it to -1 diff --git a/d2bs/kolbot/libs/config/Necromancer.js b/d2bs/kolbot/libs/config/Necromancer.js index 3d7b4554e..334d2720c 100644 --- a/d2bs/kolbot/libs/config/Necromancer.js +++ b/d2bs/kolbot/libs/config/Necromancer.js @@ -445,6 +445,8 @@ function LoadConfig() { Config.SkipEnchant = []; // Skip monsters with auras. Possible options: "fanaticism", "might", "holy fire", "blessed aim", "holy freeze", "holy shock". Conviction is bugged, don't use it. Config.SkipAura = []; + // Uncomment the following line to always attempt to kill these bosses despite immunities and mods + //Config.SkipException = [getLocaleString(2851), getLocaleString(2852), getLocaleString(2853)]; // vizier, de seis, infector /* Attack config * To disable an attack, set it to -1 diff --git a/d2bs/kolbot/libs/config/Paladin.js b/d2bs/kolbot/libs/config/Paladin.js index ddd27adb1..7a2049a77 100644 --- a/d2bs/kolbot/libs/config/Paladin.js +++ b/d2bs/kolbot/libs/config/Paladin.js @@ -445,6 +445,8 @@ function LoadConfig() { Config.SkipEnchant = []; // Skip monsters with auras. Possible options: "fanaticism", "might", "holy fire", "blessed aim", "holy freeze", "holy shock". Conviction is bugged, don't use it. Config.SkipAura = []; + // Uncomment the following line to always attempt to kill these bosses despite immunities and mods + //Config.SkipException = [getLocaleString(2851), getLocaleString(2852), getLocaleString(2853)]; // vizier, de seis, infector /* Attack config * To disable an attack, set it to -1 diff --git a/d2bs/kolbot/libs/config/Sorceress.js b/d2bs/kolbot/libs/config/Sorceress.js index ab3ec386f..ac21f7d17 100644 --- a/d2bs/kolbot/libs/config/Sorceress.js +++ b/d2bs/kolbot/libs/config/Sorceress.js @@ -445,6 +445,8 @@ function LoadConfig() { Config.SkipEnchant = []; // Skip monsters with auras. Possible options: "fanaticism", "might", "holy fire", "blessed aim", "holy freeze", "holy shock". Conviction is bugged, don't use it. Config.SkipAura = []; + // Uncomment the following line to always attempt to kill these bosses despite immunities and mods + //Config.SkipException = [getLocaleString(2851), getLocaleString(2852), getLocaleString(2853)]; // vizier, de seis, infector /* Attack config * To disable an attack, set it to -1