Color and RNG fixes

This commit is contained in:
Pyrex 2024-02-08 16:41:40 -08:00
parent 5dc6f763cd
commit ef1c014575
5 changed files with 31 additions and 22 deletions

View File

@ -20,12 +20,19 @@ end
function main:draw()
cls(13)
self.board:draw()
pal(1,0,1)
pal(3,-5,1)
pal(4,-7,1)
pal(12,12,1)
pal(11,-5,1)
pal(13,-8,1)
pal(14,5,1)
-- bg
pal(13,-3,1)
-- arcana
-- pal(1,0,1)
pal(15,-9,1)
-- suits
pal(4,-11,1) -- first suit
pal(12,12,1)
pal(2,-8,1)
pal(3,-5,1)
-- pal(8,-9,1)
-- pal(14,8,1)
end

14
main.p8
View File

@ -11,13 +11,13 @@ __lua__
#include progression.lua
#include main.lua
__gfx__
00000000070000007770000000700000007000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
70700000070000007770000007000000770000000707070000000000000000000000000000000000000000000000000000000000000000000000000000000000
07000000070000007770000007000000070000000077770000000000000000000000000000000000000000000000000000000000000000000000000000000000
70700000777000000700000070000000070000000770700000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000070000007770000070000000077000000077777000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000700777000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000777770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000007000000777000000070000700070000707070000000000000000000000000000000000000000000000000000000000000000000000000000000000
07070000007000000777000000700000707070000077770000000000000000000000000000000000000000000000000000000000000000000000000000000000
00700000007000000777000000700000707070000770700000000000000000000000000000000000000000000000000000000000000000000000000000000000
07070000077700000070000007000000777070000077777000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000007000000777000007000000700070000700777000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000707770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000070000000700000007000000000000000000000000000000000000000000000000000
00000000000070000000700000700070007000700070007000700070007000700070007000700070070707000707070007070700000000000000000000000000

View File

@ -10,7 +10,7 @@ progression={
-- level 5
-- ruleset:new(9,3,11,18),
-- fortune's foundation
-- ruleset:new(11,4,13,22)
ruleset:new(11,4,13,22)
-- harder than fortune's foundation
ruleset:new(11,5,10,25)
-- ruleset:new(11,5,10,25)
}

View File

@ -50,7 +50,7 @@ end
function ruleset:generate_deck()
local ruleset=self
local possible_suits={"p","s","c","w","b"}
local possible_suits={"c","s","p","w","b"}
local deck={
aces={},
suits={},
@ -82,10 +82,10 @@ function ruleset:generate_deck()
local s,fg
local bg,shadowbg
if meta.suit=='a' then
if meta.suit=='a' or meta.suit=='b' then
bg,shadowbg=1,1
if (shadow) bg,shadowbg=1,1
if (is_extreme) bg,shadowbg=8,8
if (is_extreme) bg,shadowbg=15,15
else
bg,shadowbg=7,7
--if (shadow) bg,shadowbg=7,6
@ -104,16 +104,18 @@ function ruleset:generate_deck()
if meta.suit=='a' then
local rank=""..meta.rank
pal(7,15)
if (is_extreme) pal(7,0)
if (is_extreme) pal(7,1)
print(meta.rank,x+5-#rank*2,y+1,7)
spr(5,x,y+8)
pal()
else
local name=sub(deck.rank_name,meta.rank,meta.rank)
local x2=x
if (meta.suit=='b') x2+=1
rectfill(x,y,x+3,y+6,fg)
print(name,x,y+1,7)
print(name,x2,y+1,bg)
pal(7,fg)
spr(s,x+5,y+1)
spr(s,x+4,y)
if not shadow then
spr(15+meta.rank,x,y+8)
end

View File