From a3cb6fcb15caf8b78c90e12ccd26b4c3bb54e406 Mon Sep 17 00:00:00 2001 From: MahtraDR <93822896+MahtraDR@users.noreply.github.com> Date: Sat, 9 Mar 2024 00:46:31 +1300 Subject: [PATCH] [scripts][almanac][combat-trainer] Reject 0-rank skills from almanac list We already rejected capped skills (1750) we now additionally reject zero-rank skills, since non-magic users have magic skills at zero ranks we can't train... --- almanac.lic | 2 +- combat-trainer.lic | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/almanac.lic b/almanac.lic index 3a58c56a41..769dcdba3a 100644 --- a/almanac.lic +++ b/almanac.lic @@ -38,7 +38,7 @@ class Almanac DRSkill.list .map { |skill| [skill.name, skill.exp, skill.rank] } .select { |element| element[1] } - .reject { |_skill, _exp, rank| rank.to_i == 1750 } + .reject { |_skill, _exp, rank| (rank.to_i == 1750 || rank.to_i == 0) } .reject { |skill, _exp| skill == "Mechanical Lore" } .select { |skill, exp| list.append [skill, exp] } skill = list.sort_by(&:last).first[0].sub(/(Lunar|Life|Arcane|Holy|Elemental)\s/, '') diff --git a/combat-trainer.lic b/combat-trainer.lic index aba42b701c..506c16b8a6 100644 --- a/combat-trainer.lic +++ b/combat-trainer.lic @@ -2919,7 +2919,7 @@ class TrainerProcess DRSkill.list .map { |skill| [skill.name, skill.exp, skill.rank] } .select { |element| element[1] } - .reject { |_skill, _exp, rank| rank.to_i == 1750 } + .reject { |_skill, _exp, rank| (rank.to_i == 1750 || rank.to_i == 0) } .reject { |skill, _exp| skill == "Mechanical Lore" } .select { |skill, exp| list.append [skill, exp] } skill = list.sort_by(&:last).first[0].sub(/(Lunar|Life|Arcane|Holy|Elemental)\s/, '')