Skip to content
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

Add card rarity information to the card buffer #7

Merged
merged 1 commit into from
Sep 25, 2021

Conversation

ohylli
Copy link
Contributor

@ohylli ohylli commented May 3, 2021

I thought that it would be useful if information about card rarity (common, uncommon, rare etc.) would be available from the card buffer. However since this information is not often needed, adding it to its own item seemed unnecessary, so I added it to the same item which contained the card type. So now instead of for example "Attack type", it now contains "Attack type, uncommon rarity". I did this by adding a new getCardRarityString method to the CardUtils class and I modified the update method of CardBuffer to add the rarity information to the buffer. The rarity name is now just name of the CardRarity enum value. I don't know if there could be a way to get a localized string for the rarity if the game has that.

Rarity is now included in the same buffer item as card type.
CardUtils: Added a getCardRarityString method.
CardBuffer: modified the update method.
@bradjrenshaw bradjrenshaw merged commit 94f51dc into bradjrenshaw:master Sep 25, 2021
@bradjrenshaw
Copy link
Owner

Sorry it took this long to get to this; I just added this to the beta2 branch. I merged this to the master branch by accident and had to revert it and due to some structural changes I had to manually implement it into the beta2 branch. Sorry for the confusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants