#! /bin/sh

in_file="./spell-gen-tab.h"
out_file="../ex-data/spell-gen-tab.csv"

head='1 { \n'

head=$head' kind \n'
head=$head' name dummy \n'
head=$head' hp mp gold resist_down \n'
head=$head' level ability extent target \n'
head=$head' resist \n'
head=$head' add_price \n'
head=$head' vfx \n'

head=$head' } \n'

####

if [ -f $out_file ]; then
	rm $out_file
fi

for a in $head
do
	echo -n "\"$a\"," >> $out_file
done
echo "" >> $out_file

../sh/rcv-tab.awk $in_file >> $out_file
