Pushing changes in 1.7.2 to 1.6.4 build
This commit is contained in:
parent
a4a02b4118
commit
fa9112493c
170 changed files with 4803 additions and 272 deletions
|
@ -4,10 +4,17 @@ import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee;
|
|||
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.MeleeDefaultEarth;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.MeleeDefensiveEarth;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.MeleeEnvironmentalEarth;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.MeleeOffensiveEarth;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ProjectileDefaultEarth;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ProjectileDefensiveEarth;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ProjectileEnvironmentalEarth;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.ProjectileOffensiveEarth;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.SelfDefaultEarth;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.SelfDefensiveEarth;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.SelfEnvironmentalEarth;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth.SelfOffensiveEarth;
|
||||
|
||||
public class SpellEffectEarth extends SpellEffect
|
||||
{
|
||||
|
@ -38,29 +45,25 @@ public class SpellEffectEarth extends SpellEffect
|
|||
@Override
|
||||
public void defaultModificationSelf(SpellParadigmSelf parad)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
parad.addSelfSpellEffect(new SelfDefaultEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void offensiveModificationSelf(SpellParadigmSelf parad)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
parad.addSelfSpellEffect(new SelfOffensiveEarth(this.powerEnhancement,this.potencyEnhancement, this.costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void defensiveModificationSelf(SpellParadigmSelf parad)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
parad.addSelfSpellEffect(new SelfDefensiveEarth(this.powerEnhancement,this.potencyEnhancement, this.costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void environmentalModificationSelf(SpellParadigmSelf parad)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
parad.addSelfSpellEffect(new SelfEnvironmentalEarth(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -72,22 +75,19 @@ public class SpellEffectEarth extends SpellEffect
|
|||
@Override
|
||||
public void offensiveModificationMelee(SpellParadigmMelee parad)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
parad.addWorldEffect(new MeleeOffensiveEarth(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void defensiveModificationMelee(SpellParadigmMelee parad)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
parad.addWorldEffect(new MeleeDefensiveEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void environmentalModificationMelee(SpellParadigmMelee parad)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
parad.addWorldEffect(new MeleeEnvironmentalEarth(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -100,7 +100,7 @@ public class SpellEffectEarth extends SpellEffect
|
|||
protected int getCostForOffenseProjectile()
|
||||
{
|
||||
|
||||
return (int)(3*(1.5*this.potencyEnhancement+1)*(Math.pow(1*this.powerEnhancement+1,2))*Math.pow(0.8, costEnhancement));
|
||||
return (int)(10*(1.5*this.potencyEnhancement+1)*(Math.pow(1*this.powerEnhancement+1,2))*Math.pow(0.8, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -118,22 +118,19 @@ public class SpellEffectEarth extends SpellEffect
|
|||
@Override
|
||||
protected int getCostForDefaultSelf()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
return (int)(20*Math.pow(1.5*powerEnhancement+1,2)*(2*this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForOffenseSelf()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
return (int)(10*Math.pow(2*this.powerEnhancement+1,2)*(this.potencyEnhancement+1));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForDefenseSelf()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
return (int)(750*(1.1*this.powerEnhancement+1)*(0.5*this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -146,28 +143,24 @@ public class SpellEffectEarth extends SpellEffect
|
|||
@Override
|
||||
protected int getCostForDefaultMelee()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
return (int)(50*Math.pow(1.5*this.potencyEnhancement + 1,3)*(0.5*this.powerEnhancement + 1)*Math.pow(0.8, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForOffenseMelee()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
return (int)(20*Math.pow(1.5*this.powerEnhancement+1,3)*(0.25*this.powerEnhancement+1));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForDefenseMelee()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
return (int)(5*(1.2*this.powerEnhancement+1)*(1.0f/3.0f*Math.pow(this.potencyEnhancement,2)+2+1.0f/2.0f*this.potencyEnhancement)*Math.pow(0.8, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForEnvironmentMelee()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
return (int)(500*Math.pow(2*this.potencyEnhancement+1, 3)*(0.25*this.powerEnhancement+1)*Math.pow(0.8, costEnhancement));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
|
@ -16,6 +17,8 @@ import net.minecraft.util.AxisAlignedBB;
|
|||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.NewPacketHandler;
|
||||
|
||||
public class SpellHelper
|
||||
|
@ -201,14 +204,17 @@ public class SpellHelper
|
|||
if(block==Blocks.stone)
|
||||
{
|
||||
world.setBlock(posX, posY, posZ, Blocks.cobblestone);
|
||||
return;
|
||||
}
|
||||
else if(block==Blocks.cobblestone)
|
||||
{
|
||||
world.setBlock(posX, posY, posZ, Blocks.gravel);
|
||||
return;
|
||||
}
|
||||
else if(block==Blocks.gravel)
|
||||
{
|
||||
world.setBlock(posX, posY, posZ, Blocks.sand);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -226,4 +232,40 @@ public class SpellHelper
|
|||
world.setBlockToAir(posX, posY, posZ);
|
||||
}
|
||||
}
|
||||
|
||||
public static ItemStack getDustForOre(ItemStack item)
|
||||
{
|
||||
String oreName = OreDictionary.getOreName(OreDictionary.getOreID(item));
|
||||
|
||||
if(oreName.contains("ore"))
|
||||
{
|
||||
String lowercaseOre = oreName;
|
||||
lowercaseOre.toLowerCase();
|
||||
boolean isAllowed = false;
|
||||
|
||||
for(String str : AlchemicalWizardry.allowedCrushedOresArray)
|
||||
{
|
||||
if(lowercaseOre.contains(str))
|
||||
{
|
||||
isAllowed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(!isAllowed)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
String dustName = oreName.replace("ore", "dust");
|
||||
|
||||
ArrayList<ItemStack> items = OreDictionary.getOres(dustName);
|
||||
|
||||
if(items!=null && items.size()>=1)
|
||||
{
|
||||
return(items.get(0).copy());
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,18 +11,17 @@ public abstract class MeleeSpellCenteredWorldEffect extends MeleeSpellWorldEffec
|
|||
public MeleeSpellCenteredWorldEffect(int power, int potency, int cost)
|
||||
{
|
||||
super(power, potency, cost);
|
||||
range = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWorldEffect(World world, EntityPlayer entityPlayer)
|
||||
{
|
||||
Vec3 lookVec = entityPlayer.getLook(range);
|
||||
int x = (int)(entityPlayer.posX + lookVec.xCoord);
|
||||
int y = (int)(entityPlayer.posY + entityPlayer.getEyeHeight() + lookVec.yCoord);
|
||||
int z = (int)(entityPlayer.posZ + lookVec.zCoord);
|
||||
Vec3 lookVec = entityPlayer.getLook(range).normalize();
|
||||
int x = (int)(entityPlayer.posX + lookVec.xCoord*range);
|
||||
int y = (int)(entityPlayer.posY + entityPlayer.getEyeHeight() + lookVec.yCoord*range);
|
||||
int z = (int)(entityPlayer.posZ + lookVec.zCoord*range);
|
||||
|
||||
this.onCenteredWorldEffect(world, x, y, z);
|
||||
this.onCenteredWorldEffect(entityPlayer, world, x, y, z);
|
||||
}
|
||||
|
||||
public void setRange(float range)
|
||||
|
@ -30,5 +29,5 @@ public abstract class MeleeSpellCenteredWorldEffect extends MeleeSpellWorldEffec
|
|||
this.range = range;
|
||||
}
|
||||
|
||||
public abstract void onCenteredWorldEffect(World world, int posX, int posY, int posZ);
|
||||
public abstract void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ);
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.e
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.item.EntityFallingBlock;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.MeleeSpellCenteredWorldEffect;
|
||||
|
||||
|
@ -10,17 +11,19 @@ public class MeleeDefaultEarth extends MeleeSpellCenteredWorldEffect
|
|||
public MeleeDefaultEarth(int power, int potency, int cost)
|
||||
{
|
||||
super(power, potency, cost);
|
||||
this.setRange(2);
|
||||
this.setRange(3*power + 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCenteredWorldEffect(World world, int posX, int posY, int posZ)
|
||||
public void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ)
|
||||
{
|
||||
for(int i=-3; i<=3; i++)
|
||||
int radius = this.potencyUpgrades;
|
||||
|
||||
for(int i=-radius; i<=radius; i++)
|
||||
{
|
||||
for(int j=-3; j<=3; j++)
|
||||
for(int j=-radius; j<=radius; j++)
|
||||
{
|
||||
for(int k=-3; k<=3; k++)
|
||||
for(int k=-radius; k<=radius; k++)
|
||||
{
|
||||
if(!world.isAirBlock(posX + i, posY + j, posZ + k) && world.getTileEntity(posX + i, posY + j, posZ + k)==null)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.item.EntityFallingBlock;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockTeleposer;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.MeleeSpellCenteredWorldEffect;
|
||||
|
||||
public class MeleeDefensiveEarth extends MeleeSpellCenteredWorldEffect
|
||||
{
|
||||
public MeleeDefensiveEarth(int power, int potency, int cost)
|
||||
{
|
||||
super(power, potency, cost);
|
||||
this.setRange(3*power+2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ)
|
||||
{
|
||||
ForgeDirection dir = SpellHelper.getDirectionForLookVector(player.getLook(1));
|
||||
|
||||
int vertRadius = (int)(2 + 1.0f/2.0f*Math.pow(this.potencyUpgrades,2)+1.0f/2.0f*this.potencyUpgrades);
|
||||
int horizRadius = this.potencyUpgrades+1;
|
||||
|
||||
int xOff = dir.offsetX;
|
||||
int zOff = dir.offsetZ;
|
||||
|
||||
for(int i=-horizRadius; i<=horizRadius; i++)
|
||||
{
|
||||
for(int j=0; j<vertRadius; j++)
|
||||
{
|
||||
BlockTeleposer.swapBlocks(world, world, posX + i*zOff, posY + j, posZ + i*xOff, posX + i*zOff, posY + j - vertRadius, posZ + i*xOff);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
|
||||
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.MeleeSpellCenteredWorldEffect;
|
||||
|
||||
public class MeleeEnvironmentalEarth extends MeleeSpellCenteredWorldEffect
|
||||
{
|
||||
public MeleeEnvironmentalEarth(int power, int potency, int cost)
|
||||
{
|
||||
super(power, potency, cost);
|
||||
this.setRange(3*power + 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ)
|
||||
{
|
||||
int radius = this.potencyUpgrades;
|
||||
|
||||
for(int i=-radius; i<=radius; i++)
|
||||
{
|
||||
for(int j=-radius; j<=radius; j++)
|
||||
{
|
||||
for(int k=-radius; k<=radius; k++)
|
||||
{
|
||||
if(!world.isAirBlock(posX + i, posY + j, posZ + k) && world.getTileEntity(posX + i, posY + j, posZ + k)==null)
|
||||
{
|
||||
ItemStack stack = new ItemStack(world.getBlock(posX+i, posY+j, posZ+k),1,world.getBlockMetadata(posX+i, posY+j, posZ+k));
|
||||
|
||||
ItemStack dustStack = SpellHelper.getDustForOre(stack);
|
||||
|
||||
if(dustStack!=null)
|
||||
{
|
||||
dustStack.stackSize *= 3;
|
||||
world.spawnEntityInWorld(new EntityItem(world,posX,posY,posZ,dustStack));
|
||||
|
||||
world.setBlockToAir(posX+i, posY+j, posZ+k);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
|
||||
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.MeleeSpellCenteredWorldEffect;
|
||||
|
||||
public class MeleeOffensiveEarth extends MeleeSpellCenteredWorldEffect
|
||||
{
|
||||
public MeleeOffensiveEarth(int power, int potency, int cost)
|
||||
{
|
||||
super(power, potency, cost);
|
||||
this.setRange(3*power + 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ)
|
||||
{
|
||||
int radius = this.potencyUpgrades;
|
||||
|
||||
for(int i=-radius; i<=radius; i++)
|
||||
{
|
||||
for(int j=-radius; j<=radius; j++)
|
||||
{
|
||||
for(int k=-radius; k<=radius; k++)
|
||||
{
|
||||
SpellHelper.smashBlock(world, posX+i, posY+j, posZ+k);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockTeleposer;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.SelfSpellEffect;
|
||||
|
||||
public class SelfDefaultEarth extends SelfSpellEffect
|
||||
{
|
||||
|
||||
public SelfDefaultEarth(int power, int potency, int cost)
|
||||
{
|
||||
super(power, potency, cost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSelfUse(World world, EntityPlayer player)
|
||||
{
|
||||
int horizRadius = this.powerUpgrades;
|
||||
int vertRange = 5 + 10*this.potencyUpgrades;
|
||||
|
||||
Vec3 blockVec = SpellHelper.getEntityBlockVector(player);
|
||||
|
||||
int posX = (int)(blockVec.xCoord);
|
||||
int posY = (int)(blockVec.yCoord) - 1;
|
||||
int posZ = (int)(blockVec.zCoord);
|
||||
|
||||
for(int i=-horizRadius; i<=horizRadius; i++)
|
||||
{
|
||||
for(int k=-horizRadius; k<=horizRadius; k++)
|
||||
{
|
||||
if(!world.isAirBlock(posX+i, posY, posZ+k))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
for(int j=-1; j>=-vertRange; j--)
|
||||
{
|
||||
if(!world.isAirBlock(posX+i, posY+j, posZ+k)&&!SpellHelper.isBlockFluid(world.getBlock(posX+i, posY+j, posZ+k)))
|
||||
{
|
||||
BlockTeleposer.swapBlocks(world, world, posX+i, posY, posZ+k, posX+i, posY+j, posZ+k);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.SelfSpellEffect;
|
||||
|
||||
public class SelfDefensiveEarth extends SelfSpellEffect
|
||||
{
|
||||
|
||||
public SelfDefensiveEarth(int power, int potency, int cost)
|
||||
{
|
||||
super(power, potency, cost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSelfUse(World world, EntityPlayer player)
|
||||
{
|
||||
int pot = 2*this.potencyUpgrades + 1;
|
||||
int duration = 20*60*(this.powerUpgrades+1);
|
||||
|
||||
player.addPotionEffect(new PotionEffect(Potion.field_76434_w.id,duration, pot));
|
||||
player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionHeavyHeart.id, duration, pot));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.block.BlockTeleposer;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.SelfSpellEffect;
|
||||
|
||||
public class SelfEnvironmentalEarth extends SelfSpellEffect
|
||||
{
|
||||
public SelfEnvironmentalEarth(int power, int potency, int cost)
|
||||
{
|
||||
super(power, potency, cost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSelfUse(World world, EntityPlayer player)
|
||||
{
|
||||
int horizRadius = this.powerUpgrades + 1;
|
||||
int vertRadius = this.potencyUpgrades + 2;
|
||||
|
||||
Vec3 blockVec = SpellHelper.getEntityBlockVector(player);
|
||||
|
||||
int posX = (int)(blockVec.xCoord);
|
||||
int posY = (int)(blockVec.yCoord);
|
||||
int posZ = (int)(blockVec.zCoord);
|
||||
|
||||
for(int i=-horizRadius; i<=horizRadius; i++)
|
||||
{
|
||||
for(int j=0; j<vertRadius; j++)
|
||||
{
|
||||
for(int k=-horizRadius; k<=horizRadius; k++)
|
||||
{
|
||||
// if(k==0&&i==0)
|
||||
// {
|
||||
// continue;
|
||||
// }
|
||||
|
||||
BlockTeleposer.swapBlocks(world, world, posX + i, posY + j, posZ+k, posX+i, posY+j-vertRadius, posZ+k);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.SelfSpellEffect;
|
||||
|
||||
public class SelfOffensiveEarth extends SelfSpellEffect
|
||||
{
|
||||
|
||||
public SelfOffensiveEarth(int power, int potency, int cost)
|
||||
{
|
||||
super(power, potency, cost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSelfUse(World world, EntityPlayer player)
|
||||
{
|
||||
int horizRadius = this.powerUpgrades;
|
||||
int vertRadius = this.potencyUpgrades + 1;
|
||||
|
||||
Vec3 blockVec = SpellHelper.getEntityBlockVector(player);
|
||||
|
||||
int posX = (int)(blockVec.xCoord);
|
||||
int posY = (int)(blockVec.yCoord);
|
||||
int posZ = (int)(blockVec.zCoord);
|
||||
|
||||
for(int i=-horizRadius; i<=horizRadius; i++)
|
||||
{
|
||||
for(int j=-vertRadius; j<0; j++)
|
||||
{
|
||||
for(int k=-horizRadius; k<=horizRadius; k++)
|
||||
{
|
||||
if(world.rand.nextFloat()<0.7f)
|
||||
{
|
||||
SpellHelper.smashBlock(world, posX+i, posY+j, posZ+k);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -16,6 +16,6 @@ public class SelfOffensiveFire extends SelfSpellEffect
|
|||
@Override
|
||||
public void onSelfUse(World world, EntityPlayer player)
|
||||
{
|
||||
player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionFlameCloak.id,(this.powerUpgrades+1)*this.powerUpgrades,this.potencyUpgrades));
|
||||
player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionFlameCloak.id,200*(this.powerUpgrades+1)*(this.powerUpgrades+1),this.potencyUpgrades));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue