From 45d6e2c1f8cd2caf86116ec8a93b29dfc5780e0d Mon Sep 17 00:00:00 2001 From: Sollace Date: Thu, 18 May 2023 12:57:06 +0100 Subject: [PATCH] Added additional lore for new items and spells --- .../magic/spell/effect/DispellEvilSpell.java | 2 +- .../unicopia/command/ManaCommand.java | 8 ++- .../unicopia/item/AlicornAmuletItem.java | 2 +- .../unicopia/recipes/spells/dispel_evil.json | 16 +++++ .../spellbook/chapters/crystal_heart.json | 37 +++++++++- .../spellbook/chapters/dark_magic.json | 70 +++++++++++++++++++ .../spellbook/chapters/fire_magic.json | 14 ++++ 7 files changed, 145 insertions(+), 4 deletions(-) create mode 100644 src/main/resources/data/unicopia/recipes/spells/dispel_evil.json diff --git a/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/DispellEvilSpell.java b/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/DispellEvilSpell.java index db71768f..b6951e39 100644 --- a/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/DispellEvilSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/DispellEvilSpell.java @@ -15,7 +15,7 @@ import net.minecraft.util.math.Vec3d; public class DispellEvilSpell extends AbstractSpell implements ProjectileDelegate.HitListener { public static final SpellTraits DEFAULT_TRAITS = new SpellTraits.Builder() - .with(Trait.POWER, 10) + .with(Trait.POWER, 1) .build(); protected DispellEvilSpell(CustomisedSpellType type) { diff --git a/src/main/java/com/minelittlepony/unicopia/command/ManaCommand.java b/src/main/java/com/minelittlepony/unicopia/command/ManaCommand.java index d3204431..2948ea45 100644 --- a/src/main/java/com/minelittlepony/unicopia/command/ManaCommand.java +++ b/src/main/java/com/minelittlepony/unicopia/command/ManaCommand.java @@ -27,7 +27,13 @@ public class ManaCommand { var pony = Pony.of(source.getSource().getPlayer()); var bar = type.getBar(pony.getMagicalReserves()); - bar.set(source.getArgument("value", Float.class)); + float value = source.getArgument("value", Float.class); + while (type == ManaType.XP && value > 1) { + pony.getLevel().add(1); + value -= 1; + } + + bar.set(value); source.getSource().getPlayer().sendMessage(Text.literal("Set " + type.name() + " to " + bar.get() + "/" + bar.getMax())); return 0; })) diff --git a/src/main/java/com/minelittlepony/unicopia/item/AlicornAmuletItem.java b/src/main/java/com/minelittlepony/unicopia/item/AlicornAmuletItem.java index 97ee180f..3dc3e2af 100644 --- a/src/main/java/com/minelittlepony/unicopia/item/AlicornAmuletItem.java +++ b/src/main/java/com/minelittlepony/unicopia/item/AlicornAmuletItem.java @@ -296,7 +296,7 @@ public class AlicornAmuletItem extends AmuletItem implements ItemTracker.Trackab public void inFrameTick(ItemFrameEntity entity) { Random rng = entity.world.random; - if (rng.nextInt(500) == 0) { + if (rng.nextInt(1500) == 0) { entity.world.playSound(null, entity.getBlockPos(), USounds.ITEM_ALICORN_AMULET_AMBIENT, SoundCategory.HOSTILE, 0.5F, 1); for (int i = 0; i < 5; i++) { entity.world.addParticle(rng.nextBoolean() ? ParticleTypes.LARGE_SMOKE : ParticleTypes.FLAME, diff --git a/src/main/resources/data/unicopia/recipes/spells/dispel_evil.json b/src/main/resources/data/unicopia/recipes/spells/dispel_evil.json new file mode 100644 index 00000000..e0993076 --- /dev/null +++ b/src/main/resources/data/unicopia/recipes/spells/dispel_evil.json @@ -0,0 +1,16 @@ +{ + "type": "unicopia:spellbook/crafting", + "material": { "item": "unicopia:gemstone", "spell": "unicopia:none" }, + "traits": { + "kindness": 1, + "power": 1 + }, + "ingredients": [ + { "item": "unicopia:gemstone", "spell": "unicopia:arcane_protection" }, + { "item": "unicopia:gemstone", "spell": "unicopia:displacement" } + ], + "result": { + "item": "unicopia:gemstone", + "spell": "unicopia:dispel_evil" + } +} \ No newline at end of file diff --git a/src/main/resources/data/unicopia/spellbook/chapters/crystal_heart.json b/src/main/resources/data/unicopia/spellbook/chapters/crystal_heart.json index 53ee501e..25030fc3 100644 --- a/src/main/resources/data/unicopia/spellbook/chapters/crystal_heart.json +++ b/src/main/resources/data/unicopia/spellbook/chapters/crystal_heart.json @@ -86,12 +86,47 @@ ] }, { - "title": "22nd Trot '12", + "title": "21st Trot '12", "level": 0, "elements": [ "It was intended as an aide for early unicorn ambassadors to Cloud Heights, but was lost after negotiations broke down." ] }, + { + "title": "Meadowbrook's Staff", + "level": 3, + "elements": [ + { "item": { "item": "unicopia:meadowbrooks_staff" } }, + "Status: Confirmed", + "A precursor to magic staffs, the meadwobrook's staff is an upright support structure commonly used by warlocks during long incantation sessions.", + "It features a twisting and mottled shape with a dense and sturdy core capable of supporting the weight of an average-sized, adult male." + ] + }, + { + "title": "22nd Trot '12", + "level": 3, + "elements": [ + "Due to its dense structure and flamability, this object also serves a secondary purpose as an offensive weapon and fuel source should the situation demand.", + "To use correctly in combat, one must begin by gripping the staff by the narrow end in both hands, followed by a swift swing from above one's head whilst yelling 'Fus Roh DAH!'" + ] + }, + { + "title": "Magic Staffs", + "level": 5, + "elements": [ + { "item": { "item": "unicopia:magic_staff" } }, + "Status: Unconfirmed", + "Magical aides for non-magical users. Magic staffs work in a similar way to a unicorns horn in that they can be used to channel and harness the innate magic stored within gems." + ] + }, + { + "title": "22nd Trot '12", + "level": 5, + "elements": [ + "Not all spells work in the same way, but for those that do, a good staff is an essential tool for any beginner magi.", + "The simplest way to create these is to put a gem on the end of a stick. Yes, very revolutionary, I know." + ] + }, { "title": "Grogar's Bell", "level": 0, diff --git a/src/main/resources/data/unicopia/spellbook/chapters/dark_magic.json b/src/main/resources/data/unicopia/spellbook/chapters/dark_magic.json index deccc925..ededc3ae 100644 --- a/src/main/resources/data/unicopia/spellbook/chapters/dark_magic.json +++ b/src/main/resources/data/unicopia/spellbook/chapters/dark_magic.json @@ -314,6 +314,76 @@ "- A transmutation gem\nAt least 19x knowledge trait\n- At least 10x life trait\n- At least 4x chaos trait", "* Add the focus trait to increase the effect's duration" ] + }, + { + "title": "", + "level": 0, + "elements": [ + "" + ] + }, + { + "title": "", + "level": 0, + "elements": [ + "" + ] + }, + { + "title": "??? ???? ??", + "level": 44, + "elements": [ + "There's been a wave of darkness that has come over the town. Nothing's been the same since that gods-forsaken creature arrived.", + "Ponies in town have begun remarking on lack of sleep, and it's showing. Just today I saw a poor stallion walking around in a daze. Bags under his eyes, barely any colour in his cheeks." + ] + }, + { + "title": "??? ???? ??", + "level": 44, + "elements": [ + "He looked almost like a zombie the way he went through the motions, not really paying any attention even after he nearly ran into me.", + "- Starswirl the Bearded" + ] + }, + { + "title": "Scrap", + "level": 21, + "elements": [ + { + "text": "It's not enough. Never enough. Crawling. I feel crawling. Oh gods the crawling won't stop", + "obfuscated": true + } + ] + }, + { + "title": "??? ???? ??", + "level": 33, + "elements": [ + "The insomnia. I can't take it. I lie in my bed every night waiting to go to sleep", + "I thought I could stop it, keep it at bay, but I still hear it. That creature. Cold, unfeeling.", + "I feel myself being drained any time I'm around it. Is it... feeding on me?", + "No, it couldn't be." + ] + }, + { + "title": "????? ????", + "level": 19, + "elements": [ + "I found this incantation under some old notes whilst clearing out the lab. It's... simplistic and hard to manage, but it gets the job done.", + "- Starswirl the Bearded", + { "x": 125, "y": -20, "width": 32, "height": 32, "texture": "unicopia:textures/gui/container/pages/dark_magic.png" }, + { "x": 125, "y": -20, "width": 16, "height": 16, "texture": "unicopia:textures/gui/trait/kindness.png" } + ] + }, + { + "title": "", + "level": 19, + "elements": [ + { "recipe": "unicopia:spells/dispel_evil" }, + "Requires:", + "- A arcane protection gem\n- A displacement gem\n- At least 1x kindness trait\n- At least 1x power trait", + "* Add the power trait to increase the effect's range" + ] } ] } diff --git a/src/main/resources/data/unicopia/spellbook/chapters/fire_magic.json b/src/main/resources/data/unicopia/spellbook/chapters/fire_magic.json index a2083458..2ea1ad7c 100644 --- a/src/main/resources/data/unicopia/spellbook/chapters/fire_magic.json +++ b/src/main/resources/data/unicopia/spellbook/chapters/fire_magic.json @@ -92,6 +92,20 @@ "- Starswirl the Bearded" ] }, + { + "title": "Scrap 2", + "level": 21, + "elements": [ + "We went to the market today. Had to get out of that tower, do something, be somewhere. Luna suggested we go in to see what they were selling for the fair so I decided to indulge her.", + "The townsfolk are still rather skeptical of us, though who's to blame them. Luna was getting along well with the other foals, at least." + ] + }, + { + "title": "", + "level": 21, + "elements": [ + ] + }, { "title": "Fire Bolt", "level": 2,