Skip to content

implemented stats! and rotation! macros - #9

Merged
lambdv merged 6 commits into
mainfrom
feat/macros
Jun 29, 2026
Merged

implemented stats! and rotation! macros#9
lambdv merged 6 commits into
mainfrom
feat/macros

Conversation

@lambdv

@lambdv lambdv commented Jun 29, 2026

Copy link
Copy Markdown
Owner

implemented stats! and rotation! macros for creating stat tables and rotations easily
before:

StatTable::of(&[
        (Stat::ATKPercent, 0.88),
        (Stat::CritRate, 0.55),
        (Stat::CryoDMGBonus, 0.73),
        (Stat::NormalATKDMGBonus, 0.3),
        (Stat::ChargeATKDMGBonus, 0.3),
        (Stat::CryoResistanceReduction, 0.4),
 ]);
Rotation::of(vec![
    default_cryo_na_formula("n1", &ayaka, 0.84, 3, None),
    default_cryo_na_formula("n2", &ayaka, 0.894, 2, None),
    default_cryo_na_formula("ca", &ayaka, 3.039, 2, None),
    default_cryo_e_formula("skill", &ayaka, 4.07, 2, None),
    default_cryo_q_formula("burstcuts", &ayaka, 1.91, 19, None),
    default_cryo_q_formula("burstexplosion", &ayaka, 2.86, 1, None),
]);

after

stats! {
  Stat::ATKPercent: 0.88, // 4pc no + 4pc tom + ttds 
  Stat::CritRate: 0.55, // 4pc bs + 
  Stat::CryoDMGBonus: 0.73,
  Stat::NormalATKDMGBonus: 0.3,
  Stat::ChargeATKDMGBonus: 0.3,
  Stat::CryoResistanceReduction: 0.4,
};
rotation! {
        ("n1", Element::Cryo, DamageType::Normal, BaseScaling::ATK, Amplifier::None, 0.84, 3.0, None),
        ("n2", Element::Cryo, DamageType::Normal, BaseScaling::ATK, Amplifier::None, 0.894, 2.0, None),
        ("ca", Element::Cryo, DamageType::Normal, BaseScaling::ATK, Amplifier::None, 3.039, 2.0, None),
        ("skill", Element::Cryo, DamageType::Skill, BaseScaling::ATK, Amplifier::None, 4.07, 2.0, None),
        ("burstcuts", Element::Cryo, DamageType::Burst, BaseScaling::ATK, Amplifier::None, 1.91, 19.0, None),
        ("burstexplosion", Element::Cryo, DamageType::Burst, BaseScaling::ATK, Amplifier::None, 2.86, 1.0, None),
    };

@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
aminus Ready Ready Preview, Comment Jun 29, 2026 6:17am

@lambdv
lambdv merged commit cc0ca68 into main Jun 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant