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:
YoshiCraft64 2024-08-08 12:56:28 -05:00 committed by Robert Paciorek
parent 9ca4dfc7ae
commit 757392d4d5

View File

@ -11,9 +11,75 @@ public class RatingController : Controller
[HttpPost] [HttpPost]
[Produces("application/xml")] [Produces("application/xml")]
[Route("MissionWebService.asmx/GetPayout")] // used by World Of Jumpstart [Route("MissionWebService.asmx/GetPayout")] // used by World Of Jumpstart
public IActionResult GetPayout([FromForm] int points, [FromForm] string ModuleName) { public IActionResult GetPayout([FromForm] int points, [FromForm] string ModuleName) {
// TODO: better calculations, improve module determination code switch (ModuleName)
// for now, a trusty placeholder {
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)); return Ok(points / (350 / 3));
} }