Skip to content

Commit

Permalink
add 2 more consumes for p2
Browse files Browse the repository at this point in the history
  • Loading branch information
rosenrusinov committed Feb 3, 2024
1 parent a064ad5 commit 6708717
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 31 deletions.
2 changes: 2 additions & 0 deletions proto/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ enum Potions {
UnknownPotion = 0;
LesserManaPotion = 1;
ManaPotion = 2;
GreaterManaPotion = 3;
}

enum Conjured {
Expand Down Expand Up @@ -361,6 +362,7 @@ enum Food {
FoodHotWolfRibs = 8;
FoodTenderWolfSteak = 9;
FoodSmokedSagefish = 10;
FoodSagefishDelight = 11;
}

enum SaygesFortune {
Expand Down
14 changes: 11 additions & 3 deletions sim/core/consumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ func applyConsumeEffects(agent Agent) {
character.AddStats(stats.Stats{
stats.MP5: 3,
})
case proto.Food_FoodSagefishDelight:
character.AddStats(stats.Stats{
stats.MP5: 6,
})
case proto.Food_FoodGrilledSquid:
character.AddStats(stats.Stats{
stats.Agility: 10,
Expand Down Expand Up @@ -257,20 +261,23 @@ func makeManaConsumableMCD(itemId int32, character *Character, cdTimer *Timer) M
minRoll := map[int32]float64{
3385: 280.0,
3827: 455.0,
6149: 700.0,
4381: 150.0,
12662: 900.0,
}[itemId]

maxRoll := map[int32]float64{
3385: 360.0,
3827: 585.0,
6149: 900.0,
4381: 250.0,
12662: 1500.0,
}[itemId]

cdDuration := map[int32]time.Duration{
3385: time.Minute * 2,
3827: time.Minute * 2,
6149: time.Minute * 2,
4381: time.Minute * 5,
12662: time.Minute * 2,
}[itemId]
Expand Down Expand Up @@ -304,10 +311,11 @@ func makeManaConsumableMCD(itemId int32, character *Character, cdTimer *Timer) M
}

func makePotionActivationInternal(potionType proto.Potions, character *Character, potionCD *Timer) MajorCooldown {
if potionType == proto.Potions_LesserManaPotion || potionType == proto.Potions_ManaPotion {
if potionType == proto.Potions_LesserManaPotion || potionType == proto.Potions_ManaPotion || potionType == proto.Potions_GreaterManaPotion {
itemId := map[proto.Potions]int32{
proto.Potions_LesserManaPotion: 3385,
proto.Potions_ManaPotion: 3827,
proto.Potions_LesserManaPotion: 3385,
proto.Potions_ManaPotion: 3827,
proto.Potions_GreaterManaPotion: 6149,
}[potionType]

return makeManaConsumableMCD(itemId, character, potionCD)
Expand Down
70 changes: 42 additions & 28 deletions ui/core/components/inputs/consumables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@ export const FlaskOfChromaticResistance: ConsumableInputConfig<Flask> = {
};

export const FLASKS_CONFIG: ConsumableStatOption<Flask>[] = [
{ config: FlaskOfTheTitans, stats: [Stat.StatStamina] },
{ config: FlaskOfTheTitans, stats: [Stat.StatStamina] },
{ config: FlaskOfDistilledWisdom, stats: [Stat.StatMP5, Stat.StatSpellPower] },
{ config: FlaskOfSupremePower, stats: [Stat.StatMP5, Stat.StatSpellPower] },
{ config: FlaskOfChromaticResistance, stats: [Stat.StatStamina] },
{ config: FlaskOfSupremePower, stats: [Stat.StatMP5, Stat.StatSpellPower] },
{ config: FlaskOfChromaticResistance, stats: [Stat.StatStamina] },
];

export const makeFlasksInput = makeConsumeInputFactory({consumesFieldName: 'flask'});
Expand Down Expand Up @@ -248,18 +248,25 @@ export const SmokedSagefish: ConsumableInputConfig<Food> = {
]),
value: Food.FoodSmokedSagefish,
};
export const SagefishDelight: ConsumableInputConfig<Food> = {
actionId: (player: Player<Spec>) => player.getMatchingItemActionId([
{ id: 21217, minLevel: 30 },
]),
value: Food.FoodSagefishDelight,
};

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: GrilledSquid, stats: [Stat.StatAgility] },
{ config: HotWolfRibs, stats: [Stat.StatSpirit] },
{ config: SmokedSagefish, stats: [Stat.StatMP5] },
{ 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: GrilledSquid, stats: [Stat.StatAgility] },
{ config: HotWolfRibs, stats: [Stat.StatSpirit] },
{ config: SmokedSagefish, stats: [Stat.StatMP5] },
{ config: SagefishDelight, stats: [Stat.StatMP5] },
];

export const makeFoodInput = makeConsumeInputFactory({consumesFieldName: 'food'});
Expand Down Expand Up @@ -299,9 +306,9 @@ export const ScrollOfAgility: ConsumableInputConfig<AgilityElixir> = {

export const AGILITY_CONSUMES_CONFIG: ConsumableStatOption<AgilityElixir>[] = [
{ config: ElixirOfTheMongoose, stats: [Stat.StatAgility] },
{ config: ElixirOfGreaterAgility, stats: [Stat.StatAgility] },
{ config: ElixirOfGreaterAgility, stats: [Stat.StatAgility] },
{ config: ElixirOfLesserAgility, stats: [Stat.StatAgility] },
{ config: ScrollOfAgility, stats: [Stat.StatAgility] },
{ config: ScrollOfAgility, stats: [Stat.StatAgility] },
];

export const makeAgilityConsumeInput = makeConsumeInputFactory({consumesFieldName: 'agilityElixir'});
Expand Down Expand Up @@ -331,10 +338,10 @@ export const ScrollOfStrength: ConsumableInputConfig<StrengthBuff> = {
};

export const STRENGTH_CONSUMES_CONFIG: ConsumableStatOption<StrengthBuff>[] = [
{ config: JujuPower, stats: [Stat.StatStrength] },
{ config: ElixirOfGiants, stats: [Stat.StatStrength] },
{ config: JujuPower, stats: [Stat.StatStrength] },
{ config: ElixirOfGiants, stats: [Stat.StatStrength] },
{ config: ElixirOfOgresStrength, stats: [Stat.StatStrength] },
{ config: ScrollOfStrength, stats: [Stat.StatStrength] },
{ config: ScrollOfStrength, stats: [Stat.StatStrength] },
];

export const makeStrengthConsumeInput = makeConsumeInputFactory({consumesFieldName: 'strengthBuff'});
Expand All @@ -360,11 +367,18 @@ export const LesserManaPotion: ConsumableInputConfig<Potions> = {
export const ManaPotion: ConsumableInputConfig<Potions> = {
actionId: () => ActionId.fromItemId(3827),
value: Potions.ManaPotion,
minLevel: 22,
};
export const GreaterManaPotion: ConsumableInputConfig<Potions> = {
actionId: () => ActionId.fromItemId(6149),
value: Potions.GreaterManaPotion,
minLevel: 31,
};

export const POTIONS_CONFIG: ConsumableStatOption<Potions>[] = [
{ config: LesserManaPotion, stats: [Stat.StatIntellect] },
{ config: ManaPotion, stats: [Stat.StatIntellect] },
{ config: LesserManaPotion, stats: [Stat.StatIntellect] },
{ config: ManaPotion, stats: [Stat.StatIntellect] },
{ config: GreaterManaPotion, stats: [Stat.StatIntellect] },
];

export const makePotionsInput = makeConsumeInputFactory({consumesFieldName: 'defaultPotion'});
Expand All @@ -388,8 +402,8 @@ export const ArcaneElixir: ConsumableInputConfig<SpellPowerBuff> = {
};

export const SPELL_POWER_CONFIG: ConsumableStatOption<SpellPowerBuff>[] = [
{ config: GreaterArcaneElixir, stats: [Stat.StatSpellPower] },
{ config: ArcaneElixir, stats: [Stat.StatSpellPower] },
{ config: GreaterArcaneElixir, stats: [Stat.StatSpellPower] },
{ config: ArcaneElixir, stats: [Stat.StatSpellPower] },
];

export const makeSpellPowerConsumeInput = makeConsumeInputFactory({consumesFieldName: 'spellPowerBuff'})
Expand All @@ -410,7 +424,7 @@ export const ElixirOfFirepower: ConsumableInputConfig<FirePowerBuff> = {

export const FIRE_POWER_CONFIG: ConsumableStatOption<FirePowerBuff>[] = [
{ config: ElixirOfGreaterFirepower, stats: [Stat.StatFirePower] },
{ config: ElixirOfFirepower, stats: [Stat.StatFirePower] },
{ config: ElixirOfFirepower, stats: [Stat.StatFirePower] },
];

export const makeFirePowerConsumeInput = makeConsumeInputFactory({consumesFieldName: 'firePowerBuff'})
Expand Down Expand Up @@ -487,12 +501,12 @@ export const WildStrikes: ConsumableInputConfig<WeaponImbue> = {
};

export const WEAPON_IMBUES_OH_CONFIG: ConsumableStatOption<WeaponImbue>[] = [
{ config: ElementalSharpeningStone, stats: [Stat.StatAttackPower] },
{ config: BrillianWizardOil, stats: [Stat.StatSpellPower] },
{ config: BrilliantManaOil, stats: [Stat.StatHealing, Stat.StatSpellPower] },
{ config: DenseSharpeningStone, stats: [Stat.StatAttackPower] },
{ config: BlackfathomManaOil, stats: [Stat.StatSpellPower, Stat.StatMP5] },
{ config: BlackfathomSharpeningStone, stats: [Stat.StatMeleeHit] },
{ config: ElementalSharpeningStone, stats: [Stat.StatAttackPower] },
{ config: BrillianWizardOil, stats: [Stat.StatSpellPower] },
{ config: BrilliantManaOil, stats: [Stat.StatHealing, Stat.StatSpellPower] },
{ config: DenseSharpeningStone, stats: [Stat.StatAttackPower] },
{ config: BlackfathomManaOil, stats: [Stat.StatSpellPower, Stat.StatMP5] },
{ config: BlackfathomSharpeningStone, stats: [Stat.StatMeleeHit] },
];

export const WEAPON_IMBUES_MH_CONFIG: ConsumableStatOption<WeaponImbue>[] = [
Expand Down

0 comments on commit 6708717

Please sign in to comment.