Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move rogue to Beta APL #3747

Merged
merged 1 commit into from
Sep 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
728 changes: 364 additions & 364 deletions sim/rogue/TestAssassination.results

Large diffs are not rendered by default.

1,434 changes: 1,053 additions & 381 deletions sim/rogue/TestCombat.results

Large diffs are not rendered by default.

508 changes: 254 additions & 254 deletions sim/rogue/TestSubtlety.results

Large diffs are not rendered by default.

478 changes: 151 additions & 327 deletions sim/rogue/rogue_test.go

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions ui/core/components/individual_sim_ui/apl_actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export class APLActionPicker extends Input<Player<any>, APLAction> {
getValue: (player: Player<any>) => this.getSourceValue()?.action.oneofKind,
setValue: (eventID: EventID, player: Player<any>, newKind: APLActionKind) => {
const sourceValue = this.getSourceValue();
const oldKind = sourceValue.action.oneofKind;
const oldKind = sourceValue?.action.oneofKind;
if (oldKind == newKind) {
return;
}
Expand Down Expand Up @@ -216,9 +216,12 @@ export class APLActionPicker extends Input<Player<any>, APLAction> {
const factory = actionKindFactories[newActionKind];
this.actionPicker = factory.factory(this.actionDiv, this.modObject, {
changedEvent: (player: Player<any>) => player.rotationChangeEmitter,
getValue: () => (this.getSourceValue().action as any)[newActionKind] || factory.newValue(),
getValue: () => (this.getSourceValue()?.action as any)?.[newActionKind] || factory.newValue(),
setValue: (eventID: EventID, player: Player<any>, newValue: any) => {
(this.getSourceValue().action as any)[newActionKind] = newValue;
const sourceValue = this.getSourceValue();
if (sourceValue) {
(sourceValue?.action as any)[newActionKind] = newValue;
}
player.rotationChangeEmitter.emit(eventID);
},
});
Expand Down
2 changes: 1 addition & 1 deletion ui/core/launched_sims.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const aplLaunchStatuses: Record<Spec, LaunchStatus> = {
[Spec.SpecRestorationShaman]: LaunchStatus.Beta,
[Spec.SpecHunter]: LaunchStatus.Launched,
[Spec.SpecMage]: LaunchStatus.Beta,
[Spec.SpecRogue]: LaunchStatus.Alpha,
[Spec.SpecRogue]: LaunchStatus.Beta,
[Spec.SpecHolyPaladin]: LaunchStatus.Beta,
[Spec.SpecProtectionPaladin]: LaunchStatus.Beta,
[Spec.SpecRetributionPaladin]: LaunchStatus.Beta,
Expand Down
282 changes: 274 additions & 8 deletions ui/rogue/presets.ts

Large diffs are not rendered by default.

31 changes: 30 additions & 1 deletion ui/rogue/sim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ import {
TristateEffect,
WeaponType
} from '../core/proto/common.js';
import {
APLAction,
APLListItem,
APLRotation,
} from '../core/proto/apl.js';
import { Player } from '../core/player.js';
import { Stats } from '../core/proto_utils/stats.js';
import { IndividualSimUI } from '../core/individual_sim_ui.js';
Expand Down Expand Up @@ -367,8 +372,17 @@ export class RogueSimUI extends IndividualSimUI<Spec.SpecRogue> {
Presets.SubtletyTalents,
Presets.HemoSubtletyTalents,
],
// Preset rotations that the user can quickly select.
rotations: [
Presets.ROTATION_APL_PRESET,
Presets.ROTATION_PRESET_MUTILATE,
Presets.ROTATION_PRESET_MUTILATE_EXPOSE,
Presets.ROTATION_PRESET_RUPTURE_MUTILATE,
Presets.ROTATION_PRESET_RUPTURE_MUTILATE_EXPOSE,
Presets.ROTATION_PRESET_COMBAT,
Presets.ROTATION_PRESET_COMBAT_EXPOSE,
Presets.ROTATION_PRESET_COMBAT_CLEAVE_SND,
Presets.ROTATION_PRESET_COMBAT_CLEAVE_SND_EXPOSE,
Presets.ROTATION_PRESET_AOE,
],
// Preset gear configurations that the user can quickly select.
gear: [
Expand All @@ -386,6 +400,21 @@ export class RogueSimUI extends IndividualSimUI<Spec.SpecRogue> {
Presets.P3_PRESET_DANCE_SUB,
],
},

autoRotation: (player: Player<Spec.SpecRogue>): APLRotation => {
const talentTree = player.getTalentTree();
const numTargets = player.sim.encounter.targets.length;
if (numTargets >= 5) {
return Presets.ROTATION_PRESET_AOE.rotation.rotation!;
} else if (talentTree == 0) {
return Presets.ROTATION_PRESET_MUTILATE_EXPOSE.rotation.rotation!;
} else if (talentTree == 1) {
return Presets.ROTATION_PRESET_COMBAT_EXPOSE.rotation.rotation!;
} else {
// TODO: Need a sub rotation here
return Presets.ROTATION_PRESET_MUTILATE_EXPOSE.rotation.rotation!;
}
},
})
this.player.changeEmitter.on((c) => {
const rotation = this.player.getRotation()
Expand Down
Loading