Updating 1.7.2 repo
This commit is contained in:
parent
c9a38c4c10
commit
9dc8a57a2d
76 changed files with 1789 additions and 184 deletions
|
@ -32,7 +32,7 @@ public class LifeBucketHandler
|
|||
|
||||
if (block!=null && (block.equals(ModBlocks.blockLifeEssence)) && world.getBlockMetadata(pos.blockX, pos.blockY, pos.blockZ) == 0)
|
||||
{
|
||||
world.setBlock(pos.blockX, pos.blockY, pos.blockZ, block);
|
||||
world.setBlockToAir(pos.blockX, pos.blockY, pos.blockZ);
|
||||
return new ItemStack(ModItems.bucketLife);
|
||||
} else
|
||||
{
|
||||
|
|
|
@ -17,6 +17,7 @@ public class AlchemicalPotionCreationHandler
|
|||
addPotion(new ItemStack(Items.ghast_tear), Potion.regeneration.id, 450);
|
||||
addPotion(new ItemStack(Items.golden_carrot), Potion.nightVision.id, 2 * 60 * 20);
|
||||
addPotion(new ItemStack(Items.magma_cream), Potion.fireResistance.id, 2 * 60 * 20);
|
||||
addPotion(new ItemStack(Items.water_bucket), Potion.waterBreathing.id, 2 * 60 * 20);
|
||||
addPotion(new ItemStack(Items.sugar), Potion.moveSpeed.id, 2 * 60 * 20);
|
||||
addPotion(new ItemStack(Items.speckled_melon), Potion.heal.id, 2 * 60 * 20);
|
||||
addPotion(new ItemStack(Items.spider_eye), Potion.poison.id, 450);
|
||||
|
@ -35,6 +36,7 @@ public class AlchemicalPotionCreationHandler
|
|||
addPotion(new ItemStack(ModItems.terrae), AlchemicalWizardry.customPotionBoost.id, 1 * 60 * 20);
|
||||
addPotion(new ItemStack(Items.feather), AlchemicalWizardry.customPotionFlight.id, 1 * 60 * 20);
|
||||
addPotion(new ItemStack(Items.arrow), AlchemicalWizardry.customPotionReciprocation.id, 1 * 60 * 20);
|
||||
addPotion(new ItemStack(Items.ender_pearl),AlchemicalWizardry.customPotionPlanarBinding.id,1*60*20);
|
||||
}
|
||||
|
||||
public static void addPotion(ItemStack itemStack, int potionID, int tickDuration)
|
||||
|
|
|
@ -60,9 +60,10 @@ public class EnergyItems extends Item implements IBindable
|
|||
//player.setEntityHealth((player.getHealth()-1));
|
||||
player.setHealth((player.getHealth() - 1));
|
||||
|
||||
if (player.getHealth() <= 0)
|
||||
if (player.getHealth() <= 0.0005)
|
||||
{
|
||||
player.inventory.dropAllItems();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -217,9 +218,10 @@ public class EnergyItems extends Item implements IBindable
|
|||
//player.setEntityHealth((player.getHealth()-1));
|
||||
user.setHealth((user.getHealth() - 1));
|
||||
|
||||
if (user.getHealth() <= 0.1f)
|
||||
if (user.getHealth() <= 0.0005f)
|
||||
{
|
||||
user.onDeath(DamageSource.generic);
|
||||
|
||||
}
|
||||
}
|
||||
} else if (energySyphoned >= 100)
|
||||
|
@ -231,9 +233,10 @@ public class EnergyItems extends Item implements IBindable
|
|||
//player.setEntityHealth((player.getHealth()-1));
|
||||
user.setHealth((user.getHealth() - 1));
|
||||
|
||||
if (user.getHealth() <= 0.1f)
|
||||
if (user.getHealth() <= 0.0005f)
|
||||
{
|
||||
user.onDeath(DamageSource.generic);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class ItemAlchemyBase extends Item
|
||||
{
|
||||
private static final String[] ITEM_NAMES = new String[]{};
|
||||
private static final String[] ITEM_NAMES = new String[]{"Offensa","Praesidium","OrbisTerrae","StrengthenedCatalyst","ConcentratedCatalyst","FracturedBone","Virtus","Reductus","Potentia"};
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[] icons;
|
||||
|
|
|
@ -21,7 +21,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class ItemComponents extends Item
|
||||
{
|
||||
private static final String[] ITEM_NAMES = new String[]{"QuartzRod", "EmptyCore", "MagicalesCable", "WoodBrace", "StoneBrace", "ProjectileCore", "SelfCore","MeleeCore","ParadigmBackPlate","OutputCable","FlameCore","IcyCore","GustCore","EarthenCore","InputCable","CrackedRunicPlate","RunicPlate","ScribedRunicPlate","DefaultCore","OffensiveCore","DefensiveCore","EnvironmentalCore"};
|
||||
private static final String[] ITEM_NAMES = new String[]{"QuartzRod", "EmptyCore", "MagicalesCable", "WoodBrace", "StoneBrace", "ProjectileCore", "SelfCore","MeleeCore","ParadigmBackPlate","OutputCable","FlameCore","IcyCore","GustCore","EarthenCore","InputCable","CrackedRunicPlate","RunicPlate","ScribedRunicPlate","DefaultCore","OffensiveCore","DefensiveCore","EnvironmentalCore","PowerCore","CostCore","PotencyCore","ObsidianBrace"};
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[] icons;
|
||||
|
|
|
@ -228,7 +228,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
|||
{
|
||||
if (!p_150919_1_.isRemote)
|
||||
{
|
||||
p_150919_0_.stackSize--;
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -246,7 +246,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
|||
igrowable.func_149853_b(p_150919_1_, p_150919_1_.rand, p_150919_2_, p_150919_3_, p_150919_4_);
|
||||
}
|
||||
|
||||
--p_150919_0_.stackSize;
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -37,6 +37,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile
|
|||
private int ticksInAir = 0;
|
||||
private int ricochetCounter = 0;
|
||||
private boolean scheduledForDeath = false;
|
||||
private boolean isSilkTouch = false;
|
||||
|
||||
//Custom variables
|
||||
private int maxRicochet = 0;
|
||||
|
@ -316,6 +317,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile
|
|||
|
||||
par1NBTTagCompound.setTag("Effects", effectList);
|
||||
par1NBTTagCompound.setInteger("blocksBroken", blocksBroken);
|
||||
par1NBTTagCompound.setBoolean("isSilkTouch", isSilkTouch);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -331,6 +333,7 @@ public class EntitySpellProjectile extends Entity implements IProjectile
|
|||
inData = par1NBTTagCompound.getByte("inData") & 255;
|
||||
inGround = par1NBTTagCompound.getByte("inGround") == 1;
|
||||
blocksBroken = par1NBTTagCompound.getInteger("blocksBroken");
|
||||
isSilkTouch = par1NBTTagCompound.getBoolean("isSilkTouch");
|
||||
|
||||
NBTTagList tagList = par1NBTTagCompound.getTagList("Effects",Constants.NBT.TAG_COMPOUND);
|
||||
|
||||
|
@ -608,4 +611,14 @@ public class EntitySpellProjectile extends Entity implements IProjectile
|
|||
{
|
||||
this.blocksBroken = blocksBroken;
|
||||
}
|
||||
|
||||
public boolean getIsSilkTouch()
|
||||
{
|
||||
return this.isSilkTouch;
|
||||
}
|
||||
|
||||
public void setIsSilkTouch(boolean bool)
|
||||
{
|
||||
this.isSilkTouch = bool;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ public class SpellParadigmProjectile extends SpellParadigm
|
|||
public List<IProjectileUpdateEffect> updateEffectList;
|
||||
public boolean penetration;
|
||||
public int ricochetMax;
|
||||
public boolean isSilkTouch;
|
||||
|
||||
public SpellParadigmProjectile()
|
||||
{
|
||||
|
@ -33,6 +34,7 @@ public class SpellParadigmProjectile extends SpellParadigm
|
|||
this.updateEffectList = new ArrayList();
|
||||
this.penetration = false;
|
||||
this.ricochetMax = 0;
|
||||
this.isSilkTouch = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -71,6 +73,7 @@ public class SpellParadigmProjectile extends SpellParadigm
|
|||
proj.setUpdateEffectList(updateEffectList);
|
||||
proj.setPenetration(penetration);
|
||||
proj.setRicochetMax(ricochetMax);
|
||||
proj.setIsSilkTouch(isSilkTouch);
|
||||
proj.setSpellEffectList(bufferedEffectList);
|
||||
}
|
||||
|
||||
|
|
|
@ -93,74 +93,73 @@ public class SpellEffectEarth extends SpellEffect
|
|||
@Override
|
||||
protected int getCostForDefaultProjectile()
|
||||
{
|
||||
return (int)(10*Math.pow((0.5*(this.powerEnhancement)+1)*2 + 1,3)*Math.pow(0.8, costEnhancement));
|
||||
return (int)(10*Math.pow((0.5*(this.powerEnhancement)+1)*2 + 1,3)*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForOffenseProjectile()
|
||||
{
|
||||
|
||||
return (int)(10*(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.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForDefenseProjectile()
|
||||
{
|
||||
return (int)(3*Math.pow((this.powerEnhancement*2+1),2)*(this.potencyEnhancement*2+1)*Math.pow(0.8, costEnhancement));
|
||||
return (int)(3*Math.pow((this.powerEnhancement*2+1),2)*(this.potencyEnhancement*2+1)*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForEnvironmentProjectile()
|
||||
{
|
||||
return (int)(10*2*(0.1d*(this.potencyEnhancement+1))*Math.pow(3.47,this.potencyEnhancement)*Math.pow(0.8, costEnhancement));
|
||||
return (int)(10*2*(0.1d*(this.potencyEnhancement+1))*Math.pow(3.47,this.potencyEnhancement)*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForDefaultSelf()
|
||||
{
|
||||
return (int)(20*Math.pow(1.5*powerEnhancement+1,2)*(2*this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement));
|
||||
return (int)(20*Math.pow(1.5*powerEnhancement+1,2)*(2*this.potencyEnhancement+1)*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForOffenseSelf()
|
||||
{
|
||||
return (int)(10*Math.pow(2*this.powerEnhancement+1,2)*(this.potencyEnhancement+1));
|
||||
return (int)(10*Math.pow(2*this.powerEnhancement+1,2)*(this.potencyEnhancement+1)*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForDefenseSelf()
|
||||
{
|
||||
return (int)(750*(1.1*this.powerEnhancement+1)*(0.5*this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement));
|
||||
return (int)(750*(1.1*this.powerEnhancement+1)*(0.5*this.potencyEnhancement+1)*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForEnvironmentSelf()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
return (int)(250*(1.2*this.potencyEnhancement+1)*(3*this.powerEnhancement+2.5)*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForDefaultMelee()
|
||||
{
|
||||
return (int)(50*Math.pow(1.5*this.potencyEnhancement + 1,3)*(0.5*this.powerEnhancement + 1)*Math.pow(0.8, costEnhancement));
|
||||
return (int)(50*Math.pow(1.5*this.potencyEnhancement + 1,3)*(0.5*this.powerEnhancement + 1)*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForOffenseMelee()
|
||||
{
|
||||
return (int)(20*Math.pow(1.5*this.powerEnhancement+1,3)*(0.25*this.powerEnhancement+1));
|
||||
return (int)(20*Math.pow(1.5*this.powerEnhancement+1,3)*(0.25*this.powerEnhancement+1)*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForDefenseMelee()
|
||||
{
|
||||
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));
|
||||
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.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForEnvironmentMelee()
|
||||
{
|
||||
return (int)(500*Math.pow(2*this.potencyEnhancement+1, 3)*(0.25*this.powerEnhancement+1)*Math.pow(0.8, costEnhancement));
|
||||
return (int)(500*Math.pow(2*this.potencyEnhancement+1, 3)*(0.25*this.powerEnhancement+1)*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect;
|
|||
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.fire.MeleeDefaultFire;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.MeleeDefensiveFire;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.MeleeEnvironmentalFire;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.MeleeOffensiveFire;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.ProjectileDefaultFire;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.ProjectileDefensiveFire;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.ProjectileEnvironmentalFire;
|
||||
|
@ -66,104 +70,96 @@ public class SpellEffectFire extends SpellEffect
|
|||
@Override
|
||||
public void defaultModificationMelee(SpellParadigmMelee parad)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
parad.addEntityEffect(new MeleeDefaultFire(this.powerEnhancement, this.potencyEnhancement, this.costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void offensiveModificationMelee(SpellParadigmMelee parad)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
parad.addEntityEffect(new MeleeOffensiveFire(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void defensiveModificationMelee(SpellParadigmMelee parad)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
parad.addWorldEffect(new MeleeDefensiveFire(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void environmentalModificationMelee(SpellParadigmMelee parad)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
parad.addWorldEffect(new MeleeEnvironmentalFire(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForDefaultProjectile()
|
||||
{
|
||||
return (int)((5*Math.pow(1.5*this.powerEnhancement+1, 2)*(1.5*this.potencyEnhancement+1)+this.potencyEnhancement*15)*Math.pow(0.8, costEnhancement));
|
||||
return (int)((5*Math.pow(1.5*this.powerEnhancement+1, 2)*(1.5*this.potencyEnhancement+1)+this.potencyEnhancement*15)*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForOffenseProjectile()
|
||||
{
|
||||
return (int)(10*Math.pow((this.powerEnhancement)*1.3+1,2)*((1.5*this.potencyEnhancement+1))*Math.pow(0.8, costEnhancement));
|
||||
return (int)(10*Math.pow((this.powerEnhancement)*1.3+1,2)*((1.5*this.potencyEnhancement+1))*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForDefenseProjectile()
|
||||
{
|
||||
return (int)(25*Math.pow(1*this.powerEnhancement+1,2)*(1*this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement));
|
||||
return (int)(25*Math.pow(1*this.powerEnhancement+1,2)*(1*this.potencyEnhancement+1)*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForEnvironmentProjectile()
|
||||
{
|
||||
return (int)(75*(0.5*this.powerEnhancement+1)*(0.5*this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement));
|
||||
return (int)(75*(0.5*this.powerEnhancement+1)*(0.5*this.potencyEnhancement+1)*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForDefaultSelf()
|
||||
{
|
||||
return 10*(int)(10*Math.pow(1.5, this.powerEnhancement+1.5*this.potencyEnhancement)*Math.pow(0.8, costEnhancement));
|
||||
return 10*(int)(10*Math.pow(1.5, this.powerEnhancement+1.5*this.potencyEnhancement)*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForOffenseSelf()
|
||||
{
|
||||
return 500*(int)((this.powerEnhancement+1)*Math.pow(2, potencyEnhancement)*Math.pow(0.8, costEnhancement));
|
||||
return (int)(300*(3*powerEnhancement+1)*(2*potencyEnhancement + 1)*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForDefenseSelf()
|
||||
{
|
||||
return (int)(25*(3*this.potencyEnhancement+1)*(2*this.powerEnhancement+1)*Math.pow(0.8, costEnhancement));
|
||||
return (int)(25*(3*this.potencyEnhancement+1)*(2*this.powerEnhancement+1)*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForEnvironmentSelf()
|
||||
{
|
||||
return (int) ((15*Math.pow(1.7, powerEnhancement)+10*Math.pow(potencyEnhancement,1.8))*Math.pow(0.8, costEnhancement));
|
||||
return (int)((15*Math.pow(1.7, powerEnhancement)+10*Math.pow(potencyEnhancement,1.8))*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForDefaultMelee()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
return (int)(25*(1.2*this.potencyEnhancement+1)*(2.5*this.powerEnhancement+2)*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForOffenseMelee()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
return (int)(500*(1+this.potencyEnhancement)*(this.powerEnhancement+1)*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForDefenseMelee()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
return (int)(30*(1.5*potencyEnhancement+1)*(3*powerEnhancement+1)*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForEnvironmentMelee()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
return (int)(25*Math.pow(1.5*this.powerEnhancement+1,3)*(0.25*this.powerEnhancement+1)*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,9 +3,17 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect;
|
|||
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.wind.MeleeDefaultWind;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.MeleeDefensiveWind;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.MeleeEnvironmentalWind;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.MeleeOffensiveWind;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.ProjectileDefaultWind;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.ProjectileEnvironmentalWind;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.ProjectileOffensiveWind;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.SelfDefaultWind;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.SelfDefensiveWind;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.SelfEnvironmentalWind;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind.SelfOffensiveWind;
|
||||
|
||||
public class SpellEffectWind extends SpellEffect
|
||||
{
|
||||
|
@ -24,7 +32,7 @@ public class SpellEffectWind extends SpellEffect
|
|||
@Override
|
||||
public void defensiveModificationProjectile(SpellParadigmProjectile parad)
|
||||
{
|
||||
parad.ricochetMax+=this.potencyEnhancement;
|
||||
parad.isSilkTouch = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -36,137 +44,120 @@ public class SpellEffectWind extends SpellEffect
|
|||
@Override
|
||||
public void defaultModificationSelf(SpellParadigmSelf parad)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
parad.addSelfSpellEffect(new SelfDefaultWind(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void offensiveModificationSelf(SpellParadigmSelf parad)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
parad.addSelfSpellEffect(new SelfOffensiveWind(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void defensiveModificationSelf(SpellParadigmSelf parad)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
parad.addSelfSpellEffect(new SelfDefensiveWind(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void environmentalModificationSelf(SpellParadigmSelf parad)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
parad.addSelfSpellEffect(new SelfEnvironmentalWind(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void defaultModificationMelee(SpellParadigmMelee parad)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
parad.addEntityEffect(new MeleeDefaultWind(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void offensiveModificationMelee(SpellParadigmMelee parad)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
parad.addEntityEffect(new MeleeOffensiveWind(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void defensiveModificationMelee(SpellParadigmMelee parad)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
parad.addEntityEffect(new MeleeDefensiveWind(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void environmentalModificationMelee(SpellParadigmMelee parad)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
parad.addWorldEffect(new MeleeEnvironmentalWind(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForDefaultProjectile()
|
||||
{
|
||||
return (int)(100*(this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement));
|
||||
return (int)(100*(this.potencyEnhancement+1)*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForOffenseProjectile()
|
||||
{
|
||||
return (int)(100*(0.5*this.potencyEnhancement+1)*(this.powerEnhancement+1)*Math.pow(0.8, costEnhancement));
|
||||
return (int)(100*(0.5*this.potencyEnhancement+1)*(this.powerEnhancement+1)*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForDefenseProjectile()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
return (int)(100*(this.potencyEnhancement+1));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForEnvironmentProjectile()
|
||||
{
|
||||
return (int)(50*(this.powerEnhancement+1)*(this.potencyEnhancement+1)*Math.pow(0.8, costEnhancement));
|
||||
return (int)(50*(this.powerEnhancement+1)*(this.potencyEnhancement+1)*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForDefaultSelf()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
return (int)(100*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForOffenseSelf()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
return (int)(100*(0.5*this.powerEnhancement+1)*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForDefenseSelf()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
return (int)(500*(0.7d*this.powerEnhancement+1)*(0.8*this.potencyEnhancement+1)*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForEnvironmentSelf()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
return (int)(500*(0.7d*this.powerEnhancement+1)*(0.2*this.potencyEnhancement+1)*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForDefaultMelee()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
return (int)(350*(1.0*this.potencyEnhancement+1)*(1.2*this.powerEnhancement+1)*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForOffenseMelee()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
return (int)(250*(1.0*this.potencyEnhancement+1)*(0.7*this.powerEnhancement+1)*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForDefenseMelee()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
return (int)(150*(1.0*this.potencyEnhancement+1)*(0.7*this.powerEnhancement+1)*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCostForEnvironmentMelee()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
return (int)(100*(1.0*this.potencyEnhancement+1)*(0.7*this.powerEnhancement+1)*Math.pow(0.85, costEnhancement));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -239,15 +239,17 @@ public class SpellHelper
|
|||
|
||||
if(oreName.contains("ore"))
|
||||
{
|
||||
String lowercaseOre = oreName;
|
||||
lowercaseOre.toLowerCase();
|
||||
String lowercaseOre = oreName.toLowerCase();
|
||||
boolean isAllowed = false;
|
||||
|
||||
|
||||
for(String str : AlchemicalWizardry.allowedCrushedOresArray)
|
||||
{
|
||||
if(lowercaseOre.contains(str))
|
||||
{
|
||||
String testStr = str.toLowerCase();
|
||||
|
||||
if(lowercaseOre.contains(testStr))
|
||||
{
|
||||
isAllowed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ public abstract class ExtrapolatedMeleeEntityEffect implements IMeleeSpellEntity
|
|||
{
|
||||
if(hit<maxHit&&!entity.equals(entityPlayer))
|
||||
{
|
||||
if(this.entityEffect(world, entity))
|
||||
if(this.entityEffect(world, entity, entityPlayer))
|
||||
{
|
||||
hit++;
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ public abstract class ExtrapolatedMeleeEntityEffect implements IMeleeSpellEntity
|
|||
}
|
||||
}
|
||||
|
||||
protected abstract boolean entityEffect(World world, Entity entity);
|
||||
protected abstract boolean entityEffect(World world, Entity entity, EntityPlayer player);
|
||||
|
||||
public void setRange(float range)
|
||||
{
|
||||
|
|
|
@ -28,6 +28,11 @@ public class MeleeDefaultEarth extends MeleeSpellCenteredWorldEffect
|
|||
if(!world.isAirBlock(posX + i, posY + j, posZ + k) && world.getTileEntity(posX + i, posY + j, posZ + k)==null)
|
||||
{
|
||||
Block block = world.getBlock(posX + i, posY + j, posZ + k);
|
||||
|
||||
if(block.getBlockHardness(world, posX + i, posY + j, posZ + k)==-1)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
int meta = world.getBlockMetadata(posX + i, posY + j, posZ + k);
|
||||
|
||||
EntityFallingBlock entity = new EntityFallingBlock(world, posX + i + 0.5f, posY + j + 0.5f, posZ + k + 0.5f, block, meta);
|
||||
|
@ -36,6 +41,5 @@ public class MeleeDefaultEarth extends MeleeSpellCenteredWorldEffect
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
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;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
|
|
@ -4,7 +4,6 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.BlockFluidBase;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ProjectileImpactEffect;
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
@ -52,13 +50,25 @@ public class ProjectileEnvironmentalEarth extends ProjectileUpdateEffect
|
|||
if(!worldObj.isAirBlock(posX+i, posY+j, posZ+k)&&blocksBroken<maxBlocks)
|
||||
{
|
||||
Block block = worldObj.getBlock(posX+i, posY+j, posZ+k);
|
||||
int meta = worldObj.getBlockMetadata(posX+i, posY+j, posZ+k);
|
||||
if(block == null || block.getBlockHardness(worldObj, posX+i, posY+j, posZ+k)==-1 || SpellHelper.isBlockFluid(block))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if(((EntitySpellProjectile)projectile).getIsSilkTouch()&&block.canSilkHarvest(worldObj, ((EntitySpellProjectile)projectile).shootingEntity, posX+i, posY+j, posZ+k, meta))
|
||||
{
|
||||
ItemStack stack = new ItemStack(block,1,meta);
|
||||
EntityItem itemEntity = new EntityItem(worldObj,posX+i+0.5, posY+j+0.5, posZ+k+0.5,stack);
|
||||
worldObj.spawnEntityInWorld(itemEntity);
|
||||
worldObj.setBlockToAir(posX+i, posY+j, posZ+k);
|
||||
}else
|
||||
{
|
||||
worldObj.func_147480_a(posX+i, posY+j, posZ+k, true);
|
||||
}
|
||||
//block.breakBlock(worldObj, posX+i, posY+j, posZ+k, block.blockID, worldObj.getBlockMetadata(posX+i, posY+j, posZ+k));
|
||||
//worldObj.destroyBlock(posX+i, posY+j, posZ+k, true);
|
||||
worldObj.func_147480_a(posX+i, posY+j, posZ+k, true);
|
||||
|
||||
|
||||
blocksBroken++;
|
||||
}
|
||||
|
|
|
@ -1,19 +1,13 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.EntitySpellProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ProjectileImpactEffect;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ProjectileUpdateEffect;
|
||||
|
||||
public class ProjectileOffensiveEarth extends ProjectileImpactEffect
|
||||
{
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
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;
|
||||
|
||||
|
@ -17,28 +21,16 @@ public class SelfEnvironmentalEarth extends SelfSpellEffect
|
|||
@Override
|
||||
public void onSelfUse(World world, EntityPlayer player)
|
||||
{
|
||||
int horizRadius = this.powerUpgrades + 1;
|
||||
int vertRadius = this.potencyUpgrades + 2;
|
||||
float radius = this.powerUpgrades*2 + 1.5f;
|
||||
int dur = this.powerUpgrades*5*20 + 60;
|
||||
|
||||
Vec3 blockVec = SpellHelper.getEntityBlockVector(player);
|
||||
List<Entity> entities = SpellHelper.getEntitiesInRange(world, player.posX, player.posY, player.posZ, radius, radius);
|
||||
|
||||
int posX = (int)(blockVec.xCoord);
|
||||
int posY = (int)(blockVec.yCoord);
|
||||
int posZ = (int)(blockVec.zCoord);
|
||||
|
||||
for(int i=-horizRadius; i<=horizRadius; i++)
|
||||
for(Entity entity : entities)
|
||||
{
|
||||
for(int j=0; j<vertRadius; j++)
|
||||
if(entity instanceof EntityLiving)
|
||||
{
|
||||
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);
|
||||
}
|
||||
((EntityLiving) entity).addPotionEffect(new PotionEffect(Potion.weakness.id,dur,this.potencyUpgrades));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ExtrapolatedMeleeEntityEffect;
|
||||
|
||||
public class MeleeDefaultFire extends ExtrapolatedMeleeEntityEffect
|
||||
{
|
||||
public MeleeDefaultFire(int power, int potency, int cost)
|
||||
{
|
||||
super(power, potency, cost);
|
||||
this.setRange(3+0.3f*potency);
|
||||
this.setRadius(2+0.3f*potency);
|
||||
this.setMaxNumberHit(potency+1);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean entityEffect(World world, Entity entity, EntityPlayer entityPlayer)
|
||||
{
|
||||
if(entity instanceof EntityLiving)
|
||||
{
|
||||
entity.setFire(3*this.powerUpgrades+3);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.MeleeSpellWorldEffect;
|
||||
|
||||
public class MeleeDefensiveFire extends MeleeSpellWorldEffect
|
||||
{
|
||||
public MeleeDefensiveFire(int power, int potency, int cost)
|
||||
{
|
||||
super(power, potency, cost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWorldEffect(World world, EntityPlayer entityPlayer)
|
||||
{
|
||||
ForgeDirection look = SpellHelper.getCompassDirectionForLookVector(entityPlayer.getLookVec());
|
||||
|
||||
int width = this.potencyUpgrades + 1;
|
||||
int length = 5*this.powerUpgrades + 3;
|
||||
|
||||
int xOffset = look.offsetX;
|
||||
int zOffset = look.offsetZ;
|
||||
|
||||
Vec3 lookVec = SpellHelper.getEntityBlockVector(entityPlayer);
|
||||
|
||||
int xStart = (int)(lookVec.xCoord)+1*xOffset;
|
||||
int zStart = (int)(lookVec.zCoord)+1*zOffset;
|
||||
int yStart = (int)(lookVec.yCoord)-1;
|
||||
|
||||
for(int i=-width; i<=width; i++)
|
||||
{
|
||||
for(int j=0; j<length;j++)
|
||||
{
|
||||
for(int k=0;k<3;k++)
|
||||
{
|
||||
if(world.isAirBlock(xStart + i*(zOffset) + j*(xOffset), yStart+k, zStart + i*(xOffset) + j*(zOffset)))
|
||||
{
|
||||
world.setBlock(xStart + i*(zOffset) + j*(xOffset), yStart+k, zStart + i*(xOffset) + j*(zOffset), Blocks.fire);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.MeleeSpellCenteredWorldEffect;
|
||||
|
||||
public class MeleeEnvironmentalFire extends MeleeSpellCenteredWorldEffect
|
||||
{
|
||||
public MeleeEnvironmentalFire(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.evaporateWaterBlock(world, posX+i, posY+j, posZ+k);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ExtrapolatedMeleeEntityEffect;
|
||||
|
||||
public class MeleeOffensiveFire extends ExtrapolatedMeleeEntityEffect
|
||||
{
|
||||
public MeleeOffensiveFire(int power, int potency, int cost)
|
||||
{
|
||||
super(power, potency, cost);
|
||||
this.setRange(3+0.3f*potency);
|
||||
this.setRadius(2+0.3f*potency);
|
||||
this.setMaxNumberHit(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean entityEffect(World world, Entity entity, EntityPlayer entityPlayer)
|
||||
{
|
||||
if(entity instanceof EntityLiving)
|
||||
{
|
||||
((EntityLiving)entity).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionFireFuse.id,20*(7-this.powerUpgrades),this.potencyUpgrades));
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -1,19 +1,12 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.EntitySpellProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ProjectileImpactEffect;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ProjectileUpdateEffect;
|
||||
|
||||
public class ProjectileOffensiveFire extends ProjectileImpactEffect
|
||||
{
|
||||
|
|
|
@ -16,6 +16,6 @@ public class SelfOffensiveFire extends SelfSpellEffect
|
|||
@Override
|
||||
public void onSelfUse(World world, EntityPlayer player)
|
||||
{
|
||||
player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionFlameCloak.id,200*(this.powerUpgrades+1)*(this.powerUpgrades+1),this.potencyUpgrades));
|
||||
player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionFlameCloak.id,300*(2*this.powerUpgrades+1),this.potencyUpgrades));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ExtrapolatedMeleeEntityEffect;
|
||||
|
||||
|
@ -15,7 +16,7 @@ public class MeleeDefaultIce extends ExtrapolatedMeleeEntityEffect {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected boolean entityEffect(World world, Entity entity)
|
||||
protected boolean entityEffect(World world, Entity entity, EntityPlayer entityPlayer)
|
||||
{
|
||||
if(entity.hurtResistantTime>0)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntitySnowball;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ExtrapolatedMeleeEntityEffect;
|
||||
|
@ -16,8 +17,9 @@ public class MeleeEnvironmentalIce extends ExtrapolatedMeleeEntityEffect
|
|||
}
|
||||
|
||||
@Override
|
||||
protected boolean entityEffect(World world, Entity entity)
|
||||
protected boolean entityEffect(World world, Entity entity, EntityPlayer entityPlayer)
|
||||
{
|
||||
//TODO Change to an Ice Cage
|
||||
for(int i=0;i<=this.powerUpgrades;i++)
|
||||
{
|
||||
double randX = (world.rand.nextDouble()-world.rand.nextDouble())*3;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -18,7 +19,7 @@ public class MeleeOffensiveIce extends ExtrapolatedMeleeEntityEffect
|
|||
}
|
||||
|
||||
@Override
|
||||
protected boolean entityEffect(World world, Entity entity)
|
||||
protected boolean entityEffect(World world, Entity entity, EntityPlayer entityPlayer)
|
||||
{
|
||||
Vec3 blockVector = SpellHelper.getEntityBlockVector(entity);
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice;
|
||||
|
||||
import ibxm.Player;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.PacketHandler;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.SelfSpellEffect;
|
||||
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ExtrapolatedMeleeEntityEffect;
|
||||
|
||||
public class MeleeDefaultWind extends ExtrapolatedMeleeEntityEffect
|
||||
{
|
||||
public MeleeDefaultWind(int power, int potency, int cost)
|
||||
{
|
||||
super(power, potency, cost);
|
||||
this.setRange(4+2.0f*potency);
|
||||
this.setRadius(4+2.0f*potency);
|
||||
this.setMaxNumberHit(potency+1);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean entityEffect(World world, Entity entity, EntityPlayer player)
|
||||
{
|
||||
double wantedVel = -(0.5d+0.7d*this.powerUpgrades);
|
||||
|
||||
if(entity instanceof EntityLiving)
|
||||
{
|
||||
double dist = Math.sqrt(entity.getDistanceToEntity(player));
|
||||
double xVel = wantedVel*(entity.posX - player.posX)/dist;
|
||||
double yVel = wantedVel*(entity.posY - player.posY)/dist;
|
||||
double zVel = wantedVel*(entity.posZ - player.posZ)/dist;
|
||||
|
||||
entity.motionX = xVel;
|
||||
entity.motionY = yVel;
|
||||
entity.motionZ = zVel;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ExtrapolatedMeleeEntityEffect;
|
||||
|
||||
public class MeleeDefensiveWind extends ExtrapolatedMeleeEntityEffect
|
||||
{
|
||||
public MeleeDefensiveWind(int power, int potency, int cost)
|
||||
{
|
||||
super(power, potency, cost);
|
||||
this.setRange(3+0.3f*potency);
|
||||
this.setRadius(2+0.3f*potency);
|
||||
this.setMaxNumberHit(potency+1);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean entityEffect(World world, Entity entity, EntityPlayer player)
|
||||
{
|
||||
double wantedVel = 0.5d+0.5d*this.powerUpgrades;
|
||||
|
||||
if(entity instanceof EntityLiving)
|
||||
{
|
||||
entity.motionY = wantedVel;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.MeleeSpellCenteredWorldEffect;
|
||||
|
||||
public class MeleeEnvironmentalWind extends MeleeSpellCenteredWorldEffect
|
||||
{
|
||||
public MeleeEnvironmentalWind(int power, int potency, int cost)
|
||||
{
|
||||
super(power, potency, cost);
|
||||
this.setRange(5*power + 5);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCenteredWorldEffect(EntityPlayer player, World world, int posX, int posY, int posZ)
|
||||
{
|
||||
int radius = 5*this.potencyUpgrades + 3;
|
||||
|
||||
List<Entity> entities = SpellHelper.getEntitiesInRange(world, posX, posY, posZ, radius, radius);
|
||||
|
||||
for(Entity entity : entities)
|
||||
{
|
||||
if(entity instanceof EntityItem)
|
||||
{
|
||||
((EntityItem)entity).delayBeforeCanPickup = 0;
|
||||
entity.onCollideWithPlayer((EntityPlayer)player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ExtrapolatedMeleeEntityEffect;
|
||||
|
||||
public class MeleeOffensiveWind extends ExtrapolatedMeleeEntityEffect
|
||||
{
|
||||
public MeleeOffensiveWind(int power, int potency, int cost)
|
||||
{
|
||||
super(power, potency, cost);
|
||||
this.setRange(3+0.3f*potency);
|
||||
this.setRadius(2+0.3f*potency);
|
||||
this.setMaxNumberHit(potency+1);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean entityEffect(World world, Entity entity, EntityPlayer player)
|
||||
{
|
||||
double wantedVel = 1.0d+1.0d*this.powerUpgrades;
|
||||
|
||||
if(entity instanceof EntityLiving)
|
||||
{
|
||||
double dist = Math.sqrt(entity.getDistanceToEntity(player));
|
||||
double xVel = wantedVel*(entity.posX - player.posX)/dist;
|
||||
double yVel = wantedVel*(entity.posY - player.posY+0.5f)/dist;
|
||||
double zVel = wantedVel*(entity.posZ - player.posZ)/dist;
|
||||
|
||||
entity.motionX = xVel;
|
||||
entity.motionY = yVel;
|
||||
entity.motionZ = zVel;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.SelfSpellEffect;
|
||||
|
||||
public class SelfDefaultWind extends SelfSpellEffect
|
||||
{
|
||||
public SelfDefaultWind(int power, int potency, int cost)
|
||||
{
|
||||
super(power, potency, cost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSelfUse(World world, EntityPlayer player)
|
||||
{
|
||||
player.extinguish();
|
||||
player.fallDistance = 0;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.SelfSpellEffect;
|
||||
|
||||
public class SelfDefensiveWind extends SelfSpellEffect
|
||||
{
|
||||
public SelfDefensiveWind(int power, int potency, int cost)
|
||||
{
|
||||
super(power, potency, cost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSelfUse(World world, EntityPlayer player)
|
||||
{
|
||||
double radius = 1.5d*this.powerUpgrades+1.5d;
|
||||
double posX = player.posX;
|
||||
double posY = player.posY;
|
||||
double posZ = player.posZ;
|
||||
|
||||
List<Entity> entities = SpellHelper.getEntitiesInRange(world, posX, posY, posZ, radius, radius);
|
||||
|
||||
for(Entity entity: entities)
|
||||
{
|
||||
if((!entity.equals(player))&&entity instanceof EntityLiving)
|
||||
{
|
||||
((EntityLiving)entity).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionHeavyHeart.id,200,this.potencyUpgrades));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.SelfSpellEffect;
|
||||
|
||||
public class SelfEnvironmentalWind extends SelfSpellEffect
|
||||
{
|
||||
public SelfEnvironmentalWind(int power, int potency, int cost)
|
||||
{
|
||||
super(power, potency, cost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSelfUse(World world, EntityPlayer player)
|
||||
{
|
||||
double radius = 1.5d*this.potencyUpgrades+1;
|
||||
double posX = player.posX;
|
||||
double posY = player.posY-0.7d;
|
||||
double posZ = player.posZ;
|
||||
double wantedVel = 0.7d+0.7d*this.powerUpgrades;
|
||||
|
||||
List<Entity> entities = SpellHelper.getEntitiesInRange(world, posX, posY, posZ, radius, radius);
|
||||
|
||||
for(Entity entity: entities)
|
||||
{
|
||||
if((!entity.equals(player))&&entity instanceof EntityLiving)
|
||||
{
|
||||
double dist = Math.sqrt(entity.getDistanceToEntity(player));
|
||||
double xVel = wantedVel*(entity.posX - posX)/dist;
|
||||
double yVel = wantedVel*(entity.posY - posY)/dist;
|
||||
double zVel = wantedVel*(entity.posZ - posZ)/dist;
|
||||
|
||||
entity.motionX = xVel;
|
||||
entity.motionY = yVel;
|
||||
entity.motionZ = zVel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.wind;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.SelfSpellEffect;
|
||||
|
||||
public class SelfOffensiveWind extends SelfSpellEffect
|
||||
{
|
||||
public SelfOffensiveWind(int power, int potency, int cost)
|
||||
{
|
||||
super(power, potency, cost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSelfUse(World world, EntityPlayer player)
|
||||
{
|
||||
Vec3 vec = player.getLookVec();
|
||||
double wantedVelocity = 1.5 + this.powerUpgrades*0.4;
|
||||
|
||||
SpellHelper.setPlayerSpeedFromServer(player, vec.xCoord * wantedVelocity, vec.yCoord * wantedVelocity, vec.zCoord * wantedVelocity);
|
||||
|
||||
player.fallDistance = 0;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue