Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- when_projectile_hits()
- {
- float damage = calculate_stat(projectile.damageStat);
- if(how_many_times_chained > 0)
- {
- float falloff = calculate_stat_ignore_base(projectile.falloffStat) * (1 / BASE_FALLOFF);
- falloff = 1 / falloff;
- falloff = min(1, falloff);
- falloff = max(0, falloff);
- float nerf_based_on_chains = powf(falloff, how_many_times_chained);
- damage *= nerf_based_on_chains;
- }
- }
- calculate_stat_ignore_base(Stat stat)
- {
- stat.base = 1;
- return calculate_stat(stat);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement