More unit tests, fixes

This commit is contained in:
Deukhoofd committed 2026-07-05 19:45:40 +02:00
1 parent db839ac214
commit 2f51e27811
18 files changed
+1499 -19

No files matched your search

@@ -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,
};
}