#textdomain wesnoth-utbs

#! -- Change the difficulty increase model from having computer recruit some lvl2 and 3 units outright
#! -- to advancing or half-advancing recruited lvl 1. At the same time guarantees broader spectrum of opposing units
#! -- as ai advancement is random
#! -- internal variables : $factor
#define RECRUIT_TWEAK
    [event]
        name=recruit
        first_time_only=no
        [filter]
            side=2,3,4
            x=$x1
            y=$y1
        [/filter]

#ifdef MEDIUM
        {VARIABLE factor $unit.max_experience}
        {VARIABLE_OP factor multiply 0.5}
        {RANDOM $factor..$unit.max_experience}
        {VARIABLE unit.experience $random}
#endif
        [unstore_unit]
            variable=unit
            x=$x1
            y=$y1
        [/unstore_unit]
        {CLEAR_VARIABLE factor}
    [/event]
#enddef
