]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Balance swing at Vestine (#42302)
authorPrincess Cheeseballs <66055347+Princess-Cheeseballs@users.noreply.github.com>
Tue, 13 Jan 2026 07:29:34 +0000 (23:29 -0800)
committerGitHub <noreply@github.com>
Tue, 13 Jan 2026 07:29:34 +0000 (07:29 +0000)
AAAAAAAAAAAAAAAAAAAAAAA

* whhops

* full range whoop

* less diff any%

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
Content.Server/EntityEffects/Effects/Botany/PlantMutateChemicalsEntityEffectSystem.cs
Resources/Prototypes/Hydroponics/randomChemicals.yml
Resources/Prototypes/Reagents/medicine.yml
Resources/Prototypes/Reagents/toxins.yml

index 1f8f3fc946fe5229d64750a6158c515f1c280ad8..b21bc0b7b3475d7a3407029d045e98f8c8142f8e 100644 (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;
         }
index 52f66ed78f3914a52cd40c139eaf7736a3de7e98..3b8d225c36725277258ab4a3519c5038caa5c8a8 100644 (file)
 - 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:
-    - Vestine
-  - quantity: 0.5 # High quantity but uncommon
-    weight: 10
-    reagents:
-    - Stimulants
+    - Nocturine
     - MuteToxin
-  - quantity: 0.5 # High quantity but very rare
+    - 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: 1.0 # High quantity but on average only 1 per chemical kit
     weight: 1
     reagents:
     - Tazinide
-    - Lead
-    - Nocturine
+    - Stimulants
     - Lexorin
index 1d587ee89ed6f7fa5e629b1f69535f878013b10b..e69a277e4e272b2b57efcb5499206b046c9d41dd 100644 (file)
   physicalDesc: reagent-physical-desc-starry
   flavor: medicine
   color: "#2b2f77"
+  plantMetabolism:
+  - !type:PlantAdjustToxins
+    amount: -5
   metabolisms:
     Medicine:
       effects:
index ce2982d18499cd13f604b357b02738084c976ade..6fb5d3aa7ac5bfb03e98c04822c8288a7a0917e6 100644 (file)
   plantMetabolism:
   - !type:PlantMutateChemicals
     randomPickBotanyReagent: EvilRandomFillSolution
+  - !type:PlantAdjustToxins
+    amount: 10
   metabolisms:
     Poison:
       effects: