More unit tests, fixes

This commit is contained in:
2026-07-05 19:45:40 +02:00
parent db839ac214
commit 2f51e27811
18 changed files with 1499 additions and 19 deletions

View File

@@ -9,14 +9,19 @@ public class ElectroBall : Script, IScriptChangeBasePower
var user = move.User;
var targetSpeed = target.BoostedStats.Speed;
var userSpeed = user.BoostedStats.Speed;
if (targetSpeed == 0)
{
basePower = 40;
return;
}
var ratio = (float)userSpeed / targetSpeed;
basePower = ratio switch
{
> 4 => 150,
> 3 => 120,
> 2 => 80,
> 1 => 60,
>= 4 => 150,
>= 3 => 120,
>= 2 => 80,
>= 1 => 60,
_ => 40,
};
}