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

Pack Attack zone #73

Merged
merged 14 commits into from
Jan 10, 2024
Merged

Pack Attack zone #73

merged 14 commits into from
Jan 10, 2024

Conversation

modargo
Copy link
Collaborator

@modargo modargo commented Jan 10, 2024

I felt this project needed a Packmaster tribute zone, so I made one. I was originally planning to stop at two zones (and don't plan to make more after this), but having a Packmaster tribute was important to me.

This zone picks three packs, and card rewards and shop cards are taken from the zone's packs. In combat, you get a random card from those packs added to your hand each turn, in return for drawing one less card (I didn't want it to be purely positive). If this feels too limiting, it could be two random cards instead.

This remaining content is the zone is two events that are broadly positive and intended to draw people towards the zone. If you get an event while in the zone, it will always be one of these events.

Pack Shrine lets you either pick 1 out of 20 of any Packmaster cards (Library-style events always offer interesting choices) or remove a card by offering it to the shrine in return for gold based on the card's rarity (think Bonfire Spirits, except gold instead of healing and max HP). Like all shrines, this is a purely positive event. It has image variants for both Packmaster and Packmistress.

Black Market Two has three options: PM Booster Box in return for the Vexed curse, three random cards from the zone's packs in return for losing a small amount of HP, or Cardistry in return for some gold. These have costs, but are all intended to be good options. PM Booster Box is strong enough to be worth a curse, three random cards will often be good (but may depend on the zone's packs), and Cardistry is worth buying for most decks. The image is a flipped and slightly modified version of the Packmaster event.

Everything is achieved by reflection so that this doesn't require any dependencies. The zone can only spawn if Packmaster is loaded, and I've tested that it doesn't break when Packmaster isn't loaded. Packmaster's pack filtering is respected.

Most of the code here is for the events and getting pack/card information from Packmaster by reflection. The rest of the zone setup is straightforward.

Here are screenshots for the start of each event:
event 1

event 2

@modargo modargo changed the title Pack Attack Zone Pack Attack zone Jan 10, 2024
Copy link
Owner

@erasels erasels left a comment

Choose a reason for hiding this comment

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

Looks good, just figure it can be a bit less crash happy.

this.hpLoss = AbstractDungeon.ascensionLevel >= 15 ? A15_HP_LOSS : HP_LOSS;
this.boosterBox = RelicLibrary.getRelic("anniv5:PMBoosterBox").makeCopy();
this.vexed = CardLibrary.getCard("anniv5:Vexed").makeCopy();
this.cardistry = CardLibrary.getCard("anniv5:Cardistry").makeCopy();
Copy link
Owner

Choose a reason for hiding this comment

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

Using string literals for Ids, smh 😝

}

if (!Loader.isModLoaded("anniv5")) {
throw new RuntimeException("This event requires Packmaster to be loaded");
Copy link
Owner

Choose a reason for hiding this comment

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

Hmm, not sure if this is a good idea. If some mod does something weird with a dynamic way to get all events they might run into this accidentally.

Could we just set the only dialogue option to leave if that's the case instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good suggestion, that will be easy to do.

@modargo
Copy link
Collaborator Author

modargo commented Jan 10, 2024

Changes made. Leaving this for you to merge so you can take a quick look over the changes and confirm they match your expectations.

@erasels
Copy link
Owner

erasels commented Jan 10, 2024

Looks good, thanks!

@erasels erasels merged commit fefaa87 into erasels:main Jan 10, 2024
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