mse version: 2.0.0 game: magic short name: Dungeons full name: AFR Dungeons icon: card-sample.png installer group: magic/m15 style/normal cards position hint: 099 version: 2021-06-25 depends on: package: magic.mse-game version: 2014-06-25 card width: 375 card height: 523 card dpi: 150 ################################# ##### Beta blank by CompleteIndie init script: text_filter := text_filter + replace@( match:"^([^\\\n]+)(\\\n|[ ][ ])" replace:"\\1\\2" ) card_shape := {"token"} shrink_name := {if styling.shrink_name_text != "" then to_int(styling.shrink_name_text) else 0 } note_cleaner := replace@(match:"\\+", replace:"") num_cleaner := replace@(match:"[0-9]", replace:"") max_level := { notes := "1,2,2,3,3,3,4," if styling.room_notation != "" then notes := note_cleaner(styling.room_notation) if contains(notes, match:"7") then 7 else if contains(notes, match:"6") then 6 else if contains(notes, match:"5") then 5 else if contains(notes, match:"4") then 4 else 3 } level_counts := { notes := "1,2,2,3,3,3,4," if styling.room_notation != "" then notes := note_cleaner(styling.room_notation) saga_lore_count(split_text(replace(notes, match:",[^,]+$", replace:","), match:",")) } double_counts := { notes := "" if styling.double_rooms != "" then notes := note_cleaner(styling.double_rooms) saga_lore_count(split_text(replace(notes, match:",[^,]+$", replace:","), match:",")) } plus_check := { counts := double_counts() if counts[input] > check then box_height(input+1) else 0 } box_width := { rooms := level_counts()[input] if input >= max_level()-1 then 0 else if box > rooms then 0 else 310 / rooms } ##pad_sum := { ## sum := 0 ## splits := split_text(styling.pad_levels, match:",") ## for x from 0 to length(splits)-1 do ## sum := sum + to_int(splits[x]) ## sum ##} box_height := { counts := level_counts() h := 370 end_float := 0 avg_float := 0 pad_float := 0 output := 0 ##pad := to_int(pull_comma_array(styling.pad_levels, cell:input)) ##if input == max_level()-2 then ## pad := pad - to_int(pull_comma_array(styling.pad_levels, cell:input+1)) ##else if input == max_level()-1 then ## pad := -pad_sum() map := [0:0, 1: 35, 2:75, 3:95] for x from 0 to length(counts)-1 do ( h := h - map[min(3, counts[x])] ) ##if h >= pad_sum() then ( ## h := h - pad ## pad_float := pad ##) if h >= 19 then ( h := h-19 end_float := 19 ) levels := max_level() if h < 0 then levels := levels - 2 avg_float := h / levels if input == max_level()-1 then output := map[min(3, counts[input])] + end_float + max(0,avg_float) else if input == 0 then output := map[min(3, counts[input])] + max(0,avg_float) else output := map[min(3, counts[input])] + avg_float output } pick_a_lane := { counts := level_counts() pluses := double_counts() out_lane := counts[input] in_lane := counts[input+1] plus := pluses[input] if out_lane == 1 then if in_lane == 1 then "lanes/onelane.png" else if in_lane == 2 then "lanes/twolane.png" else if in_lane == 3 then "lanes/threelane.png" else "lanes/onelane.png" else if out_lane == 2 then if plus > 0 then "lanes/halflane.png" else if in_lane == 3 then "lanes/fourlane.png" else "lanes/twolane.png" else if out_lane == 3 then if plus == 1 then "lanes/splitlane.png" else if plus == 2 then "lanes/thirdlane.png" else if in_lane == 2 then "lanes/fourlane.png" else "lanes/threelane.png" else "lanes/onelane.png" } pick_a_wall := { rooms := counts := level_counts()[input] if rooms == 3 then "lanes/twowall.png" else if rooms == 2 then "lanes/onewall.png" else "lanes/nowall.png" } font_size := {if styling.font_size != "" then styling.font_size else 11} mana_t := { if styling.tap_symbol == "old" then "old" else if styling.tap_symbol == "diagonal T" then "older" else "new" } # Use guild mana symbols? guild_mana := { styling.use_guild_mana_symbols } transfer_levels := {false} ############################################################## Set info fields styling field: type: text name: room notation description: Code to generate a dungeon setup. See dropdown below for instructions styling field: type: text name: double rooms description: The levels to have a double-height room on. styling field: type: choice name: notation help choice: List rooms in a comma-separated list. Default 1,2,2,3,3,3,4, choice: List the level number equal to the number of rooms on the level choice: So default is 1 room, 2 rooms, 3 rooms, 1 room in four levels choice: First and last are max 1 room, others are max 3 rooms, max 7 levels total choice: For double size rooms, list the levels in the double rooms style choice: Listing it once puts it on second, twice on middle and third rows choice: The next row needs to be the same number of rooms or it will glitch choice: Currently it can't do first row doubles or triple rooms, may be a future feature styling field: type: text name: font size description: Font size for the rooms. Default is 11. styling field: type: boolean name: remove from autocount description: Removes the automatic card number for specific cards, to allow for overcounted cards like in Planeswalker Decks. initial: no styling field: type: text name: shrink name text description: Reduces the name text N points. styling field: type: package choice name: text box mana symbols match: magic-mana-*.mse-symbol-font initial: magic-mana-small.mse-symbol-font styling field: type: boolean name: promo description: Is this card a promo card, with the "P" rarity? initial: no styling field: type: boolean name: use guild mana symbols description: Use the Ravnica guild symbols instead of the official half/half circles for hybrid mana. initial: no styling field: type: choice name: tap symbol description: What tap and untap symbols should be used on cards? initial: modern choice: modern choice: old choice: diagonal T ############################################################## Card fields card style: border color: left: 0 top : 0 width: 375 height: 523 radius: 18 left width: 17 right width: 17 top width: 17 bottom width: 18 z index: 4 mask: border_mask.png name: left: 30 top: 26 width: 315 height: {28 - (0.5 * shrink_name())} alignment: middle center padding bottom: -2 padding top: 2 z index: 5 font: name: Beleren Small Caps Bold size: { 17 - shrink_name()} color: rgb(222,222,222) ############################# Image ############################# Textboxes rule text: left: 33 top: 79 width: 310 height: {box_height(0)} font: name: MPlantin italic name: MPlantin-Italic size: {font_size()} scale down to: 6 color: black symbol font: name: { styling.text_box_mana_symbols } size: {font_size()} scale down to: 6 alignment: middle center z index: 2 padding top: 2 padding bottom: 2 padding left: 4 padding right: 6 line height hard: 0.9 line height line: 0.9 line height soft: 0.9 line height hard max: 0.9 line height line max: 0.9 level 1 text: left: 33 top: {card_style.rule_text.bottom} width: {box_width(1, box:1)} height: {box_height(1)} font: name: MPlantin italic name: MPlantin-Italic size: {font_size()} scale down to: 6 color: black symbol font: name: { styling.text_box_mana_symbols } size: {font_size()} scale down to: 6 alignment: middle center z index: 2 padding left: 4 padding right: 6 line height hard: 0.9 line height line: 0.9 line height soft: 0.9 line height hard max: 0.9 line height line max: 0.9 level 2 text: left: {card_style.level_1_text.right} top: {card_style.rule_text.bottom} width: {box_width(1, box:2)} height: {box_height(1)+plus_check(1, check:0)} font: name: MPlantin italic name: MPlantin-Italic size: {font_size()} scale down to: 6 color: black symbol font: name: { styling.text_box_mana_symbols } size: {font_size()} scale down to: 6 alignment: middle center z index: 2 padding top: 2 padding bottom: 2 padding left: 4 padding right: 6 line height hard: 0.9 line height line: 0.9 line height soft: 0.9 line height hard max: 0.9 line height line max: 0.9 level 3 text: left: {card_style.level_2_text.right} top: {card_style.rule_text.bottom} width: {box_width(1, box:3)} height: {box_height(1)+plus_check(1, check:1)} font: name: MPlantin italic name: MPlantin-Italic size: {font_size()} scale down to: 6 color: black symbol font: name: { styling.text_box_mana_symbols } size: {font_size()} scale down to: 6 alignment: middle center z index: 2 padding top: 2 padding bottom: 2 padding left: 4 padding right: 6 line height hard: 0.9 line height line: 0.9 line height soft: 0.9 line height hard max: 0.9 line height line max: 0.9 level 4 text: left: 33 top: {card_style.level_1_text.bottom} width: {box_width(2, box:1)} height: {box_height(2)} font: name: MPlantin italic name: MPlantin-Italic size: {font_size()} scale down to: 6 color: black symbol font: name: { styling.text_box_mana_symbols } size: {font_size()} scale down to: 6 alignment: middle center z index: 2 padding top: 2 padding bottom: 2 padding left: 4 padding right: 6 line height hard: 0.9 line height line: 0.9 line height soft: 0.9 line height hard max: 0.9 line height line max: 0.9 level 5 text: left: {card_style.level_4_text.right} top: {card_style.level_1_text.bottom} width: {box_width(2, box:2)} height: {box_height(2)-plus_check(1, check:0)+plus_check(2, check:0)} font: name: MPlantin italic name: MPlantin-Italic size: {font_size()} scale down to: 6 color: black symbol font: name: { styling.text_box_mana_symbols } size: {font_size()} scale down to: 6 alignment: middle center z index: 2 padding top: 2 padding bottom: 2 padding left: 4 padding right: 6 line height hard: 0.9 line height line: 0.9 line height soft: 0.9 line height hard max: 0.9 line height line max: 0.9 level 6 text: left: {card_style.level_5_text.right} top: {card_style.level_1_text.bottom} width: {box_width(2, box:3)} height: {box_height(2)-plus_check(1, check:1)+plus_check(2, check:1)} font: name: MPlantin italic name: MPlantin-Italic size: {font_size()} scale down to: 6 color: black symbol font: name: { styling.text_box_mana_symbols } size: {font_size()} scale down to: 6 alignment: middle center z index: 2 padding top: 2 padding bottom: 2 padding left: 4 padding right: 6 line height hard: 0.9 line height line: 0.9 line height soft: 0.9 line height hard max: 0.9 line height line max: 0.9 level 7 text: left: 33 top: {card_style.level_4_text.bottom} width: {box_width(3, box:1)} height: {box_height(3)} font: name: MPlantin italic name: MPlantin-Italic size: {font_size()} scale down to: 6 color: black symbol font: name: { styling.text_box_mana_symbols } size: {font_size()} scale down to: 6 alignment: middle center z index: 2 padding top: 2 padding bottom: 2 padding left: 4 padding right: 6 line height hard: 0.9 line height line: 0.9 line height soft: 0.9 line height hard max: 0.9 line height line max: 0.9 level 8 text: left: {card_style.level_7_text.right} top: {card_style.level_4_text.bottom} width: {box_width(3, box:2)} height: {box_height(3)-plus_check(2, check:0)+plus_check(3, check:0)} font: name: MPlantin italic name: MPlantin-Italic size: {font_size()} scale down to: 6 color: black symbol font: name: { styling.text_box_mana_symbols } size: {font_size()} scale down to: 6 alignment: middle center z index: 2 padding top: 2 padding bottom: 2 padding left: 4 padding right: 6 line height hard: 0.9 line height line: 0.9 line height soft: 0.9 line height hard max: 0.9 line height line max: 0.9 level 9 text: left: {card_style.level_8_text.right} top: {card_style.level_4_text.bottom} width: {box_width(3, box:3)} height: {box_height(3)-plus_check(2, check:1)+plus_check(3, check:1)} font: name: MPlantin italic name: MPlantin-Italic size: {font_size()} scale down to: 6 color: black symbol font: name: { styling.text_box_mana_symbols } size: {font_size()} scale down to: 6 alignment: middle center z index: 2 padding top: 2 padding bottom: 2 padding left: 4 padding right: 6 line height hard: 0.9 line height line: 0.9 line height soft: 0.9 line height hard max: 0.9 line height line max: 0.9 level 10 text: left: 33 top: {card_style.level_7_text.bottom} width: {box_width(4, box:1)} height: {box_height(4)} font: name: MPlantin italic name: MPlantin-Italic size: {font_size()} scale down to: 6 color: black symbol font: name: { styling.text_box_mana_symbols } size: {font_size()} scale down to: 6 alignment: middle center z index: 2 padding top: 2 padding bottom: 2 padding left: 4 padding right: 6 line height hard: 0.9 line height line: 0.9 line height soft: 0.9 line height hard max: 0.9 line height line max: 0.9 level 11 text: left: {card_style.level_10_text.right} top: {card_style.level_7_text.bottom} width: {box_width(4, box:2)} height: {box_height(4)-plus_check(3, check:0)+plus_check(4, check:0)} font: name: MPlantin italic name: MPlantin-Italic size: {font_size()} scale down to: 6 color: black symbol font: name: { styling.text_box_mana_symbols } size: {font_size()} scale down to: 6 alignment: middle center z index: 2 padding top: 2 padding bottom: 2 padding left: 4 padding right: 6 line height hard: 0.9 line height line: 0.9 line height soft: 0.9 line height hard max: 0.9 line height line max: 0.9 level 12 text: left: {card_style.level_11_text.right} top: {card_style.level_7_text.bottom} width: {box_width(4, box:3)} height: {box_height(4)-plus_check(3, check:1)+plus_check(4, check:1)} font: name: MPlantin italic name: MPlantin-Italic size: {font_size()} scale down to: 6 color: black symbol font: name: { styling.text_box_mana_symbols } size: {font_size()} scale down to: 6 alignment: middle center z index: 2 padding top: 2 padding bottom: 2 padding left: 4 padding right: 6 line height hard: 0.9 line height line: 0.9 line height soft: 0.9 line height hard max: 0.9 line height line max: 0.9 level 13 text: left: 33 top: {card_style.level_10_text.bottom} width: {box_width(5, box:1)} height: {box_height(5)} font: name: MPlantin italic name: MPlantin-Italic size: {font_size()} scale down to: 6 color: black symbol font: name: { styling.text_box_mana_symbols } size: {font_size()} scale down to: 6 alignment: middle center z index: 2 padding top: 2 padding bottom: 2 padding left: 4 padding right: 6 line height hard: 0.9 line height line: 0.9 line height soft: 0.9 line height hard max: 0.9 line height line max: 0.9 level 14 text: left: {card_style.level_13_text.right} top: {card_style.level_10_text.bottom} width: {box_width(5, box:2)} height: {box_height(5)-plus_check(4, check:0)+plus_check(5, check:0)} font: name: MPlantin italic name: MPlantin-Italic size: {font_size()} scale down to: 6 color: black symbol font: name: { styling.text_box_mana_symbols } size: {font_size()} scale down to: 6 alignment: middle center z index: 2 padding top: 2 padding bottom: 2 padding left: 4 padding right: 6 line height hard: 0.9 line height line: 0.9 line height soft: 0.9 line height hard max: 0.9 line height line max: 0.9 level 15 text: left: {card_style.level_14_text.right} top: {card_style.level_10_text.bottom} width: {box_width(5, box:3)} height: {box_height(5)-plus_check(4, check:1)+plus_check(5, check:1)} font: name: MPlantin italic name: MPlantin-Italic size: {font_size()} scale down to: 6 color: black symbol font: name: { styling.text_box_mana_symbols } size: {font_size()} scale down to: 6 alignment: middle center z index: 2 padding top: 2 padding bottom: 2 padding left: 4 padding right: 6 line height hard: 0.9 line height line: 0.9 line height soft: 0.9 line height hard max: 0.9 line height line max: 0.9 rule text 2: left: 33 bottom: 448 width: 310 height: {box_height(max_level()-1)} font: name: MPlantin italic name: MPlantin-Italic size: {font_size()} scale down to: 6 color: black symbol font: name: { styling.text_box_mana_symbols } size: {font_size()} scale down to: 6 alignment: middle center z index: 2 padding top: 2 padding bottom: 2 padding left: 4 padding right: 6 line height hard: 0.9 line height line: 0.9 line height soft: 0.9 line height hard max: 0.9 line height line max: 0.9 ############################# Card sorting / numbering set code: left: 24 top: 498 width: 40 height: 10 z index: 1 font: name: Relay-Medium size: 7 color: white weight: bold ############################# Copyright stuff copyright: right: 350 top: { if card.pt != "" then 500 else 488 } width: 140 height: 10 z index: 2 visible: {not set.automatic_copyright} alignment: middle right shrink-overflow font: name: Matrix size: 7 color: white weight: bold ############################################################## Extra card fields extra card field: type: text name: card code save value: false script: if set.automatic_card_numbers and not styling.remove_from_autocount then forward_editor(prefix: card_number_m15() + "/" + card_count_m15() + " " + rarity_code() + " ", field: card.card_code_text) else combined_editor(field1: card.custom_card_number, separator: " " + rarity_code() + " ", field2: card.card_code_text) extra card field: type: choice name: hwall 1 editable: false save value: false choice: wall extra card field: type: choice name: hwall 2 editable: false save value: false choice: wall extra card field: type: choice name: hwall 3 editable: false save value: false choice: wall extra card field: type: choice name: hwall 4 editable: false save value: false choice: wall extra card field: type: choice name: hwall 5 editable: false save value: false choice: wall extra card field: type: choice name: hwall 6 editable: false save value: false choice: wall extra card field: type: choice name: vwall 1 editable: false save value: false choice: wall extra card field: type: choice name: vwall 2 editable: false save value: false choice: wall extra card field: type: choice name: vwall 3 editable: false save value: false choice: wall extra card field: type: choice name: vwall 4 editable: false save value: false choice: wall extra card field: type: choice name: vwall 5 editable: false save value: false choice: wall extra card field: type: text name: auto copyright script: set.copyright save value: false editable: false show statistics: false extra card field: type: choice name: border editable: false save value: false choice: border extra card style: card code: left: 24 top: 488 width: 120 height: 10 z index: 1 font: name: Relay-Medium size: 7 color: white weight: bold auto copyright: right: 350 top: { if card.pt != "" then 500 else 488 } width: 140 height: 10 z index: 2 alignment: middle right shrink-overflow visible: {set.automatic_copyright} font: name: Matrix size: 7 color: white weight: bold border: left: 0 top: 0 width: 375 height: 523 z index: 0 render style: image image: card.png hwall 1: left: 31 top: {card_style.rule_text.bottom-4} width: 312 height: 9 render style: image image: {pick_a_lane(0)} z index: 3 hwall 2: left: 31 top: {card_style.level_1_text.bottom-4} width: 312 height: 9 render style: image image: {pick_a_lane(1)} z index: 3 hwall 3: left: 31 top: {card_style.level_4_text.bottom-4} width: 312 height: 9 render style: image image: {pick_a_lane(2)} z index: 3 visible: {max_level() >= 4} hwall 4: left: 31 top: {card_style.level_7_text.bottom-4} width: 312 height: 9 render style: image image: {pick_a_lane(3)} z index: 3 visible: {max_level() >= 5} hwall 5: left: 31 top: {card_style.level_10_text.bottom-4} width: 312 height: 9 render style: image image: {pick_a_lane(4)} z index: 3 visible: {max_level() >= 6} hwall 6: left: 31 top: {card_style.level_13_text.bottom-4} width: 312 height: 9 render style: image image: {pick_a_lane(5)} z index: 3 visible: {max_level() >= 7} vwall 1: left: 31 top: {card_style.rule_text.bottom} width: 312 height: {box_height(1)} render style: image image: {pick_a_wall(1)} z index: 3 vwall 2: left: 31 top: {card_style.level_1_text.bottom+3} width: 312 height: {card_style.level_4_text.height} render style: image image: {pick_a_wall(2)} z index: 3 visible: {max_level() >= 4} vwall 3: left: 31 top: {card_style.level_4_text.bottom+3} width: 312 height: {card_style.level_7_text.height} render style: image image: {pick_a_wall(3)} z index: 3 visible: {max_level() >= 5} vwall 4: left: 31 top: {card_style.level_7_text.bottom} width: 312 height: {box_height(4)} render style: image image: {pick_a_wall(4)} z index: 3 visible: {max_level() >= 6} vwall 5: left: 31 top: {card_style.level_10_text.bottom} width: 312 height: {box_height(5)} render style: image image: {pick_a_wall(5)} z index: 3 visible: {max_level() >= 7}