diff --git a/src/main/java/spireMapOverhaul/abstracts/AbstractZone.java b/src/main/java/spireMapOverhaul/abstracts/AbstractZone.java index c73973a13..3dbca5eb0 100644 --- a/src/main/java/spireMapOverhaul/abstracts/AbstractZone.java +++ b/src/main/java/spireMapOverhaul/abstracts/AbstractZone.java @@ -148,10 +148,14 @@ public void updateDescription() { } if (icons.length > 0) sb.append(" NL "); - sb.append(TEXT[1]); + sb.append(getDescriptionText()); tooltipBody = sb.toString(); } + public String getDescriptionText() { + return TEXT[1]; + } + public void renderOnMap(SpriteBatch sb, float alpha) { if (alpha > 0) { if (shapeRegion == null) { diff --git a/src/main/java/spireMapOverhaul/zones/packattack/PackAttackZone.java b/src/main/java/spireMapOverhaul/zones/packattack/PackAttackZone.java new file mode 100644 index 000000000..cb7b82d50 --- /dev/null +++ b/src/main/java/spireMapOverhaul/zones/packattack/PackAttackZone.java @@ -0,0 +1,172 @@ +package spireMapOverhaul.zones.packattack; + +import basemod.ReflectionHacks; +import com.badlogic.gdx.graphics.Color; +import com.evacipated.cardcrawl.modthespire.Loader; +import com.megacrit.cardcrawl.actions.common.MakeTempCardInHandAction; +import com.megacrit.cardcrawl.cards.AbstractCard; +import com.megacrit.cardcrawl.dungeons.AbstractDungeon; +import com.megacrit.cardcrawl.helpers.FontHelper; +import com.megacrit.cardcrawl.map.MapRoomNode; +import com.megacrit.cardcrawl.random.Random; +import com.megacrit.cardcrawl.relics.AbstractRelic; +import com.megacrit.cardcrawl.rooms.AbstractRoom; +import com.megacrit.cardcrawl.rooms.EventRoom; +import spireMapOverhaul.abstracts.AbstractZone; +import spireMapOverhaul.util.Wiz; +import spireMapOverhaul.zoneInterfaces.CombatModifyingZone; +import spireMapOverhaul.zoneInterfaces.ModifiedEventRateZone; +import spireMapOverhaul.zoneInterfaces.RewardModifyingZone; +import spireMapOverhaul.zoneInterfaces.ShopModifyingZone; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public class PackAttackZone extends AbstractZone implements CombatModifyingZone, RewardModifyingZone, ShopModifyingZone, ModifiedEventRateZone { + public static final String ID = "PackAttack"; + + public static Class anniv5; + public static Class abstractCardPack; + + private ArrayList cards; + private ArrayList commonPool; + private ArrayList uncommonPool; + private ArrayList rarePool; + + private ArrayList packNames; + + public PackAttackZone() { + super(ID, Icons.MONSTER, Icons.EVENT, Icons.SHOP); + this.width = 2; + this.maxHeight = 4; + this.height = 3; + this.maxHeight = 4; + + if (Loader.isModLoaded("anniv5")) { + try { + anniv5 = Class.forName("thePackmaster.SpireAnniversary5Mod"); + abstractCardPack = Class.forName("thePackmaster.packs.AbstractCardPack"); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + throw new RuntimeException("Error retrieving classes from Packmaster", e); + } + } + } + + public ArrayList getCards() { + return cards; + } + + @Override + public AbstractZone copy() { + return new PackAttackZone(); + } + + @Override + public Color getColor() { + return new Color(0.76f, 0.65f, 0.52f, 1); + } + + @Override + public String getDescriptionText() { + if (this.packNames == null) { + return TEXT[1]; + } + + List packNameStrings = this.packNames.stream().map(name -> FontHelper.colorString(name, "b")).collect(Collectors.toList()); + return TEXT[2].replace("{0}", packNameStrings.get(0)).replace("{1}", packNameStrings.get(1)).replace("{2}", packNameStrings.get(2)); + } + + @Override + @SuppressWarnings("unchecked") + public boolean canSpawn() { + return anniv5 != null && abstractCardPack != null && ((ArrayList)ReflectionHacks.getPrivateStatic(anniv5, "allPacks")).size() >= 3; + } + + @Override + public void distributeRooms(Random rng, ArrayList roomList) { + //Guarantee at least one event + placeRoomRandomly(rng, roomOrDefault(roomList, (room)->room instanceof EventRoom, EventRoom::new)); + } + + @Override + @SuppressWarnings("unchecked") + public void mapGenDone(ArrayList> map) { + ArrayList allPacks = new ArrayList<>(ReflectionHacks.getPrivateStatic(anniv5, "allPacks")); + Collections.shuffle(allPacks, new java.util.Random(AbstractDungeon.mapRng.randomLong())); + ArrayList packs = allPacks.stream().limit(3).collect(Collectors.toCollection(ArrayList::new)); + this.packNames = new ArrayList<>(); + this.cards = new ArrayList<>(); + for (Object pack : packs) { + try { + this.packNames.add((String)ReflectionHacks.getCachedField(abstractCardPack, "name").get(pack)); + this.cards.addAll((ArrayList)ReflectionHacks.getCachedField(abstractCardPack, "cards").get(pack)); + } catch (IllegalAccessException e) { + e.printStackTrace(); + throw new RuntimeException("Error determining packs for Pack zone", e); + } + } + this.commonPool = this.cards.stream().filter(c -> c.rarity == AbstractCard.CardRarity.COMMON).collect(Collectors.toCollection(ArrayList::new)); + this.uncommonPool = this.cards.stream().filter(c -> c.rarity == AbstractCard.CardRarity.UNCOMMON).collect(Collectors.toCollection(ArrayList::new)); + this.rarePool = this.cards.stream().filter(c -> c.rarity == AbstractCard.CardRarity.RARE).collect(Collectors.toCollection(ArrayList::new)); + this.updateDescription(); + } + + @Override + public float zoneSpecificEventRate() { + return 1; + } + + @Override + public void atPreBattle() { + AbstractDungeon.player.gameHandSize -= 1; + } + + @Override + public void atTurnStart() { + AbstractCard c = this.cards.get(AbstractDungeon.cardRandomRng.random(this.cards.size() - 1)).makeCopy(); + Wiz.atb(new MakeTempCardInHandAction(c, 1)); + } + + @Override + public void modifyRewardCards(ArrayList cards) { + this.replaceWithPackCards(cards, AbstractDungeon.cardRng); + this.applyStandardUpgradeLogic(cards); + } + + @Override + public void postCreateShopCards(ArrayList coloredCards, ArrayList colorlessCards) { + this.replaceWithPackCards(coloredCards, AbstractDungeon.merchantRng); + for (AbstractCard c : coloredCards) { + for (AbstractRelic relic : AbstractDungeon.player.relics) { + relic.onPreviewObtainCard(c); + } + } + } + + private void replaceWithPackCards(ArrayList cards, Random rng) { + for (int i = 0; i < cards.size(); i++) { + cards.set(i, this.getPackCard(cards.get(i).rarity, rng)); + } + } + + private AbstractCard getPackCard(AbstractCard.CardRarity rarity, Random rng) { + ArrayList options; + switch(rarity) { + case UNCOMMON: + options = this.uncommonPool; + break; + case RARE: + options = this.rarePool; + break; + default: + options = this.commonPool; + break; + } + + return options.get(rng.random(options.size() - 1)).makeCopy(); + } +} diff --git a/src/main/java/spireMapOverhaul/zones/packattack/events/BlackMarketTwo.java b/src/main/java/spireMapOverhaul/zones/packattack/events/BlackMarketTwo.java new file mode 100644 index 000000000..050bacd5b --- /dev/null +++ b/src/main/java/spireMapOverhaul/zones/packattack/events/BlackMarketTwo.java @@ -0,0 +1,135 @@ +package spireMapOverhaul.zones.packattack.events; + +import com.evacipated.cardcrawl.modthespire.Loader; +import com.megacrit.cardcrawl.cards.AbstractCard; +import com.megacrit.cardcrawl.cards.DamageInfo; +import com.megacrit.cardcrawl.core.CardCrawlGame; +import com.megacrit.cardcrawl.core.Settings; +import com.megacrit.cardcrawl.dungeons.AbstractDungeon; +import com.megacrit.cardcrawl.events.AbstractImageEvent; +import com.megacrit.cardcrawl.helpers.CardLibrary; +import com.megacrit.cardcrawl.helpers.FontHelper; +import com.megacrit.cardcrawl.helpers.RelicLibrary; +import com.megacrit.cardcrawl.localization.EventStrings; +import com.megacrit.cardcrawl.relics.AbstractRelic; +import com.megacrit.cardcrawl.vfx.cardManip.ShowCardAndObtainEffect; +import spireMapOverhaul.SpireAnniversary6Mod; +import spireMapOverhaul.util.Wiz; +import spireMapOverhaul.zones.packattack.PackAttackZone; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.stream.Collectors; + +public class BlackMarketTwo extends AbstractImageEvent { + public static final String ID = SpireAnniversary6Mod.makeID("BlackMarketTwo"); + private static final EventStrings eventStrings = CardCrawlGame.languagePack.getEventString(ID); + private static final String NAME = eventStrings.NAME; + private static final String[] DESCRIPTIONS = eventStrings.DESCRIPTIONS; + private static final String[] OPTIONS = eventStrings.OPTIONS; + public static final String IMG = SpireAnniversary6Mod.makeImagePath("events/PackAttack/BlackMarketTwo.png"); + private static final int CARDS = 3; + private static final int HP_LOSS = 4; + private static final int A15_HP_LOSS = 5; + private static final int GOLD = 20; + private static final int A15_GOLD = 25; + + private int hpLoss; + private int gold; + private AbstractRelic boosterBox; + private AbstractCard vexed; + private AbstractCard cardistry; + + private int screenNum = 0; + + public BlackMarketTwo() { + super(NAME, DESCRIPTIONS[0], IMG); + + if (!Loader.isModLoaded("anniv5")) { + SpireAnniversary6Mod.logger.error("This event requires Packmaster to be loaded"); + this.imageEventText.setDialogOption(OPTIONS[5]); + return; + } + + this.gold = AbstractDungeon.ascensionLevel >= 15 ? A15_GOLD : GOLD; + 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(); + + if (!AbstractDungeon.player.hasRelic(this.boosterBox.relicId)) { + this.imageEventText.setDialogOption(OPTIONS[0].replace("{0}", FontHelper.colorString(this.boosterBox.name, "g")).replace("{1}", FontHelper.colorString(this.vexed.name, "r")), this.vexed, this.boosterBox); + } else { + this.imageEventText.setDialogOption(OPTIONS[1], true); + + } + this.imageEventText.setDialogOption(OPTIONS[2].replace("{0}", CARDS + "").replace("{1}", this.hpLoss + "")); + if (AbstractDungeon.player.gold >= this.gold) { + this.imageEventText.setDialogOption(OPTIONS[3].replace("{0}", FontHelper.colorString(this.cardistry.name, "g")).replace("{1}", this.gold + ""), this.cardistry); + } else { + this.imageEventText.setDialogOption(OPTIONS[4].replace("{0}", this.gold + ""), true); + } + this.imageEventText.setDialogOption(OPTIONS[5]); + } + + @Override + protected void buttonEffect(int buttonPressed) { + if (!Loader.isModLoaded("anniv5")) { + this.openMap(); + return; + } + switch (screenNum) { + case 0: + switch (buttonPressed) { + case 0: // Box + this.imageEventText.updateBodyText(DESCRIPTIONS[1]); + this.screenNum = 1; + this.imageEventText.updateDialogOption(0, OPTIONS[5]); + this.imageEventText.clearRemainingOptions(); + AbstractDungeon.getCurrRoom().spawnRelicAndObtain((float) (Settings.WIDTH / 2), (float) (Settings.HEIGHT / 2), this.boosterBox); + AbstractDungeon.rareRelicPool.remove(this.boosterBox.relicId); + AbstractDungeon.effectList.add(new ShowCardAndObtainEffect(this.vexed, (float)Settings.WIDTH / 2.0F, (float)Settings.HEIGHT / 2.0F)); + logMetricObtainCardAndRelic(ID, "Box", this.vexed, this.boosterBox); + break; + case 1: // Bag + this.imageEventText.updateBodyText(DESCRIPTIONS[2]); + this.screenNum = 1; + this.imageEventText.updateDialogOption(0, OPTIONS[5]); + this.imageEventText.clearRemainingOptions(); + ArrayList cards = new ArrayList<>(); + PackAttackZone zone = (PackAttackZone)Wiz.getCurZone(); + ArrayList packCards = new ArrayList<>(zone.getCards()); + Collections.shuffle(packCards, new java.util.Random(AbstractDungeon.miscRng.randomLong())); + for (int i = 0; i < CARDS; i++) { + AbstractCard c = packCards.get(i).makeCopy(); + cards.add(c); + int offset = i - CARDS/2; + AbstractDungeon.effectList.add(new ShowCardAndObtainEffect(c, (float)Settings.WIDTH / 2.0F - offset * 300.0F * Settings.scale, (float)Settings.HEIGHT / 2.0F)); + } + AbstractDungeon.player.damage(new DamageInfo(null, this.hpLoss)); + logMetric(ID, "Bag", cards.stream().map(c -> c.cardID).collect(Collectors.toList()), null, null, null, null, null, null, 0, 0, this.hpLoss, 0, 0, 0); + break; + case 2: // Bin + this.imageEventText.updateBodyText(DESCRIPTIONS[3]); + this.screenNum = 1; + this.imageEventText.updateDialogOption(0, OPTIONS[5]); + this.imageEventText.clearRemainingOptions(); + AbstractDungeon.effectList.add(new ShowCardAndObtainEffect(this.cardistry, (float)Settings.WIDTH / 2.0F, (float)Settings.HEIGHT / 2.0F)); + AbstractDungeon.player.loseGold(this.gold); + logMetric(ID, "Bin", Collections.singletonList(this.cardistry.cardID), null, null, null, null, null, null, 0, 0, this.hpLoss, 0, 0, this.gold); + break; + default: // Leave + this.imageEventText.updateBodyText(DESCRIPTIONS[4]); + this.screenNum = 1; + this.imageEventText.updateDialogOption(0, OPTIONS[5]); + this.imageEventText.clearRemainingOptions(); + logMetricIgnored(ID); + break; + } + break; + default: + this.openMap(); + break; + } + } +} diff --git a/src/main/java/spireMapOverhaul/zones/packattack/events/PackShrine.java b/src/main/java/spireMapOverhaul/zones/packattack/events/PackShrine.java new file mode 100644 index 000000000..b7db3c6f3 --- /dev/null +++ b/src/main/java/spireMapOverhaul/zones/packattack/events/PackShrine.java @@ -0,0 +1,201 @@ +package spireMapOverhaul.zones.packattack.events; + +import basemod.ReflectionHacks; +import com.badlogic.gdx.math.MathUtils; +import com.evacipated.cardcrawl.modthespire.Loader; +import com.megacrit.cardcrawl.cards.AbstractCard; +import com.megacrit.cardcrawl.cards.CardGroup; +import com.megacrit.cardcrawl.core.CardCrawlGame; +import com.megacrit.cardcrawl.core.Settings; +import com.megacrit.cardcrawl.dungeons.AbstractDungeon; +import com.megacrit.cardcrawl.events.AbstractImageEvent; +import com.megacrit.cardcrawl.localization.EventStrings; +import com.megacrit.cardcrawl.relics.AbstractRelic; +import com.megacrit.cardcrawl.unlock.UnlockTracker; +import com.megacrit.cardcrawl.vfx.cardManip.PurgeCardEffect; +import com.megacrit.cardcrawl.vfx.cardManip.ShowCardAndObtainEffect; +import spireMapOverhaul.SpireAnniversary6Mod; +import spireMapOverhaul.zones.packattack.PackAttackZone; + +import java.util.*; +import java.util.stream.Collectors; + +public class PackShrine extends AbstractImageEvent { + public static final String ID = SpireAnniversary6Mod.makeID("PackShrine"); + private static final EventStrings eventStrings = CardCrawlGame.languagePack.getEventString(ID); + private static final String NAME = eventStrings.NAME; + private static final String[] DESCRIPTIONS = eventStrings.DESCRIPTIONS; + private static final String[] OPTIONS = eventStrings.OPTIONS; + public static final String IMG_1 = SpireAnniversary6Mod.makeImagePath("events/PackAttack/PackShrine1.png"); + public static final String IMG_2 = SpireAnniversary6Mod.makeImagePath("events/PackAttack/PackShrine2.png"); + private static final int CARDS = 20; + private static final int COMMON_GOLD = 30; + private static final int A15_COMMON_GOLD = 20; + private static final int UNCOMMON_GOLD = 60; + private static final int A15_UNCOMMON_GOLD = 50; + private static final int RARE_GOLD = 120; + private static final int A15_RARE_GOLD = 100; + + private int commonGold; + private int uncommonGold; + private int rareGold; + private boolean pickCard = false; + private boolean remove = false; + + private int screenNum = 0; + + public PackShrine() { + super(NAME, DESCRIPTIONS[0], IMG_1); + if (MathUtils.randomBoolean()) { + this.imageEventText.loadImage(IMG_2); + } + + if (!Loader.isModLoaded("anniv5")) { + SpireAnniversary6Mod.logger.error("This event requires Packmaster to be loaded"); + this.imageEventText.setDialogOption(OPTIONS[2]); + return; + } + + this.commonGold = AbstractDungeon.ascensionLevel >= 15 ? A15_COMMON_GOLD : COMMON_GOLD; + this.uncommonGold = AbstractDungeon.ascensionLevel >= 15 ? A15_UNCOMMON_GOLD : UNCOMMON_GOLD; + this.rareGold = AbstractDungeon.ascensionLevel >= 15 ? A15_RARE_GOLD : RARE_GOLD; + + this.imageEventText.setDialogOption(OPTIONS[0].replace("{0}", CARDS + "")); + this.imageEventText.setDialogOption(OPTIONS[1]); + this.imageEventText.setDialogOption(OPTIONS[2]); + } + + @Override + public void onEnterRoom() { + CardCrawlGame.music.playTempBGM("SHRINE"); + } + + @Override + public void update() { + super.update(); + if (this.pickCard && !AbstractDungeon.isScreenUp && !AbstractDungeon.gridSelectScreen.selectedCards.isEmpty()) { + AbstractCard c = AbstractDungeon.gridSelectScreen.selectedCards.get(0); + if (this.remove) { + AbstractDungeon.topLevelEffects.add(new PurgeCardEffect(c, (float) (Settings.WIDTH / 2), (float) (Settings.HEIGHT / 2))); + AbstractDungeon.player.masterDeck.removeCard(c); + int gold = c.rarity == AbstractCard.CardRarity.COMMON ? this.commonGold + : c.rarity == AbstractCard.CardRarity.UNCOMMON ? this.uncommonGold + : c.rarity == AbstractCard.CardRarity.RARE ? this.rareGold + : 0; + logMetric(ID, "Offer", null, Collections.singletonList(c.cardID), null, null, null, null, null, 0, 0, 0, 0, gold, 0); + this.imageEventText.updateBodyText(gold == 0 ? DESCRIPTIONS[2] : DESCRIPTIONS[3]); + this.screenNum = 1; + this.imageEventText.updateDialogOption(0, OPTIONS[2]); + this.imageEventText.clearRemainingOptions(); + } + else { + AbstractDungeon.effectList.add(new ShowCardAndObtainEffect(c, (float)Settings.WIDTH / 2.0F, (float)Settings.HEIGHT / 2.0F)); + logMetricObtainCard(ID, "Learn", c); + } + + AbstractDungeon.gridSelectScreen.selectedCards.clear(); + this.pickCard = false; + } + } + + @Override + protected void buttonEffect(int buttonPressed) { + if (!Loader.isModLoaded("anniv5")) { + this.openMap(); + return; + } + switch (screenNum) { + case 0: + switch (buttonPressed) { + case 0: // Learn + this.imageEventText.updateBodyText(DESCRIPTIONS[1]); + this.screenNum = 1; + this.imageEventText.updateDialogOption(0, OPTIONS[2]); + this.imageEventText.clearRemainingOptions(); + this.pickCard = true; + this.getCardsAndOpenSelectScreen(); + break; + case 1: // Offer + if (CardGroup.getGroupWithoutBottledCards(AbstractDungeon.player.masterDeck.getPurgeableCards()).size() > 0) { + this.pickCard = true; + this.remove = true; + AbstractDungeon.gridSelectScreen.open(CardGroup.getGroupWithoutBottledCards(AbstractDungeon.player.masterDeck.getPurgeableCards()), 1, OPTIONS[4], false, false, false, true); + } + break; + default: // Leave + this.imageEventText.updateBodyText(DESCRIPTIONS[4]); + this.screenNum = 1; + this.imageEventText.updateDialogOption(0, OPTIONS[2]); + this.imageEventText.clearRemainingOptions(); + logMetricIgnored(ID); + break; + } + break; + default: + this.openMap(); + break; + } + } + + private void getCardsAndOpenSelectScreen() { + ArrayList allCards = this.getAllPackmasterCards(); + ArrayList commons = allCards.stream().filter(c -> c.rarity == AbstractCard.CardRarity.COMMON).collect(Collectors.toCollection(ArrayList::new)); + ArrayList uncommons = allCards.stream().filter(c -> c.rarity == AbstractCard.CardRarity.UNCOMMON).collect(Collectors.toCollection(ArrayList::new)); + ArrayList rares = allCards.stream().filter(c -> c.rarity == AbstractCard.CardRarity.RARE).collect(Collectors.toCollection(ArrayList::new)); + CardGroup group = new CardGroup(CardGroup.CardGroupType.UNSPECIFIED); + for(int i = 0; i < CARDS; ++i) { + AbstractCard.CardRarity rarity = AbstractDungeon.rollRarity(); + ArrayList list = rarity == AbstractCard.CardRarity.RARE ? rares : rarity == AbstractCard.CardRarity.UNCOMMON ? uncommons : commons; + AbstractCard card = list.get(AbstractDungeon.cardRng.random(list.size() - 1)).makeCopy(); + boolean containsDupe = true; + + while(containsDupe) { + containsDupe = false; + + for (AbstractCard c : group.group) { + if (c.cardID.equals(card.cardID)) { + containsDupe = true; + rarity = AbstractDungeon.rollRarity(); + list = rarity == AbstractCard.CardRarity.RARE ? rares : rarity == AbstractCard.CardRarity.UNCOMMON ? uncommons : commons; + card = list.get(AbstractDungeon.cardRng.random(list.size() - 1)).makeCopy(); + break; + } + } + } + + if (group.contains(card)) { + i--; + } else { + for (AbstractRelic r : AbstractDungeon.player.relics) { + r.onPreviewObtainCard(card); + } + group.addToBottom(card); + } + } + + for (AbstractCard c : group.group) { + UnlockTracker.markCardAsSeen(c.cardID); + } + + AbstractDungeon.gridSelectScreen.open(group, 1, OPTIONS[3], false); + } + + @SuppressWarnings("unchecked") + private ArrayList getAllPackmasterCards() { + List validRarities = Arrays.asList(AbstractCard.CardRarity.COMMON, AbstractCard.CardRarity.UNCOMMON, AbstractCard.CardRarity.RARE); + ArrayList allPacks = new ArrayList<>(ReflectionHacks.getPrivateStatic(PackAttackZone.anniv5, "allPacks")); + return allPacks + .stream() + .map(pack -> { + try { + return (ArrayList)ReflectionHacks.getCachedField(PackAttackZone.abstractCardPack, "cards").get(pack); + } catch (IllegalAccessException e) { + e.printStackTrace(); + throw new RuntimeException("Error getting cards for Pack Shrine event"); + } + }) + .flatMap(Collection::stream) + .filter(c -> validRarities.contains(c.rarity)) + .collect(Collectors.toCollection(ArrayList::new)); + } +} diff --git a/src/main/resources/anniv6Resources/images/events/PackAttack/BlackMarketTwo.png b/src/main/resources/anniv6Resources/images/events/PackAttack/BlackMarketTwo.png new file mode 100644 index 000000000..998810125 Binary files /dev/null and b/src/main/resources/anniv6Resources/images/events/PackAttack/BlackMarketTwo.png differ diff --git a/src/main/resources/anniv6Resources/images/events/PackAttack/PackShrine1.png b/src/main/resources/anniv6Resources/images/events/PackAttack/PackShrine1.png new file mode 100644 index 000000000..5dc1cfbd9 Binary files /dev/null and b/src/main/resources/anniv6Resources/images/events/PackAttack/PackShrine1.png differ diff --git a/src/main/resources/anniv6Resources/images/events/PackAttack/PackShrine2.png b/src/main/resources/anniv6Resources/images/events/PackAttack/PackShrine2.png new file mode 100644 index 000000000..c9a1c730d Binary files /dev/null and b/src/main/resources/anniv6Resources/images/events/PackAttack/PackShrine2.png differ diff --git a/src/main/resources/anniv6Resources/images/ui/zoneIcons/PackAttack.png b/src/main/resources/anniv6Resources/images/ui/zoneIcons/PackAttack.png new file mode 100644 index 000000000..2a4ce1f86 Binary files /dev/null and b/src/main/resources/anniv6Resources/images/ui/zoneIcons/PackAttack.png differ diff --git a/src/main/resources/anniv6Resources/localization/eng/PackAttack/Eventstrings.json b/src/main/resources/anniv6Resources/localization/eng/PackAttack/Eventstrings.json new file mode 100644 index 000000000..cca3ec992 --- /dev/null +++ b/src/main/resources/anniv6Resources/localization/eng/PackAttack/Eventstrings.json @@ -0,0 +1,37 @@ +{ + "${ModID}:PackShrine": { + "NAME": "Pack Shrine", + "DESCRIPTIONS": [ + "Before you is a shrine to a ~legendary~ ~adventurer.~ Normally, statues are larger than life, but this one is life-size and seems #yjust #yright for its subject. NL NL Though diminutive in stature, this fabled hero is said to be able to cause #rmayhem for foes with their unusual abilities. Nobody knows what's in the #bbackpack, but it sure is big. NL NL Also, they have a nice hat.", + "Taking a few minutes to appreciate the power of the Pack, you think about the incredible versatility of techniques said to be used by the enabled by the backpack. NL NL You're not sure how they manage it, but you do work out how to replicate one technique. You bow thankfully to the statue as you leave.", + "You present your #goffering at the shrine. It fades into mist, but nothing appears in its place. Seems like your offering wasn't appreciated by the Pack.", + "You present your #goffering at the shrine. As it fades into mist, a #ygold coins falls to the ground. Your offering must have been appreciated by the Pack.", + "You don't linger long at the shrine. As it fades into the distance behind you, you feel like you missed out on something big." + ], + "OPTIONS": [ + "[Learn] #gChoose #g1 #gof #g{0} #gcards #gto #gadd #gto #gyour #gdeck.", + "[Offer] #gRemove #ga #gcard #gfrom #gyour #gdeck. #gGain #ggold #gbased #gon #gits #grarity.", + "[Leave]", + "Add a card to your deck.", + "Remove a card in return for gold based on its rarity." + ] + }, + "${ModID}:BlackMarketTwo": { + "NAME": "Black Market 2: Electric Boogaloo", + "DESCRIPTIONS": [ + "\"YOU THERE! Come in and browse! We're a fully legitimate business providing the best of the Pack, in your hands, for a very reasonable price!\" NL NL The main offerings seem to be an ornate box of cards, a grab bag of random prizes, and a big bin of what mostly looks like junk.", + "\"Ah, it's good to meet someone who ~truly~ appreciates the #gpower of the Pack. Now, hold still for just a moment, this won't hurt a bit.\" NL NL When you return to your senses, the box is in front of you, but the market is gone, and you feel a bit... #pvexed.", + "You reach into the bag to pull out a few prizes.... NL NL #r@Ouch!!@ You pull your hand back from the bag as quickly as you can, but that really hurt. It felt like teeth, but you don't see anything other than the bag and the prizes. Strange. NL NL Still, you got a few prizes for your trouble, even if some of them look to be of dubious value. NL NL The dealer chuckles as you leave.", + "Rummaging through the bin, almost all of it is #rjunk. However, just as you're about to give up hope, you find something basic but #ghigh #gquality. NL NL The dealer smiles when you ask to purchase it. NL NL \"That's a good deal right there. Many adventurers use something like that their entire career. There's always some value from it.\" NL NL The price is very reasonable, and the dealer wishes you the best of luck with your new acquisition.", + "You don't trust this place. Best to keep moving." + ], + "OPTIONS": [ + "[Box] #gGain {0}. #rBecome #rCursed #r- #rVexed.", + "[Locked] Out of stock.", + "[Bag] #gGain #g{0} #grandom #gcards #gfrom #gthe #gzone's #gpacks. #rLose #r{1} #rHP.", + "[Bin] #gGain {0}. #rLose #r{1} #rGold.", + "[Locked] Requires {0} Gold.", + "[Leave]" + ] + } +} \ No newline at end of file diff --git a/src/main/resources/anniv6Resources/localization/eng/PackAttack/UIstrings.json b/src/main/resources/anniv6Resources/localization/eng/PackAttack/UIstrings.json new file mode 100644 index 000000000..ee92102d3 --- /dev/null +++ b/src/main/resources/anniv6Resources/localization/eng/PackAttack/UIstrings.json @@ -0,0 +1,9 @@ +{ + "${ModID}:PackAttack": { + "TEXT": [ + "Pack Attack", + "Cards from Packmaster packs are everywhere! Each turn, you draw one less card, but add a random card from a set of three packs to your hand. NL NL Card rewards and shops contain cards from the packs, and rumor has it that interesting shrines and markets can be found here.", + "Cards Packmaster packs {0}, {1}, and {2} are everywhere! Each turn, you draw one less card, but add a random card from those packs to your hand. NL NL Card rewards and shops contain cards from those packs, and rumor has it that interesting shrines and markets can be found here." + ] + } +} \ No newline at end of file