* Revise "x=1" and "x=0" to "x"
*Changes a few instances of `count="x=1"`and `count="x=0"` to `count="x"` for consistency in how `count` is handled.
* update version
---------
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
* Add WOE and WOC Tokens
* Adds 12 new token entries
* Adds 21 set lines for new art for reprinted tokens
* fix names of adventure cards
* update version
---------
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
* Add MAT Token Relations
*Adds token relations for Pia Nalaar, Consul of Revival and Rocco, Street Chef
* update version
---------
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
* Add CMM Tokens
*Adds entries for 8 new tokens
*Adds set lines for 69 reprints
*Splits entries for 3/1 R Elemental and 3/1 R Elemental with Haste and for 1/1 R Elemental and 1/1 R Elemental with Haste as WotC has decided to print those tokens with Haste again and not all the reverse-related cards make tokens with Haste
*Changes text for Chandra, Torch of Defiance to reflect new oracle text
*Changes reverse-related for Lightning Coils to count="x=5" since it should always make at least 5 tokens when it goes off
* sorting
* update version
---------
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
* Add LTR and LTC Tokens
*Adds entries for 5 new tokens and set lines for 5 reprints from LTR
*Adds entries for 5 new tokens and set lines for 10 reprints from LTC
* Change 'Tolkien' to 'Token'
* fixes
* update version
---------
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
* Fix Transforming Tokens
*Adds attach="transform" to Phyrexian Incubator, Day, and Night to allow tokens to transform using the context menu
* Sort related on top
* sort
* update version
---------
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
* Add MOC Tokens
*Added entries for 3 new tokens
*Added set lines for 40 reprinted tokens
*Corrected several instances of "exlude"
*Excluded tokens from The Argent Etchings
* Remove excludes that don't do anything
See https://github.com/Cockatrice/Magic-Token/pull/222#issuecomment-1503739091
* Add missing token relations
Goro Goro and Satoru
Slimefoot and Squee
* update version
---------
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
* Add MOM Tokens
*Added entries for 13 new tokens
*Added set lines for 8 reprinted tokens
*Reverse-related an existing Knight token to Elspeth's Talent
* Add Dinosaur Art
* mark transforming cards as exclude, sort
* update version
---------
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
* Add BRC Tokens
*Adds entries and art for 2 new tokens
*Adds set lines for 12 existing tokens
* Relate Staff of Titania (BRC) to Dryad (BRO)
* add missing >
* add titania relation
* update version
---------
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
* Add image to banana token
*Card picture is a public domain picture of a bunch of bananas with a GIMP olify applied
*Card made in mtgdesign
* update version
---------
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
* Add Token Entries and Relations for Heroes of the Realm
*Adds 10 new token entries (8 tokens and 2 emblems) for tokens made by cards in Heroes of the Realm Sets
*Adds Heroes of the Realm relations to 3 existing tokens
* Fix ampresand
* Fix Indents
* sort tokens
* update version
---------
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
* Add Token Images from Arena
*Adds entry and image for Karn, Living Legacy's Emblem (from MTG:Arena)
*Replaces user generated Unicorn token with the token from MTG:Arena
* Revert Unicorn token image
* Change Emblem to jpeg for consistency
* Back to png
* Correct duplicated url
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
* update version
---------
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
* set xsi to http instead of https
* update check_links.yml
* use env. context
* remove continue-on-error
* all at once
* step name
* update version to 20230313
---------
Co-authored-by: tooomm <tooomm@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
* Add J22 Tokens
*Adds artless entries for 3 new tokens (no physical print available)
*Adds reverse-related lines to 5 existing tokens
*Adds excluded count="x" for Zendikar's Roil to allow for making multiple tokens at once off multiple lands triggering landfall
*Replaces "x=1" with "x" for Iridescent Hornbeetle to conform with style rules
* update version
---------
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
* add missing excludes for double entries
cockatrice will actually implicitly mark the second reverse-related tag
on the same token as exclude, however we prefer to mark them explicitly,
there are only two relations that we happened to have this wrong
lazy bash:
tag="reverse-related"
relationrx="( *)<$tag([^>]*)>([^<]*)</$tag>"
exclude='exclude="exclude"'
while IFS= read -r line; do
if [[ $line =~ $relationrx ]]; then
space=${BASH_REMATCH[1]}
args=${BASH_REMATCH[2]}
name=${BASH_REMATCH[3]}
if [[ $last_name && $name == "$last_name" ]]; then
if [[ ! $args =~ $exclude ]]; then
echo "$space<$tag$args $exclude>$name</$tag>"
continue
fi
else
last_name=$name
fi
else
last_name=""
fi
echo "$line"
done <tokens.xml | sponge tokens.xml
* update version to 20230311
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add ONC Tokens
*Added 2 new tokens
*Added set lines for 19 reprints
*Added 3 new reverse-related entries for new cards that make existing tokens
*Added 4 cards with Toxic to the Poison Counter entry
*Added reminder text to the oracle text of the Phyrexian Insect token as its printed on both copies of the card and listed as oracle text on Scryfall
* update version
* mark exclude
---------
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
* Add Urza, Chief Artificer to 0/0 Construct
* Add other BRC cards that make BRO tokens
*Completes the set of BRC cards that make BRO tokens in addition to Urza, Chief Artificer
* update version
---------
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
* Add ONE Tokens
* Adds 10 new tokens and 3 art lines for reprints
* Adds missing set line to Sketch token
* Includes reverse relations to ONE and ONC cards (but no ONC token entries)
* Removes Goblin art from Phyrexian Goblin entry as we now have a printed Phyrexian Goblin token and that goblin art already appears a Goblin Token entry in the file
* Did not remove any Golem art from the Phyrexian Golem entry as that art does not appear anywhere else in the file and that token was reprinted in 2XM as 'Phyreixan Golem'
* Did not do reverse relations for the Poison counter for the 57 new cards with toxic, but I will if you ask me to
* Add Poison Counter Relation to tokens with Toxic
*Analogous to the Phyrexian Insect token with Infect, the Phyrexian Beast and Phyrexian Mite tokens have Toxic 1 and can generate poison counters.
* add poison
* sort
* update version
---------
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
* Add DMR Tokens
*Adds art lines for 14 tokens from DMR
*Replaces 2 blog images with DMR printings on Scryfall
*I didn't edit the Ravage entry; I am not sure why Github thinks it changed
* Add back staticneo tokens
* update version
---------
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
* Remove Parentheses Around Emblem Names
*Aligns emblem names with their names on Scryfall for consistency
* update version
---------
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
* use proper set code for fnm 2012 token
* change order of each set using script
some sets were not properly sorted
the release date of SLD might be contestable but the script seems to
have found 27 real discrepancies
the release date is as shown in scryfall, eg SLD has a date of 2019-12-02
bash is a real programming language and I can put it on my resume,
don't tell me otherwise:
set -eo pipefail
mapfile -t sets < <(LC_ALL=C curl -L 'https://mtgjson.com/api/v5/SetList.json' | jq -r '.data[]|.releaseDate,.code' | sed 'N;s/\n/ /' | sort -r | sed 's/.* //')
setrx="<set[^>]*>([^<]+)</set>"
list=()
while IFS= read -r line; do
if [[ $line =~ $setrx ]]; then
code="${BASH_REMATCH[1]}"
list+=("$code" "$line")
elif [[ $code ]]; then
for set_ in "${sets[@]}"; do
for (( i=0; i<${#list[@]}; i+=2 )); do
code="${list[$i]}"
if [[ $set_ == "$code" ]]; then
echo "${list[$i+1]}"
fi
done
done
code=""
list=()
echo "$line"
else
echo "$line"
fi
done <tokens.xml | sponge tokens.xml
* sort all cards using script
actually there was only one discrepancy in the file before " Token" was
added to a lot of entries (Wasp)
however the addition has changed the sort order for many cards,
eg "Bird Token" vs "Bird Soldier Token"
cards after the last normal token have not been included (Zombie Wizard)
still using bash of course:
last="Zombie Wizard Token"
startrx=" -->"
namerx="<name>([^<]*)</name>"
endrx="</card>"
declare -A list # associative array
{
while IFS= read -r line; do
echo "$line"
if [[ $line =~ $startrx ]]; then # eat first comment
break
fi
done
while
while
IFS= read -r line || exit 2
card+="$line
"
[[ ! $line =~ $namerx ]]
do :; done
name="${BASH_REMATCH[1]}"
while
IFS= read -r line || exit 3
card+="$line
"
[[ ! $line =~ $endrx ]]
do :; done
list[ "$name"]="$card"
keys+="
$name"
card=""
[[ $name != "$last" ]]
do :; done
<<<"${keys:1}" LC_ALL=C sort --ignore-case | while IFS= read -r key; do
echo -n "${list[ $key]}"
done
cat
} <tokens.xml | sponge tokens.xml
* sort reverse-related tags again
slightly changed script from 6ca51e5
tag="reverse-related"
relationrx="<$tag([^>]*)>([^<]*)</$tag>"
declare -A list # associative array
while IFS= read -r line; do
if [[ $line =~ $relationrx ]]; then
yes=1
name="${BASH_REMATCH[2]}"
args="${BASH_REMATCH[1]}"
key="$name $(printf "%03d" "${#args}")$args"
list["$key"]="$line"
keys+="
$key"
elif [[ $yes ]]; then
# LC_ALL=C determines the sort behavior!
<<<"${keys:1}" LC_ALL=C sort --ignore-case | while read -r; do
echo "${list[$REPLY]}"
done
yes=""
list=()
keys=""
echo "$line"
else
echo "$line"
fi
done <tokens.xml | sponge tokens.xml
* update version
* Add UNF tokens
*Adds 7 new tokens and art line for 4 reprints
*Only adds art for the front of Contortionist since the back is probably not useful in digital space
* fixes
* update version
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
* Add DMC Tokens
*Adds 2 new tokens and art for 10 reprinted tokens
*Removes several unneeded empty tags
*Adds '0' to empty cmc tags (seems to be the prevailing pattern)
*Fix typo in pirate token
* corrections
we don't add additional count=x relations for on cast triggers
names have to be unique across all datasets, take care with named tokens
changed some set tags
* update version
Co-authored-by: ebbit1q <ebbit1q@gmail.com>