Skip to content

Commit

Permalink
Circular Dependencies fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nwjgit committed Aug 2, 2024
1 parent 0cc7c3f commit 7fb79ae
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
15 changes: 14 additions & 1 deletion src/lib/bso/gorajanGearBoost.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
import { gearstatToSetup, gorajanBoosts } from '../../mahoji/lib/abstracted_commands/minionKill';
import { gorajanArcherOutfit, gorajanOccultOutfit, gorajanWarriorOutfit } from '../data/CollectionsExport';
import type { KillableMonster } from '../minions/types';

export const gorajanBoosts = [
[gorajanArcherOutfit, 'range'],
[gorajanWarriorOutfit, 'melee'],
[gorajanOccultOutfit, 'mage']
] as const;

export const gearstatToSetup = new Map()
.set('attack_stab', 'melee')
.set('attack_slash', 'melee')
.set('attack_crush', 'melee')
.set('attack_magic', 'mage')
.set('attack_ranged', 'range');

export function gorajanGearBoost(user: MUser, monster: KillableMonster | string) {
let attackStyle = null;
let goraBoost = false;
Expand Down
2 changes: 1 addition & 1 deletion src/mahoji/commands/rates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
durationPerBaxBath
} from '../../lib/baxtorianBathhouses';
import { calcAtomicEnergy, divinationEnergies, memoryHarvestTypes } from '../../lib/bso/divination';
import { gearstatToSetup, gorajanBoosts } from '../../lib/bso/gorajanGearBoost';
import { TuraelsTrialsMethods, calculateTuraelsTrialsInput } from '../../lib/bso/turaelsTrials';
import { ClueTiers } from '../../lib/clues/clueTiers';
import { GLOBAL_BSO_XP_MULTIPLIER, PeakTier } from '../../lib/constants';
Expand Down Expand Up @@ -51,7 +52,6 @@ import { calculateDungeoneeringResult } from '../../tasks/minions/bso/dungeoneer
import { memoryHarvestResult, totalTimePerRound } from '../../tasks/minions/bso/memoryHarvestActivity';
import { calculateTuraelsTrialsResult } from '../../tasks/minions/bso/turaelsTrialsActivity';
import { calculateMiningResult } from '../../tasks/minions/miningActivity';
import { gearstatToSetup, gorajanBoosts } from '../lib/abstracted_commands/minionKill';
import type { OSBMahojiCommand } from '../lib/util';
import { calculateHunterInput } from './hunt';
import { calculateMiningInput } from './mine';
Expand Down
14 changes: 0 additions & 14 deletions src/mahoji/lib/abstracted_commands/minionKill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import { itemID } from 'oldschooljs/dist/util';
import { gorajanGearBoost } from '../../../lib/bso/gorajanGearBoost';
import { colosseumCommand } from '../../../lib/colosseum';
import { BitField, PeakTier, type PvMMethod, YETI_ID } from '../../../lib/constants';
import { gorajanArcherOutfit, gorajanOccultOutfit, gorajanWarriorOutfit } from '../../../lib/data/CollectionsExport';
import { Eatables } from '../../../lib/data/eatables';
import { getSimilarItems } from '../../../lib/data/similarItems';
import { checkUserCanUseDegradeableItem, degradeItem, degradeablePvmBoostItems } from '../../../lib/degradeableItems';
Expand Down Expand Up @@ -125,19 +124,6 @@ function formatMissingItems(consumables: Consumable[], timeToFinish: number) {

const { floor } = Math;

export const gorajanBoosts = [
[gorajanArcherOutfit, 'range'],
[gorajanWarriorOutfit, 'melee'],
[gorajanOccultOutfit, 'mage']
] as const;

export const gearstatToSetup = new Map()
.set('attack_stab', 'melee')
.set('attack_slash', 'melee')
.set('attack_crush', 'melee')
.set('attack_magic', 'mage')
.set('attack_ranged', 'range');

function applySkillBoost(user: MUser, duration: number, styles: AttackStyles[]): [number, string] {
const skillTotal = sumArr(styles.map(s => user.skillLevel(s)));

Expand Down

0 comments on commit 7fb79ae

Please sign in to comment.