check that resources/magic/data/AllCardNames.txt covers all the cards in scripts and scripts_missing

master
melvinzhang 2015-05-14 11:20:07 +08:00
parent 7dfa67e15e
commit c00190c857
1 changed files with 7 additions and 0 deletions

View File

@ -484,6 +484,7 @@ checks: \
check_requires_groovy_code \
check_script_name \
check_tokens \
check_all_cards \
check_unique_property \
check_required_property \
check_spells \
@ -551,6 +552,7 @@ check_decks:
<(grep "name=" -r release/Magarena/scripts/ | sed 's/.*name=//' | sort) \
<(cat release/Magarena/decks/prebuilt/*.dec | grep "^[0-9]" | sed 's/^[0-9]* //' | sort | uniq) | grep ">" | ${NO_OUTPUT}
# each property occurs at most once
check_unique_property:
grep "^[^=]*" -r release/Magarena/scripts/*.txt | sed 's/=.*//g' | sort | uniq -d | ${NO_OUTPUT}
@ -582,6 +584,11 @@ check_unused_choice:
diff declared-choices used-choices | ${NO_OUTPUT}
rm declared-choices used-choices
check_all_cards:
diff \
<(grep "name=" `grep "token=" -Lr release/Magarena/scripts release/Magarena/scripts_missing` -h | sed 's/name=//' | sort) \
resources/magic/data/AllCardNames.txt
crash.txt: $(wildcard *.log)
for i in `grep "^Excep" -l $^`; do \
tail -n +`grep -n "random seed" $$i | tail -1 | cut -d':' -f1` $$i; \