From 17c043dd31c8e01fdaf0d6964f25f54f64eaa779 Mon Sep 17 00:00:00 2001 From: James Tanner Date: Sun, 8 Oct 2023 18:30:21 -0700 Subject: [PATCH] Merge mage simple presets into 1 --- ui/mage/presets.ts | 68 ++++++++++++---------------------------------- ui/mage/sim.ts | 6 ++-- ui/raid/presets.ts | 6 ++-- 3 files changed, 22 insertions(+), 58 deletions(-) diff --git a/ui/mage/presets.ts b/ui/mage/presets.ts index 9c2afa1a06..70270967b7 100644 --- a/ui/mage/presets.ts +++ b/ui/mage/presets.ts @@ -109,14 +109,16 @@ export const FrostTalents = { }), }; -export const DefaultFireRotation = MageRotation.create({ +export const DefaultSimpleRotation = MageRotation.create({ + only3ArcaneBlastStacksBelowManaPercent: 0.15, + blastWithoutMissileBarrageAboveManaPercent: 0.2, + missileBarrageBelowManaPercent: 0, + useArcaneBarrage: false, + primaryFireSpell: PrimaryFireSpell.Fireball, maintainImprovedScorch: false, -}); -export const DefaultFFBRotation = MageRotation.create({ - primaryFireSpell: PrimaryFireSpell.FrostfireBolt, - maintainImprovedScorch: false, + useIceLance: false, }); export const DefaultFFBOptions = MageOptions.create({ @@ -137,9 +139,6 @@ export const DefaultFireConsumes = Consumes.create({ prepopPotion: Potions.PotionOfSpeed, }); -export const DefaultFrostRotation = MageRotation.create({ -}); - export const DefaultFrostOptions = MageOptions.create({ armor: ArmorType.MoltenArmor, focusMagicTarget: UnitReference.create(), @@ -153,12 +152,6 @@ export const DefaultFrostConsumes = Consumes.create({ food: Food.FoodFishFeast, }); -export const DefaultArcaneRotation = MageRotation.create({ - only3ArcaneBlastStacksBelowManaPercent: 0.15, - blastWithoutMissileBarrageAboveManaPercent: 0.2, - missileBarrageBelowManaPercent: 0, -}); - export const DefaultArcaneOptions = MageOptions.create({ armor: ArmorType.MoltenArmor, focusMagicPercentUptime: 99, @@ -178,14 +171,13 @@ export const OtherDefaults = { profession2: Profession.Tailoring, }; -export const ARCANE_ROTATION_PRESET_SIMPLE = { - name: 'Simple Arcane', - enableWhen: (player: Player) => player.getTalentTree() == 0, +export const ROTATION_PRESET_SIMPLE = { + name: 'Simple Default', rotation: SavedRotation.create({ rotation: { type: APLRotation_Type.TypeSimple, simple: { - specRotationJson: MageRotation.toJsonString(DefaultArcaneRotation), + specRotationJson: MageRotation.toJsonString(DefaultSimpleRotation), }, }, }), @@ -195,29 +187,16 @@ export const ARCANE_ROTATION_PRESET_DEFAULT = { name: 'Arcane', enableWhen: (player: Player) => player.getTalentTree() == 0, rotation: SavedRotation.create({ - specRotationOptionsJson: MageRotation.toJsonString(DefaultArcaneRotation), + specRotationOptionsJson: MageRotation.toJsonString(MageRotation.create()), rotation: APLRotation.fromJsonString(JSON.stringify(ArcaneApl)) }), } -export const FIRE_ROTATION_PRESET_SIMPLE = { - name: 'Simple Fire', - enableWhen: (player: Player) => player.getTalentTree() == 1, - rotation: SavedRotation.create({ - rotation: { - type: APLRotation_Type.TypeSimple, - simple: { - specRotationJson: MageRotation.toJsonString(DefaultFireRotation), - }, - }, - }), -} - export const FIRE_ROTATION_PRESET_DEFAULT = { name: 'Fire', enableWhen: (player: Player) => player.getTalentTree() == 1, rotation: SavedRotation.create({ - specRotationOptionsJson: MageRotation.toJsonString(DefaultFireRotation), + specRotationOptionsJson: MageRotation.toJsonString(MageRotation.create()), rotation: APLRotation.fromJsonString(JSON.stringify(FireApl)), }), } @@ -226,29 +205,16 @@ export const FROSTFIRE_ROTATION_PRESET_DEFAULT = { name: 'Frostfire', enableWhen: (player: Player) => player.getTalentTree() == 1, rotation: SavedRotation.create({ - specRotationOptionsJson: MageRotation.toJsonString(DefaultFFBRotation), + specRotationOptionsJson: MageRotation.toJsonString(MageRotation.create()), rotation: APLRotation.fromJsonString(JSON.stringify(FrostFireApl)), }), } -export const FROST_ROTATION_PRESET_SIMPLE = { - name: 'Simple Frost', - enableWhen: (player: Player) => player.getTalentTree() == 2, - rotation: SavedRotation.create({ - rotation: { - type: APLRotation_Type.TypeSimple, - simple: { - specRotationJson: MageRotation.toJsonString(DefaultFrostRotation), - }, - }, - }), -} - export const FROST_ROTATION_PRESET_DEFAULT = { name: 'Frost', enableWhen: (player: Player) => player.getTalentTree() == 2, rotation: SavedRotation.create({ - specRotationOptionsJson: MageRotation.toJsonString(DefaultFrostRotation), + specRotationOptionsJson: MageRotation.toJsonString(MageRotation.create()), rotation: APLRotation.fromJsonString(JSON.stringify(FrostApl)), }), } @@ -257,7 +223,7 @@ export const ARCANE_ROTATION_PRESET_AOE = { name: 'Arcane AOE', enableWhen: (player: Player) => player.getTalentTree() == 0, rotation: SavedRotation.create({ - specRotationOptionsJson: MageRotation.toJsonString(DefaultFrostRotation), + specRotationOptionsJson: MageRotation.toJsonString(MageRotation.create()), rotation: APLRotation.fromJsonString(JSON.stringify(ArcaneAoeApl)), }), } @@ -266,7 +232,7 @@ export const FIRE_ROTATION_PRESET_AOE = { name: 'Fire AOE', enableWhen: (player: Player) => player.getTalentTree() == 1, rotation: SavedRotation.create({ - specRotationOptionsJson: MageRotation.toJsonString(DefaultFrostRotation), + specRotationOptionsJson: MageRotation.toJsonString(MageRotation.create()), rotation: APLRotation.fromJsonString(JSON.stringify(FireAoeApl)), }), } @@ -275,7 +241,7 @@ export const FROST_ROTATION_PRESET_AOE = { name: 'Frost AOE', enableWhen: (player: Player) => player.getTalentTree() == 2, rotation: SavedRotation.create({ - specRotationOptionsJson: MageRotation.toJsonString(DefaultFrostRotation), + specRotationOptionsJson: MageRotation.toJsonString(MageRotation.create()), rotation: APLRotation.fromJsonString(JSON.stringify(FrostAoeApl)), }), } diff --git a/ui/mage/sim.ts b/ui/mage/sim.ts index baf2e04382..70a41e4a2b 100644 --- a/ui/mage/sim.ts +++ b/ui/mage/sim.ts @@ -77,7 +77,7 @@ export class MageSimUI extends IndividualSimUI { // Default consumes settings. consumes: Presets.DefaultFireConsumes, // Default rotation settings. - rotation: Presets.DefaultFireRotation, + rotation: Presets.DefaultSimpleRotation, // Default talents. talents: Presets.Phase3FireTalents.data, // Default spec-specific settings. @@ -145,9 +145,7 @@ export class MageSimUI extends IndividualSimUI { presets: { // Preset rotations that the user can quickly select. rotations: [ - Presets.ARCANE_ROTATION_PRESET_SIMPLE, - Presets.FIRE_ROTATION_PRESET_SIMPLE, - Presets.FROST_ROTATION_PRESET_SIMPLE, + Presets.ROTATION_PRESET_SIMPLE, Presets.ARCANE_ROTATION_PRESET_DEFAULT, Presets.FIRE_ROTATION_PRESET_DEFAULT, Presets.FROSTFIRE_ROTATION_PRESET_DEFAULT, diff --git a/ui/raid/presets.ts b/ui/raid/presets.ts index 9265575c0f..b92c7c8487 100644 --- a/ui/raid/presets.ts +++ b/ui/raid/presets.ts @@ -417,7 +417,7 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecMage, - rotation: MagePresets.DefaultArcaneRotation, + rotation: MagePresets.DefaultSimpleRotation, talents: MagePresets.ArcaneTalents.data, specOptions: MagePresets.DefaultArcaneOptions, consumes: MagePresets.DefaultArcaneConsumes, @@ -446,7 +446,7 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecMage, - rotation: MagePresets.DefaultFireRotation, + rotation: MagePresets.DefaultSimpleRotation, talents: MagePresets.FireTalents.data, specOptions: MagePresets.DefaultFireOptions, consumes: MagePresets.DefaultFireConsumes, @@ -475,7 +475,7 @@ export const playerPresets: Array> = [ }, { spec: Spec.SpecMage, - rotation: MagePresets.DefaultFFBRotation, + rotation: MagePresets.DefaultSimpleRotation, talents: MagePresets.FrostfireTalents.data, specOptions: MagePresets.DefaultFFBOptions, consumes: MagePresets.DefaultFireConsumes,