Balance swing at Vestine (#42302)

* AAAAAAAAAAAAAAAAAAAAAAA

* whhops

* full range whoop

* less diff any%

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
This commit is contained in:
Princess Cheeseballs
2026-01-12 23:29:34 -08:00
committed by GitHub
parent de9d8334d1
commit 4cd5d115bf
4 changed files with 20 additions and 15 deletions

View File

@@ -3,6 +3,7 @@ using Content.Server.Botany.Components;
using Content.Shared.EntityEffects;
using Content.Shared.EntityEffects.Effects.Botany;
using Content.Shared.FixedPoint;
using Content.Shared.Random.Helpers;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
@@ -19,12 +20,11 @@ public sealed partial class PlantMutateChemicalsEntityEffectSystem : EntityEffec
return;
var chemicals = entity.Comp.Seed.Chemicals;
var randomChems = _proto.Index(args.Effect.RandomPickBotanyReagent).Fills;
var randomChems = _proto.Index(args.Effect.RandomPickBotanyReagent);
// Add a random amount of a random chemical to this set of chemicals
var pick = _random.Pick(randomChems);
var chemicalId = _random.Pick(pick.Reagents);
var amount = _random.NextFloat(0.1f, (float)pick.Quantity);
var (chemicalId, quantity) = randomChems.Pick(_random);
var amount = FixedPoint2.Max(_random.NextFloat(0f, 1f) * quantity, FixedPoint2.Epsilon);
var seedChemQuantity = new SeedChemQuantity();
if (chemicals.ContainsKey(chemicalId))
{
@@ -34,7 +34,7 @@ public sealed partial class PlantMutateChemicalsEntityEffectSystem : EntityEffec
else
{
//Set the minimum to a fifth of the quantity to give some level of bad luck protection
seedChemQuantity.Min = FixedPoint2.Clamp(pick.Quantity / 5f, FixedPoint2.Epsilon, 1f);
seedChemQuantity.Min = FixedPoint2.Clamp(quantity / 5f, FixedPoint2.Epsilon, 1f);
seedChemQuantity.Max = seedChemQuantity.Min + amount;
seedChemQuantity.Inherent = false;
}

View File

@@ -125,19 +125,19 @@
- type: weightedRandomFillSolution
id: EvilRandomFillSolution
fills:
- quantity: 0.1 # Common but low quantity
weight: 20
- quantity: 0.05 # Common but very low quantity
weight: 40
reagents:
- Nocturine
- MuteToxin
- Lead
- quantity: 0.1
weight: 5 # 99.9% chance of appearing at least once with 60u of vestine with an average of 6.5 occurances.
reagents:
- Vestine
- quantity: 0.5 # High quantity but uncommon
weight: 10
reagents:
- Stimulants
- MuteToxin
- quantity: 0.5 # High quantity but very rare
- quantity: 1.0 # High quantity but on average only 1 per chemical kit
weight: 1
reagents:
- Tazinide
- Lead
- Nocturine
- Stimulants
- Lexorin

View File

@@ -732,6 +732,9 @@
physicalDesc: reagent-physical-desc-starry
flavor: medicine
color: "#2b2f77"
plantMetabolism:
- !type:PlantAdjustToxins
amount: -5
metabolisms:
Medicine:
effects:

View File

@@ -645,6 +645,8 @@
plantMetabolism:
- !type:PlantMutateChemicals
randomPickBotanyReagent: EvilRandomFillSolution
- !type:PlantAdjustToxins
amount: 10
metabolisms:
Poison:
effects: