math
This commit is contained in:
@@ -40,8 +40,6 @@ Species RandomSpecies() { return static_cast<Species>(GetRandomValue(0, 3)); }
|
||||
RoundConfig MakeRoundConfig(int roundIndex) {
|
||||
RoundConfig cfg;
|
||||
cfg.creature_count = std::min(5 + roundIndex * 2, 20);
|
||||
cfg.marshmallow_supply =
|
||||
std::max(2, (int)std::round(cfg.creature_count * 0.4f));
|
||||
|
||||
float rampedStandard = std::min(0.35f + roundIndex * 0.03f, 0.70f);
|
||||
float remaining = 1.0f - rampedStandard;
|
||||
@@ -51,6 +49,12 @@ RoundConfig MakeRoundConfig(int roundIndex) {
|
||||
cfg.w_subtle2 = remaining * (0.20f / baseRemaining);
|
||||
cfg.w_obvious = remaining * (0.15f / baseRemaining);
|
||||
|
||||
cfg.cryptid_ratio = 0.35f;
|
||||
float ambiguousFraction =
|
||||
(1.0f - cfg.cryptid_ratio) + cfg.cryptid_ratio * cfg.w_standard;
|
||||
float ambiguousCount = cfg.creature_count * ambiguousFraction;
|
||||
cfg.marshmallow_supply = std::max(2, (int)std::round(ambiguousCount * 0.85f));
|
||||
|
||||
return cfg;
|
||||
}
|
||||
|
||||
@@ -81,7 +85,6 @@ Round GenerateRound(const RoundConfig &config) {
|
||||
round.creatures.push_back(c);
|
||||
}
|
||||
|
||||
// Shuffle so cryptids aren't all front-loaded.
|
||||
for (int i = (int)round.creatures.size() - 1; i > 0; --i) {
|
||||
int j = GetRandomValue(0, i);
|
||||
std::swap(round.creatures[i], round.creatures[j]);
|
||||
@@ -111,7 +114,7 @@ bool ResolveCurrentCreature(Round &round, bool captured) {
|
||||
|
||||
bool died = false;
|
||||
if (!captured && c->is_cryptid) {
|
||||
died = true; // let a real cryptid go — run over
|
||||
died = true;
|
||||
} else if (captured && !c->is_cryptid) {
|
||||
round.miscaptures++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user