Skip to content

Commit

Permalink
Merge pull request #1058 from wowsims/feature/shaman-p3
Browse files Browse the repository at this point in the history
[SHAMAN][UI] Elemental Shaman P3
  • Loading branch information
1337LutZ authored Sep 26, 2024
2 parents 3bd1b55 + 87b4fbb commit 1eb0e26
Show file tree
Hide file tree
Showing 11 changed files with 4,229 additions and 702 deletions.
2,966 changes: 2,365 additions & 601 deletions sim/shaman/elemental/TestElemental.results

Large diffs are not rendered by default.

26 changes: 22 additions & 4 deletions sim/shaman/elemental/elemental_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,18 @@ func TestElemental(t *testing.T) {
OtherRaces: []proto.Race{proto.Race_RaceOrc},

GearSet: core.GetGearSet("../../../ui/shaman/elemental/gear_sets", "p1"),
OtherGearSets: []core.GearSetCombo{
core.GetGearSet("../../../ui/shaman/elemental/gear_sets", "p3.default"),
core.GetGearSet("../../../ui/shaman/elemental/gear_sets", "p3.cleave-aoe"),
},
Talents: TalentsTotemDuration,
Glyphs: StandardGlyphs,
OtherTalentSets: []core.TalentsCombo{
{
Label: "TalentsAoE",
Talents: TalentsImprovedShields,
Glyphs: AoEGlyphs,
},
{
Label: "TalentsImprovedShields",
Talents: TalentsImprovedShields,
Expand Down Expand Up @@ -61,16 +70,24 @@ var StandardGlyphs = &proto.Glyphs{
Prime2: int32(proto.ShamanPrimeGlyph_GlyphOfLavaBurst),
Prime3: int32(proto.ShamanPrimeGlyph_GlyphOfLightningBolt),
Major1: int32(proto.ShamanMajorGlyph_GlyphOfLightningShield),
Major2: int32(proto.ShamanMajorGlyph_GlyphOfThunder),
Major3: int32(proto.ShamanMajorGlyph_GlyphOfFireNova),
Major2: int32(proto.ShamanMajorGlyph_GlyphOfHealingStreamTotem),
Major3: int32(proto.ShamanMajorGlyph_GlyphOfStoneclawTotem),
}
var AoEGlyphs = &proto.Glyphs{
Prime1: int32(proto.ShamanPrimeGlyph_GlyphOfFlameShock),
Prime2: int32(proto.ShamanPrimeGlyph_GlyphOfLavaBurst),
Prime3: int32(proto.ShamanPrimeGlyph_GlyphOfLightningBolt),
Major1: int32(proto.ShamanMajorGlyph_GlyphOfLightningShield),
Major2: int32(proto.ShamanMajorGlyph_GlyphOfChainLightning),
Major3: int32(proto.ShamanMajorGlyph_GlyphOfStoneclawTotem),
}
var AlternateGlyphs = &proto.Glyphs{
Prime1: int32(proto.FireTotem_FireElementalTotem),
Prime2: int32(proto.ShamanImbue_FlametongueWeapon),
Prime3: int32(proto.ShamanPrimeGlyph_GlyphOfUnleashedLightning),
Major1: int32(proto.ShamanMajorGlyph_GlyphOfLightningShield),
Major2: int32(proto.ShamanMajorGlyph_GlyphOfThunder),
Major3: int32(proto.ShamanMajorGlyph_GlyphOfChainLightning),
Major2: int32(proto.ShamanMajorGlyph_GlyphOfHealingStreamTotem),
Major3: int32(proto.ShamanMajorGlyph_GlyphOfStoneclawTotem),
}

var NoTotems = &proto.ShamanTotems{}
Expand Down Expand Up @@ -121,4 +138,5 @@ var FullConsumes = &proto.Consumes{
DefaultPotion: proto.Potions_VolcanicPotion,
PrepopPotion: proto.Potions_VolcanicPotion,
DefaultConjured: proto.Conjured_ConjuredDarkRune,
TinkerHands: proto.TinkerHands_TinkerHandsSynapseSprings,
}
2 changes: 1 addition & 1 deletion sim/shaman/talents.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func (shaman *Shaman) applyRollingThunder() {
aura.Activate(sim)
},
OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
if (spell == shaman.LightningBolt || spell == shaman.ChainLightning || spell == shaman.LightningBoltOverload) && shaman.SelfBuffs.Shield == proto.ShamanShield_LightningShield {
if (spell.Matches(SpellMaskLightningBolt | SpellMaskLightningBoltOverload | SpellMaskChainLightning | SpellMaskChainLightningOverload)) && shaman.SelfBuffs.Shield == proto.ShamanShield_LightningShield {
// for _, allowedSpell := range allowedSpells {
// if spell == allowedSpell {
if sim.RandomFloat("Rolling Thunder") < 0.3*float64(shaman.Talents.RollingThunder) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { ref } from 'tsx-vanilla';

import { IndividualSimUI } from '../../individual_sim_ui';
import { PresetBuild } from '../../preset_utils';
import { APLRotation } from '../../proto/apl';
import { Encounter, EquipmentSpec, HealingModel, Spec } from '../../proto/common';
import { APLRotation, APLRotation_Type } from '../../proto/apl';
import { Encounter, EquipmentSpec, Glyphs, HealingModel, Spec } from '../../proto/common';
import { TypedEvent } from '../../typed_event';
import { Component } from '../component';
import { ContentBlock } from '../content_block';
Expand Down Expand Up @@ -86,7 +86,10 @@ export class PresetConfigurationPicker extends Component {
const eventID = TypedEvent.nextEventID();
TypedEvent.freezeAllAndDo(() => {
if (gear) this.simUI.player.setGear(eventID, this.simUI.sim.db.lookupEquipmentSpec(gear.gear));
if (talents) this.simUI.player.setTalentsString(eventID, talents.data.talentsString);
if (talents) {
this.simUI.player.setTalentsString(eventID, talents.data.talentsString);
if (talents.data.glyphs) this.simUI.player.setGlyphs(eventID, talents.data.glyphs);
}
if (rotation?.rotation.rotation) {
this.simUI.player.setAplRotation(eventID, rotation.rotation.rotation);
}
Expand All @@ -106,11 +109,18 @@ export class PresetConfigurationPicker extends Component {
private isBuildActive({ gear, rotation, talents, epWeights, encounter }: PresetBuild): boolean {
const hasGear = gear ? EquipmentSpec.equals(gear.gear, this.simUI.player.getGear().asSpec()) : true;
const hasTalents = talents ? talents.data.talentsString == this.simUI.player.getTalentsString() : true;
const hasRotation = rotation ? APLRotation.equals(rotation.rotation.rotation, this.simUI.player.aplRotation) : true;
const hasGlyphs = talents?.data.glyphs ? Glyphs.equals(this.simUI.player.getGlyphs(), talents.data.glyphs) : true;
let hasRotation = true;
if (rotation) {
const activeRotation = this.simUI.player.getResolvedAplRotation();
// Ensure that the auto rotation can be matched with a preset
if (activeRotation.type === APLRotation_Type.TypeAuto) activeRotation.type = APLRotation_Type.TypeAPL;
hasRotation = APLRotation.equals(rotation.rotation.rotation, activeRotation);
}
const hasEpWeights = epWeights ? this.simUI.player.getEpWeights().equals(epWeights.epWeights) : true;
const hasEncounter = encounter?.encounter ? Encounter.equals(encounter.encounter, this.simUI.sim.encounter.toProto()) : true;
const hasHealingModel = encounter?.healingModel ? HealingModel.equals(encounter.healingModel, this.simUI.player.getHealingModel()) : true;

return hasGear && hasTalents && hasRotation && hasEpWeights && hasEncounter && hasHealingModel;
return hasGear && hasTalents && hasGlyphs && hasRotation && hasEpWeights && hasEncounter && hasHealingModel;
}
}
Loading

0 comments on commit 1eb0e26

Please sign in to comment.