v2.5.0: fixed ghost and smith enchant RNG outcomes affecting levelgen
This commit is contained in:
+7
-3
@@ -469,10 +469,14 @@ public class Blacksmith extends NPC {
|
||||
}
|
||||
|
||||
// 30% base chance to be enchanted, stored separately so status isn't revealed early
|
||||
//we generate first so that the outcome doesn't affect the number of RNG rolls
|
||||
smithEnchant = Weapon.Enchantment.random();
|
||||
smithGlyph = Armor.Glyph.random();
|
||||
|
||||
float enchantRoll = Random.Float();
|
||||
if (enchantRoll <= 0.3f * ParchmentScrap.enchantChanceMultiplier()){
|
||||
smithEnchant = Weapon.Enchantment.random();
|
||||
smithGlyph = Armor.Glyph.random();
|
||||
if (enchantRoll > 0.3f * ParchmentScrap.enchantChanceMultiplier()){
|
||||
smithEnchant = null;
|
||||
smithGlyph = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+7
-3
@@ -351,10 +351,14 @@ public class Ghost extends NPC {
|
||||
armor.upgrade(itemLevel);
|
||||
|
||||
// 20% base chance to be enchanted, stored separately so status isn't revealed early
|
||||
//we generate first so that the outcome doesn't affect the number of RNG rolls
|
||||
enchant = Weapon.Enchantment.random();
|
||||
glyph = Armor.Glyph.random();
|
||||
|
||||
float enchantRoll = Random.Float();
|
||||
if (enchantRoll < 0.2f * ParchmentScrap.enchantChanceMultiplier()){
|
||||
enchant = Weapon.Enchantment.random();
|
||||
glyph = Armor.Glyph.random();
|
||||
if (enchantRoll > 0.2f * ParchmentScrap.enchantChanceMultiplier()){
|
||||
enchant = null;
|
||||
glyph = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user