Fixed stack overflow error. Added missing type conversion.
Chnaged handling of X costs for Hearth of kami and Geth, Lord of the Vault.
Fixed bug that cost reduction did not work of Locket of Yesterdays.
[minor] formatting.