12345678910111213141516171819202122232425262728293031323334353637383940 |
- # deckShuffle
- killvar 'deckFace'
- killvar '$deckImg'
- i = 0
- :loop1
- if i < 4:
- i += 1
- if i = 1: $text = 'Spades'
- if i = 2: $text = 'Hearts'
- if i = 3: $text = 'Clubs'
- if i = 4: $text = 'Diamonds'
- j = 0
- :loop2
- if j < 13:
- j += 1
- deckFace[] = j
- $deckImg[] = 'images/locations/city/industrial/casino/cards/<<$text>>/<<j>>.jpg'
- jump 'loop2'
- end
- jump 'loop1'
- end
- i = 0
- :loop3
- if i < 52:
- j = rand(0, 51)
- temp = deckFace[i]
- deckFace[i] = deckFace[j]
- deckFace[j] = temp
- $text = $deckImg[i]
- $deckImg[i] = $deckImg[j]
- $deckImg[j] = $text
- i += 1
- jump 'loop3'
- end
- --- deckShuffle ---------------------------------
|