Skip to content

Commit

Permalink
add dragonbreath chili
Browse files Browse the repository at this point in the history
  • Loading branch information
kayla-glick committed Feb 13, 2024
1 parent 3f5da51 commit 440d2a6
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 15 deletions.
2 changes: 2 additions & 0 deletions proto/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ enum WeaponImbue {
WindfuryWeapon = 12;
}

// NextIndex: 13
enum Food {
FoodUnknown = 0;
FoodGrilledSquid = 1;
Expand All @@ -397,6 +398,7 @@ enum Food {
FoodTenderWolfSteak = 9;
FoodSmokedSagefish = 10;
FoodSagefishDelight = 11;
FoodDragonbreathChili = 12;
}

enum SaygesFortune {
Expand Down
38 changes: 38 additions & 0 deletions sim/core/consumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ func applyConsumeEffects(agent Agent, partyBuffs *proto.PartyBuffs) {
character.AddStats(stats.Stats{
stats.Strength: 10,
})
case proto.Food_FoodDragonbreathChili:
MakePermanent(DragonBreathChiliAura(&character.Unit))
}
}

Expand Down Expand Up @@ -350,6 +352,42 @@ func registerExplosivesCD(agent Agent, consumes *proto.Consumes) {
}
}

func DragonBreathChiliAura(unit *Unit) *Aura {
baseDamage := 60.0
procChance := .05

procSpell := unit.RegisterSpell(SpellConfig{
ActionID: ActionID{SpellID: 15851},
SpellSchool: SpellSchoolFire,
ProcMask: ProcMaskEmpty,
Flags: SpellFlagNone,

DamageMultiplier: 1,
CritMultiplier: 1,
ThreatMultiplier: 1,

ApplyEffects: func(sim *Simulation, target *Unit, spell *Spell) {
spell.CalcAndDealDamage(sim, target, baseDamage+spell.SpellDamage(), spell.OutcomeMagicHitAndCrit)
},
})

aura := unit.GetOrRegisterAura(Aura{
Label: "Dragonbreath Chili",
ActionID: ActionID{SpellID: 15852},
Duration: NeverExpires,
OnSpellHitDealt: func(aura *Aura, sim *Simulation, spell *Spell, result *SpellResult) {
if !result.Landed() || !spell.ProcMask.Matches(ProcMaskMelee) {
return
}

if sim.RandomFloat("Dragonbreath Chili") < procChance {
procSpell.Cast(sim, result.Target)
}
},
})
return aura
}

// Creates a spell object for the common explosive case.
func (character *Character) newBasicExplosiveSpellConfig(sharedTimer *Timer, actionID ActionID, school SpellSchool, minDamage float64, maxDamage float64, cooldown Cooldown, selfMinDamage float64, selfMaxDamage float64) SpellConfig {
isSapper := actionID.SameAction(SapperActionID)
Expand Down
36 changes: 21 additions & 15 deletions ui/core/components/inputs/consumables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@ export const DirgesKickChimaerokChops: ConsumableInputConfig<Food> = {
]),
value: Food.FoodDirgesKickChimaerokChops,
};
export const GrilledSquid: ConsumableInputConfig<Food> = {
actionId: (player: Player<Spec>) => player.getMatchingItemActionId([
{ id: 13928, minLevel: 50 },
]),
value: Food.FoodGrilledSquid,
};
export const SmokedDesertDumpling: ConsumableInputConfig<Food> = {
actionId: (player: Player<Spec>) => player.getMatchingItemActionId([
{ id: 20452, minLevel: 45 },
Expand All @@ -271,24 +277,24 @@ export const BlessedSunfruitJuice: ConsumableInputConfig<Food> = {
]),
value: Food.FoodBlessedSunfruitJuice,
};
export const TenderWolfSteak: ConsumableInputConfig<Food> = {
actionId: (player: Player<Spec>) => player.getMatchingItemActionId([
{ id: 18045, minLevel: 40 },
]),
value: Food.FoodTenderWolfSteak
};
export const NightfinSoup: ConsumableInputConfig<Food> = {
actionId: (player: Player<Spec>) => player.getMatchingItemActionId([
// Requires Skill 250
{ id: 13931, minLevel: 41 },
]),
value: Food.FoodNightfinSoup,
};
export const GrilledSquid: ConsumableInputConfig<Food> = {
export const TenderWolfSteak: ConsumableInputConfig<Food> = {
actionId: (player: Player<Spec>) => player.getMatchingItemActionId([
{ id: 13928, minLevel: 50 },
{ id: 18045, minLevel: 40 },
]),
value: Food.FoodGrilledSquid,
value: Food.FoodTenderWolfSteak
};
export const DragonBreathChili: ConsumableInputConfig<Food> = {
actionId: (player: Player<Spec>) => player.getMatchingItemActionId([
{ id: 12217, minLevel: 35 },
]),
value: Food.FoodDragonbreathChili
};
export const HotWolfRibs: ConsumableInputConfig<Food> = {
actionId: (player: Player<Spec>) => player.getMatchingItemActionId([
Expand All @@ -310,17 +316,17 @@ export const SagefishDelight: ConsumableInputConfig<Food> = {
};

export const FOOD_CONFIG: ConsumableStatOption<Food>[] = [
{ config: DirgesKickChimaerokChops, stats: [Stat.StatStamina] },
{ config: SmokedDesertDumpling, stats: [Stat.StatStrength] },
{ config: RunnTumTuberSurprise, stats: [Stat.StatIntellect] },
{ config: BlessSunfruit, stats: [Stat.StatStrength] },
{ config: BlessedSunfruitJuice, stats: [Stat.StatSpirit] },
{ config: TenderWolfSteak, stats: [Stat.StatStamina, Stat.StatSpirit] },
{ config: NightfinSoup, stats: [Stat.StatMP5, Stat.StatSpellPower] },
{ config: DirgesKickChimaerokChops, stats: [Stat.StatStamina] },
{ config: DragonBreathChili, stats: [] },
{ config: GrilledSquid, stats: [Stat.StatAgility] },
{ config: HotWolfRibs, stats: [Stat.StatSpirit] },
{ config: SmokedSagefish, stats: [Stat.StatMP5] },
{ config: RunnTumTuberSurprise, stats: [Stat.StatIntellect] },
{ config: SagefishDelight, stats: [Stat.StatMP5] },
{ config: SmokedDesertDumpling, stats: [Stat.StatStrength] },
{ config: SmokedSagefish, stats: [Stat.StatMP5] },
{ config: TenderWolfSteak, stats: [Stat.StatStamina, Stat.StatSpirit] },
];

export const makeFoodInput = makeConsumeInputFactory({consumesFieldName: 'food'});
Expand Down

0 comments on commit 440d2a6

Please sign in to comment.