Make fishing challenge scale with catch quality
This commit is contained in:
parent
c806e7ca6f
commit
46df74361a
10 changed files with 128 additions and 32 deletions
|
|
@ -16,6 +16,10 @@ const ALL_TIERS_MASK: int = (1 << TIER_COUNT) - 1
|
|||
# multipliers later without changing catch serialization or tier identity.
|
||||
const BASE_ROLL_WEIGHTS: Array[float] = [40.0, 32.0, 18.0, 8.0, 2.0]
|
||||
const SALE_MULTIPLIERS: Array[float] = [1.0, 1.1, 1.25, 1.5, 2.0]
|
||||
# Provisional challenge curve. Fish profiles continue to own their baseline
|
||||
# barrier health; quality scales that authored baseline before player upgrades
|
||||
# apply damage. This keeps future rods, bait, and lures on one shared seam.
|
||||
const BARRIER_HEALTH_MULTIPLIERS: Array[float] = [1.0, 1.25, 1.6, 2.2, 3.25]
|
||||
const DISPLAY_NAMES: PackedStringArray = [
|
||||
"boring",
|
||||
"average",
|
||||
|
|
@ -52,6 +56,24 @@ static func apply_sale_value(base_value: int, quality: int) -> int:
|
|||
)
|
||||
|
||||
|
||||
static func barrier_health_multiplier(quality: int) -> float:
|
||||
return (
|
||||
BARRIER_HEALTH_MULTIPLIERS[quality]
|
||||
if is_valid(quality)
|
||||
else BARRIER_HEALTH_MULTIPLIERS[Tier.BORING]
|
||||
)
|
||||
|
||||
|
||||
static func apply_barrier_health(base_health: int, quality: int) -> int:
|
||||
return maxi(
|
||||
ceili(
|
||||
float(maxi(base_health, 1))
|
||||
* barrier_health_multiplier(quality)
|
||||
),
|
||||
1,
|
||||
)
|
||||
|
||||
|
||||
static func roll(
|
||||
rng: RandomNumberGenerator,
|
||||
weight_multipliers: Array[float] = [],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue