v2.4.0: fixed grass droprate lower than intended with no petrified seed

This commit is contained in:
Evan Debenham
2024-04-26 10:46:57 -04:00
parent a44b158328
commit dd9026ee24
2 changed files with 8 additions and 4 deletions
@@ -46,8 +46,12 @@ public class PetrifiedSeed extends Trinket {
} }
public static float grassLootMultiplier( int level ){ public static float grassLootMultiplier( int level ){
if (level <= 0){
return 1f;
} else {
return 1f + .4f*level/3f; return 1f + .4f*level/3f;
} }
}
public static float stoneInsteadOfSeedChance(){ public static float stoneInsteadOfSeedChance(){
return stoneInsteadOfSeedChance(trinketLevel(PetrifiedSeed.class)); return stoneInsteadOfSeedChance(trinketLevel(PetrifiedSeed.class));
@@ -130,7 +130,6 @@ public class HighGrass {
if (Random.Float() < lootChance) { if (Random.Float() < lootChance) {
if (Random.Float() < PetrifiedSeed.stoneInsteadOfSeedChance()) { if (Random.Float() < PetrifiedSeed.stoneInsteadOfSeedChance()) {
//TODO do we want to use decks here in some way?
level.drop(Generator.randomUsingDefaults(Generator.Category.STONE), pos).sprite.drop(); level.drop(Generator.randomUsingDefaults(Generator.Category.STONE), pos).sprite.drop();
} else { } else {
level.drop(Generator.random(Generator.Category.SEED), pos).sprite.drop(); level.drop(Generator.random(Generator.Category.SEED), pos).sprite.drop();
@@ -138,7 +137,8 @@ public class HighGrass {
} }
// Dew, scales from 1/6 to 1/4 // Dew, scales from 1/6 to 1/4
if (Random.Int(6 - naturalismLevel/2) == 0) { lootChance = 1/(6f -naturalismLevel/2f);
if (Random.Float() < lootChance) {
level.drop(new Dewdrop(), pos).sprite.drop(); level.drop(new Dewdrop(), pos).sprite.drop();
} }
} }