More unit tests, fixes
This commit is contained in:
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user