@@ -531,6 +531,7 @@ local error_joker = {
531531 },
532532 },
533533 },
534+ key = Cryptid .gameset (self ) == " madness" and " j_cry_error_madness" or " j_cry_error"
534535 }
535536 end ,
536537 add_to_deck = function (self , card , from_debuff )
@@ -596,7 +597,7 @@ local error_joker = {
596597 local buff = 0
597598 local cards = # G .jokers .cards
598599 for i = 1 , # jokers do
599- if cards + buff < G .jokers .config .card_limit then
600+ if cards + buff < G .jokers .config .card_limit or Cryptid . gameset ( self ) == " madness " then
600601 local card = copy_card (jokers [i ])
601602 card :add_to_deck ()
602603 G .jokers :emplace (card )
@@ -898,49 +899,79 @@ local boredom = {
898899 num ,
899900 denom ,
900901 },
902+ key = Cryptid .gameset (self ) == " madness" and " j_cry_boredom_madness" or " j_cry_boredom"
901903 }
902904 end ,
903905 atlas = " atlasepic" ,
904906 calculate = function (self , card , context )
905- if context .before then
906- local cards = {}
907- for i , v in pairs (G .jokers .cards ) do
908- if v .config .center .key ~= " j_cry_boredom" then
909- cards [# cards + 1 ] = v
907+ if Cryptid .gameset (self ) == " madness" then
908+ if
909+ context .retrigger_joker_check
910+ and not context .retrigger_joker
911+ and not (context .other_card .ability and context .other_card .ability .name == " cry-Boredom" )
912+ then
913+ if SMODS .pseudorandom_probability (card , " cry_boredom_joker" , 1 , card .ability .extra .odds , " Boredom" ) then
914+ return {
915+ message = localize (" k_again_ex" ),
916+ repetitions = 1 ,
917+ card = card ,
918+ }
919+ else
920+ return nil , true
910921 end
911922 end
912- local joker = pseudorandom_element (cards , pseudoseed (" cry_boredom_joker" ))
913- card .cry_boredom_marked = joker
914- end
915- if context .after then
916- card .cry_boredom_marked = nil
917- end
918- if
919- context .retrigger_joker_check
920- and not context .retrigger_joker
921- and not (context .other_card .ability and context .other_card .ability .name == " cry-Boredom" )
922- and card .cry_boredom_marked == context .other_card
923- then
924- if SMODS .pseudorandom_probability (card , " cry_boredom_joker" , 1 , card .ability .extra .odds , " Boredom" ) then
923+ if
924+ context .repetition
925+ and context .cardarea == G .play
926+ and SMODS .pseudorandom_probability (card , " cry_boredom_joker" , 1 , card .ability .extra .odds , " Boredom" )
927+ then
928+ return {
929+ message = localize (" k_again_ex" ),
930+ repetitions = 1 ,
931+ card = card ,
932+ }
933+ end
934+ else
935+ if context .before then
936+ local cards = {}
937+ for i , v in pairs (G .jokers .cards ) do
938+ if v .config .center .key ~= " j_cry_boredom" then
939+ cards [# cards + 1 ] = v
940+ end
941+ end
942+ local joker = pseudorandom_element (cards , pseudoseed (" cry_boredom_joker" ))
943+ card .cry_boredom_marked = joker
944+ end
945+ if context .after then
946+ card .cry_boredom_marked = nil
947+ end
948+ if
949+ context .retrigger_joker_check
950+ and not context .retrigger_joker
951+ and not (context .other_card .ability and context .other_card .ability .name == " cry-Boredom" )
952+ and card .cry_boredom_marked == context .other_card
953+ then
954+ if SMODS .pseudorandom_probability (card , " cry_boredom_joker" , 1 , card .ability .extra .odds , " Boredom" ) then
955+ return {
956+ message = localize (" k_again_ex" ),
957+ repetitions = 1 ,
958+ card = card ,
959+ }
960+ else
961+ return nil , true
962+ end
963+ end
964+ if
965+ context .repetition
966+ and context .cardarea == G .play
967+ and SMODS .pseudorandom_probability (card , " cry_boredom_card" , 1 , card .ability .extra .odds , " Boredom" )
968+ then
925969 return {
926970 message = localize (" k_again_ex" ),
927971 repetitions = 1 ,
928972 card = card ,
929973 }
930- else
931- return nil , true
932974 end
933- end
934- if
935- context .repetition
936- and context .cardarea == G .play
937- and SMODS .pseudorandom_probability (card , " cry_boredom_card" , 1 , card .ability .extra .odds , " Boredom" )
938- then
939- return {
940- message = localize (" k_again_ex" ),
941- repetitions = 1 ,
942- card = card ,
943- }
944975 end
945976 end ,
946977 cry_credits = {
@@ -988,7 +1019,7 @@ local number_blocks = {
9881019 }
9891020 end ,
9901021 calculate = function (self , card , context )
991- if context .after and not context .blueprint and not context .before and not context .repetition then
1022+ if context .after and not context .blueprint and not context .before and not context .repetition and Cryptid . gameset ( self ) ~= " madness " then
9921023 for i , v in pairs (G .hand .cards ) do
9931024 if v :get_id () == G .GAME .current_round .cry_nb_card .id and not v .debuff then
9941025 SMODS .scale_card (card , {
@@ -1000,6 +1031,32 @@ local number_blocks = {
10001031 end
10011032 end
10021033 end
1034+ if Cryptid .gameset (self ) ~= " madness" then
1035+ if
1036+ context .individual
1037+ and not context .end_of_round
1038+ and context .cardarea == G .hand
1039+ and not context .blueprint
1040+ and not context .before
1041+ and not context .after
1042+ and context .other_card :get_id () == G .GAME .current_round .cry_nb_card .id
1043+ then
1044+ if context .other_card .debuff then
1045+ return {
1046+ message = localize (" k_debuffed" ),
1047+ colour = G .C .RED ,
1048+ card = card ,
1049+ }
1050+ else
1051+ SMODS .scale_card (card , {
1052+ ref_table = card .ability .extra ,
1053+ ref_value = " money" ,
1054+ scalar_value = " money_mod" ,
1055+ })
1056+ return nil , true
1057+ end
1058+ end
1059+ end
10031060 end ,
10041061 calc_dollar_bonus = function (self , card )
10051062 if to_big (card .ability .extra .money ) > to_big (0 ) then
@@ -1038,7 +1095,7 @@ local double_scale = {
10381095 immutable = true ,
10391096 atlas = " atlasepic" ,
10401097 calc_scaling = function (self , card , other , current_scaling , current_scalar , args )
1041- if to_big (times_current ) >= to_big (times_needed ) then
1098+ if to_big (times_current ) >= to_big (times_needed ) or Cryptid . gameset ( self ) == " madness " then
10421099 times_current = times_current - times_needed
10431100 else
10441101 return {
@@ -1089,6 +1146,7 @@ local double_scale = {
10891146 card .ability .times_needed ,
10901147 card .ability .times_current ,
10911148 },
1149+ key = Cryptid .gameset (self ) == " madness" and " j_cry_Double Scale_madness" or " j_cry_Double Scale"
10921150 }
10931151 end ,
10941152}
@@ -2173,7 +2231,7 @@ local jtron = {
21732231 name = " cry-jtron" ,
21742232 key = " jtron" ,
21752233 config = {
2176- extra = { bonus = 2 },
2234+ extra = { bonus = 1 },
21772235 immutable = { current = 0 },
21782236 },
21792237 rarity = " cry_epic" ,
@@ -2195,63 +2253,32 @@ local jtron = {
21952253 }
21962254 end ,
21972255 calculate = function (self , card , context )
2256+ card .ability .immutable .current =
2257+ lenient_bignum (1 + to_big (card .ability .extra .bonus ) * # SMODS .find_card (" j_joker" ))
21982258 if context .cardarea == G .jokers and context .joker_main then
2199- card .ability .immutable .current =
2200- lenient_bignum (1 + to_big (card .ability .extra .bonus ) * # SMODS .find_card (" j_joker" ))
2201- if to_big (card .ability .immutable .current ) > to_big (0 ) then
2202- return {
2203- message = localize ({
2204- type = " variable" ,
2205- key = " a_xmult" ,
2206- vars = {
2207- number_format (card .ability .immutable .current ),
2208- },
2209- }),
2210- Xmult_mod = lenient_bignum (card .ability .immutable .current ),
2211- colour = G .C .MULT ,
2212- }
2213- end
2214- end
2215- if
2216- context .end_of_round
2217- and not context .blueprint
2218- and not context .individual
2219- and not context .repetition
2220- and not context .retrigger_joker
2221- then
2222- if # G .jokers .cards + G .GAME .joker_buffer < G .jokers .config .card_limit then
2223- G .E_MANAGER :add_event (Event ({
2224- func = function ()
2225- SMODS .add_card ({
2226- key = " j_joker" ,
2227- area = G .jokers ,
2228- })
2229- return true
2230- end ,
2231- }))
2232- end
2259+ return {
2260+ message = localize ({
2261+ type = " variable" ,
2262+ key = " a_powmult" ,
2263+ vars = {
2264+ number_format (card .ability .immutable .current ),
2265+ },
2266+ }),
2267+ Emult_mod = lenient_bignum (card .ability .immutable .current ),
2268+ colour = G .C .DARK_EDITION ,
2269+ }
22332270 end
22342271 if context .forcetrigger then
2235- G .GAME .joker_buffer = G .GAME .joker_buffer + 1
2236- G .E_MANAGER :add_event (Event ({
2237- func = function ()
2238- SMODS .add_card ({
2239- key = " j_joker" ,
2240- area = G .jokers ,
2241- })
2242- return true
2243- end ,
2244- }))
22452272 return {
22462273 message = localize ({
22472274 type = " variable" ,
2248- key = " a_xmult " ,
2275+ key = " a_powmult " ,
22492276 vars = {
22502277 number_format (1 + to_big (card .ability .extra .bonus )),
22512278 },
22522279 }),
2253- Xmult_mod = lenient_bignum (1 + to_big (card .ability .extra .bonus )),
2254- colour = G .C .MULT ,
2280+ Emult_mod = lenient_bignum (1 + to_big (card .ability .extra .bonus )),
2281+ colour = G .C .DARK_EDITION ,
22552282 }
22562283 end
22572284 end ,
0 commit comments