* Bump to 2.5.8 - Hard code exception for word "plains" in english_singular and english_plural functions - Add font preloading by TomTkacz - Add import_image function by TomTkacz - Fix freeze when loading a set with missing templates * add locale entries * include localized keywords and statistics * Add slider fields and get_mse_path * Allow "Default" in slider fields * better fix for print bug * don't draw checkerboard when image field has default this allows an image field to be transparent before an image has been selected by the user * allow additional individual choices in slider fields * Add CSV / TSV importer * Update README.md * move game scripts to separate file * add json import * format english locale * format foreign locales * localize * finish locales * cleanup * minor tweaks * fix bug in import csv * optimize card counts display * tighten conditions on drop down menu closing * widen welcome window buttons * Update changelog.txt * tweaks * update cli * add locale entries, add changelog entries * make some values scriptable, rewrite print layout logic * fix "referencing nonexistant file" internal error the error would happen when an image or set symbol file was changed or deleted, then the set was saved, then the change or deletion was undone * add add_card_to_set script function am I crazy or was there no way to do this from the CLI? * fix symbol font bug * add global_script statistics dimension property this script is ran once at the start, and its result is stored in the 'global_value' variable, which is accessible to the regular script. with this we can get rid of the set.global_variable_average_opening_hand field, and make sure its script is ran only once, when the user clicks on the relevant statistics dimension * Add to_json and from_json script functions * Update changelog.txt * bump wxWidgets to 3.3.1 * Update changelog.txt typos and today's prs --------- Co-authored-by: cajun <kajunkittyavenger@gmail.com> Co-authored-by: cajun <12363371+CajunAvenger@users.noreply.github.com>
72 lines
3.4 KiB
Plaintext
72 lines
3.4 KiB
Plaintext
############################################################## Game Scripts
|
|
#### Determine the color in the card columns
|
|
card list color script:
|
|
input := card.card_color
|
|
if input == "white" then rgb(156,130,90)
|
|
else if input == "blue" then rgb(0,64,168)
|
|
else if input == "black" then rgb(0,0,0)
|
|
else if input == "red" then rgb(168,0,0)
|
|
else if input == "green" then rgb(0,168,0)
|
|
else if input == "pink" then rgb(210,60,140)
|
|
else if input == "purple" then rgb(150,100,160)
|
|
else if input == "yellow" then rgb(190,200,50)
|
|
else if input == "brown" then rgb(51, 10, 0)
|
|
else if input == "orange" then rgb(255, 51, 0)
|
|
else (
|
|
artifact := chosen(choice:"artifact")
|
|
land := chosen(choice:"land")
|
|
multi := chosen(choice:"multicolor")
|
|
hybrid := chosen(choice:"hybrid")
|
|
if land then rgb(109,62,39) # land
|
|
else if multi and input != "artifact, multicolor" then rgb(130,110,0) # multicolor
|
|
else if hybrid then rgb(115,0,160) # hybrid
|
|
else if artifact then rgb(72,90,100) # artifact
|
|
else rgb(119,83,83) # colorless
|
|
)
|
|
|
|
#### Make some adjustments when creating a new card
|
|
import script:
|
|
map := []
|
|
|
|
if card.stylesheet == nil then (
|
|
if card.layout == "split" then map := map + [stylesheet: "m15-split-fusable"]
|
|
else if card.layout == "aftermath" then map := map + [stylesheet: "m15-aftermath"]
|
|
else if card.layout == "flip" then map := map + [stylesheet: "m15-flip"]
|
|
else if card.layout == "transform" then map := map + [stylesheet: "m15-mainframe-dfc"]
|
|
else if card.layout == "modal_dfc" then map := map + [stylesheet: "m15-mainframe-dfc"]
|
|
else if card.layout == "meld" then map := map + [stylesheet: "m15-mainframe-dfc"]
|
|
else if card.layout == "class" then map := map + [stylesheet: "m15-saga"]
|
|
else if card.layout == "case" then map := map + [stylesheet: "m15-saga"]
|
|
else if card.layout == "saga" then map := map + [stylesheet: "m15-saga"]
|
|
else if card.layout == "adventure" then map := map + [stylesheet: "m15-adventure"]
|
|
else if card.layout == "battle" then map := map + [stylesheet: "m15-battle"]
|
|
else if card.layout == "planar" then map := map + [stylesheet: "m15-mainframe-planes"]
|
|
else if card.layout == "scheme" then map := map + [stylesheet: "archenemy"]
|
|
else if card.layout == "vanguard" then map := map + [stylesheet: "m15-vanguard"]
|
|
else if card.layout == "token" then map := map + [stylesheet: "m15-mainframe-tokens"]
|
|
else if card.layout == "emblem" then map := map + [stylesheet: "m15-emblem-cajun"]
|
|
|
|
else if lang_setting("is_planeswalker")(card.super_type)
|
|
then map := map + [stylesheet:"m15-mainframe-planeswalker"]
|
|
|
|
else if lang_setting("is_saga")(card.sub_type)
|
|
or lang_setting("is_class")(card.sub_type)
|
|
or lang_setting("is_case")(card.sub_type)
|
|
then map := map + [stylesheet:"m15-saga"]
|
|
|
|
else if lang_setting("is_adventure")(card.sub_type)
|
|
or lang_setting("is_adventure")(card.sub_type_2)
|
|
then map := map + [stylesheet:"m15-adventure"]
|
|
)
|
|
|
|
style := to_lower(if card.stylesheet == nil then (map["stylesheet"] or else "m15-altered") else card.stylesheet.folder_name)
|
|
if contains(style, match:"walker")
|
|
or contains(style, match:"pw")
|
|
or contains(style, match:"leveler")
|
|
or contains(style, match:"saga")
|
|
or contains(style, match:"class")
|
|
then map := map + rule_text_to_level_text(1)
|
|
|
|
map
|
|
|