Merge pull request #250 from magpie514/master

Adventure mode - Revert RNG
This commit is contained in:
Anthony Calosa
2022-05-05 20:06:45 +08:00
committed by GitHub

View File

@@ -95,7 +95,7 @@ public class RewardData {
if(probability == 0 || WorldSave.getCurrentSave().getWorld().getRandom().nextFloat() <= probability) { if(probability == 0 || WorldSave.getCurrentSave().getWorld().getRandom().nextFloat() <= probability) {
if(type==null || type.isEmpty()) if(type==null || type.isEmpty())
type="randomCard"; type="randomCard";
int addedCount = WorldSave.getCurrentSave().getWorld().getRandom().nextInt(addMaxCount); int addedCount = (int)((float)(addMaxCount)* WorldSave.getCurrentSave().getWorld().getRandom().nextFloat());
if( colors != null && colors.length > 0 ) { //Filter special "colorID" case. if( colors != null && colors.length > 0 ) { //Filter special "colorID" case.
String C = Current.player().getColorIdentityLong(); String C = Current.player().getColorIdentityLong();
for(int i = 0; i < colors.length; i++){ for(int i = 0; i < colors.length; i++){