diff --git a/src/main/java/electroblob/wizardry/registry/Spells.java b/src/main/java/electroblob/wizardry/registry/Spells.java index 286a9ab2..e9c5f1a8 100644 --- a/src/main/java/electroblob/wizardry/registry/Spells.java +++ b/src/main/java/electroblob/wizardry/registry/Spells.java @@ -243,6 +243,7 @@ public final class Spells { public static final Spell frost_barrier = placeholder(); public static final Spell blinding_flash = placeholder(); + public static final Spell enrage = placeholder(); public static final Spell mark_sacrifice = placeholder(); public static final Spell stormcloud = placeholder(); @@ -458,6 +459,7 @@ public final class Spells { registry.register(new FrostBarrier()); registry.register(new BlindingFlash()); + registry.register(new Enrage()); registry.register(new MarkSacrifice()); registry.register(new Stormcloud()); diff --git a/src/main/java/electroblob/wizardry/spell/Enrage.java b/src/main/java/electroblob/wizardry/spell/Enrage.java new file mode 100644 index 00000000..45003b49 --- /dev/null +++ b/src/main/java/electroblob/wizardry/spell/Enrage.java @@ -0,0 +1,52 @@ +package electroblob.wizardry.spell; + +import electroblob.wizardry.item.SpellActions; +import electroblob.wizardry.util.ParticleBuilder; +import electroblob.wizardry.util.ParticleBuilder.Type; +import electroblob.wizardry.util.SpellModifiers; +import net.minecraft.entity.EntityCreature; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.tileentity.TileEntityDispenser; +import net.minecraft.util.math.Vec3d; +import net.minecraft.world.World; +import net.minecraftforge.fml.common.Mod; + +import javax.annotation.Nullable; + +@Mod.EventBusSubscriber +public class Enrage extends SpellAreaEffect { + + public Enrage(){ + super("enrage", SpellActions.SUMMON, false); + this.alwaysSucceed(true); + } + + @Override + public boolean canBeCastBy(TileEntityDispenser dispenser){ + return false; + } + + @Override + protected boolean affectEntity(World world, Vec3d origin, @Nullable EntityLivingBase caster, EntityLivingBase target, int targetCount, int ticksInUse, SpellModifiers modifiers){ + + if(caster != null && target instanceof EntityCreature){ + target.setRevengeTarget(caster); // Yours truly, angry mobs + } + + return true; + } + + @Override + protected void spawnParticleEffect(World world, Vec3d origin, double radius, @Nullable EntityLivingBase caster, SpellModifiers modifiers){ + + if(caster != null) origin = caster.getPositionEyes(1); + + for(int i = 0; i < 30; i++){ + double x = origin.x - 1 + world.rand.nextDouble() * 2; + double y = origin.y - 0.25 + world.rand.nextDouble() * 0.5; + double z = origin.z - 1 + world.rand.nextDouble() * 2; + ParticleBuilder.create(Type.DARK_MAGIC).pos(x, y, z).clr(0.9f, 0.1f, 0).spawn(world); + } + } + +} diff --git a/src/main/resources/assets/ebwizardry/lang/en_gb.lang b/src/main/resources/assets/ebwizardry/lang/en_gb.lang index 9d09419e..ea03f69f 100644 --- a/src/main/resources/assets/ebwizardry/lang/en_gb.lang +++ b/src/main/resources/assets/ebwizardry/lang/en_gb.lang @@ -810,6 +810,7 @@ spell.ebwizardry\:divination=Divination spell.ebwizardry\:dragon_fireball=Dragon Fireball spell.ebwizardry\:earthquake=Earthquake spell.ebwizardry\:empowering_presence=Empowering Presence +spell.ebwizardry\:enrage=Enrage spell.ebwizardry\:entrapment=Entrapment spell.ebwizardry\:evade=Evade spell.ebwizardry\:fangs=Fangs @@ -994,6 +995,7 @@ spell.ebwizardry\:divination.desc=Guides the caster to nearby ores and resources spell.ebwizardry\:dragon_fireball.desc=Launches an enderdragon fireball in the direction you are pointing, which releases lingering poisonous clouds on impact. spell.ebwizardry\:earthquake.desc=A true master of earth magic can move mountains. spell.ebwizardry\:empowering_presence.desc=Grants the caster and nearby allies increased magic damage for 30 seconds. +spell.ebwizardry\:enrage.desc=Causes nearby creatures to become enraged, stopping whatever they are doing to attack the caster instead. spell.ebwizardry\:entrapment.desc=Traps the target in a sphere of darkness which pulls it helplessly upwards and continually damages it. spell.ebwizardry\:evade.desc=Causes the caster to quickly jump sideways to dodge incoming attacks. spell.ebwizardry\:fangs.desc=Summons a row of evoker fangs in front of the caster that rise from the ground, biting mobs in their path. diff --git a/src/main/resources/assets/ebwizardry/lang/en_us.lang b/src/main/resources/assets/ebwizardry/lang/en_us.lang index 62439a62..010a52fb 100644 --- a/src/main/resources/assets/ebwizardry/lang/en_us.lang +++ b/src/main/resources/assets/ebwizardry/lang/en_us.lang @@ -810,6 +810,7 @@ spell.ebwizardry\:divination=Divination spell.ebwizardry\:dragon_fireball=Dragon Fireball spell.ebwizardry\:earthquake=Earthquake spell.ebwizardry\:empowering_presence=Empowering Presence +spell.ebwizardry\:enrage=Enrage spell.ebwizardry\:entrapment=Entrapment spell.ebwizardry\:evade=Evade spell.ebwizardry\:fangs=Fangs @@ -994,6 +995,7 @@ spell.ebwizardry\:divination.desc=Guides the caster to nearby ores and resources spell.ebwizardry\:dragon_fireball.desc=Launches an enderdragon fireball in the direction you are pointing, which releases lingering poisonous clouds on impact. spell.ebwizardry\:earthquake.desc=A true master of earth magic can move mountains. spell.ebwizardry\:empowering_presence.desc=Grants the caster and nearby allies increased magic damage for 30 seconds. +spell.ebwizardry\:enrage.desc=Causes nearby creatures to become enraged, stopping whatever they are doing to attack the caster instead. spell.ebwizardry\:entrapment.desc=Traps the target in a sphere of darkness which pulls it helplessly upwards and continually damages it. spell.ebwizardry\:evade.desc=Causes the caster to quickly jump sideways to dodge incoming attacks. spell.ebwizardry\:fangs.desc=Summons a row of evoker fangs in front of the caster that rise from the ground, biting mobs in their path. diff --git a/src/main/resources/assets/ebwizardry/sounds.json b/src/main/resources/assets/ebwizardry/sounds.json index f74362cf..f967a670 100644 --- a/src/main/resources/assets/ebwizardry/sounds.json +++ b/src/main/resources/assets/ebwizardry/sounds.json @@ -169,6 +169,7 @@ "spell.dragon_fireball": {"category": "spells", "sounds": ["mob/ghast/fireball4"]}, "spell.earthquake": {"category": "spells", "sounds": ["ebwizardry:rumble"]}, "spell.empowering_presence": {"category": "spells", "sounds": ["ebwizardry:buff"]}, + "spell.enrage": {"category": "spells", "sounds": ["mob/wither/idle1", "mob/wither/idle2", "mob/wither/idle3", "mob/wither/idle4"]}, "spell.entrapment": {"category": "spells", "sounds": ["mob/evocation_illager/prepare_attack1", "mob/evocation_illager/prepare_attack2"]}, "spell.evade": {"category": "spells", "sounds": ["random/bow"]}, "spell.fangs": {"category": "spells", "sounds": ["mob/evocation_illager/prepare_attack1", "mob/evocation_illager/prepare_attack2"]}, diff --git a/src/main/resources/assets/ebwizardry/spells/enrage.json b/src/main/resources/assets/ebwizardry/spells/enrage.json new file mode 100644 index 00000000..af7ce24a --- /dev/null +++ b/src/main/resources/assets/ebwizardry/spells/enrage.json @@ -0,0 +1,22 @@ +{ + "enabled": { + "book": true, + "scroll": true, + "wands": true, + "npcs": true, + "dispensers": true, + "commands": true, + "treasure": true, + "trades": true, + "looting": true + }, + "tier": "apprentice", + "element": "necromancy", + "type": "alteration", + "cost": 20, + "chargeup": 0, + "cooldown": 100, + "base_properties": { + "effect_radius": 8 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/ebwizardry/textures/spells/enrage.png b/src/main/resources/assets/ebwizardry/textures/spells/enrage.png new file mode 100644 index 00000000..6fcf177a Binary files /dev/null and b/src/main/resources/assets/ebwizardry/textures/spells/enrage.png differ