fix(ai): swap GetDelay bounds so min is the lower one (#2711)
GetDelay sets min to 6.0 - del * 0.75 and max to 6.0 - del * 1.25, so for any Magery above zero min is the larger value. The draw min + (max - min) * r still covers the right interval, but it runs downward and the names say the opposite. Swap the two definitions so min is the lower bound. The interval and its uniform distribution do not change; for a given random draw the delay comes out mirrored.
This commit is contained in:
parent
6b411944b3
commit
24ebce6f84
1 changed files with 2 additions and 2 deletions
|
|
@ -616,8 +616,8 @@ public class MageAI : BaseAI
|
|||
}
|
||||
|
||||
var del = ScaleBySkill(3.0, SkillName.Magery);
|
||||
var min = 6.0 - del * 0.75;
|
||||
var max = 6.0 - del * 1.25;
|
||||
var min = 6.0 - del * 1.25;
|
||||
var max = 6.0 - del * 0.75;
|
||||
|
||||
return TimeSpan.FromSeconds(min + (max - min) * Utility.RandomDouble());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue