That's one heck of a commit you've got there...
I may have got a bit behind with version control. A lot behind, in fact. Maybe I'll go back and split this sometime - then again, I probably won't. But hey, at least it's here!
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
package electroblob.wizardry.spell;
|
||||
|
||||
import electroblob.wizardry.constants.Element;
|
||||
import electroblob.wizardry.constants.SpellType;
|
||||
import electroblob.wizardry.constants.Tier;
|
||||
import electroblob.wizardry.registry.WizardryItems;
|
||||
import electroblob.wizardry.util.MagicDamage;
|
||||
import electroblob.wizardry.util.MagicDamage.DamageType;
|
||||
@@ -12,19 +9,16 @@ import electroblob.wizardry.util.SpellModifiers;
|
||||
import electroblob.wizardry.util.WizardryUtilities;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.init.SoundEvents;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ForestsCurse extends SpellAreaEffect {
|
||||
|
||||
private static final int BASE_DAMAGE = 4;
|
||||
private static final int BASE_DURATION = 140;
|
||||
|
||||
public ForestsCurse(){
|
||||
super("forests_curse", Tier.MASTER, Element.EARTH, SpellType.ATTACK, 75, 200, EnumAction.BOW, 5, SoundEvents.ENTITY_WITHER_SPAWN);
|
||||
super("forests_curse", EnumAction.BOW);
|
||||
this.soundValues(1, 1.1f, 0.2f);
|
||||
addProperties(DAMAGE, EFFECT_DURATION, EFFECT_STRENGTH);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -33,13 +27,15 @@ public class ForestsCurse extends SpellAreaEffect {
|
||||
if(!MagicDamage.isEntityImmune(DamageType.POISON, target) && WizardryUtilities.isLiving(target)){
|
||||
|
||||
target.attackEntityFrom(MagicDamage.causeDirectMagicDamage(caster, DamageType.POISON),
|
||||
BASE_DAMAGE * modifiers.get(SpellModifiers.POTENCY));
|
||||
|
||||
int duration = (int)(BASE_DURATION * modifiers.get(WizardryItems.duration_upgrade));
|
||||
|
||||
target.addPotionEffect(new PotionEffect(MobEffects.POISON, duration, 2));
|
||||
target.addPotionEffect(new PotionEffect(MobEffects.SLOWNESS, duration, 2));
|
||||
target.addPotionEffect(new PotionEffect(MobEffects.WEAKNESS, duration, 2));
|
||||
getProperty(DAMAGE).floatValue() * modifiers.get(SpellModifiers.POTENCY));
|
||||
|
||||
int bonusAmplifier = SpellBuff.getStandardBonusAmplifier(modifiers.get(SpellModifiers.POTENCY));
|
||||
int duration = (int)(getProperty(EFFECT_DURATION).floatValue() * modifiers.get(WizardryItems.duration_upgrade));
|
||||
int amplifier = (int)(getProperty(EFFECT_STRENGTH).floatValue() + bonusAmplifier);
|
||||
|
||||
target.addPotionEffect(new PotionEffect(MobEffects.POISON, duration, amplifier));
|
||||
target.addPotionEffect(new PotionEffect(MobEffects.SLOWNESS, duration, amplifier));
|
||||
target.addPotionEffect(new PotionEffect(MobEffects.WEAKNESS, duration, amplifier));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user