Skip to content

Commit

Permalink
Run make fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyt857 committed Jul 9, 2023
1 parent 7034d60 commit 10ad294
Show file tree
Hide file tree
Showing 86 changed files with 3,204 additions and 3,196 deletions.
2 changes: 1 addition & 1 deletion sim/druid/survival_instincts.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (druid *Druid) registerSurvivalInstinctsCD() {

druid.SurvivalInstincts = druid.RegisterSpell(core.SpellConfig{
ActionID: actionID,
Flags: SpellFlagOmenTrigger,
Flags: SpellFlagOmenTrigger,
Cast: core.CastConfig{
CD: core.Cooldown{
Timer: cdTimer,
Expand Down
240 changes: 120 additions & 120 deletions ui/balance_druid/presets.ts
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
import {
Consumes,
Debuffs,
EquipmentSpec, Explosive, Faction,
Flask,
Food,
Glyphs,
IndividualBuffs,
PartyBuffs,
Potions,
RaidBuffs,
RaidTarget, Spec,
TristateEffect
Consumes,
Debuffs,
EquipmentSpec, Explosive, Faction,
Flask,
Food,
Glyphs,
IndividualBuffs,
PartyBuffs,
Potions,
RaidBuffs,
RaidTarget, Spec,
TristateEffect
} from '../core/proto/common.js';
import {SavedTalents} from '../core/proto/ui.js';
import { SavedTalents } from '../core/proto/ui.js';

import {
BalanceDruid_Options as BalanceDruidOptions,
BalanceDruid_Rotation as BalanceDruidRotation,
BalanceDruid_Rotation_IsUsage,
BalanceDruid_Rotation_MfUsage,
BalanceDruid_Rotation_Type as RotationType,
BalanceDruid_Rotation_WrathUsage,
DruidMajorGlyph,
DruidMinorGlyph,
BalanceDruid_Options as BalanceDruidOptions,
BalanceDruid_Rotation as BalanceDruidRotation,
BalanceDruid_Rotation_IsUsage,
BalanceDruid_Rotation_MfUsage,
BalanceDruid_Rotation_Type as RotationType,
BalanceDruid_Rotation_WrathUsage,
DruidMajorGlyph,
DruidMinorGlyph,
} from '../core/proto/druid.js';

import * as Tooltips from '../core/constants/tooltips.js';
import {NO_TARGET} from "../core/proto_utils/utils";
import {Player} from "../core/player";
import { NO_TARGET } from "../core/proto_utils/utils";
import { Player } from "../core/player";

// Preset options for this spec.
// Eventually we will import these values for the raid sim too, so its good to
Expand All @@ -36,122 +36,122 @@ import {Player} from "../core/player";
// Default talents. Uses the wowhead calculator format, make the talents on
// https://wowhead.com/wotlk/talent-calc and copy the numbers in the url.
export const Phase1Talents = {
name: 'Phase 1',
data: SavedTalents.create({
talentsString: '5032003115331303213305311231--205003012',
glyphs: Glyphs.create({
major1: DruidMajorGlyph.GlyphOfFocus,
major2: DruidMajorGlyph.GlyphOfInsectSwarm,
major3: DruidMajorGlyph.GlyphOfStarfall,
minor1: DruidMinorGlyph.GlyphOfTyphoon,
minor2: DruidMinorGlyph.GlyphOfUnburdenedRebirth,
minor3: DruidMinorGlyph.GlyphOfTheWild,
}),
}),
name: 'Phase 1',
data: SavedTalents.create({
talentsString: '5032003115331303213305311231--205003012',
glyphs: Glyphs.create({
major1: DruidMajorGlyph.GlyphOfFocus,
major2: DruidMajorGlyph.GlyphOfInsectSwarm,
major3: DruidMajorGlyph.GlyphOfStarfall,
minor1: DruidMinorGlyph.GlyphOfTyphoon,
minor2: DruidMinorGlyph.GlyphOfUnburdenedRebirth,
minor3: DruidMinorGlyph.GlyphOfTheWild,
}),
}),
};

export const Phase2Talents = {
name: 'Phase 2',
data: SavedTalents.create({
talentsString: '5012203115331303213305311231--205003012',
glyphs: Glyphs.create({
major1: DruidMajorGlyph.GlyphOfStarfire,
major2: DruidMajorGlyph.GlyphOfInsectSwarm,
major3: DruidMajorGlyph.GlyphOfStarfall,
minor1: DruidMinorGlyph.GlyphOfTyphoon,
minor2: DruidMinorGlyph.GlyphOfUnburdenedRebirth,
minor3: DruidMinorGlyph.GlyphOfTheWild,
}),
}),
name: 'Phase 2',
data: SavedTalents.create({
talentsString: '5012203115331303213305311231--205003012',
glyphs: Glyphs.create({
major1: DruidMajorGlyph.GlyphOfStarfire,
major2: DruidMajorGlyph.GlyphOfInsectSwarm,
major3: DruidMajorGlyph.GlyphOfStarfall,
minor1: DruidMinorGlyph.GlyphOfTyphoon,
minor2: DruidMinorGlyph.GlyphOfUnburdenedRebirth,
minor3: DruidMinorGlyph.GlyphOfTheWild,
}),
}),
};

export const Phase3Talents = {
name: 'Phase 3',
data: SavedTalents.create({
talentsString: '5102233115331303213305311031--205003002',
glyphs: Glyphs.create({
major1: DruidMajorGlyph.GlyphOfStarfire,
major2: DruidMajorGlyph.GlyphOfMoonfire,
major3: DruidMajorGlyph.GlyphOfStarfall,
minor1: DruidMinorGlyph.GlyphOfTyphoon,
minor2: DruidMinorGlyph.GlyphOfUnburdenedRebirth,
minor3: DruidMinorGlyph.GlyphOfTheWild,
}),
}),
name: 'Phase 3',
data: SavedTalents.create({
talentsString: '5102233115331303213305311031--205003002',
glyphs: Glyphs.create({
major1: DruidMajorGlyph.GlyphOfStarfire,
major2: DruidMajorGlyph.GlyphOfMoonfire,
major3: DruidMajorGlyph.GlyphOfStarfall,
minor1: DruidMinorGlyph.GlyphOfTyphoon,
minor2: DruidMinorGlyph.GlyphOfUnburdenedRebirth,
minor3: DruidMinorGlyph.GlyphOfTheWild,
}),
}),
};

export const DefaultRotation = BalanceDruidRotation.create({
type: RotationType.Default,
maintainFaerieFire: true,
useSmartCooldowns: true,
mfUsage: BalanceDruid_Rotation_MfUsage.BeforeLunar,
isUsage: BalanceDruid_Rotation_IsUsage.MaximizeIs,
wrathUsage: BalanceDruid_Rotation_WrathUsage.RegularWrath,
useStarfire: true,
useBattleRes: false,
playerLatency: 200,
type: RotationType.Default,
maintainFaerieFire: true,
useSmartCooldowns: true,
mfUsage: BalanceDruid_Rotation_MfUsage.BeforeLunar,
isUsage: BalanceDruid_Rotation_IsUsage.MaximizeIs,
wrathUsage: BalanceDruid_Rotation_WrathUsage.RegularWrath,
useStarfire: true,
useBattleRes: false,
playerLatency: 200,
});

export const DefaultOptions = BalanceDruidOptions.create({
innervateTarget: RaidTarget.create({
targetIndex: NO_TARGET,
}),
innervateTarget: RaidTarget.create({
targetIndex: NO_TARGET,
}),
});

export const DefaultConsumes = Consumes.create({
defaultPotion: Potions.PotionOfSpeed,
flask: Flask.FlaskOfTheFrostWyrm,
food: Food.FoodFishFeast,
prepopPotion: Potions.PotionOfWildMagic,
fillerExplosive: Explosive.ExplosiveSaroniteBomb,
defaultPotion: Potions.PotionOfSpeed,
flask: Flask.FlaskOfTheFrostWyrm,
food: Food.FoodFishFeast,
prepopPotion: Potions.PotionOfWildMagic,
fillerExplosive: Explosive.ExplosiveSaroniteBomb,
});

export const DefaultRaidBuffs = RaidBuffs.create({
arcaneBrilliance: true,
bloodlust: true,
divineSpirit: true,
giftOfTheWild: TristateEffect.TristateEffectImproved,
icyTalons: true,
moonkinAura: TristateEffect.TristateEffectImproved,
leaderOfThePack: TristateEffect.TristateEffectImproved,
powerWordFortitude: TristateEffect.TristateEffectImproved,
sanctifiedRetribution: true,
strengthOfEarthTotem: TristateEffect.TristateEffectImproved,
trueshotAura: true,
wrathOfAirTotem: true,
demonicPact: 500,
arcaneBrilliance: true,
bloodlust: true,
divineSpirit: true,
giftOfTheWild: TristateEffect.TristateEffectImproved,
icyTalons: true,
moonkinAura: TristateEffect.TristateEffectImproved,
leaderOfThePack: TristateEffect.TristateEffectImproved,
powerWordFortitude: TristateEffect.TristateEffectImproved,
sanctifiedRetribution: true,
strengthOfEarthTotem: TristateEffect.TristateEffectImproved,
trueshotAura: true,
wrathOfAirTotem: true,
demonicPact: 500,
});

export const DefaultIndividualBuffs = IndividualBuffs.create({
blessingOfKings: true,
blessingOfMight: TristateEffect.TristateEffectImproved,
blessingOfWisdom: TristateEffect.TristateEffectImproved,
vampiricTouch: true,
blessingOfKings: true,
blessingOfMight: TristateEffect.TristateEffectImproved,
blessingOfWisdom: TristateEffect.TristateEffectImproved,
vampiricTouch: true,
});

export const DefaultPartyBuffs = PartyBuffs.create({
heroicPresence: false,
heroicPresence: false,
});

export const DefaultDebuffs = Debuffs.create({
bloodFrenzy: true,
ebonPlaguebringer: true,
faerieFire: TristateEffect.TristateEffectImproved,
heartOfTheCrusader: true,
judgementOfWisdom: true,
shadowMastery: true,
sunderArmor: true,
totemOfWrath: true,
bloodFrenzy: true,
ebonPlaguebringer: true,
faerieFire: TristateEffect.TristateEffectImproved,
heartOfTheCrusader: true,
judgementOfWisdom: true,
shadowMastery: true,
sunderArmor: true,
totemOfWrath: true,
});

export const OtherDefaults = {
distanceFromTarget: 18,
distanceFromTarget: 18,
};

export const P2_PRESET = {
name: 'P2 Preset',
tooltip: Tooltips.BASIC_BIS_DISCLAIMER,
gear: EquipmentSpec.fromJsonString(` {
name: 'P2 Preset',
tooltip: Tooltips.BASIC_BIS_DISCLAIMER,
gear: EquipmentSpec.fromJsonString(` {
"items": [
{
"id": 45497,
Expand Down Expand Up @@ -267,9 +267,9 @@ export const P2_PRESET = {
};

export const P1_PRESET = {
name: 'P1 Preset',
tooltip: Tooltips.BASIC_BIS_DISCLAIMER,
gear: EquipmentSpec.fromJsonString(`{"items": [
name: 'P1 Preset',
tooltip: Tooltips.BASIC_BIS_DISCLAIMER,
gear: EquipmentSpec.fromJsonString(`{"items": [
{
"id": 40467,
"enchant": 3820,
Expand Down Expand Up @@ -363,9 +363,9 @@ export const P1_PRESET = {
};

export const PRE_RAID_PRESET = {
name: 'Pre-raid Preset',
tooltip: Tooltips.BASIC_BIS_DISCLAIMER,
gear: EquipmentSpec.fromJsonString(`{ "items": [
name: 'Pre-raid Preset',
tooltip: Tooltips.BASIC_BIS_DISCLAIMER,
gear: EquipmentSpec.fromJsonString(`{ "items": [
{
"id": 42554,
"enchant": 3820,
Expand Down Expand Up @@ -459,10 +459,10 @@ export const PRE_RAID_PRESET = {
};

export const P3_PRESET_HORDE = {
name: 'P3 Preset Horde',
enableWhen: (player: Player<Spec.SpecBalanceDruid>) => player.getFaction() == Faction.Horde,
tooltip: Tooltips.BASIC_BIS_DISCLAIMER,
gear: EquipmentSpec.fromJsonString(`{"items": [
name: 'P3 Preset Horde',
enableWhen: (player: Player<Spec.SpecBalanceDruid>) => player.getFaction() == Faction.Horde,
tooltip: Tooltips.BASIC_BIS_DISCLAIMER,
gear: EquipmentSpec.fromJsonString(`{"items": [
{
"id": 48174,
"enchant": 3820,
Expand Down Expand Up @@ -573,10 +573,10 @@ export const P3_PRESET_HORDE = {
};

export const P3_PRESET_ALLI = {
name: 'P3 Preset Alliance',
enableWhen: (player: Player<Spec.SpecBalanceDruid>) => player.getFaction() == Faction.Alliance,
tooltip: Tooltips.BASIC_BIS_DISCLAIMER,
gear: EquipmentSpec.fromJsonString(`{"items": [
name: 'P3 Preset Alliance',
enableWhen: (player: Player<Spec.SpecBalanceDruid>) => player.getFaction() == Faction.Alliance,
tooltip: Tooltips.BASIC_BIS_DISCLAIMER,
gear: EquipmentSpec.fromJsonString(`{"items": [
{
"id": 48171,
"enchant": 3820,
Expand Down
4 changes: 2 additions & 2 deletions ui/core/components/base_modal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class BaseModal extends Component {

constructor(parent: HTMLElement, cssClass: string, config: BaseModalConfig = {}) {
super(parent, 'modal');
this.modalConfig = {...DEFAULT_CONFIG, ...config};
this.modalConfig = { ...DEFAULT_CONFIG, ...config };

const modalSizeKlass = this.modalConfig.size && this.modalConfig.size != 'md' ? `modal-${this.modalConfig.size}` : '';

Expand Down Expand Up @@ -83,7 +83,7 @@ export class BaseModal extends Component {

this.modal = new Modal(this.rootElem);
this.open();

this.rootElem.addEventListener('hidden.bs.modal', (event) => {
this.rootElem.remove();
})
Expand Down
6 changes: 3 additions & 3 deletions ui/core/components/character_stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class CharacterStats extends Component {
this.valueElems[idx].prepend(valueElem);

let bonusStatValue = bonusStats.getStat(stat);

if (bonusStatValue == 0) {
valueElem.classList.remove('text-success', 'text-danger');
valueElem.classList.add('text-white');
Expand Down Expand Up @@ -187,10 +187,10 @@ export class CharacterStats extends Component {
displayStr += ` (${((rawValue / Mechanics.BLOCK_RATING_PER_BLOCK_CHANCE) + (Mechanics.MISS_DODGE_PARRY_BLOCK_CRIT_CHANCE_PER_DEFENSE * Math.floor(stats.getStat(Stat.StatDefense) / Mechanics.DEFENSE_RATING_PER_DEFENSE)) + 5.00).toFixed(2)}%)`;
} else if (stat == Stat.StatDodge) {
//displayStr += ` (${(rawValue / Mechanics.DODGE_RATING_PER_DODGE_CHANCE).toFixed(2)}%)`;
displayStr += ` (${(stats.getPseudoStat(PseudoStat.PseudoStatDodge)*100).toFixed(2)}%)`;
displayStr += ` (${(stats.getPseudoStat(PseudoStat.PseudoStatDodge) * 100).toFixed(2)}%)`;
} else if (stat == Stat.StatParry) {
//displayStr += ` (${(rawValue / Mechanics.PARRY_RATING_PER_PARRY_CHANCE).toFixed(2)}%)`;
displayStr += ` (${(stats.getPseudoStat(PseudoStat.PseudoStatParry)*100).toFixed(2)}%)`;
displayStr += ` (${(stats.getPseudoStat(PseudoStat.PseudoStatParry) * 100).toFixed(2)}%)`;
} else if (stat == Stat.StatResilience) {
displayStr += ` (${(rawValue / Mechanics.RESILIENCE_RATING_PER_CRIT_REDUCTION_CHANCE).toFixed(2)}%)`;
}
Expand Down
2 changes: 1 addition & 1 deletion ui/core/components/close_button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class CloseButton extends Component {

constructor(parent: HTMLElement, onClick: () => void, config: CloseButtonConfig = {}) {
super(parent, 'close-button', document.createElement('a'));
this.config = {...DEFAULT_CONFIG, ...config};
this.config = { ...DEFAULT_CONFIG, ...config };

if (this.config.fixed)
this.rootElem.classList.add('position-fixed');
Expand Down
Loading

0 comments on commit 10ad294

Please sign in to comment.