Skip to content

Commit e6941da

Browse files
committed
add voxel
1 parent f6a5ab2 commit e6941da

File tree

6 files changed

+128
-8
lines changed

6 files changed

+128
-8
lines changed

assets/1x/atlasnotjokers.png

3.42 KB
Loading

assets/2x/atlasnotjokers.png

4.18 KB
Loading

items/code.lua

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2860,11 +2860,12 @@ local declare = {
28602860
})[(G.GAME.DECLARE_USED or 0) + 1],
28612861
"poker_hands"
28622862
),
2863-
number_format(-G.GAME.DECLARE_USED),
2863+
number_format(3-(G.GAME.DECLARE_USED or 0)),
28642864
},
28652865
}
28662866
end,
28672867
can_use = function(self, card)
2868+
G.GAME.DECLARE_USED = G.GAME.DECLARE_USED or 0
28682869
return (G.GAME.DECLARE_USED or 0) < 3
28692870
end,
28702871
use = function(self, card, area, copier)
@@ -2993,7 +2994,7 @@ local declare = {
29932994
if not suitless then
29942995
if (SMODS.has_no_suit(v) and not suits["suitless"]) or not suits[v.base.suit] then
29952996
suits[SMODS.has_no_suit(v) and "suitless" or v.base.suit] = true
2996-
complexity = complexity + 0.45
2997+
complexity = complexity + 0.65
29972998
end
29982999
end
29993000
end
@@ -3003,8 +3004,8 @@ local declare = {
30033004
complexity = complexity * 0.75
30043005
local mult = complexity
30053006
local chips = complexity * 8.45 --arbitrary just shake it up a little
3006-
local l_mult = complexity * 0.1
3007-
local l_chips = complexity
3007+
local l_mult = math.min(complexity * 0.15, 0.5)
3008+
local l_chips = math.min(complexity * 1.5, 5)
30083009
local declare_cards = {}
30093010
for i, v in pairs(cards) do
30103011
local card = {
@@ -3056,7 +3057,7 @@ local declare = {
30563057
local is_visibleref = SMODS.is_poker_hand_visible
30573058
function SMODS.is_poker_hand_visible(handname)
30583059
if not SMODS.PokerHands[handname] then
3059-
return G.GAME.hands[handname].visible
3060+
return G.GAME.hands[handname] and G.GAME.hands[handname].visible
30603061
end
30613062
return is_visibleref(handname)
30623063
end

items/planet.lua

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,6 +1365,113 @@ local kaikki = {
13651365
end,
13661366
}
13671367
-- order 166 reserved for suit planet of TEFD, None and Sol
1368+
local voxel = {
1369+
cry_credits = {
1370+
idea = {
1371+
"HexaCryonic",
1372+
},
1373+
art = {
1374+
"HexaCryonic",
1375+
"Icyethics",
1376+
},
1377+
code = {
1378+
"lord.ruby",
1379+
},
1380+
},
1381+
dependencies = {
1382+
items = {
1383+
"set_cry_planet",
1384+
"set_cry_code",
1385+
"c_cry_declare"
1386+
},
1387+
},
1388+
object_type = "Consumable",
1389+
set = "Planet",
1390+
name = "cry-Voxel",
1391+
key = "voxel",
1392+
pos = { x = 1, y = 6 },
1393+
config = { hand_types = { "cry_Declare0", "cry_Declare1", "cry_Declare2" }, softlock = true },
1394+
cost = 4,
1395+
aurinko = true,
1396+
atlas = "atlasnotjokers",
1397+
order = 167,
1398+
can_use = function(self, card)
1399+
return true
1400+
end,
1401+
loc_vars = function(self, info_queue, center)
1402+
local levelone = G.GAME.hands["cry_Declare0"] and G.GAME.hands["cry_Declare0"].level or 1
1403+
local leveltwo = G.GAME.hands["cry_Declare1"] and G.GAME.hands["cry_Declare1"].level or 1
1404+
local levelthree = G.GAME.hands["cry_Declare2"] and G.GAME.hands["cry_Declare2"].level or 1
1405+
local planetcolourone = G.C.HAND_LEVELS[math.min(levelone, 7)]
1406+
local planetcolourtwo = G.C.HAND_LEVELS[math.min(leveltwo, 7)]
1407+
local planetcolourthree = G.C.HAND_LEVELS[math.min(levelthree, 7)]
1408+
1409+
return {
1410+
vars = {
1411+
G.GAME.hands["cry_Declare0"] and G.GAME.hands["cry_Declare0"].declare_cards and localize("cry_Declare0", "poker_hands") or localize("cry_code_empty"),
1412+
G.GAME.hands["cry_Declare1"] and G.GAME.hands["cry_Declare1"].declare_cards and localize("cry_Declare1", "poker_hands") or localize("cry_code_empty"),
1413+
G.GAME.hands["cry_Declare2"] and G.GAME.hands["cry_Declare2"].declare_cards and localize("cry_Declare2", "poker_hands") or localize("cry_code_empty"),
1414+
G.GAME.hands["cry_Declare0"] and G.GAME.hands["cry_Declare0"].level or 1,
1415+
G.GAME.hands["cry_Declare1"] and G.GAME.hands["cry_Declare1"].level or 1,
1416+
G.GAME.hands["cry_Declare2"] and G.GAME.hands["cry_Declare2"].level or 1,
1417+
colours = {
1418+
(
1419+
to_big(G.GAME.hands["cry_Declare0"] and G.GAME.hands["cry_Declare0"].level or 1) == to_big(1) and G.C.UI.TEXT_DARK
1420+
or G.C.HAND_LEVELS[to_number(math.min(7, G.GAME.hands["cry_Declare0"] and G.GAME.hands["cry_Declare0"].level or 1))]
1421+
),
1422+
(
1423+
to_big(G.GAME.hands["cry_Declare1"] and G.GAME.hands["cry_Declare1"].level or 1) == to_big(1) and G.C.UI.TEXT_DARK
1424+
or G.C.HAND_LEVELS[to_number(math.min(7, G.GAME.hands["cry_Declare1"] and G.GAME.hands["cry_Declare1"].level or 1))]
1425+
),
1426+
(
1427+
to_big(G.GAME.hands["cry_Declare2"] and G.GAME.hands["cry_Declare2"].level or 1) == to_big(1) and G.C.UI.TEXT_DARK
1428+
or G.C.HAND_LEVELS[to_number(math.min(7, G.GAME.hands["cry_Declare2"] and G.GAME.hands["cry_Declare2"].level or 1))]
1429+
),
1430+
},
1431+
},
1432+
}
1433+
end,
1434+
use = function(self, card, area, copier)
1435+
local hand_types = {
1436+
G.GAME.hands.cry_Declare0 and G.GAME.hands.cry_Declare0.declare_cards and "cry_Declare0",
1437+
G.GAME.hands.cry_Declare1 and G.GAME.hands.cry_Declare1.declare_cards and "cry_Declare1",
1438+
G.GAME.hands.cry_Declare2 and G.GAME.hands.cry_Declare2.declare_cards and "cry_Declare2"
1439+
}
1440+
Cryptid.suit_level_up(card, copier, 1, hand_types)
1441+
end,
1442+
bulk_use = function(self, card, area, copier, number)
1443+
local hand_types = {
1444+
G.GAME.hands.cry_Declare0 and G.GAME.hands.cry_Declare0.declare_cards and "cry_Declare0",
1445+
G.GAME.hands.cry_Declare1 and G.GAME.hands.cry_Declare1.declare_cards and "cry_Declare1",
1446+
G.GAME.hands.cry_Declare2 and G.GAME.hands.cry_Declare2.declare_cards and "cry_Declare2"
1447+
}
1448+
Cryptid.suit_level_up(card, copier, number, hand_types)
1449+
end,
1450+
calculate = function(self, card, context)
1451+
if
1452+
G.GAME.used_vouchers.v_observatory
1453+
and context.joker_main
1454+
and (
1455+
context.scoring_name == "cry_Declare0"
1456+
or context.scoring_name == "cry_Declare1"
1457+
or context.scoring_name == "cry_Declare2"
1458+
)
1459+
then
1460+
local value = G.P_CENTERS.v_observatory.config.extra
1461+
if Overflow then
1462+
value = value ^ to_big(card.ability.immutable and card.ability.immutable.overflow_amount or 1)
1463+
end
1464+
return {
1465+
message = localize({ type = "variable", key = "a_xmult", vars = { value } }),
1466+
Xmult_mod = value,
1467+
}
1468+
end
1469+
end,
1470+
demicoloncompat = true,
1471+
force_use = function(self, card, area)
1472+
card:use_consumeable(area)
1473+
end,
1474+
}
13681475

13691476
function Cryptid.suit_level_up(card, copier, number, poker_hands, message)
13701477
local used_consumable = copier or card
@@ -1416,6 +1523,7 @@ local planet_cards = {
14161523
pata,
14171524
kaikki,
14181525
-- reserved for tefd/none/sol suit planet
1526+
voxel
14191527
}
14201528
return {
14211529
name = "Planets",

localization/en-us.lua

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3263,6 +3263,16 @@ return {
32633263
"and {C:attention}#3#{}",
32643264
},
32653265
},
3266+
c_cry_voxel = {
3267+
name = "Voxel",
3268+
text = {
3269+
"({V:1}lvl.#4#{})({V:2}lvl.#5#{})({V:3}lvl.#6#{})",
3270+
"Level up",
3271+
"{C:attention}#1#{},",
3272+
"{C:attention}#2#{},",
3273+
"and {C:attention}#3#{}",
3274+
},
3275+
},
32663276
},
32673277
Sleeve = {
32683278
sleeve_cry_beige_sleeve = {
@@ -5044,6 +5054,7 @@ return {
50445054
cry_code_with_suits = "INCLUDE SUITS",
50455055
cry_code_without_suits = "IGNORE SUITS",
50465056
cry_code_suitless = "Hand does not require specific suits",
5057+
cry_code_empty = "[Declare Hand]",
50475058

50485059
b_flip = "FLIP",
50495060
b_merge = "MERGE",

lovely/code.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -764,10 +764,10 @@ payload = '''
764764
results[key] = {}
765765
end
766766
end
767-
if not results["cry_Declare0"] then results["cry_Declare0"] = {} end
768-
if not results["cry_Declare1"] then results["cry_Declare1"] = {} end
769-
if not results["cry_Declare2"] then results["cry_Declare2"] = {} end
770767
end
768+
if not results["cry_Declare0"] then results["cry_Declare0"] = {} end
769+
if not results["cry_Declare1"] then results["cry_Declare1"] = {} end
770+
if not results["cry_Declare2"] then results["cry_Declare2"] = {} end
771771
'''
772772
match_indent = true
773773

0 commit comments

Comments
 (0)