Skip to content

Commit

Permalink
SkipException feature added (#661)
Browse files Browse the repository at this point in the history
* Mandatory Bosses feature added
* Renamed option from MandatoryBosses to SkipException
* Grouped option with other similar option; formatting fixes
  • Loading branch information
Nishimura-Katsuo authored and noah- committed Sep 1, 2018
1 parent 2a4d14b commit 553dcb1
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 1 deletion.
11 changes: 10 additions & 1 deletion d2bs/kolbot/libs/common/Attack.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];

Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions d2bs/kolbot/libs/common/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ var Config = {
SkipEnchant: [],
SkipImmune: [],
SkipAura: [],
SkipException: [],
ScanShrines: [],
Debug: false,

Expand Down
2 changes: 2 additions & 0 deletions d2bs/kolbot/libs/config/Amazon.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions d2bs/kolbot/libs/config/Assassin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions d2bs/kolbot/libs/config/Barbarian.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions d2bs/kolbot/libs/config/Druid.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions d2bs/kolbot/libs/config/Necromancer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions d2bs/kolbot/libs/config/Paladin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions d2bs/kolbot/libs/config/Sorceress.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 553dcb1

Please sign in to comment.