Skip to main content

wowlab_engine_content/generated/items/
algethar_puzzle_box.rs

1//! @generated by codegen-cli from manifests/items.toml (ALGETHAR_PUZZLE_BOX) -- do not edit by hand.
2// Generated code: naming follows game data conventions.
3#![allow(non_snake_case, dead_code)]
4use wowlab_engine_combat::{
5    CombatSystemBuilder, AuraDefinitionDraft, SpellDefinitionDraft,
6};
7use wowlab_engine_gamedata::{ItemBudget, ResolvedGameData};
8///<https://wowlab.gg/inspect/item/193701>
9pub(crate) const ITEM_ID: u32 = 193_701;
10pub(crate) mod SPELL {
11    ///<https://wowlab.gg/inspect/spell/383781>
12    pub(crate) const USE: u32 = 383_781;
13}
14pub(crate) mod AURA {
15    ///<https://wowlab.gg/inspect/spell/383781>
16    pub(crate) const PUZZLE: u32 = 383_781;
17}
18fn aura_puzzle(
19    a: AuraDefinitionDraft,
20    data: &ResolvedGameData,
21    budget: ItemBudget,
22) -> Result<AuraDefinitionDraft, wowlab_engine_combat::BuilderError> {
23    a.on_player()
24        .apply_base_from_data(data, 383_781)?
25        .max_stacks(
26            data.require_aura_max_stacks(wowlab_types::sim::SpellIdx::from_raw(383_781))?,
27        )
28        .rating_per_stack(
29            data,
30            wowlab_types::game::RatingType::Mastery,
31            data.coefficient(wowlab_types::sim::SpellIdx::from_raw(383_781), 1)
32                * budget.rating,
33        )
34}
35fn spell_use(
36    s: SpellDefinitionDraft,
37    data: &ResolvedGameData,
38) -> Result<SpellDefinitionDraft, wowlab_engine_combat::BuilderError> {
39    s.apply_cooldown_pools_from_data(data, 383_781)
40}
41pub(crate) fn register(
42    builder: CombatSystemBuilder,
43    data: &ResolvedGameData,
44    budget: ItemBudget,
45) -> CombatSystemBuilder {
46    crate::items::register_item!(
47        builder, data, "Algethar Puzzle Box", auras : (budget) [(AURA::PUZZLE,
48        aura_puzzle),], spells : [(SPELL::USE, spell_use),]
49    )
50}