Add enrage spell
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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"]},
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
Reference in New Issue
Block a user