another tweak to it, for good measure

This commit is contained in:
Putnam3145
2021-11-26 22:49:30 -08:00
parent 2558789015
commit 0ef0991d65
2 changed files with 8 additions and 5 deletions
+3 -2
View File
@@ -73,5 +73,6 @@
TECHWEB_POINT_TYPE_GENERIC = "General Research"\
)
#define TECHWEB_BOMB_MIDPOINT 50000 //Adjust as needed. Actual hard cap is double this, but will never be reached due to hyperbolic curve.
#define TECHWEB_BOMB_SIZE 200 // The shockwave radius required for a bomb to get TECHWEB_BOMB_MIDPOINT points.
#define BOMB_TARGET_POINTS 50000 //Adjust as needed. Actual hard cap is double this, but will never be reached due to hyperbolic curve.
#define BOMB_TARGET_SIZE 200 // The shockwave radius required for a bomb to get TECHWEB_BOMB_MIDPOINT points.
#define BOMB_SUB_TARGET_EXPONENT 2 // The power of the points curve below the target size. Higher = less points for worse bombs, below target.
+5 -3
View File
@@ -194,11 +194,13 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
/*****The Point Calculator*****/
if(orig_light < 1)
if(orig_light < 5)
say("Explosion not large enough for research calculations.")
return
else
point_gain = (TECHWEB_BOMB_MIDPOINT * 2 * orig_light) / (orig_light + TECHWEB_BOMB_SIZE)
else if(orig_light < BOMB_TARGET_SIZE) // we want to give fewer points if below the target; this curve does that
point_gain = (BOMB_TARGET_POINTS * orig_light ** BOMB_SUB_TARGET_EXPONENT) / (BOMB_TARGET_SIZE**BOMB_SUB_TARGET_EXPONENT)
else // once we're at the target, switch to a hyperbolic function so we can't go too far above it, but bigger bombs always get more points
point_gain = (BOMB_TARGET_POINTS * 2 * orig_light) / (orig_light + BOMB_TARGET_SIZE)
/*****The Point Capper*****/
if(point_gain > linked_techweb.largest_bomb_value)