v2.5.0: fixed parchment scrap still affecting RNG in some cases
This commit is contained in:
@@ -569,6 +569,10 @@ public class Armor extends EquipableItem {
|
||||
}
|
||||
level(n);
|
||||
|
||||
//we use a separate RNG here so that variance due to things like parchment scrap
|
||||
//does not affect levelgen
|
||||
Random.pushGenerator(Random.Long());
|
||||
|
||||
//30% chance to be cursed
|
||||
//15% chance to be inscribed
|
||||
float effectRoll = Random.Float();
|
||||
@@ -579,6 +583,8 @@ public class Armor extends EquipableItem {
|
||||
inscribe();
|
||||
}
|
||||
|
||||
Random.popGenerator();
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -332,6 +332,10 @@ abstract public class Weapon extends KindOfWeapon {
|
||||
}
|
||||
level(n);
|
||||
|
||||
//we use a separate RNG here so that variance due to things like parchment scrap
|
||||
//does not affect levelgen
|
||||
Random.pushGenerator(Random.Long());
|
||||
|
||||
//30% chance to be cursed
|
||||
//10% chance to be enchanted
|
||||
float effectRoll = Random.Float();
|
||||
@@ -342,6 +346,8 @@ abstract public class Weapon extends KindOfWeapon {
|
||||
enchant();
|
||||
}
|
||||
|
||||
Random.popGenerator();
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user