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

Shrieking hat #586

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Shrieking hat #586

wants to merge 8 commits into from

Conversation

wang429
Copy link
Collaborator

@wang429 wang429 commented Nov 25, 2020

Shrieking Hat - Unplayable, Retain, When you die instead deal all damage taken while this was in your hand to all enemies and destroy this.
Upgrades to +3 damage

Shrieking Hat card art was already in the code base apparently.

Copy link
Collaborator

@acourrau acourrau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Complex card, thank you for tackling this! A few comments inline.

src/main/java/stsjorbsmod/cards/cull/OldBook.java Outdated Show resolved Hide resolved
src/main/java/stsjorbsmod/cards/cull/ShriekingHat.java Outdated Show resolved Hide resolved
return false;

OldBookPower po = null;
// requested that death preventing cards trigger in order of pickup.
SortedSet<DeathPreventionCard> deathPreventionCards = new TreeSet<>(Comparator.comparingInt(DeathPreventionCard::getPriority));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the change suggested above, we should be able to loop the masterDeck object first to determine "permanent" cards that were added to the deck that need to be consumed, and then pursue the "temporary" cards using your priority implemented.

Copy link
Collaborator Author

@wang429 wang429 Dec 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It added a little bit more complexity to the the logic, but I think it should work as expected.

…or death prevention cards then add them to the sorted set.
… dies without shrieking hat in hand. Old book should trigger in that case.
@wang429 wang429 requested a review from acourrau December 6, 2020 06:11
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