Skip to content

Commit

Permalink
Merge pull request #4711 from jjayers99/ShopSeedUpdate
Browse files Browse the repository at this point in the history
Adventure - Shop seed randomization fix
  • Loading branch information
jjayers99 authored Feb 18, 2024
2 parents 8dffcdc + a6a2735 commit 347709f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Random;

/**
* Class to save point of interest changes, like sold cards and dead enemies
Expand Down Expand Up @@ -109,8 +110,7 @@ public long getShopSeed(int objectID){
}

public void generateNewShopSeed(int objectID){

shopSeeds.put(objectID, Current.world().getRandom().nextLong());
shopSeeds.put(objectID, shopSeeds.containsKey(objectID)? new Random(shopSeeds.get(objectID)).nextLong() : Current.world().getRandom().nextLong());
cardsBought.put(objectID, new HashSet<>()); //Allows cards to appear in slots of previous purchases
}

Expand Down
1 change: 1 addition & 0 deletions forge-gui/res/adventure/Shandalar/world/quests.json
Original file line number Diff line number Diff line change
Expand Up @@ -10193,6 +10193,7 @@
"description": "Use Donovan's talisman to contact him.",
"mapFlag": "exploreShand1",
"mapFlagValue": 7,
"worldMapOK": true,
"objective": "QuestFlag",
"prerequisiteIDs": [ 3 ],
"prologue": {
Expand Down

0 comments on commit 347709f

Please sign in to comment.