forked from xziino/ff14-mitigator
213 lines
9.3 KiB
JavaScript
213 lines
9.3 KiB
JavaScript
(function () {
|
|
const JOB_FROM_TYPE = {
|
|
'Paladin': 'PLD', 'Warrior': 'WAR', 'DarkKnight': 'DRK', 'Gunbreaker': 'GNB',
|
|
'WhiteMage': 'WHM', 'Scholar': 'SCH', 'Astrologian': 'AST', 'Sage': 'SGE',
|
|
'Monk': 'MNK', 'Dragoon': 'DRG', 'Ninja': 'NIN', 'Samurai': 'SAM',
|
|
'Reaper': 'RPR', 'Viper': 'VPR', 'Bard': 'BRD', 'Machinist': 'MCH',
|
|
'Dancer': 'DNC', 'BlackMage': 'BLM', 'Summoner': 'SMN', 'RedMage': 'RDM',
|
|
'Pictomancer': 'PCT', 'BlueMage': 'BLU',
|
|
};
|
|
|
|
const JOB_ROLE = {
|
|
'PLD': 'tank', 'WAR': 'tank', 'DRK': 'tank', 'GNB': 'tank',
|
|
'WHM': 'healer', 'SCH': 'healer', 'AST': 'healer', 'SGE': 'healer',
|
|
'MNK': 'dps', 'DRG': 'dps', 'NIN': 'dps', 'SAM': 'dps',
|
|
'RPR': 'dps', 'VPR': 'dps', 'BRD': 'dps', 'MCH': 'dps',
|
|
'DNC': 'dps', 'BLM': 'dps', 'SMN': 'dps', 'RDM': 'dps', 'PCT': 'dps',
|
|
'BLU': 'dps',
|
|
};
|
|
|
|
const ALL_JOBS = [
|
|
{ group: 'Tank', jobs: ['PLD', 'WAR', 'DRK', 'GNB'] },
|
|
{ group: 'Healer', jobs: ['WHM', 'SCH', 'AST', 'SGE'] },
|
|
{ group: 'Melee', jobs: ['MNK', 'DRG', 'NIN', 'SAM', 'RPR', 'VPR'] },
|
|
{ group: 'Ranged', jobs: ['BRD', 'MCH', 'DNC'] },
|
|
{ group: 'Caster', jobs: ['BLM', 'SMN', 'RDM', 'PCT'] },
|
|
];
|
|
|
|
const JOB_ABILITIES = {
|
|
'PLD': [
|
|
{ name: 'Passage of Arms', buffType: 'buff' },
|
|
{ name: 'Divine Veil', buffType: 'shield' },
|
|
{ name: 'Guardian', buffType: 'shield' },
|
|
{ name: 'Reprisal', buffType: 'debuff' },
|
|
],
|
|
'WAR': [
|
|
{ name: 'Shake It Off', buffType: 'shield' },
|
|
{ name: 'Bloodwhetting', buffType: 'shield' },
|
|
{ name: 'Reprisal', buffType: 'debuff' },
|
|
],
|
|
'DRK': [
|
|
{ name: 'Dark Missionary', buffType: 'buff' },
|
|
{ name: 'Reprisal', buffType: 'debuff' },
|
|
],
|
|
'GNB': [
|
|
{ name: 'Heart of Light', buffType: 'buff' },
|
|
{ name: 'Reprisal', buffType: 'debuff' },
|
|
],
|
|
'WHM': [
|
|
{ name: 'Temperance', buffType: 'buff' },
|
|
{ name: 'Divine Benison', buffType: 'shield' },
|
|
{ name: 'Divine Caress', buffType: 'shield' },
|
|
],
|
|
'SCH': [
|
|
{ name: 'Sacred Soil', buffType: 'buff' },
|
|
{ name: 'Expedient', buffType: 'buff' },
|
|
{ name: 'Fey Illumination', buffType: 'buff' },
|
|
{ name: 'Galvanize', buffType: 'shield' },
|
|
{ name: 'Seraphic Veil', buffType: 'shield' },
|
|
{ name: 'Catalyze', buffType: 'shield' },
|
|
],
|
|
'AST': [
|
|
{ name: 'Collective Unconscious', buffType: 'buff' },
|
|
{ name: 'Neutral Sect', buffType: 'shield' },
|
|
{ name: 'Intersection', buffType: 'shield' },
|
|
{ name: 'the Spire', buffType: 'shield' },
|
|
],
|
|
'SGE': [
|
|
{ name: 'Kerachole', buffType: 'buff' },
|
|
{ name: 'Holos', buffType: 'buff' },
|
|
{ name: 'Holosakos', buffType: 'shield' },
|
|
{ name: 'Panhaima', buffType: 'shield' },
|
|
{ name: 'Eukrasian Prognosis', buffType: 'shield' },
|
|
{ name: 'Eukrasian Prognosis II', buffType: 'shield' },
|
|
{ name: 'Eukrasian Diagnosis', buffType: 'shield' },
|
|
{ name: 'Differential Diagnosis', buffType: 'shield' },
|
|
{ name: 'Haima', buffType: 'shield' },
|
|
],
|
|
'BRD': [{ name: 'Troubadour', buffType: 'buff' }],
|
|
'MCH': [{ name: 'Tactician', buffType: 'buff' }],
|
|
'DNC': [
|
|
{ name: 'Shield Samba', buffType: 'buff' },
|
|
{ name: 'Improvised Finish', buffType: 'shield' },
|
|
],
|
|
'MNK': [{ name: 'Feint', buffType: 'debuff' }],
|
|
'DRG': [{ name: 'Feint', buffType: 'debuff' }],
|
|
'NIN': [{ name: 'Feint', buffType: 'debuff' }],
|
|
'SAM': [{ name: 'Feint', buffType: 'debuff' }],
|
|
'RPR': [{ name: 'Feint', buffType: 'debuff' }],
|
|
'VPR': [{ name: 'Feint', buffType: 'debuff' }],
|
|
'BLM': [{ name: 'Addle', buffType: 'debuff' }],
|
|
'SMN': [
|
|
{ name: 'Addle', buffType: 'debuff' },
|
|
{ name: 'Radiant Aegis', buffType: 'shield' },
|
|
],
|
|
'RDM': [
|
|
{ name: 'Addle', buffType: 'debuff' },
|
|
{ name: 'Magick Barrier', buffType: 'buff' },
|
|
],
|
|
'PCT': [
|
|
{ name: 'Addle', buffType: 'debuff' },
|
|
{ name: 'Tempera Coat', buffType: 'shield' },
|
|
{ name: 'Tempera Grassa', buffType: 'shield' },
|
|
],
|
|
};
|
|
|
|
const ABILITY_JOB_MAP = {
|
|
'Passage of Arms': 'PLD', 'Divine Veil': 'PLD', 'Guardian': 'PLD',
|
|
'Shake It Off': 'WAR', 'Bloodwhetting': 'WAR',
|
|
'Dark Missionary': 'DRK',
|
|
'Heart of Light': 'GNB',
|
|
'Temperance': 'WHM', 'Divine Benison': 'WHM', 'Divine Caress': 'WHM',
|
|
'Sacred Soil': 'SCH', 'Expedient': 'SCH', 'Fey Illumination': 'SCH',
|
|
'Galvanize': 'SCH', 'Seraphic Veil': 'SCH', 'Catalyze': 'SCH',
|
|
'Collective Unconscious': 'AST', 'Neutral Sect': 'AST',
|
|
'Intersection': 'AST', 'the Spire': 'AST',
|
|
'Kerachole': 'SGE', 'Holos': 'SGE', 'Holosakos': 'SGE',
|
|
'Panhaima': 'SGE', 'Haima': 'SGE',
|
|
'Eukrasian Prognosis': 'SGE', 'Eukrasian Prognosis II': 'SGE',
|
|
'Eukrasian Diagnosis': 'SGE', 'Differential Diagnosis': 'SGE',
|
|
'Troubadour': 'BRD',
|
|
'Tactician': 'MCH',
|
|
'Shield Samba': 'DNC', 'Improvised Finish': 'DNC',
|
|
'Radiant Aegis': 'SMN',
|
|
'Magick Barrier': 'RDM',
|
|
'Tempera Coat': 'PCT', 'Tempera Grassa': 'PCT',
|
|
};
|
|
|
|
const MITIG_ICONS = {
|
|
'Passage of Arms': 'assets/icons/mitigation/passage-of-arms.png',
|
|
'Dark Missionary': 'assets/icons/mitigation/dark-missionary.png',
|
|
'Heart of Light': 'assets/icons/mitigation/heart-of-light.png',
|
|
'Temperance': 'assets/icons/mitigation/temperance.png',
|
|
'Sacred Soil': 'assets/icons/mitigation/sacred-soil.png',
|
|
'Expedient': 'assets/icons/mitigation/expedient.png',
|
|
'Fey Illumination': 'assets/icons/mitigation/fey-illumination.png',
|
|
'Collective Unconscious': 'assets/icons/mitigation/collective-unconscious.png',
|
|
'Holos': 'assets/icons/mitigation/holos.png',
|
|
'Kerachole': 'assets/icons/mitigation/kerachole.png',
|
|
'Troubadour': 'assets/icons/mitigation/troubadour.png',
|
|
'Tactician': 'assets/icons/mitigation/tactician.png',
|
|
'Shield Samba': 'assets/icons/mitigation/shield-samba.png',
|
|
'Magick Barrier': 'assets/icons/mitigation/magick-barrier.png',
|
|
'Reprisal': 'assets/icons/mitigation/reprisal.png',
|
|
'Feint': 'assets/icons/mitigation/feint.png',
|
|
'Addle': 'assets/icons/mitigation/addle.png',
|
|
'Divine Veil': 'assets/icons/mitigation/divine-veil.png',
|
|
'Guardian': 'assets/icons/mitigation/guardian.png',
|
|
'Shake It Off': 'assets/icons/mitigation/shake-it-off.png',
|
|
'Bloodwhetting': 'assets/icons/mitigation/bloodwhetting.png',
|
|
'Divine Benison': 'assets/icons/mitigation/divine-benison.png',
|
|
'Divine Caress': 'assets/icons/mitigation/divine-caress.png',
|
|
'Intersection': 'assets/icons/mitigation/intersection.png',
|
|
'Neutral Sect': 'assets/icons/mitigation/neutral-sect.png',
|
|
'the Spire': 'assets/icons/mitigation/the-spire.png',
|
|
'Panhaima': 'assets/icons/mitigation/panhaima.png',
|
|
'Holosakos': 'assets/icons/mitigation/holos.png',
|
|
'Eukrasian Prognosis': 'assets/icons/mitigation/eukrasian-prognosis.png',
|
|
'Eukrasian Prognosis II': 'assets/icons/mitigation/eukrasian-prognosis-ii.png',
|
|
'Eukrasian Diagnosis': 'assets/icons/mitigation/eukrasian-diagnosis.png',
|
|
'Differential Diagnosis': 'assets/icons/mitigation/eukrasian-diagnosis.png',
|
|
'Haima': 'assets/icons/mitigation/haima.png',
|
|
'Galvanize': 'assets/icons/mitigation/galvanize.png',
|
|
'Seraphic Veil': 'assets/icons/mitigation/seraphic-veil.png',
|
|
'Radiant Aegis': 'assets/icons/mitigation/radiant-aegis.png',
|
|
'Tempera Coat': 'assets/icons/mitigation/tempera-coat.png',
|
|
'Tempera Grassa': 'assets/icons/mitigation/tempera-grassa.png',
|
|
'Improvised Finish': 'assets/icons/mitigation/improvised-finish.png',
|
|
};
|
|
|
|
const ABILITY_DR = {
|
|
'Passage of Arms': 0.15,
|
|
'Troubadour': 0.15,
|
|
'Tactician': 0.15,
|
|
'Shield Samba': 0.15,
|
|
'Dark Missionary': 0.10,
|
|
'Heart of Light': 0.10,
|
|
'Temperance': 0.10,
|
|
'Sacred Soil': 0.10,
|
|
'Expedient': 0.10,
|
|
'Collective Unconscious': 0.10,
|
|
'Holos': 0.10,
|
|
'Kerachole': 0.10,
|
|
'Magick Barrier': 0.10,
|
|
'Fey Illumination': 0.05,
|
|
'Reprisal': 0.10,
|
|
'Feint': 0.05,
|
|
'Addle': 0.10,
|
|
};
|
|
|
|
const ABILITY_JOBS = {};
|
|
Object.entries(JOB_ABILITIES).forEach(([job, abilities]) => {
|
|
abilities.forEach(ability => {
|
|
if (!ABILITY_JOBS[ability.name]) ABILITY_JOBS[ability.name] = [];
|
|
ABILITY_JOBS[ability.name].push(job);
|
|
});
|
|
});
|
|
|
|
window.FF14_DATA = {
|
|
JOB_ABBR: JOB_FROM_TYPE,
|
|
JOB_FROM_TYPE,
|
|
JOB_ROLE,
|
|
ALL_JOBS,
|
|
JOB_ABILITIES,
|
|
ABILITY_JOB_MAP,
|
|
ABILITY_JOBS,
|
|
ABILITY_DR,
|
|
MITIG_ICONS,
|
|
TANK_JOBS: new Set(['PLD', 'WAR', 'DRK', 'GNB']),
|
|
MELEE_JOBS: new Set(['MNK', 'DRG', 'NIN', 'SAM', 'RPR', 'VPR']),
|
|
CASTER_JOBS: new Set(['BLM', 'SMN', 'RDM', 'PCT']),
|
|
};
|
|
})();
|