Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float chill_effect = 0.2;
- Stat stat = {.base = chill_effect};
- // ...
- // This will totally stop the enemy if final_effect is >= 1
- float final_effect = calculate_stat(stat);
- enemy_speed *= 1 - min(1, final_effect);
- // This makes increasing chill weaker and weaker. Will never completely stop the enemy
- float final_effect = 1 / (1 + calculate_stat(stat));
- enemy_speed *= final_effect;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement