-
Notifications
You must be signed in to change notification settings - Fork 36
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
Pack Attack zone #73
Conversation
…events if Packmaster isn't loaded
…and apply card preview effects to cards in shops
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.
Looks good, just figure it can be a bit less crash happy.
src/main/java/spireMapOverhaul/zones/packattack/PackAttackZone.java
Outdated
Show resolved
Hide resolved
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(); |
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.
Using string literals for Ids, smh 😝
} | ||
|
||
if (!Loader.isModLoaded("anniv5")) { | ||
throw new RuntimeException("This event requires Packmaster to be loaded"); |
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.
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?
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.
Good suggestion, that will be easy to do.
Changes made. Leaving this for you to merge so you can take a quick look over the changes and confirm they match your expectations. |
Looks good, thanks! |
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: