coding and button appearance updates
This commit is contained in:
parent
86f2329f5a
commit
e8269ed69c
@ -156,7 +156,6 @@ function drawEncounterCard(params)
|
||||
-- nothing here, time to reshuffle
|
||||
if reshuffledAlready == true then
|
||||
reshuffledAlready = false
|
||||
-- print something?
|
||||
return
|
||||
end
|
||||
reshuffleEncounterDeck() -- if there is no discard pile either, reshuffleEncounterDeck will give an error message already
|
||||
@ -182,7 +181,7 @@ function actualEncounterCardDraw(card, params)
|
||||
end
|
||||
|
||||
function reshuffleEncounterDeck()
|
||||
--flag to avoid multiple calls
|
||||
-- flag to avoid multiple calls
|
||||
if isReshuffling then return end
|
||||
isReshuffling = true
|
||||
local encounterDeck = getEncounterDeck()
|
||||
@ -190,7 +189,9 @@ function reshuffleEncounterDeck()
|
||||
|
||||
if #discardPile > 0 then
|
||||
local discardDeck = discardPile[1]
|
||||
if not discardDeck.is_face_down then discardDeck.setRotation({0, -90, 180}) end --flips discard pile
|
||||
if not discardDeck.is_face_down then --flips discard pile
|
||||
discardDeck.setRotation({0, -90, 180})
|
||||
end
|
||||
if encounterDeck == nil then
|
||||
discardDeck.setPosition(Vector(ENCOUNTER_DECK_POS) + Vector({0, 1, 0}))
|
||||
discardDeck.shuffle()
|
||||
@ -198,7 +199,7 @@ function reshuffleEncounterDeck()
|
||||
encounterDeck.putObject(discardDeck)
|
||||
encounterDeck.shuffle()
|
||||
end
|
||||
broadcastToAll("Shuffled encounter discard into deck.", "White")
|
||||
broadcastToAll("Shuffled encounter discard into deck.", "White")
|
||||
else
|
||||
broadcastToAll("Encounter discard pile is already empty.", "Red")
|
||||
end
|
||||
|
@ -1,10 +1,3 @@
|
||||
<Panel
|
||||
position="124 40 -13"
|
||||
rotation="0 0 180"
|
||||
height="74" width="74">
|
||||
|
||||
|
||||
<Button scale="0.1 0.1 1" fontsize="62" onClick="reshuffleEncounterDeck">➡</Button>
|
||||
|
||||
|
||||
<Panel position="160 70 -13" rotation="0 0 180" height="74" width="315">
|
||||
<Button scale="0.1 0.1 1" color="#ffffff00" textColors="#ffffff|#88e3cf|#4f8478" font="font_teutonic-arkham" fontSize="62" onClick="reshuffleEncounterDeck">Reshuffle ➡</Button>
|
||||
</Panel>
|
Loading…
Reference in New Issue
Block a user