diff --git a/.github/workflows/autoTag.py b/.github/workflows/autoTag.py index eb97add..57f18e6 100644 --- a/.github/workflows/autoTag.py +++ b/.github/workflows/autoTag.py @@ -9,4 +9,5 @@ os.remove(".updateVersion") #tag the commit - os.system(f"git tag -a v{new_version} -m 'Version {new_version}'") \ No newline at end of file + os.system(f"git tag -a v{new_version} -m 'Version {new_version}'") + os.system(f"git push origin v{new_version}") \ No newline at end of file diff --git a/.github/workflows/generateYaml.py b/.github/workflows/generateYaml.py index c965f74..6802928 100644 --- a/.github/workflows/generateYaml.py +++ b/.github/workflows/generateYaml.py @@ -44,10 +44,20 @@ def Quoted(s): """) } }, + { + 'name': 'Render Box', + 'uses': 'leana8959/typst-action@main', + 'with': { + 'source_file': LS("""\ + box.typ + """) + } + }, { 'run': LS("""\ mkdir -p assets mv Game\\ of\\ Intrigue.pdf assets/Game\\ of\\ Intrigue.pdf + mv box.pdf assets/box.pdf """) } ] diff --git a/Game of Intrigue.typ b/Game of Intrigue.typ index 3ecd192..86fcbfc 100644 --- a/Game of Intrigue.typ +++ b/Game of Intrigue.typ @@ -205,49 +205,7 @@ dx: -0.5em, dy: -5em )[ - #rotate(-skew_angle)[ - #skew(-skew_angle)[ - #text( - weight: "extrabold", - size: 5em, - fill: white - )[ - GAME - #text( - weight: "bold", - size: 0.8em - )[ - #h(-0.2em) - of - ] - INTRIGUE - ]\ - #text( - weight: "extrabold", - size: 2em, - fill: white - )[ - a game about\ being an asshole - ] - #v(2em) - #box( - width: 150% - )[ - #grid( - rows: 1, - columns: (1fr) * 7, - fill: white, - )[ - #icon("Pact", width: 5em, height: 5em, color: red) - #icon("Asset", width: 5em, height: 5em, color: orange) - #icon("Influence", width: 5em, height: 5em, color: yellow) - #icon("Social", width: 5em, height: 5em, color: green) - #icon("Speech", width: 5em, height: 5em, color: blue) - #icon("Role", width: 5em, height: 5em, color: purple) - ] - ] - ] - ] + #logo(banner: true) ] #pagebreak() #text(size: 3em, weight: "bold")[ @@ -261,13 +219,7 @@ Version #version = The Game == Outline -In the Game of Intrigue, you compete against at least two other players. You draw cards and trade them with other players to gain an advantage. - -The most important cards are the Standing cards. If you loose all your Standing cards you are eliminated. You can play it safe and try to stay in the game or you can take risks and try to eliminate other players. - -When everyone except two players are eliminated. The player with the most valueable cards wins. - -But beware! After players draw their Role cards they get powerfull abilities or goals that can even win them the game. +#outline_text == Setup Separate the Standing cards from the rest.\ @@ -479,8 +431,8 @@ Put them back in the box. They are not to be used this game anymore. ] ] #place( - dx: 6.17em * card_example_scale, - dy: 14.9em * card_example_scale, + dx: 6.2em * card_example_scale, + dy: 14.85em * card_example_scale, )[ #rotate(-skew_angle)[ #skew(-skew_angle)[ @@ -506,8 +458,8 @@ Put them back in the box. They are not to be used this game anymore. ] ] #place( - dx: 6.17em * card_example_scale, - dy: 14.9em * card_example_scale, + dx: 6.2em * card_example_scale, + dy: 14.85em * card_example_scale, )[ #rotate(-skew_angle)[ #skew(-skew_angle)[ @@ -544,9 +496,6 @@ Put them back in the box. They are not to be used this game anymore. - #(defence_copy_amount * defence_values.len()) x Defence (#(calc.min(..defence_values))-#(calc.max(..defence_values))) ], [ - #let colored_card_count = player_count * ((player_count - 2) + social_cards.len()) - #let non_colored_card_count = asset_copy_amount * (asset_value_range.at(1) - asset_value_range.at(0) + 1) + influence_copy_amount * (influence_value_range.at(1) - influence_value_range.at(0) + 1) + testimony_copy_amount * testimony_values.len() + rebrand_copy_amount * rebrand_values.len() + defence_copy_amount * defence_values.len() - #let card_count = colored_card_count + non_colored_card_count + player_count + role_card_amount + standing_card_amount * player_count #text[ Color Tokens: #player_count\ Roles: #role_card_amount\ diff --git a/box.typ b/box.typ new file mode 100644 index 0000000..edac3d9 --- /dev/null +++ b/box.typ @@ -0,0 +1,460 @@ +#import "data.typ": * + +#let render_box( + box_length, + box_height, + box_width, + lid_height, + color, + front_face_content: [], + under_lid_front_face_content: [], + back_face_content: [], + left_face_content: [], + right_face_content: [], + top_face_content: [], + bottom_face_content: [], + lid_front_content: [], + glue_strip_width: 10mm, + cut_stroke: (paint: white, thickness: 0.4mm, dash: "dashed"), + fold_stroke: (paint: gray.transparentize(50%), thickness: 0.2mm), + glue_color: gray.transparentize(50%), +) = { + + let total_width = (box_width + box_length) * 2 + glue_strip_width + let total_height = box_width * 2 + box_height + lid_height + glue_strip_width + + set page( + width: total_width, + height: total_height, + margin: 0%, + ) + + let glue_pattern = pattern(size: (30pt, 30pt))[ + #place[#box(fill: color, width: 100%, height: 100%)] + #place(line(start: (5pt, 0%), end: (-5pt, 100%), stroke: 0.3mm + glue_color)) + #place(line(start: (15pt, 0%), end: (5pt, 100%), stroke: 0.3mm + glue_color)) + #place(line(start: (25pt, 0%), end: (15pt, 100%), stroke: 0.3mm + glue_color)) + #place(line(start: (35pt, 0%), end: (25pt, 100%), stroke: 0.3mm + glue_color)) + ] + + let glue_edge_left = [ + #place(left + horizon)[ + #polygon( + fill: glue_pattern, + stroke: 0.3mm + black, + (0%, 0%), + (glue_strip_width, glue_strip_width), + (glue_strip_width, 100% - glue_strip_width), + (0%, 100%) + ) + ] + #place(left + horizon)[ + #line( + start: (0%, 0%), + end: (0%, 100%), + stroke: fold_stroke + ) + ] + #place(left + top)[ + #line( + start: (0%, 0%), + end: (glue_strip_width, glue_strip_width), + stroke: cut_stroke + ) + ] + #place(left + bottom)[ + #line( + start: (0%, 100%), + end: (glue_strip_width, 100% - glue_strip_width), + stroke: cut_stroke + ) + ] + #place(left + top)[ + #line( + start: (glue_strip_width, glue_strip_width), + end: (glue_strip_width, 100% - glue_strip_width), + stroke: cut_stroke + ) + ] + ] + + let glue_edge_right = [ + #place(right + horizon)[ + #polygon( + fill: glue_pattern, + stroke: 0.3mm + black, + (0%, glue_strip_width), + (glue_strip_width, 0%), + (glue_strip_width, 100%), + (0%, 100% - glue_strip_width) + ) + ] + #place(right + horizon)[ + #line( + start: (0%, 0%), + end: (0%, 100%), + stroke: fold_stroke + ) + ] + #place(right + top)[ + #line( + start: (0%, glue_strip_width), + end: (glue_strip_width, 0%), + stroke: cut_stroke + ) + ] + #place(right + bottom)[ + #line( + start: (0%, 100% - glue_strip_width), + end: (glue_strip_width, 100%), + stroke: cut_stroke + ) + ] + #place(right + top)[ + #line( + start: (-glue_strip_width, glue_strip_width), + end: (-glue_strip_width, 100% - glue_strip_width), + stroke: cut_stroke + ) + ] + ] + + let glue_edge_bottom = [ + #place(bottom + center)[ + #polygon( + fill: glue_pattern, + stroke: 0.3mm + black, + (glue_strip_width, 0%), + (100% - glue_strip_width, 0%), + (100%, glue_strip_width), + (0%, glue_strip_width) + ) + ] + #place(bottom + center)[ + #line( + start: (0%, 0%), + end: (100%, 0%), + stroke: 0.3mm + white + ) + ] + #place(bottom + center)[ + #line( + start: (0%, -glue_strip_width), + end: (100% - glue_strip_width * 2, -glue_strip_width), + stroke: cut_stroke + ) + ] + #place(left + bottom)[ + #line( + start: (0%, glue_strip_width), + end: (glue_strip_width, 0%), + stroke: cut_stroke + ) + ] + #place(right + bottom)[ + #line( + start: (100%, glue_strip_width), + end: (100% - glue_strip_width, 0%), + stroke: cut_stroke + ) + ] + ] + + let glue_edge_top = [ + #place(top + center)[ + #polygon( + fill: glue_pattern, + stroke: 0.3mm + black, + (0%, 0%), + (100%, 0%), + (100% - glue_strip_width, glue_strip_width), + (glue_strip_width, glue_strip_width) + ) + ] + #place(top + center)[ + #line( + start: (0%, 0%), + end: (100%, 0%), + stroke: fold_stroke + ) + ] + #place(top + center)[ + #line( + start: (0%, glue_strip_width), + end: (100% - glue_strip_width * 2, glue_strip_width), + stroke: cut_stroke + ) + ] + #place(left + top)[ + #line( + start: (0%, 0%), + end: (glue_strip_width, glue_strip_width), + stroke: cut_stroke + ) + ] + #place(right + top)[ + #line( + start: (100%, 0%), + end: (100% - glue_strip_width, glue_strip_width), + stroke: cut_stroke + ) + ] + ] + + let front_face = box( + fill: color, + clip: true, + width: 100%, + height: 100%, + stroke: ( + top: cut_stroke, + right: cut_stroke, + bottom: cut_stroke, + ), + )[ + #grid( + columns: (1fr), + rows: (lid_height, 1fr), + under_lid_front_face_content, + front_face_content + ) + ] + + let lid_front = box( + fill: color, + clip: true, + width: 100%, + height: 100%, + stroke: ( + top: cut_stroke + ), + )[ + #rotate(180deg)[ + #lid_front_content + ] + ] + + let back_face = box( + fill: color, + clip: true, + width: 100%, + height: 100%, + stroke: fold_stroke, + )[ + #back_face_content + ] + + let left_face = box( + fill: color, + clip: true, + width: 100%, + height: 100%, + stroke: ( + top: cut_stroke, + bottom: cut_stroke, + right: fold_stroke, + ), + )[ + #left_face_content + ] + + let lid_right = [ + #place(right + horizon)[ + #polygon( + fill: color, + (100%, 0%), + (100% - lid_height, 0%), + (100%, 100%), + ) + ] + #place(right + top)[#line(start: (100%, 0%), end: (100% - lid_height, 0%), stroke: cut_stroke)] + #place(right + horizon)[#line(start: (100% - lid_height, 0%), end: (100%, 100%), stroke: cut_stroke)] + ] + + let right_face = box( + fill: color, + clip: true, + width: 100%, + height: 100%, + stroke: ( + top: cut_stroke, + bottom: cut_stroke + ), + )[ + #right_face_content + ] + + let lid_left = [ + #place(left + horizon)[ + #polygon( + fill: color, + (0%, 0%), + (lid_height, 0%), + (0%, 100%), + ) + ] + #place(left + top)[#line(start: (0%, 0%), end: (lid_height, 0%), stroke: cut_stroke)] + #place(left + horizon)[#line(start: (lid_height, 0%), end: (0%, 100%), stroke: cut_stroke)] + ] + + let top_face = box( + fill: color, + clip: true, + width: 100%, + height: 100%, + stroke: ( + top: fold_stroke, + right: fold_stroke, + left: fold_stroke, + ), + )[ + #rotate(180deg)[ + #top_face_content + ] + ] + + let bottom_face = box( + fill: color, + clip: true, + width: 100%, + height: 100%, + )[ + #bottom_face_content + ] + + set align(center + horizon) + set text(size: 4em) + grid( + columns: (glue_strip_width ,box_width, box_length, box_width, box_length), + rows: (lid_height, box_width, box_height, box_width, glue_strip_width), + [], + glue_edge_right, + lid_front, + glue_edge_left, + [], + [], + lid_right, + top_face, + lid_left, + [], + glue_edge_right, + right_face, + back_face, + left_face, + front_face, + [], + glue_edge_right, + bottom_face, + glue_edge_left, + [], + [], + [], + glue_edge_top, + [], + [], + ) +} + +#set page(fill: gray) +#set text(font: "Inter Tight", fill: white) +#let card_amount = card_count +#let card_thickness = 1mm +#render_box( + card_thickness * card_amount, card_height + 5mm, + card_width + 5mm, + card_height * 0.4, + black, + front_face_content: [ + #set text(size: 0.15em) + #place( + center + horizon + )[ + #logo(banner: true) + ] + ], + top_face_content: [ + #set text(size: 0.15em) + #place( + center + horizon + )[ + #logo() + ] + ], + left_face_content: [ + #set text(size: 0.1em) + #place( + center + horizon, + dy: -8em, + )[ + #logo() + ] + + #place( + center + bottom, + dy: -23mm, + )[ + #box(width: 100%, height: 6.3em, fill: gradient.linear(white, black)) + ] + ], + right_face_content: [ + #set text(size: 0.1em) + #place( + center + horizon, + dy: -8em, + )[ + #logo() + ] + + #place( + center + bottom, + dy: -23mm, + )[ + #box(width: 100%, height: 6.3em, fill: gradient.linear(black, white)) + ] + ], + back_face_content: [ + #set text( + size: 0.18em, + fill: white + ) + + #box( + inset: ( + top: 3em, + bottom: 16em, + left: 3em, + right: 3em + ) + )[ + #set align((left)) + #set par(justify: true) + #columns(2, gutter: 3em)[ + #text(size: 1.2em)[ + #outline_text + ] + #linebreak() + #linebreak() + 3-#player_count players#h(1fr)Ages: 12+#h(1fr)Playtime: 30-60 min.#h(1fr)Contains: #card_amount cards + ] + ] + + #place( + center + bottom, + dy: -23mm, + )[ + #set text(size: 0.8em) + #set align(center) + #icon_banner + ] + + #place( + center + bottom, + dy: -10mm, + [ + Game of Intrigue - Version #version\ + Lyx Rothböck 2024\ + ] + ) + ] +) + diff --git a/cards.typ b/cards.typ index f6fed7b..ac822c7 100644 --- a/cards.typ +++ b/cards.typ @@ -258,23 +258,10 @@ #repeat("GAME OF INTRIGUE") #repeat("OF INTRIGUE GAME") #repeat("INTRIGUE GAME OF") + #repeat("GAME OF INTRIGUE") ] #v(2em, weak: true) - #text( - weight: "extrabold", - size: 5em, - fill: if role {black} else {white} - )[ - GAME - #text( - weight: "bold", - size: 0.8em - )[ - #h(-0.2em) - of - ] - INTRIGUE - ] + #logo_text #v(2em, weak: true) #text(font: "Chivo Mono", fill: secret_gradient)[ #repeat("GAME OF INTRIGUE") diff --git a/cards_abstract.typ b/cards_abstract.typ index f512211..87f2c72 100644 --- a/cards_abstract.typ +++ b/cards_abstract.typ @@ -269,23 +269,10 @@ #repeat("GAME OF INTRIGUE") #repeat("OF INTRIGUE GAME") #repeat("INTRIGUE GAME OF") + #repeat("GAME OF INTRIGUE") ] #v(2em, weak: true) - #text( - weight: "extrabold", - size: 5em, - fill: if role {black} else {white} - )[ - GAME - #text( - weight: "bold", - size: 0.8em - )[ - #h(-0.2em) - of - ] - INTRIGUE - ] + #logo_text #v(2em, weak: true) #text(font: "Chivo Mono", fill: secret_gradient)[ #repeat("GAME OF INTRIGUE") diff --git a/data.typ b/data.typ index 2a65aae..5d5a739 100644 --- a/data.typ +++ b/data.typ @@ -1,4 +1,4 @@ -#let version = "1.0.1" +#let version = "1.0.2" // Game settings #let colors = ( @@ -87,6 +87,10 @@ #let role_card_amount = role_descriptions.len() +#let colored_card_count = player_count * ((player_count - 2) + social_cards.len()) +#let non_colored_card_count = asset_copy_amount * (asset_value_range.at(1) - asset_value_range.at(0) + 1) + influence_copy_amount * (influence_value_range.at(1) - influence_value_range.at(0) + 1) + testimony_copy_amount * testimony_values.len() + rebrand_copy_amount * rebrand_values.len() + defence_copy_amount * defence_values.len() +#let card_count = colored_card_count + non_colored_card_count + player_count + role_card_amount + standing_card_amount * player_count + #let symbols = ( "Token": "token.svg", "Standing": "standing.svg", @@ -127,4 +131,93 @@ rotate(phi,scale(x: sx*100%, y: sy*100%,rotate(theta,body))) } -#let icon(name, color: none, color2: black, width: 1.2em, height: 1.2em, side_distance: 0.4em) = [#h(side_distance/2)#box(image.decode(read("icons/" + symbols.at(name)).replace("rgb(254,255,254)", if color == none { gray } else { color }.to-hex()).replace("rgb(0,0,0)", color2.to-hex()), width: width, height: height), inset: -0.3em)#h(side_distance)] \ No newline at end of file +#let icon(name, color: none, color2: black, width: 1.2em, height: 1.2em, side_distance: 0.4em) = [ + #h(side_distance/2)#box( + inset: -0.3em, + image.decode( + width: width, + height: height, + read("icons/" + symbols.at(name)) + .replace( + "rgb(254,255,254)", + if color == none { + gray + } else { + color + }.to-hex() + ) + .replace( + "rgb(0,0,0)", + color2.to-hex() + ) + ) + )#h(side_distance) +] + +#let logo_text = [ + #text( + weight: "extrabold", + size: 5em, + fill: white + )[ + GAME + #text( + weight: "bold", + size: 0.8em + )[ + #h(-0.2em) + of\ + ] + INTRIGUE + ]\ +] + +#let icon_banner = [ + #box( + width: 150% + )[ + #grid( + rows: 1, + columns: (1fr) * 7, + fill: white, + )[ + #icon("Pact", width: 5em, height: 5em, color: red) + #icon("Asset", width: 5em, height: 5em, color: orange) + #icon("Influence", width: 5em, height: 5em, color: yellow) + #icon("Social", width: 5em, height: 5em, color: green) + #icon("Speech", width: 5em, height: 5em, color: blue) + #icon("Role", width: 5em, height: 5em, color: purple) + ] + ] +] + +#let logo(subtitle: true, banner: false) = [ + #rotate(-skew_angle)[ + #skew(-skew_angle)[ + #logo_text + #if subtitle [ + #text( + weight: "extrabold", + size: 2em, + fill: white + )[ + a game about\ being an asshole + ] + ] + #if banner [ + #v(2em) + #icon_banner + ] + ] + ] +] + +#let outline_text = [ + In the Game of Intrigue, you compete against at least two other players. You draw cards and trade them with other players to gain an advantage. + + The most important cards are the Standing cards. If you loose all your Standing cards you are eliminated. You can play it safe and try to stay in the game or you can take risks and try to eliminate other players. + + When everyone except two players are eliminated. The player with the most valueable cards wins. + + But beware! After players draw their Role cards they get powerfull abilities or goals that can even win them the game. +] \ No newline at end of file