Skip to main content

do_x_math

Function do_x_math 

Source
pub fn do_x_math(num: i32, operators: &str) -> i32
Expand description

Apply arithmetic operators to a base value. Mirrors Java’s AbilityUtils.doXMath(int num, String operators, Card c, CardTraitBase ctb).

Delegates to the existing svar::do_x_math which already implements all operators (Plus, Minus, NMinus, Twice, Thrice, HalfUp, HalfDown, Negative, Times, Abs, LimitMax, LimitMin, DivideEvenlyUp, DivideEvenlyDown).