Curation round 28 (code only): float pow, log and exp widened to double like the game, inlined HasTrinket preview handling, explicit RNG argument order, update_effects rebuilt in the original's order, weapon vtable slots, null-frame reads, and a parity audit finishing every boss, every enemy, the level and most rooms, grid entities and weapons; misnamed pill and null-item ids corrected (55 duplicates)
This commit is contained in:
1 parent
e66baf4063
commit
719e5ef04d
157 files changed
+1399
-717
No files matched your search
+1
-1
@@ -693,7 +693,7 @@ float Entity_Player::GetGreedDonationJamChance(PersistentGameData& data)
|
||||
if ((uint32_t)playerType >= (uint32_t)COMPLETION_PLAYER_TYPE_COUNT) return DONATION_JAM_UNKNOWN;
|
||||
|
||||
uint32_t donated = data.eventCounters[COMPLETION_MARKS[playerType][COMPLETION_GREED_DONATION].counter];
|
||||
float chance = std::min(std::exp((float)donated * DONATION_JAM_GROWTH) - 1, DONATION_JAM_MAX);
|
||||
float chance = std::min(exp_float((float)donated * DONATION_JAM_GROWTH) - 1, DONATION_JAM_MAX);
|
||||
chance = std::floor(chance * DONATION_JAM_SHARE + HALF);
|
||||
return g_game->difficulty == DIFFICULTY_GREEDIER ? std::min(DONATION_JAM_GREEDIER_MAX, chance) : chance;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user