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);
|
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
|
//30% chance to be cursed
|
||||||
//15% chance to be inscribed
|
//15% chance to be inscribed
|
||||||
float effectRoll = Random.Float();
|
float effectRoll = Random.Float();
|
||||||
@@ -579,6 +583,8 @@ public class Armor extends EquipableItem {
|
|||||||
inscribe();
|
inscribe();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Random.popGenerator();
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -332,6 +332,10 @@ abstract public class Weapon extends KindOfWeapon {
|
|||||||
}
|
}
|
||||||
level(n);
|
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
|
//30% chance to be cursed
|
||||||
//10% chance to be enchanted
|
//10% chance to be enchanted
|
||||||
float effectRoll = Random.Float();
|
float effectRoll = Random.Float();
|
||||||
@@ -342,6 +346,8 @@ abstract public class Weapon extends KindOfWeapon {
|
|||||||
enchant();
|
enchant();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Random.popGenerator();
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user