Skip to content

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.


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