Skip to content

Commit

Permalink
add crystal yield (#3236)
Browse files Browse the repository at this point in the history
  • Loading branch information
lime-green authored Jul 2, 2023
1 parent 94046b7 commit 38ada9d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions proto/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,8 @@ message Debuffs {

// 1 = normal, 2 = talented, 3 = talented+glyphed
int32 hunters_mark = 35;

bool crystal_yield = 38;
}

enum MobType {
Expand Down
18 changes: 18 additions & 0 deletions sim/core/debuffs.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ func applyDebuffEffects(target *Unit, targetIdx int, debuffs *proto.Debuffs, rai
MakePermanent(SporeCloudAura(target))
}

if debuffs.CrystalYield {
MakePermanent(CrystalYieldAura(target))
}

if debuffs.Mangle && targetIdx == 0 {
MakePermanent(MangleAura(target))
} else if debuffs.Trauma && targetIdx == 0 {
Expand Down Expand Up @@ -952,3 +956,17 @@ func critBonusEffect(aura *Aura, critBonus float64) *ExclusiveEffect {
},
})
}

func CrystalYieldAura(target *Unit) *Aura {
return target.GetOrRegisterAura(Aura{
Label: "Crystal Yield",
ActionID: ActionID{SpellID: 15235},
Duration: 2 * time.Minute,
OnGain: func(aura *Aura, sim *Simulation) {
aura.Unit.stats[stats.Armor] -= 200
},
OnExpire: func(aura *Aura, sim *Simulation) {
aura.Unit.stats[stats.Armor] += 200
},
})
}
1 change: 1 addition & 0 deletions ui/core/components/icon_inputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ export const JudgementOfWisdom = withLabel(makeBooleanDebuffInput(ActionId.fromS
export const JudgementOfLight = makeBooleanDebuffInput(ActionId.fromSpellId(20271), 'judgementOfLight');
export const ShatteringThrow = makeMultistateIndividualBuffInput(ActionId.fromSpellId(64382), 20, 'shatteringThrows');
export const GiftOfArthas = makeBooleanDebuffInput(ActionId.fromSpellId(11374), 'giftOfArthas');
export const CrystalYield = makeBooleanDebuffInput(ActionId.fromSpellId(15235), 'crystalYield');

// Consumes
export const ThermalSapper = makeBooleanConsumeInput(ActionId.fromItemId(42641), 'thermalSapper');
Expand Down
1 change: 1 addition & 0 deletions ui/core/components/individual_sim_ui/settings_tab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ export class SettingsTab extends SimTab {
{ item: IconInputs.JudgementOfLight, stats: [Stat.StatStamina] },
{ item: IconInputs.ShatteringThrow, stats: [Stat.StatArmorPenetration] },
{ item: IconInputs.GiftOfArthas, stats: [Stat.StatAttackPower, Stat.StatRangedAttackPower] },
{ item: IconInputs.CrystalYield, stats: [Stat.StatArmorPenetration] },
] as Array<StatOption<IconPickerConfig<Player<any>, any>>>);
if (miscDebuffOptions.length > 0) {
new MultiIconPicker(contentBlock.bodyElement, this.simUI.player, {
Expand Down

0 comments on commit 38ada9d

Please sign in to comment.