-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alchemy #118
Alchemy #118
Conversation
…running simulations)
Holy hell I missed this, checking it out now! |
# if player played Possession while being possessed, take the extra turn | ||
# before their main turn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to google this, what a rabbit hole: https://boardgames.stackexchange.com/questions/10/if-possession-is-played-while-executing-another-possession-who-takes-the-next-t
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually amazing work, this is so cool.
My only comment would be I'd prefer if the formatting/tidying changes were in a separate PR (i.e. the List
-> list
type changes). It doesn't really matter though, would just make it easier to review!
Alchemy!
I've added all the Alchemy cards.
Notable changes:
The big change was adding the potion cost to cards. I added a new
Cost
class withmoney
andpotions
properties. Now all cardscost
property is of typeCost
. I overloaded a lot of operators for theCost
class (==
,!=
,<
,<=
,>
,>=
,+
,-
) to make logic easier, and, in most cases, this made the cost comparison logic for existing cards backwards compatible. TheCost
class could also be modified to handle debt costs someday.Alchemist and Herbalist used the
Effect
logic.Possession was, of course, the most challenging to implement. I had to make a few changes to the
Player
class to support it.