Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onLoad()
- self.createButton({click_function = "Shuffledeck", function_owner = self, label = "Shuffle Deck", position = {0, 0.3, 0}, rotation = {0, 0, 0}, scale = {2,2,2}, width = 800, height = 300, font_size = 100, tooltip = "Place all epidemic cards in the discard pile\nPress to shuffle"})
- end
- function Shuffledeck()
- zone_guid = getObjectFromGUID('1b1018')
- objectsInZone = zone_guid.getObjects()
- for a,b in pairs(objectsInZone) do
- deck1=b
- end
- zone_guid = getObjectFromGUID('da7d70')
- objectsInZone = zone_guid.getObjects()
- for a,b in pairs(objectsInZone) do
- deck2=b
- end
- deck1.shuffle()
- if deck2 then
- splits=deck2.getQuantity()
- deck1split=deck1.split(splits)
- for i=1, splits do
- print(i, " = ", deck1split[i].getQuantity())
- end
- Wait.frames(function() stage1() end,10)
- else
- print("Please place the cards in the Discard Pile.")
- end
- end
- function stage1()
- for I=1, splits do
- epidemic=deck2.takeObject({position={25.00, -10, -20.00}})
- deck1split[i].putObject(epidemic)
- end
- --Wait.frames(function() stage2() end,40)
- end
- function stage2()
- for i=1, splits do
- deck1split[i].shuffle()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement