Commit Graph

361 Commits

Author SHA1 Message Date
SlightlyCircuitous
b1f189229a
Remove reference to challengetokens.xml
If challengetokens.xml is deleted, there is no reason to reference it or differentiate it from tokens.xml
2023-05-04 12:25:55 -04:00
SlightlyCircuitous
12e37ef8d3
Merge Challenge 'Tokens' into tokens.xml
All non-creature cards from the challenge decks are in cards.xml so it makes sense for the rest to be in here.
2023-05-04 12:22:40 -04:00
SlightlyCircuitous
c0cf131b7d
Delete challenge_tokens.xml 2023-05-04 12:20:08 -04:00
tooomm
451482d8f6
run only on xml changes 2023-05-01 17:47:31 +02:00
tooomm
99d37f4dd6
Update challenge token file to db v4 (#208) 2023-04-30 13:48:45 +02:00
SlightlyCircuitous
c8e55a0035
Fix Transforming Tokens (#224)
* 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>
2023-04-19 23:30:59 +02:00
SlightlyCircuitous
ee0e316fe3
Add MOC Tokens (#223)
* 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>
2023-04-13 20:25:48 +02:00
SlightlyCircuitous
c65cd01679
Add MOM Tokens (#222)
* 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>
2023-04-11 17:50:00 +02:00
Zach H
3f8566d63b
Merge pull request #219 from SlightlyCircuitous/patch-3
Add (Token) to Certain Token Names
2023-04-01 22:34:19 -04:00
SlightlyCircuitous
212e597d17
Merge branch 'Cockatrice:master' into patch-3 2023-04-01 10:47:51 -04:00
SlightlyCircuitous
7c64b2c3df
Add BRC Tokens (#213)
* 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>
2023-04-01 16:12:17 +02:00
SlightlyCircuitous
add4502925
Add image to J22 Pirate token (#217)
* Add image to J22 Pirate token

*Made in mtgdesign using public domain art

* update version

---------

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2023-04-01 15:58:04 +02:00
tooomm
8b5f675a3c
Add Otharri, Suns' Glory to Experience Counter (#218)
Co-authored-by: SlightlyCircuitous <71394296+SlightlyCircuitous@users.noreply.github.com>
2023-04-01 15:25:20 +02:00
SlightlyCircuitous
92d4ef9801
Add image to banana token (#215)
* 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>
2023-04-01 14:58:06 +02:00
SlightlyCircuitous
e317aa255a
Add (Token) to certain token names
*Adds (Token) to tokens created by Squad, the Ornithopter token, and the Storm Crow token to be consistent with the rest of the file
2023-03-31 17:07:07 -04:00
tooomm
7fe56fbdf8
split cache action up (#205) 2023-03-31 17:53:16 +02:00
SlightlyCircuitous
bf8a88ccb0
Add Token Entries and Relations for Heroes of the Realm (#211)
* 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>
2023-03-31 17:47:24 +02:00
SlightlyCircuitous
6e1ce596bb
Move CLB Angel Warrior art to Proper Entry (#212)
Co-authored-by: tooomm <tooomm@users.noreply.github.com>
2023-03-26 16:14:04 +02:00
SlightlyCircuitous
f9ec0f4bde
Add Karn, Living Legacy emblem from Arena (#200)
* 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>
2023-03-18 23:34:40 +01:00
ebbit1q
7dafd41d28
set xsi to http instead of https (#206)
* 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>
2023-03-13 22:28:03 +01:00
SlightlyCircuitous
593d95ceff
Add J22 Tokens (#207)
* 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>
2023-03-12 01:12:34 +01:00
ebbit1q
6282826daf
add missing excludes for double entries (#203)
* 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>
2023-03-11 12:25:55 +01:00
SlightlyCircuitous
6824561b28
Add ONC Tokens (#198)
* 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>
2023-03-10 01:53:39 +01:00
SlightlyCircuitous
2ec8c81950
Add BRC cards to BRO token relations (#199)
* 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>
2023-03-10 01:25:17 +01:00
SlightlyCircuitous
cf9290cc02
Add ONE Tokens (#196)
* 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>
2023-02-08 22:51:17 +01:00
SlightlyCircuitous
a6a74cdc5b
Add DMR Tokens (#195)
* 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>
2023-01-30 23:52:37 +01:00
SlightlyCircuitous
7b8142318e
Correct Mordenkainen Emblem (#194)
* Correct Mordenkainen Emblem

* update version

---------

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2023-01-28 23:59:22 +01:00
ebbit1q
015f65a133
add missing counter relations (#193)
* add missing counter relations

* update version to 20230127b

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-01-27 23:00:42 +01:00
SlightlyCircuitous
86fd956aa1 Remove Parentheses Around Emblem Names (#188)
* Remove Parentheses Around Emblem Names

*Aligns emblem names with their names on Scryfall for consistency

* update version

---------

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2023-01-27 22:57:57 +01:00
ebbit1q
7c1b4aca2e
change occult epiphany to use x (#191)
Co-authored-by: github-actions <github-actions@github.com>
2022-12-03 14:25:19 +01:00
tooomm
f3d956033d
Update check_links.yml (#189) 2022-11-30 03:27:06 +01:00
ebbit1q
d56eddda0c
sort sets and cards (#165)
* 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
2022-11-10 00:25:31 +01:00
SlightlyCircuitous
9afb95f720
Add BRO Tokens (#187)
* Add BRO Tokens

*Adds 6 new tokens and 1 new emblem
*Adds art lines for 4 reprints

* Add exclude to Urza's command

* Add Exclude to Ashnod, Flesh Mechanist

* Update tokens.xml

Co-authored-by: ebbit1q <ebbit1q@gmail.com>

* Add Saheeli to Thopter reverse-related

* Update tokens.xml

Co-authored-by: ebbit1q <ebbit1q@gmail.com>

* Update tokens.xml

Co-authored-by: ebbit1q <ebbit1q@gmail.com>

* Update tokens.xml

Co-authored-by: ebbit1q <ebbit1q@gmail.com>

* Update tokens.xml

Co-authored-by: ebbit1q <ebbit1q@gmail.com>

* Update tokens.xml

Co-authored-by: ebbit1q <ebbit1q@gmail.com>

* Update tokens.xml

Co-authored-by: ebbit1q <ebbit1q@gmail.com>

* update version

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2022-11-09 17:59:17 +01:00
SlightlyCircuitous
757b619c0c
Add BOT tokens (#186)
* Add BOT tokens

*Adds 2 new tokens

* Update tokens.xml

* update version

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2022-11-09 16:42:31 +01:00
SlightlyCircuitous
711dcec236
Add UNF tokens (#185)
* 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>
2022-11-09 16:32:06 +01:00
SlightlyCircuitous
328b73c20d
Add 40K Tokens (#183)
* Add 40K Tokens

*Adds 21 new token entries and set/reverse-related lines for 2 reprints
*Corrects Hazezon, Shaper of Sand's exclude from count="x" to count="x=2" to better reflect token creation logic

* Update tokens.xml

Co-authored-by: ebbit1q <ebbit1q@gmail.com>

* Update tokens.xml

Co-authored-by: ebbit1q <ebbit1q@gmail.com>

* update tokens

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2022-09-28 17:52:23 +02:00
SlightlyCircuitous
af4f9b2af0
Add DMC Tokens (#182)
* 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>
2022-09-27 00:11:50 +02:00
SlightlyCircuitous
f406b1abcb
Fix typos in DMU tokens (#181)
* Fix typos in DMU tokens

broke a couple of tags by accident

* update version

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2022-09-26 22:15:36 +02:00
SlightlyCircuitous
3e64f0d0f4
Add Tokens from DMU (#179)
* Add Tokens from DMU

*Adds entries for 12 new tokens and art lines for 14 reprinted tokens
*Replaces Sand Warrior token art from blog with official print.

* update version

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2022-09-26 22:05:01 +02:00
tooomm
265a474130
fix workflow issue
we want to see  if there are issues on the run
2022-09-12 15:01:08 +02:00
tooomm
cb37bdf540
CI: Check image links (#131) 2022-09-12 14:13:36 +02:00
mainman879
6ce8f96a55
Adds Foretell maintype of State (#176)
* Adds Foretell maintype

* update version

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2022-08-17 00:32:27 +02:00
SlightlyCircuitous
dede5505a5
Split Challenge Decks and Heros By Set (#173)
* Organizes the horde cards into their three challenge decks (FTH, BTH, DAG)
* Organizes the Hero cards and equipment into their three Hero's Path sets (HP1,HP2,HP3), as per Scryfall
* Puts Garruk the Slayer in PPC1 instead of M15, as per Scryfall
* Updates all URLs to Scryfall large
2022-08-10 14:51:15 +02:00
SlightlyCircuitous
77e04724cb
Add RNA Guildkit (GK1+GK2) Tokens (#172)
Co-authored-by: tooomm <tooomm@users.noreply.github.com>
2022-08-07 16:15:38 +02:00
tooomm
5ead6f9148
Fix ISD Ooze token picture (#174)
Co-authored-by: github-actions <github-actions@github.com>
2022-08-07 15:36:12 +02:00
SlightlyCircuitous
0ba6681d1c
Add VOC and UMA Tokens (#171)
* Add VOC and UMA Tokens

* Replaces several fanmade tokens with official prints from VOC or UMA while adding the rest of the tokens from those sets

*Moves Unicorn Token out of the Emblem section and up into the Tokens section

*Moves Zariel Emblem to alphabetize

* update version

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2022-07-11 14:04:27 +02:00
tooomm
5903f6ea17
imgur --> scryfall (#168)
* more scryfall links

* update version to 20220707b

Co-authored-by: github-actions <github-actions@github.com>
2022-07-07 10:50:31 +02:00
tooomm
beecf68502
Fix Undercity image (#167)
* fix Undercity image

* update version to 20220707

Co-authored-by: github-actions <github-actions@github.com>
2022-07-07 02:33:35 +02:00
SlightlyCircuitous
3ccf8b40fd
Add Un-Set Tokens (#166)
* Adds Un-Set Tokens

*Adds novel tokens from UND, UST and UGL (UNH has no tokens on scryfall) to go with their related cards
--Acorn Stash, Beeble, Brainiac, Dragon (Gold), Giant Teddy Bear, Faerie Spy, Rogue (w/ Menace), Storm Crow, Sheep (2/2)
  --Dragon and Giant Teddy Bear are Gold and Pink, respectively, so I have left them as colorless (in line with scryfall) with a comment in case someone is curious about them in the future

*Adds new art for Construct, Gnome Goat, Goblin, Pegasus, Soldier, Squirrel, and Zombie to their existing entries
--In the case of Gnome, I have replaced the gnome token art with this one since it seemed to be a homemade placeholder. Happy to revert it if y'all prefer a black bordered token for the main art or if I misjudged its officialness

* Apply suggestions from code review

Co-authored-by: ebbit1q <ebbit1q@gmail.com>

* Update tokens.xml

* Address Second Round of Comments

*Changed 'card' to 'token' in Dragon Token and Giant Teddy Bear Token text.

*Moved Acorn Stash to be just above Energy Reserve (the Counter holder tokens seem to be alphabetized) and changed its type and Maintype to 'Counter'.

* Add exclude to Acorn Stash

That seems to be the tradition for any card listed under a Counter-holder type token.

* update version

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2022-07-04 23:43:25 +02:00
mainman879
6228a90011
Adds NCC Tokens (#164)
* Update tokens.xml

* sort

* fixes

* add missing relation

* Master of Ceremonies Suggestion

Co-authored-by: ebbit1q <ebbit1q@gmail.com>

* Adding excluded x counts

* update version

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2022-07-04 00:11:00 +02:00