diff --git a/src/main/java/electroblob/wizardry/registry/Spells.java b/src/main/java/electroblob/wizardry/registry/Spells.java index 5827d72c..632a0852 100644 --- a/src/main/java/electroblob/wizardry/registry/Spells.java +++ b/src/main/java/electroblob/wizardry/registry/Spells.java @@ -255,6 +255,7 @@ public final class Spells { public static final Spell firestorm = placeholder(); public static final Spell zombie_apocalypse = placeholder(); public static final Spell boulder = placeholder(); + public static final Spell celestial_smite = placeholder(); @SubscribeEvent public static void register(RegistryEvent.Register event){ @@ -472,6 +473,7 @@ public final class Spells { registry.register(new Firestorm()); registry.register(new ZombieApocalypse()); registry.register(new Boulder()); + registry.register(new CelestialSmite()); } diff --git a/src/main/java/electroblob/wizardry/spell/CelestialSmite.java b/src/main/java/electroblob/wizardry/spell/CelestialSmite.java new file mode 100644 index 00000000..bc3e2566 --- /dev/null +++ b/src/main/java/electroblob/wizardry/spell/CelestialSmite.java @@ -0,0 +1,65 @@ +package electroblob.wizardry.spell; + +import electroblob.wizardry.item.SpellActions; +import electroblob.wizardry.registry.WizardryItems; +import electroblob.wizardry.util.*; +import electroblob.wizardry.util.MagicDamage.DamageType; +import electroblob.wizardry.util.ParticleBuilder.Type; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.DamageSource; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Vec3d; +import net.minecraft.world.World; + +import javax.annotation.Nullable; +import java.util.List; + +public class CelestialSmite extends SpellRay { + + public CelestialSmite(){ + super("celestial_smite", SpellActions.POINT, false); + addProperties(EFFECT_RADIUS, DAMAGE, BURN_DURATION); + } + + @Override + protected boolean onEntityHit(World world, Entity target, Vec3d hit, @Nullable EntityLivingBase caster, Vec3d origin, int ticksInUse, SpellModifiers modifiers){ + return false; + } + + @Override + protected boolean onBlockHit(World world, BlockPos pos, EnumFacing side, Vec3d hit, @Nullable EntityLivingBase caster, Vec3d origin, int ticksInUse, SpellModifiers modifiers){ + + double radius = getProperty(EFFECT_RADIUS).floatValue() * modifiers.get(WizardryItems.blast_upgrade); + + List targets = EntityUtils.getLivingWithinRadius(radius, hit.x, hit.y, hit.z, world); + + DamageSource source = caster == null ? DamageSource.MAGIC : MagicDamage.causeDirectMagicDamage(caster, DamageType.RADIANT); + float damage = getProperty(DAMAGE).floatValue() * modifiers.get(SpellModifiers.POTENCY); + + for(EntityLivingBase target : targets){ + target.attackEntityFrom(source, damage); + target.setFire(getProperty(BURN_DURATION).intValue()); + } + + if(world.isRemote){ + + ParticleBuilder.create(Type.BEAM).pos(hit.x, world.getActualHeight(), hit.z).target(hit).scale(8) + .clr(0xffbf00).time(10).spawn(world); + ParticleBuilder.create(Type.SPHERE).pos(hit).scale(4).clr(0xfff098).spawn(world); + + if(side == EnumFacing.UP){ + Vec3d vec = hit.add(new Vec3d(side.getDirectionVec()).scale(GeometryUtils.ANTI_Z_FIGHTING_OFFSET)); + ParticleBuilder.create(Type.SCORCH).pos(vec).face(side).scale(3).spawn(world); + } + } + + return true; + } + + @Override + protected boolean onMiss(World world, @Nullable EntityLivingBase caster, Vec3d origin, Vec3d direction, int ticksInUse, SpellModifiers modifiers){ + return false; + } +} diff --git a/src/main/resources/assets/ebwizardry/lang/en_gb.lang b/src/main/resources/assets/ebwizardry/lang/en_gb.lang index 82d1fc1e..2d28f970 100644 --- a/src/main/resources/assets/ebwizardry/lang/en_gb.lang +++ b/src/main/resources/assets/ebwizardry/lang/en_gb.lang @@ -785,6 +785,7 @@ spell.ebwizardry\:blink=Blink spell.ebwizardry\:blizzard=Blizzard spell.ebwizardry\:boulder=Boulder spell.ebwizardry\:bubble=Bubble +spell.ebwizardry\:celestial_smite=Celestial Smite spell.ebwizardry\:chain_lightning=Chain Lightning spell.ebwizardry\:charge=Charge spell.ebwizardry\:clairvoyance=Clairvoyance @@ -971,6 +972,7 @@ spell.ebwizardry\:blink.desc=Teleports the caster over a short distance to where spell.ebwizardry\:blizzard.desc=Creates a zone of swirling icy wind which slows and continually damages anything trapped inside. The caster is immune to the damage but is still slowed. spell.ebwizardry\:boulder.desc="Let the world be my bowling alley, and my foes be the pins!" spell.ebwizardry\:bubble.desc=Fires a jet of bubbles which causes anything it hits to float upwards helplessly. The target will fall after a certain time or if it is damaged. +spell.ebwizardry\:celestial_smite.desc="Oh powers divine, I call upon thee now! Rid this land of dark creatures most foul!" spell.ebwizardry\:chain_lightning.desc=Fires a spark of lightning at the target, which then chains to additional targets up to twice. spell.ebwizardry\:charge.desc=Causes the caster to charge rapidly in the direction they are looking, damaging and knocking back anything in their path. spell.ebwizardry\:clairvoyance.desc=Reveals the path to a remembered location. With this spell selected, sneak-right-click on a block to set the location. Cast this spell normally to reveal the path. The path will fade after 90 seconds. @@ -1008,7 +1010,7 @@ spell.ebwizardry\:firebomb.desc=Lanches a firebomb in the direction you are poin spell.ebwizardry\:fire_resistance.desc=Grants the caster fire resistance for 30 seconds. spell.ebwizardry\:fire_sigil.desc=Places a magical fire trap on the ground which damages and sets on fire the creature that triggers it. spell.ebwizardry\:fireskin.desc=Cloaks the caster in flames for 30 seconds, causing anything that attacks them to catch fire. -spell.ebwizardry\:firestorm.desc="Purge the land and purge the soil!\nTrees shall burn and lakes shall boil!\nTorch the wood and scorch the stone!\nAll bow before the fiery throne!" +spell.ebwizardry\:firestorm.desc="Purge the land and purge the soil!\nTrees shall burn and lakes shall boil!\nTorch the wood and scorch the stone!\nAll bow before the infernal throne!" spell.ebwizardry\:fire_breath.desc="I am the dragon." spell.ebwizardry\:flame_ray.desc=Creates a stream of flames in the direction you are pointing which sets on fire and continually damages targets. spell.ebwizardry\:flaming_axe.desc=Creates a flaming axe which sets enemies on fire when hit. Lasts for 30 seconds. diff --git a/src/main/resources/assets/ebwizardry/lang/en_us.lang b/src/main/resources/assets/ebwizardry/lang/en_us.lang index f5515718..244eeb15 100644 --- a/src/main/resources/assets/ebwizardry/lang/en_us.lang +++ b/src/main/resources/assets/ebwizardry/lang/en_us.lang @@ -785,6 +785,7 @@ spell.ebwizardry\:blink=Blink spell.ebwizardry\:blizzard=Blizzard spell.ebwizardry\:boulder=Boulder spell.ebwizardry\:bubble=Bubble +spell.ebwizardry\:celestial_smite=Celestial Smite spell.ebwizardry\:chain_lightning=Chain Lightning spell.ebwizardry\:charge=Charge spell.ebwizardry\:clairvoyance=Clairvoyance @@ -971,6 +972,7 @@ spell.ebwizardry\:blink.desc=Teleports the caster over a short distance to where spell.ebwizardry\:blizzard.desc=Creates a zone of swirling icy wind which slows and continually damages anything trapped inside. The caster is immune to the damage but is still slowed. spell.ebwizardry\:boulder.desc="Let the world be my bowling alley, and my foes be the pins!" spell.ebwizardry\:bubble.desc=Fires a jet of bubbles which causes anything it hits to float upwards helplessly. The target will fall after a certain time or if it is damaged. +spell.ebwizardry\:celestial_smite.desc="Oh powers divine, I call upon thee now! Rid this land of dark creatures most foul!" spell.ebwizardry\:chain_lightning.desc=Fires a spark of lightning at the target, which then chains to additional targets up to twice. spell.ebwizardry\:charge.desc=Causes the caster to charge rapidly in the direction they are looking, damaging and knocking back anything in their path. spell.ebwizardry\:clairvoyance.desc=Reveals the path to a remembered location. With this spell selected, sneak-right-click on a block to set the location. Cast this spell normally to reveal the path. The path will fade after 90 seconds. @@ -1008,7 +1010,7 @@ spell.ebwizardry\:firebomb.desc=Lanches a firebomb in the direction you are poin spell.ebwizardry\:fire_resistance.desc=Grants the caster fire resistance for 30 seconds. spell.ebwizardry\:fire_sigil.desc=Places a magical fire trap on the ground which damages and sets on fire the creature that triggers it. spell.ebwizardry\:fireskin.desc=Cloaks the caster in flames for 30 seconds, causing anything that attacks them to catch fire. -spell.ebwizardry\:firestorm.desc="Purge the land and purge the soil!\nTrees shall burn and lakes shall boil!\nTorch the wood and scorch the stone!\nAll bow before the fiery throne!" +spell.ebwizardry\:firestorm.desc="Purge the land and purge the soil!\nTrees shall burn and lakes shall boil!\nTorch the wood and scorch the stone!\nAll bow before the infernal throne!" spell.ebwizardry\:fire_breath.desc="I am the dragon." spell.ebwizardry\:flame_ray.desc=Creates a stream of flames in the direction you are pointing which sets on fire and continually damages targets. spell.ebwizardry\:flaming_axe.desc=Creates a flaming axe which sets enemies on fire when hit. Lasts for 30 seconds. diff --git a/src/main/resources/assets/ebwizardry/sounds.json b/src/main/resources/assets/ebwizardry/sounds.json index b7c338c3..0b177cdf 100644 --- a/src/main/resources/assets/ebwizardry/sounds.json +++ b/src/main/resources/assets/ebwizardry/sounds.json @@ -141,6 +141,7 @@ "spell.boulder": {"category": "spells", "sounds": ["mob/evocation_illager/prepare_attack1", "mob/evocation_illager/prepare_attack2"]}, "spell.bubble.shoot": {"category": "spells", "sounds": ["ebwizardry:ice"]}, "spell.bubble.splash": {"category": "spells", "sounds": ["liquid/swim1", "liquid/swim2", "liquid/swim3", "liquid/swim4"], "volume": 2}, + "spell.celestial_smite": {"category": "spells", "sounds": ["mob/illusion_illager/prepare_blind"]}, "spell.chain_lightning": {"category": "spells", "sounds": ["ebwizardry:arc1", "ebwizardry:arc2", "ebwizardry:arc3"]}, "spell.charge": {"category": "spells", "sounds": ["ebwizardry:shockwave"]}, "spell.clairvoyance": {"category": "spells", "sounds": ["ebwizardry:conjure"]}, diff --git a/src/main/resources/assets/ebwizardry/spells/celestial_smite.json b/src/main/resources/assets/ebwizardry/spells/celestial_smite.json new file mode 100644 index 00000000..00c571b2 --- /dev/null +++ b/src/main/resources/assets/ebwizardry/spells/celestial_smite.json @@ -0,0 +1,25 @@ +{ + "enabled": { + "book": true, + "scroll": true, + "wands": true, + "npcs": true, + "dispensers": true, + "commands": true, + "treasure": true, + "trades": true, + "looting": true + }, + "tier": "master", + "element": "healing", + "type": "attack", + "cost": 100, + "chargeup": 25, + "cooldown": 200, + "base_properties": { + "range": 40, + "effect_radius": 3, + "damage": 8, + "burn_duration": 10 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/ebwizardry/textures/spells/celestial_smite.png b/src/main/resources/assets/ebwizardry/textures/spells/celestial_smite.png new file mode 100644 index 00000000..a2858b74 Binary files /dev/null and b/src/main/resources/assets/ebwizardry/textures/spells/celestial_smite.png differ