@@ -11,6 +11,88 @@ function Spectrallib.get_asc_colour(amount, text)
1111end
1212
1313
14+ function Spectrallib .card_eval_status_text_eq (card , eval_type , amt , percent , dir , extra , pref , col , sound , vol , ta )
15+ percent = percent or (0.9 + 0.2 * math.random ())
16+ if dir == ' down' then
17+ percent = 1 - percent
18+ end
19+
20+ if extra and extra .focus then card = extra .focus end
21+
22+ local text = ' '
23+ local volume = vol or 1
24+ local card_aligned = ' bm'
25+ local y_off = 0.15 * G .CARD_H
26+ if card .area == G .jokers or card .area == G .consumeables then
27+ y_off = 0.05 * card .T .h
28+ elseif card .area == G .hand or ta then
29+ y_off = - 0.05 * G .CARD_H
30+ card_aligned = ' tm'
31+ elseif card .area == G .play then
32+ y_off = - 0.05 * G .CARD_H
33+ card_aligned = ' tm'
34+ elseif card .jimbo then
35+ y_off = - 0.05 * G .CARD_H
36+ card_aligned = ' tm'
37+ end
38+ local config = {}
39+ local delay = 0.65
40+ local colour = config .colour or (extra and extra .colour ) or ( G .C .FILTER )
41+ local extrafunc = nil
42+ sound = sound or ' multhit1' -- 'other1'
43+ amt = amt
44+ text = (pref ) or (" Mult = " .. amt )
45+ colour = col or G .C .MULT
46+ config .type = ' fade'
47+ config .scale = 0.7
48+ delay = delay * 1.25
49+ if to_big (amt ) > to_big (0 ) or to_big (amt ) < to_big (0 ) then
50+ if extra and extra .instant then
51+ if extrafunc then extrafunc () end
52+ attention_text ({
53+ text = text ,
54+ scale = config .scale or 1 ,
55+ hold = delay - 0.2 ,
56+ backdrop_colour = colour ,
57+ align = card_aligned ,
58+ major = card ,
59+ offset = {x = 0 , y = y_off }
60+ })
61+ play_sound (sound , 0.8 + percent * 0.2 , volume )
62+ if not extra or not extra .no_juice then
63+ card :juice_up (0.6 , 0.1 )
64+ G .ROOM .jiggle = G .ROOM .jiggle + 0.7
65+ end
66+ else
67+ G .E_MANAGER :add_event (Event ({ -- Add bonus chips from this card
68+ trigger = ' before' ,
69+ delay = delay ,
70+ func = function ()
71+ if extrafunc then extrafunc () end
72+ attention_text ({
73+ text = text ,
74+ scale = config .scale or 1 ,
75+ hold = delay - 0.2 ,
76+ backdrop_colour = colour ,
77+ align = card_aligned ,
78+ major = card ,
79+ offset = {x = 0 , y = y_off }
80+ })
81+ play_sound (sound , 0.8 + percent * 0.2 , volume )
82+ if not extra or not extra .no_juice then
83+ card :juice_up (0.6 , 0.1 )
84+ G .ROOM .jiggle = G .ROOM .jiggle + 0.7
85+ end
86+ return true
87+ end
88+ }))
89+ end
90+ end
91+ if extra and extra .playing_cards_created then
92+ playing_card_joker_effects (extra .playing_cards_created )
93+ end
94+ end
95+
1496local scie = SMODS .calculate_individual_effect
1597function SMODS .calculate_individual_effect (effect , scored_card , key , amount , from_edition )
1698 ret = scie (effect , scored_card , key , amount , from_edition )
0 commit comments