Commit Graph

374 Commits

Author SHA1 Message Date
dependabot[bot]
33dddfaccd
Bump actions/checkout from 2 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-28 17:00:01 +00:00
tooomm
b8181c9464
Create dependabot.yml 2023-10-28 18:59:41 +02:00
SlightlyCircuitous
5c0fae6db2
Revise "x=1" and "x=0" to "x" (#239)
* 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>
2023-10-09 18:32:48 +02:00
ebbit1q
b17e62a989 fixes to #238 2023-10-09 18:28:06 +02:00
Zach H
d3b3cab24d
Merge pull request #238 from SlightlyCircuitous/patch-1
Add WHO Tokens
2023-10-08 13:29:08 -04:00
SlightlyCircuitous
93fabd0297
Add WHO Tokens
*Adds entries for 16 new tokens and 2 reminder cards
*Adds art for 7 reprinted tokens
2023-10-08 11:27:18 -04:00
SlightlyCircuitous
79e1b61dde
Add WOE and WOC Tokens (#235)
* 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>
2023-08-31 16:56:52 +02:00
ebbit1q
013a775783
update tokens with new universe within names (#236)
* update tokens with new universe within names

* update version to 20230831

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-08-31 16:07:21 +02:00
SlightlyCircuitous
f5f9e4eeb0
Add MAT Token Relations (#234)
* 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>
2023-08-18 09:37:46 +02:00
SlightlyCircuitous
0b6b093a1c
Add CMM Tokens (#233)
* 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>
2023-08-07 13:16:18 +02:00
Zach H
c25b023747
Merge pull request #229 from SlightlyCircuitous/patch-1
Add ARC Scheme Tokens
2023-07-27 19:29:26 -04:00
tooomm
3438b24bd5
Fix treasure token name (#231)
* fix treasure token

* update version to 20230701

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-07-01 15:16:13 +02:00
SlightlyCircuitous
dab8a27687
Add ARC Scheme Tokens
*Adds a 4/6 golem token and a 3/3 elemental token for The Iron Guardian Stirs and Evil Comes to Fruition, respectively
2023-06-21 20:50:25 -04:00
Zach H
49a23f1361
Merge pull request #228 from SlightlyCircuitous/patch-1
Add picture to J22 Zeppelin token
2023-06-20 23:06:06 -04:00
SlightlyCircuitous
65290d481b
Add picture to Zeppelin token
*Adds custom art for the Zeppelin vehicle token made by Lita, Mechanical Engineer
2023-06-20 16:14:31 -04:00
SlightlyCircuitous
5c421387e0
Add LTR and LTC Tokens (#227)
* 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>
2023-06-19 17:51:20 +02: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