Updated house edge for lambchop

This commit is contained in:
barelyprofessional
2026-02-19 19:26:45 -06:00
parent 78e1494a19
commit cda5aca788

View File

@@ -29,7 +29,7 @@ public class LambchopCommand : ICommand
MaxInvocations = 3,
Window = TimeSpan.FromSeconds(15)
};
private static double _houseEdge = 0.015; // house edge hack?
private static double _houseEdge = 0.05; // house edge hack?
// game assets
private const string HAIRSPACE = "";
@@ -188,8 +188,7 @@ public class LambchopCommand : ICommand
// i++;
//continue;
}
else
{
// death by wolf
await UpdateGameAsync();
hazards[i] = WOLF; // add wolf
@@ -202,7 +201,6 @@ public class LambchopCommand : ICommand
//i++;
//continue;
}
}
if (i == (targetTile - 1) && win) // trigger win animation
{
await UpdateGameAsync(); //arrive at targetTile
@@ -232,8 +230,7 @@ public class LambchopCommand : ICommand
//i++;
//continue;
}
else
{
// win in the forrest, medal
hazards[i] = MEDAL; // add medal
if (deathTile != -1 && deathTile < tiles.Count)
@@ -245,7 +242,6 @@ public class LambchopCommand : ICommand
//i++;
//continue;
}
}
if (Money.GetRandomDouble(gambler) <= 0.15)
{
//fakeouts
@@ -328,8 +324,7 @@ public class LambchopCommand : ICommand
{
return -1; // No death tile (player succeeds)
}
else
{
// Player fails - calculate where the death tile appears
double riggingFactor = Money.GetRandomDouble(gambler);
if (_houseEdge > 0 && riggingFactor < _houseEdge * 2) // shitty hack because I made the decision to clamp houseEdge to max 50%
@@ -338,13 +333,10 @@ public class LambchopCommand : ICommand
int minDeathTile = Math.Max(0, FIELD_LENGTH - 3);
return Money.GetRandomNumber(gambler, minDeathTile, FIELD_LENGTH); // return 15 means dying on the last tile xd
}
else
{
// Player fail, random tile in the path becomes death tile
return Money.GetRandomNumber(gambler,0, FIELD_LENGTH);
}
}
}
// Tiles 1 - 15
if (_houseEdge < 0.015)
@@ -370,16 +362,14 @@ public class LambchopCommand : ICommand
// extra rigged fail, choose tile just before target tile
return targetTile > 1 ? targetTile - 1 : 1;
}
else
{
// rigging failed, normal tile return
return Money.GetRandomNumber(gambler,-1, targetTile);
}
}
return fairDeathTile;
}
else
{
// Player would fail in fair game
double riggingFactor = Money.GetRandomDouble(gambler);