Implement blast modifier support for all applicable constructs, plus misc construct-related cleanup and fixes
This commit is contained in:
@@ -11,6 +11,7 @@ public class ArrowRain extends SpellConstructRanged<EntityArrowRain> {
|
||||
public ArrowRain(){
|
||||
super("arrow_rain", EntityArrowRain::new, false);
|
||||
this.floor(true);
|
||||
addProperties(EFFECT_RADIUS);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -13,6 +13,7 @@ public class Hailstorm extends SpellConstructRanged<EntityHailstorm> {
|
||||
public Hailstorm(){
|
||||
super("hailstorm", EntityHailstorm::new, false);
|
||||
this.floor(true);
|
||||
addProperties(EFFECT_RADIUS);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,6 +2,7 @@ package electroblob.wizardry.spell;
|
||||
|
||||
import electroblob.wizardry.Wizardry;
|
||||
import electroblob.wizardry.entity.construct.EntityMagicConstruct;
|
||||
import electroblob.wizardry.entity.construct.EntityScaledConstruct;
|
||||
import electroblob.wizardry.registry.WizardryItems;
|
||||
import electroblob.wizardry.util.BlockUtils;
|
||||
import electroblob.wizardry.util.SpellModifiers;
|
||||
@@ -160,6 +161,7 @@ public class SpellConstruct<T extends EntityMagicConstruct> extends Spell {
|
||||
construct.setCaster(caster);
|
||||
construct.lifetime = permanent ? -1 : (int)(getProperty(DURATION).floatValue() * modifiers.get(WizardryItems.duration_upgrade));
|
||||
construct.damageMultiplier = modifiers.get(SpellModifiers.POTENCY);
|
||||
if(construct instanceof EntityScaledConstruct) ((EntityScaledConstruct)construct).setSizeMultiplier(modifiers.get(WizardryItems.blast_upgrade));
|
||||
addConstructExtras(construct, side, caster, modifiers);
|
||||
// Prevents overlapping of multiple constructs of the same type. Since we have an instance here this is
|
||||
// very simple. The trade-off is that we have to create the entity before the spell fails, but unless
|
||||
|
||||
Reference in New Issue
Block a user