fp: Lower prices, Get rid of price multiplier

This commit is contained in:
Joshalosh 2023-10-10 08:53:19 +11:00
parent 169170945b
commit 64cf8787d7
2 changed files with 16 additions and 16 deletions

View File

@ -2054,7 +2054,7 @@ void FP_Update(TELY_Platform *platform, FP_Game *game, TELY_PlatformInput *input
// NOTE: If all enemies for the current wave have been spawned and the cooldown has elapsed // NOTE: If all enemies for the current wave have been spawned and the cooldown has elapsed
// start the next wave. // start the next wave.
if (game->play.enemies_spawned_this_wave >= game->play.enemies_per_wave && game->play.clock_ms >= game->play.wave_cooldown_timestamp_ms) { if (game->play.enemies_spawned_this_wave >= game->play.enemies_per_wave && game->play.clock_ms >= game->play.wave_cooldown_timestamp_ms) {
game->play.enemies_per_wave = DQN_MAX(5 * DQN_CAST(uint32_t)game->play.mob_spawners.size, DQN_CAST(uint32_t)(game->play.enemies_per_wave * 3)); game->play.enemies_per_wave = DQN_MAX(5 * DQN_CAST(uint32_t)game->play.mob_spawners.size, DQN_CAST(uint32_t)(game->play.enemies_per_wave * 1.5));
game->play.enemies_spawned_this_wave = 0; game->play.enemies_spawned_this_wave = 0;
game->play.current_wave++; game->play.current_wave++;
} }
@ -2123,7 +2123,7 @@ void FP_Update(TELY_Platform *platform, FP_Game *game, TELY_PlatformInput *input
Dqn_usize spawn_count = DQN_MIN(game->play.current_wave + 1, 8); Dqn_usize spawn_count = DQN_MIN(game->play.current_wave + 1, 8);
for (Dqn_usize spawn_index = 0; spawn_index < spawn_count; spawn_index++) { for (Dqn_usize spawn_index = 0; spawn_index < spawn_count; spawn_index++) {
uint16_t hp_adjustment = DQN_CAST(uint16_t)game->play.current_wave; uint16_t hp_adjustment = DQN_CAST(uint16_t)game->play.current_wave;
entity->next_spawn_timestamp_s = DQN_CAST(uint64_t)(input->timer_s + 5.f); entity->next_spawn_timestamp_s = DQN_CAST(uint64_t)(input->timer_s + 2.5f);
FP_SentinelListLink<FP_GameEntityHandle> *link = FP_SentinelList_Make(&entity->spawn_list, game->play.chunk_pool); FP_SentinelListLink<FP_GameEntityHandle> *link = FP_SentinelList_Make(&entity->spawn_list, game->play.chunk_pool);
@ -2691,13 +2691,13 @@ void FP_Render(FP_Game *game, TELY_Platform *platform, TELY_Renderer *renderer,
if (mapping.inventory_count) { if (mapping.inventory_count) {
player->coins -= *mapping.building_base_price; player->coins -= *mapping.building_base_price;
TELY_Audio_Play(audio, game->audio[FP_GameAudio_Ching], 1.f); TELY_Audio_Play(audio, game->audio[FP_GameAudio_Ching], 1.f);
*mapping.building_base_price *= 2; *mapping.building_base_price *= 1;
// NOTE: Raise the prices of everything else // NOTE: Raise the prices of everything else
invent->airports_base_price *= 2; invent->airports_base_price *= 1;
invent->clubs_base_price *= 2; invent->clubs_base_price *= 1;
invent->kennels_base_price *= 2; invent->kennels_base_price *= 1;
invent->churchs_base_price *= 2; invent->churchs_base_price *= 1;
(*mapping.inventory_count)++; (*mapping.inventory_count)++;
} }
@ -2776,7 +2776,7 @@ void FP_Render(FP_Game *game, TELY_Platform *platform, TELY_Renderer *renderer,
} else if (TELY_Platform_InputScanCodeIsReleased(input, key)) { } else if (TELY_Platform_InputScanCodeIsReleased(input, key)) {
if (game->play.clock_ms > game->play.player_trigger_purchase_upgrade_timestamp) { if (game->play.clock_ms > game->play.player_trigger_purchase_upgrade_timestamp) {
player->coins -= *mapping.upgrade_base_price; player->coins -= *mapping.upgrade_base_price;
*mapping.upgrade_base_price *= 2; *mapping.upgrade_base_price *= 1;
TELY_Audio_Play(audio, game->audio[FP_GameAudio_Ching], 1.f); TELY_Audio_Play(audio, game->audio[FP_GameAudio_Ching], 1.f);
if (mapping.merchant == game->play.merchant_terry) { if (mapping.merchant == game->play.merchant_terry) {

View File

@ -229,17 +229,17 @@ static FP_GameEntity *FP_Game_MakeEntityPointerFV(FP_Game *game, DQN_FMT_STRING_
result->hp_cap = DQN_CAST(uint32_t)(FP_DEFAULT_DAMAGE * .8f); result->hp_cap = DQN_CAST(uint32_t)(FP_DEFAULT_DAMAGE * .8f);
result->hp = result->hp_cap; result->hp = result->hp_cap;
result->inventory.airports_base_price = 25; result->inventory.airports_base_price = 50;
result->inventory.churchs_base_price = 25; result->inventory.churchs_base_price = 50;
result->inventory.kennels_base_price = 25; result->inventory.kennels_base_price = 50;
result->inventory.clubs_base_price = 25; result->inventory.clubs_base_price = 50;
result->base_attack = FP_DEFAULT_DAMAGE; result->base_attack = FP_DEFAULT_DAMAGE;
result->hp_recover_every_n_ticks = 12; result->hp_recover_every_n_ticks = 12;
result->inventory.stamina_base_price = 5; result->inventory.stamina_base_price = 10;
result->inventory.health_base_price = 5; result->inventory.health_base_price = 10;
result->inventory.mobile_plan_base_price = 5; result->inventory.mobile_plan_base_price = 10;
result->inventory.attack_base_price = 5; result->inventory.attack_base_price = 10;
// NOTE: Attach entity as a child to the parent // NOTE: Attach entity as a child to the parent