diff --git a/src/main/java/mod/icarus/crimsonrevelations/events/CREvents.java b/src/main/java/mod/icarus/crimsonrevelations/events/CREvents.java index d070e8d..a155030 100644 --- a/src/main/java/mod/icarus/crimsonrevelations/events/CREvents.java +++ b/src/main/java/mod/icarus/crimsonrevelations/events/CREvents.java @@ -22,6 +22,7 @@ @EventBusSubscriber(modid = NewCrimsonRevelations.MODID) @GameRegistry.ObjectHolder(NewCrimsonRevelations.MODID) public class CREvents { + // TODO: Custom sounds @SubscribeEvent public static void onHurtEvent(LivingHurtEvent event) { World world = event.getEntity().world; @@ -31,9 +32,10 @@ public static void onHurtEvent(LivingHurtEvent event) { EntityPlayer player = (EntityPlayer) event.getEntityLiving(); int charge = (int) player.getAbsorptionAmount(); + // Kinetic Girdle of Shielding - Explodes when the Runic Shielding is pierced (20 second cooldown). if (charge > 0) { if (charge <= event.getAmount() && BaublesApi.isBaubleEquipped(player, CRItems.runicGirdleKinetic) > 0 && !(player.getCooldownTracker().hasCooldown(CRItems.runicGirdleKinetic))) { - player.world.playSound(null, player.posX, player.posY, player.posZ, SoundsTC.poof, SoundCategory.PLAYERS, 1.0F, 1.0F + (float) player.getEntityWorld().rand.nextGaussian() * 0.05F); + player.world.playSound(null, player.posX, player.posY, player.posZ, SoundsTC.runicShieldEffect, SoundCategory.PLAYERS, 1.0F, 1.0F + (float) player.getEntityWorld().rand.nextGaussian() * 0.05F); player.world.createExplosion(player, player.posX, player.posY + player.height / 2.0F, player.posZ, 2.0F, false); List entities = player.world.getEntitiesWithinAABBExcludingEntity(player, player.getEntityBoundingBox().grow(3.0D, 3.0D, 3.0D)); @@ -49,6 +51,7 @@ public static void onHurtEvent(LivingHurtEvent event) { ((EntityPlayer) player).getCooldownTracker().setCooldown(CRItems.runicGirdleKinetic, 20 * 20); } + // Revitalizing Ring of Shielding - Gives 6 seconds of Regeneration II when the Runic Shielding is pierced (20 second cooldown). if (charge <= event.getAmount() && BaublesApi.isBaubleEquipped(player, CRItems.runicRingRegen) > 0 && !(player.getCooldownTracker().hasCooldown(CRItems.runicRingRegen))) { player.world.playSound(null, player.posX, player.posY, player.posZ, SoundsTC.runicShieldEffect, SoundCategory.PLAYERS, 1.0F, 1.0F + (float) player.getEntityWorld().rand.nextGaussian() * 0.05F); player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 6 * 20, 1, true, true)); @@ -57,13 +60,22 @@ public static void onHurtEvent(LivingHurtEvent event) { ((EntityPlayer) player).getCooldownTracker().setCooldown(CRItems.runicRingRegen, 20 * 20); } + // Amulet of Emergency Shielding - Gives 8 points of Runic Shielding when the Runic Shielding is pierced (1 minute cooldown). [WIP] if (charge <= event.getAmount() && BaublesApi.isBaubleEquipped(player, CRItems.runicAmuletEmergency) > 0 && !(player.getCooldownTracker().hasCooldown(CRItems.runicAmuletEmergency))) { - player.world.playSound(null, player.posX, player.posY, player.posZ, SoundsTC.egscreech, SoundCategory.PLAYERS, 1.0F, 1.0F + (float) player.getEntityWorld().rand.nextGaussian() * 0.05F); + player.world.playSound(null, player.posX, player.posY, player.posZ, SoundsTC.runicShieldEffect, SoundCategory.PLAYERS, 1.0F, 1.0F + (float) player.getEntityWorld().rand.nextGaussian() * 0.05F); player.setAbsorptionAmount(charge + 8); ((EntityPlayer) player).addStat(StatList.getObjectUseStats(CRItems.runicAmuletEmergency)); ((EntityPlayer) player).getCooldownTracker().setCooldown(CRItems.runicAmuletEmergency, 60 * 20); } + + // Charged Ring of Shielding - 25% chance to instantly restore the Runic Shielding lost from damage. + if (BaublesApi.isBaubleEquipped(player, CRItems.runicRingCharged) > 0 && !(player.getCooldownTracker().hasCooldown(CRItems.runicRingCharged)) && player.world.rand.nextDouble() <= 0.25D) { + player.world.playSound(null, player.posX, player.posY, player.posZ, SoundsTC.runicShieldEffect, SoundCategory.PLAYERS, 1.0F, 1.0F + (float) player.getEntityWorld().rand.nextGaussian() * 0.05F); + player.setAbsorptionAmount(charge + 1); + + ((EntityPlayer) player).addStat(StatList.getObjectUseStats(CRItems.runicRingCharged)); + } } } } diff --git a/src/main/java/mod/icarus/crimsonrevelations/init/CRItems.java b/src/main/java/mod/icarus/crimsonrevelations/init/CRItems.java index 7d0f2fd..2575a37 100644 --- a/src/main/java/mod/icarus/crimsonrevelations/init/CRItems.java +++ b/src/main/java/mod/icarus/crimsonrevelations/init/CRItems.java @@ -91,6 +91,8 @@ public class CRItems { public static Item runicGirdleKinetic; @GameRegistry.ObjectHolder("runic_ring") public static Item runicRing; + @GameRegistry.ObjectHolder("runic_ring_charged") + public static Item runicRingCharged; @GameRegistry.ObjectHolder("runic_ring_regen") public static Item runicRingRegen; @@ -124,6 +126,7 @@ public static void registerItems(@Nonnull final RegistryEvent.Register eve CRRegistry.setup(new CRItemRunicBauble(BaubleType.RING, EnumRarity.UNCOMMON, 5), "runic_ring"), CRRegistry.setup(new CRItemRunicBauble(BaubleType.AMULET, EnumRarity.UNCOMMON, 8), "runic_amulet"), CRRegistry.setup(new CRItemRunicBauble(BaubleType.BELT, EnumRarity.UNCOMMON, 10), "runic_girdle"), + CRRegistry.setup(new CRItemRunicBauble(BaubleType.RING, EnumRarity.RARE, 4), "runic_ring_charged"), CRRegistry.setup(new CRItemRunicBauble(BaubleType.RING, EnumRarity.RARE, 4), "runic_ring_regen"), CRRegistry.setup(new CRItemRunicBauble(BaubleType.AMULET, EnumRarity.RARE, 7), "runic_amulet_emergency"), CRRegistry.setup(new CRItemRunicBauble(BaubleType.BELT, EnumRarity.RARE, 9), "runic_girdle_kinetic"), diff --git a/src/main/resources/assets/crimsonrevelations/lang/en_us.lang b/src/main/resources/assets/crimsonrevelations/lang/en_us.lang index 62ba3df..7918927 100644 --- a/src/main/resources/assets/crimsonrevelations/lang/en_us.lang +++ b/src/main/resources/assets/crimsonrevelations/lang/en_us.lang @@ -29,6 +29,7 @@ item.crimsonrevelations.runic_amulet_emergency.name=Amulet of Emergency Shieldin item.crimsonrevelations.runic_girdle.name=Belt of Runic Shielding item.crimsonrevelations.runic_girdle_kinetic.name=Kinetic Girdle of Shielding item.crimsonrevelations.runic_ring.name=Ring of Runic Shielding +item.crimsonrevelations.runic_ring_charged.name=Charged Ring of Shielding item.crimsonrevelations.runic_ring_regen.name=Revitalizing Ring of Shielding item.crimsonrevelations.terra_arrow.name=Terra Arrow diff --git a/src/main/resources/assets/crimsonrevelations/models/item/runic_ring_charged.json b/src/main/resources/assets/crimsonrevelations/models/item/runic_ring_charged.json new file mode 100644 index 0000000..3a12a19 --- /dev/null +++ b/src/main/resources/assets/crimsonrevelations/models/item/runic_ring_charged.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "crimsonrevelations:items/runic_ring_charged" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/crimsonrevelations/textures/items/primordial_scribing_tools.png b/src/main/resources/assets/crimsonrevelations/textures/items/primordial_scribing_tools.png index 40d7078..7585286 100644 Binary files a/src/main/resources/assets/crimsonrevelations/textures/items/primordial_scribing_tools.png and b/src/main/resources/assets/crimsonrevelations/textures/items/primordial_scribing_tools.png differ diff --git a/src/main/resources/assets/crimsonrevelations/textures/items/runic_ring_charged.png b/src/main/resources/assets/crimsonrevelations/textures/items/runic_ring_charged.png new file mode 100644 index 0000000..4aad249 Binary files /dev/null and b/src/main/resources/assets/crimsonrevelations/textures/items/runic_ring_charged.png differ diff --git a/src/main/resources/assets/crimsonrevelations/textures/items/runic_ring_charged.png.mcmeta b/src/main/resources/assets/crimsonrevelations/textures/items/runic_ring_charged.png.mcmeta new file mode 100644 index 0000000..7e77c64 --- /dev/null +++ b/src/main/resources/assets/crimsonrevelations/textures/items/runic_ring_charged.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} \ No newline at end of file