mirror of
https://github.com/SoDOff-Project/sodoff.git
synced 2025-10-11 00:08:50 -07:00
GetPayout update (#14)
Update RatingController.cs for an update to GetPayout Updates GetPayout to have a different payout system for each minigame.
This commit is contained in:
parent
9ca4dfc7ae
commit
757392d4d5
@ -12,8 +12,74 @@ public class RatingController : Controller
|
||||
[Produces("application/xml")]
|
||||
[Route("MissionWebService.asmx/GetPayout")] // used by World Of Jumpstart
|
||||
public IActionResult GetPayout([FromForm] int points, [FromForm] string ModuleName) {
|
||||
// TODO: better calculations, improve module determination code
|
||||
// for now, a trusty placeholder
|
||||
switch (ModuleName)
|
||||
{
|
||||
case string x when x.StartsWith("MSBejeweled"):
|
||||
return Ok(points / (350 / 3));
|
||||
|
||||
case string x when x.StartsWith("MSDodgeNDash"):
|
||||
return Ok((int)Math.Floor(Math.Pow(1.145, (double)points / 10)));
|
||||
|
||||
case string x when x.StartsWith("MSBuggyRacer"):
|
||||
return Ok(points / 4.7);
|
||||
|
||||
case string x when x.StartsWith("MSSoundBop"):
|
||||
return Ok(points * 10);
|
||||
|
||||
case string x when x.StartsWith("MSGhostTownGrab"):
|
||||
return Ok(points / 20);
|
||||
|
||||
case string x when x.StartsWith("BubbleTrouble"):
|
||||
return Ok(points / 10);
|
||||
|
||||
case string x when x.StartsWith("HopsJetPack"):
|
||||
return Ok(points / 25);
|
||||
|
||||
case string x when x.StartsWith("HallowsBubbleMaze"):
|
||||
return Ok(points / 10);
|
||||
|
||||
case string x when x.StartsWith("MSRoboAGoGo"):
|
||||
return Ok(points / 20);
|
||||
|
||||
case string x when x.StartsWith("Volleyball"):
|
||||
return Ok(points / 1.8);
|
||||
|
||||
case string x when x.StartsWith("Football"):
|
||||
return Ok(points / 3.2);
|
||||
|
||||
case string x when x.StartsWith("Basketball"):
|
||||
return Ok(points / 1.8);
|
||||
|
||||
case string x when x.StartsWith("FruitSaladChop"):
|
||||
return Ok(points / 60);
|
||||
|
||||
case string x when x.StartsWith("JSGardenDefense"):
|
||||
return Ok(points / (350/3));
|
||||
|
||||
case string x when x.StartsWith("JSSushiChop"):
|
||||
return Ok(points / 120);
|
||||
|
||||
case string x when x.StartsWith("JSDanceOff"):
|
||||
return Ok(points / (350/3));
|
||||
|
||||
case string x when x.StartsWith("MSPnCow"):
|
||||
return Ok(60);
|
||||
|
||||
case string x when x.StartsWith("MSPnBunny"):
|
||||
return Ok(60);
|
||||
|
||||
case string x when x.StartsWith("MSPnMonkey"):
|
||||
return Ok(60);
|
||||
|
||||
case string x when x.StartsWith("MSCnKite"):
|
||||
return Ok(60);
|
||||
|
||||
case string x when x.StartsWith("MSCnLadyBug"):
|
||||
return Ok(60);
|
||||
|
||||
case string x when x.StartsWith("MSCnDucky"):
|
||||
return Ok(60);
|
||||
}
|
||||
|
||||
return Ok(points / (350 / 3));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user