mirror of
https://github.com/GTNewHorizons/Tainted-Magic.git
synced 2026-11-27 23:33:20 +00:00
all foci rebalancing
+ increase damage and vis consume (can be change in config) + staff give x1.5 damage (can be change in config) + some code refactoring
This commit is contained in:
1 parent
d44ecc2c38
commit
b7a0c1c857
12 files changed
+472
-230
No files matched your search
@@ -1,5 +1,6 @@
|
||||
package taintedmagic.common.items.wand.foci;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -12,6 +13,8 @@ import net.minecraft.world.World;
|
||||
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.entities.EntityEldritchOrbAttack;
|
||||
import taintedmagic.common.handler.ConfigHandler;
|
||||
import taintedmagic.common.helper.TaintedMagicHelper;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.FocusUpgradeType;
|
||||
@@ -31,82 +34,102 @@ public class ItemFocusEldritch extends ItemFocusBasic {
|
||||
new AspectList().add(Aspect.MIND, 1).add(Aspect.HEAL, 1));
|
||||
IIcon depthIcon = null;
|
||||
|
||||
private static final AspectList costBase = new AspectList().add(Aspect.ENTROPY, 20).add(Aspect.FIRE, 20);
|
||||
private static final AspectList costSane = new AspectList().add(Aspect.ENTROPY, 20).add(Aspect.FIRE, 50)
|
||||
.add(Aspect.ORDER, 20);
|
||||
private static final AspectList costCorrosive = new AspectList().add(Aspect.ENTROPY, 50).add(Aspect.FIRE, 20)
|
||||
.add(Aspect.WATER, 20);
|
||||
|
||||
long soundDelay = 0L;
|
||||
private final AspectList costBase = new AspectList().add(Aspect.ENTROPY, 250).add(Aspect.AIR, 150)
|
||||
.add(Aspect.FIRE, 250);
|
||||
private final AspectList costSane = new AspectList().add(Aspect.ORDER, 100).add(Aspect.WATER, 80);
|
||||
private final AspectList costCorrosive = new AspectList().add(Aspect.ENTROPY, 150).add(Aspect.FIRE, 120);
|
||||
|
||||
public ItemFocusEldritch() {
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setUnlocalizedName("ItemFocusEldritch");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
|
||||
super.addInformation(stack, player, list, par4);
|
||||
if (ConfigHandler.eldritchStaffMultiple != 1) {
|
||||
list = TaintedMagicHelper.addTooltipDamageAndStaffMultiplier(
|
||||
list,
|
||||
ConfigHandler.eldritchBaseDamage,
|
||||
stack,
|
||||
ConfigHandler.eldritchStaffMultiple);
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
this.icon = ir.registerIcon("taintedmagic:ItemFocusEldritch");
|
||||
this.depthIcon = ir.registerIcon("taintedmagic:ItemFocusEldritch_depth");
|
||||
}
|
||||
|
||||
public IIcon getFocusDepthLayerIcon(ItemStack s) {
|
||||
public IIcon getFocusDepthLayerIcon(ItemStack stack) {
|
||||
return this.depthIcon;
|
||||
}
|
||||
|
||||
public String getSortingHelper(ItemStack s) {
|
||||
return "ELDRITCH" + super.getSortingHelper(s);
|
||||
public String getSortingHelper(ItemStack stack) {
|
||||
return "ELDRITCH" + super.getSortingHelper(stack);
|
||||
}
|
||||
|
||||
public int getFocusColor(ItemStack s) {
|
||||
public int getFocusColor(ItemStack stack) {
|
||||
return 0x000018;
|
||||
}
|
||||
|
||||
public AspectList getVisCost(ItemStack s) {
|
||||
return isUpgradedWith(s, ItemFocusTaint.corrosive) ? costCorrosive
|
||||
: isUpgradedWith(s, sanity) ? costSane : costBase;
|
||||
public AspectList getVisCost(ItemStack stack) {
|
||||
AspectList list = costBase.copy();
|
||||
if (TaintedMagicHelper.hasFocusUpgrade(stack, ItemFocusTaint.corrosive)) {
|
||||
list.add(costCorrosive);
|
||||
}
|
||||
if (TaintedMagicHelper.hasFocusUpgrade(stack, sanity)) {
|
||||
list.add(costSane);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public int getActivationCooldown(ItemStack s) {
|
||||
return 600;
|
||||
public int getActivationCooldown(ItemStack stack) {
|
||||
return 1000;
|
||||
}
|
||||
|
||||
public boolean isVisCostPerTick(ItemStack s) {
|
||||
public boolean isVisCostPerTick(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public ItemFocusBasic.WandFocusAnimation getAnimation(ItemStack s) {
|
||||
public ItemFocusBasic.WandFocusAnimation getAnimation(ItemStack stack) {
|
||||
return ItemFocusBasic.WandFocusAnimation.WAVE;
|
||||
}
|
||||
|
||||
public ItemStack onFocusRightClick(ItemStack s, World w, EntityPlayer p, MovingObjectPosition mop) {
|
||||
ItemWandCasting wand = (ItemWandCasting) s.getItem();
|
||||
public ItemStack onFocusRightClick(ItemStack stack, World world, EntityPlayer player, MovingObjectPosition mop) {
|
||||
ItemWandCasting wand = (ItemWandCasting) stack.getItem();
|
||||
|
||||
if (!w.isRemote) {
|
||||
int potency = wand.getFocusPotency(s);
|
||||
if (wand.consumeAllVis(s, p, getVisCost(s), true, false)) {
|
||||
EntityEldritchOrbAttack orb = null;
|
||||
orb = new EntityEldritchOrbAttack(w, p, isUpgradedWith(wand.getFocusItem(s), ItemFocusTaint.corrosive));
|
||||
orb.dmg = (10F + potency);
|
||||
w.spawnEntityInWorld(orb);
|
||||
if (!isUpgradedWith(wand.getFocusItem(s), sanity)) {
|
||||
Random rand = new Random();
|
||||
int randomInt = rand.nextInt(10);
|
||||
if (randomInt == 5) {
|
||||
Thaumcraft.addStickyWarpToPlayer(p, 1);
|
||||
}
|
||||
if (!world.isRemote && wand != null && wand.consumeAllVis(stack, player, getVisCost(stack), true, false)) {
|
||||
EntityEldritchOrbAttack orb = new EntityEldritchOrbAttack(
|
||||
world,
|
||||
player,
|
||||
isUpgradedWith(wand.getFocusItem(stack), ItemFocusTaint.corrosive));
|
||||
|
||||
orb.dmg = TaintedMagicHelper.getFocusDamageWithPotency(
|
||||
stack,
|
||||
ConfigHandler.eldritchBaseDamage,
|
||||
ConfigHandler.eldritchStaffMultiple);
|
||||
world.spawnEntityInWorld(orb);
|
||||
|
||||
if (!isUpgradedWith(wand.getFocusItem(stack), sanity)) {
|
||||
Random rand = new Random();
|
||||
int randomInt = rand.nextInt(10);
|
||||
if (randomInt == 5) {
|
||||
Thaumcraft.addStickyWarpToPlayer(player, 1);
|
||||
}
|
||||
}
|
||||
w.playSoundAtEntity(p, "thaumcraft:egattack", 0.4F, 1.0F + w.rand.nextFloat() * 0.1F);
|
||||
world.playSoundAtEntity(player, "thaumcraft:egattack", 0.4F, 1.0F + world.rand.nextFloat() * 0.1F);
|
||||
}
|
||||
p.swingItem();
|
||||
return s;
|
||||
player.swingItem();
|
||||
return stack;
|
||||
}
|
||||
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack s, int rank) {
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack stack, int rank) {
|
||||
switch (rank) {
|
||||
case 1:
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal, FocusUpgradeType.potency };
|
||||
case 2:
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal, FocusUpgradeType.potency };
|
||||
case 3:
|
||||
@@ -115,8 +138,9 @@ public class ItemFocusEldritch extends ItemFocusBasic {
|
||||
case 4:
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal, FocusUpgradeType.potency };
|
||||
case 5:
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal, FocusUpgradeType.potency, this.sanity };
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal, FocusUpgradeType.potency, sanity };
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
package taintedmagic.common.items.wand.foci;
|
||||
|
||||
import static taintedmagic.common.helper.TaintedMagicHelper.getFocusDamageWithPotency;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -16,6 +14,7 @@ import net.minecraft.world.World;
|
||||
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.handler.ConfigHandler;
|
||||
import taintedmagic.common.helper.TaintedMagicHelper;
|
||||
import thaumcraft.api.ThaumcraftApiHelper;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
@@ -51,19 +50,19 @@ public class ItemFocusMageMace extends ItemFocusBasic {
|
||||
this.ornIcon = ir.registerIcon("taintedmagic:ItemFocusMageMace_orn");
|
||||
}
|
||||
|
||||
public IIcon getFocusDepthLayerIcon(ItemStack s) {
|
||||
public IIcon getFocusDepthLayerIcon(ItemStack stack) {
|
||||
return this.depthIcon;
|
||||
}
|
||||
|
||||
public IIcon getOrnament(ItemStack s) {
|
||||
public IIcon getOrnament(ItemStack stack) {
|
||||
return this.ornIcon;
|
||||
}
|
||||
|
||||
public String getSortingHelper(ItemStack s) {
|
||||
return "MACE" + super.getSortingHelper(s);
|
||||
public String getSortingHelper(ItemStack stack) {
|
||||
return "MACE" + super.getSortingHelper(stack);
|
||||
}
|
||||
|
||||
public int getFocusColor(ItemStack s) {
|
||||
public int getFocusColor(ItemStack stack) {
|
||||
return 3289650;
|
||||
}
|
||||
|
||||
@@ -71,20 +70,20 @@ public class ItemFocusMageMace extends ItemFocusBasic {
|
||||
return this.isUpgradedWith(stack, bloodlust) ? mageMAceCostBloodlust : mageMaceCostBase;
|
||||
}
|
||||
|
||||
public int getActivationCooldown(ItemStack s) {
|
||||
public int getActivationCooldown(ItemStack stack) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
public boolean isVisCostPerTick(ItemStack s) {
|
||||
public boolean isVisCostPerTick(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public ItemFocusBasic.WandFocusAnimation getAnimation(ItemStack s) {
|
||||
public ItemFocusBasic.WandFocusAnimation getAnimation(ItemStack stack) {
|
||||
return WandFocusAnimation.WAVE;
|
||||
}
|
||||
|
||||
public ItemStack onFocusRightClick(ItemStack s, World w, EntityPlayer p, MovingObjectPosition mop) {
|
||||
return s;
|
||||
public ItemStack onFocusRightClick(ItemStack stack, World world, EntityPlayer player, MovingObjectPosition mop) {
|
||||
return stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -93,16 +92,16 @@ public class ItemFocusMageMace extends ItemFocusBasic {
|
||||
list.add("");
|
||||
list.add(
|
||||
EnumChatFormatting.BLUE + "+"
|
||||
+ getFocusDamageWithPotency(stack, ConfigHandler.magesMaceBaseDamage)
|
||||
+ TaintedMagicHelper.getFocusDamageWithPotency(stack, ConfigHandler.magesMaceBaseDamage)
|
||||
+ " "
|
||||
+ StatCollector.translateToLocal("text.attackdamageequipped"));
|
||||
list.add(
|
||||
EnumChatFormatting.BLUE
|
||||
+ String.format("Staff gives x%.1f Damage", ConfigHandler.magesMaceStaffMultiple));
|
||||
|
||||
if (ConfigHandler.magesMaceStaffMultiple != 1)
|
||||
list = TaintedMagicHelper.addTooltipStaffMultiplier(list, ConfigHandler.magesMaceStaffMultiple);
|
||||
list.add("");
|
||||
}
|
||||
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack s, int rank) {
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack stack, int rank) {
|
||||
switch (rank) {
|
||||
case 1:
|
||||
case 2:
|
||||
@@ -117,8 +116,8 @@ public class ItemFocusMageMace extends ItemFocusBasic {
|
||||
|
||||
}
|
||||
|
||||
public boolean canApplyUpgrade(ItemStack s, EntityPlayer p, FocusUpgradeType t, int rank) {
|
||||
return (!t.equals(this.bloodlust))
|
||||
|| (ThaumcraftApiHelper.isResearchComplete(p.getCommandSenderName(), "BLOODLUSTUPGRADE"));
|
||||
public boolean canApplyUpgrade(ItemStack stack, EntityPlayer player, FocusUpgradeType focusUpgradeType, int rank) {
|
||||
return (!focusUpgradeType.equals(bloodlust))
|
||||
|| (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), "BLOODLUSTUPGRADE"));
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ import net.minecraft.world.World;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.FocusUpgradeType;
|
||||
import thaumcraft.api.wands.ItemFocusBasic;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
import thaumcraft.common.items.wands.WandManager;
|
||||
@@ -21,8 +22,8 @@ public class ItemFocusMeteorology extends ItemFocusBasic {
|
||||
|
||||
IIcon depthIcon = null;
|
||||
|
||||
private static final AspectList costBase = new AspectList().add(Aspect.AIR, 1000).add(Aspect.WATER, 1000)
|
||||
.add(Aspect.FIRE, 1000).add(Aspect.EARTH, 1000).add(Aspect.ORDER, 1000).add(Aspect.ENTROPY, 1000);
|
||||
private static final AspectList costBase = new AspectList().add(Aspect.AIR, 8000).add(Aspect.WATER, 8000)
|
||||
.add(Aspect.FIRE, 8000).add(Aspect.EARTH, 8000).add(Aspect.ORDER, 8000).add(Aspect.ENTROPY, 8000);
|
||||
|
||||
public ItemFocusMeteorology() {
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
@@ -35,49 +36,61 @@ public class ItemFocusMeteorology extends ItemFocusBasic {
|
||||
this.depthIcon = ir.registerIcon("taintedmagic:ItemFocusMeteorology_depth");
|
||||
}
|
||||
|
||||
public IIcon getFocusDepthLayerIcon(ItemStack s) {
|
||||
public IIcon getFocusDepthLayerIcon(ItemStack stack) {
|
||||
return this.depthIcon;
|
||||
}
|
||||
|
||||
public String getSortingHelper(ItemStack s) {
|
||||
return "RAIN" + super.getSortingHelper(s);
|
||||
public String getSortingHelper(ItemStack stack) {
|
||||
return "RAIN" + super.getSortingHelper(stack);
|
||||
}
|
||||
|
||||
public int getFocusColor(ItemStack s) {
|
||||
public int getFocusColor(ItemStack stack) {
|
||||
return 0x23D9EA;
|
||||
}
|
||||
|
||||
public AspectList getVisCost(ItemStack s) {
|
||||
return new AspectList().add(Aspect.AIR, 1000).add(Aspect.WATER, 1000).add(Aspect.FIRE, 1000)
|
||||
.add(Aspect.EARTH, 1000).add(Aspect.ORDER, 1000).add(Aspect.ENTROPY, 1000);
|
||||
public AspectList getVisCost(ItemStack stack) {
|
||||
return costBase;
|
||||
}
|
||||
|
||||
public int getActivationCooldown(ItemStack s) {
|
||||
public int getActivationCooldown(ItemStack stack) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
public boolean isVisCostPerTick(ItemStack s) {
|
||||
public boolean isVisCostPerTick(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public ItemFocusBasic.WandFocusAnimation getAnimation(ItemStack s) {
|
||||
public ItemFocusBasic.WandFocusAnimation getAnimation(ItemStack stack) {
|
||||
return ItemFocusBasic.WandFocusAnimation.WAVE;
|
||||
}
|
||||
|
||||
public ItemStack onFocusRightClick(ItemStack s, World w, EntityPlayer p, MovingObjectPosition mop) {
|
||||
WandManager.setCooldown(p, 30000);
|
||||
ItemWandCasting wand = (ItemWandCasting) s.getItem();
|
||||
wand.consumeAllVis(s, p, getVisCost(s), true, false);
|
||||
public ItemStack onFocusRightClick(ItemStack stack, World world, EntityPlayer player, MovingObjectPosition mop) {
|
||||
WandManager.setCooldown(player, 30000);
|
||||
ItemWandCasting wand = (ItemWandCasting) stack.getItem();
|
||||
wand.consumeAllVis(stack, player, getVisCost(stack), true, false);
|
||||
|
||||
w.getWorldInfo().setRainTime(w.isRaining() ? 24000 : 0);
|
||||
w.getWorldInfo().setRaining(!w.isRaining());
|
||||
world.getWorldInfo().setRainTime(world.isRaining() ? 24000 : 0);
|
||||
world.getWorldInfo().setRaining(!world.isRaining());
|
||||
|
||||
p.playSound("thaumcraft:wand", 0.5F, 1.0F);
|
||||
return s;
|
||||
player.playSound("thaumcraft:wand", 0.5F, 1.0F);
|
||||
return stack;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public EnumRarity getRarity(ItemStack s) {
|
||||
public EnumRarity getRarity(ItemStack stack) {
|
||||
return TaintedMagic.rarityCreation;
|
||||
}
|
||||
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack stack, int rank) {
|
||||
switch (rank) {
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
case 5:
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal };
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package taintedmagic.common.items.wand.foci;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -9,11 +10,12 @@ import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.entities.EntityTaintBubble;
|
||||
import taintedmagic.common.handler.ConfigHandler;
|
||||
import taintedmagic.common.helper.TaintedMagicHelper;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.FocusUpgradeType;
|
||||
@@ -40,9 +42,10 @@ public class ItemFocusTaint extends ItemFocusBasic {
|
||||
new AspectList().add(Aspect.TAINT, 1).add(Aspect.POISON, 1));
|
||||
IIcon depthIcon = null;
|
||||
|
||||
private static final AspectList costBase = new AspectList().add(Aspect.EARTH, 10).add(Aspect.WATER, 10);
|
||||
private static final AspectList costTainturgist = new AspectList().add(Aspect.EARTH, 10).add(Aspect.WATER, 10)
|
||||
.add(Aspect.ORDER, 10);
|
||||
private final AspectList costBase = new AspectList().add(Aspect.AIR, 120).add(Aspect.WATER, 120);
|
||||
private final AspectList costTainturgy = new AspectList().add(Aspect.ORDER, 80);
|
||||
private final AspectList costCorrosive = new AspectList().add(Aspect.ENTROPY, 80).add(Aspect.FIRE, 60);
|
||||
private final AspectList costEnlarge = new AspectList().add(Aspect.AIR, 80).add(Aspect.WATER, 80);
|
||||
|
||||
public ItemFocusTaint() {
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
@@ -55,72 +58,84 @@ public class ItemFocusTaint extends ItemFocusBasic {
|
||||
this.depthIcon = ir.registerIcon("taintedmagic:ItemFocusTaint_depth");
|
||||
}
|
||||
|
||||
public IIcon getFocusDepthLayerIcon(ItemStack s) {
|
||||
public IIcon getFocusDepthLayerIcon(ItemStack stack) {
|
||||
return this.depthIcon;
|
||||
}
|
||||
|
||||
public String getSortingHelper(ItemStack s) {
|
||||
return "TAINT" + super.getSortingHelper(s);
|
||||
public String getSortingHelper(ItemStack stack) {
|
||||
return "TAINT" + super.getSortingHelper(stack);
|
||||
}
|
||||
|
||||
public int getFocusColor(ItemStack s) {
|
||||
public int getFocusColor(ItemStack stack) {
|
||||
return 8073200;
|
||||
}
|
||||
|
||||
public AspectList getVisCost(ItemStack s) {
|
||||
return isUpgradedWith(s, tainturgy) ? costTainturgist : costBase;
|
||||
public AspectList getVisCost(ItemStack stack) {
|
||||
AspectList list = costBase.copy();
|
||||
if (TaintedMagicHelper.hasFocusUpgrade(stack, tainturgy)) {
|
||||
list.add(costTainturgy);
|
||||
}
|
||||
if (TaintedMagicHelper.hasFocusUpgrade(stack, corrosive)) {
|
||||
list.add(costCorrosive);
|
||||
}
|
||||
if (TaintedMagicHelper.hasFocusUpgrade(stack, FocusUpgradeType.enlarge)) {
|
||||
list.add(costEnlarge);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public int getActivationCooldown(ItemStack s) {
|
||||
public int getActivationCooldown(ItemStack stack) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
public boolean isVisCostPerTick(ItemStack s) {
|
||||
public boolean isVisCostPerTick(ItemStack stack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public ItemFocusBasic.WandFocusAnimation getAnimation(ItemStack s) {
|
||||
public ItemFocusBasic.WandFocusAnimation getAnimation(ItemStack stack) {
|
||||
return ItemFocusBasic.WandFocusAnimation.CHARGE;
|
||||
}
|
||||
|
||||
public ItemStack onFocusRightClick(ItemStack s, World w, EntityPlayer p, MovingObjectPosition mop) {
|
||||
ItemWandCasting wand = (ItemWandCasting) s.getItem();
|
||||
p.setItemInUse(s, 2147483647);
|
||||
WandManager.setCooldown(p, -1);
|
||||
return s;
|
||||
public ItemStack onFocusRightClick(ItemStack stack, World world, EntityPlayer player, MovingObjectPosition mop) {
|
||||
player.setItemInUse(stack, 2147483647);
|
||||
WandManager.setCooldown(player, -1);
|
||||
return stack;
|
||||
}
|
||||
|
||||
public void onUsingFocusTick(ItemStack s, EntityPlayer p, int count) {
|
||||
ItemWandCasting wand = (ItemWandCasting) s.getItem();
|
||||
if (!wand.consumeAllVis(s, p, getVisCost(s), false, false)) {
|
||||
p.stopUsingItem();
|
||||
public void onUsingFocusTick(ItemStack stack, EntityPlayer player, int count) {
|
||||
ItemWandCasting wand = (ItemWandCasting) stack.getItem();
|
||||
if (!wand.consumeAllVis(stack, player, getVisCost(stack), false, false)) {
|
||||
player.stopUsingItem();
|
||||
return;
|
||||
}
|
||||
int range = 8;
|
||||
Vec3 vec3d = p.getLook(range);
|
||||
if (!p.worldObj.isRemote && p.ticksExisted % 5 == 0)
|
||||
p.worldObj.playSoundAtEntity(p, "thaumcraft:bubble", 0.33F, 5.0F * (float) Math.random());
|
||||
if (!player.worldObj.isRemote && (player.ticksExisted + 6) % 5 == 0) {
|
||||
player.worldObj.playSoundAtEntity(player, "thaumcraft:bubble", 0.33F, 5.0F * (float) Math.random());
|
||||
wand.consumeAllVis(stack, player, getVisCost(stack), true, false);
|
||||
}
|
||||
|
||||
int potency = wand.getFocusPotency(s);
|
||||
if ((!p.worldObj.isRemote) && (wand.consumeAllVis(s, p, getVisCost(s), true, false))) {
|
||||
float scatter = isUpgradedWith(wand.getFocusItem(s), FocusUpgradeType.enlarge) ? 15.0F : 8.0F;
|
||||
for (int a = 0; a < 2 + wand.getFocusPotency(s); a++) {
|
||||
if (!player.worldObj.isRemote) {
|
||||
float scatter = isUpgradedWith(wand.getFocusItem(stack), FocusUpgradeType.enlarge) ? 15.0F : 8.0F;
|
||||
for (int a = 0; a < 2 + wand.getFocusPotency(stack); a++) {
|
||||
EntityTaintBubble orb = new EntityTaintBubble(
|
||||
p.worldObj,
|
||||
p,
|
||||
player.worldObj,
|
||||
player,
|
||||
scatter,
|
||||
isUpgradedWith(wand.getFocusItem(s), this.corrosive));
|
||||
isUpgradedWith(wand.getFocusItem(stack), this.corrosive));
|
||||
orb.posX += orb.motionX;
|
||||
orb.posY += orb.motionY;
|
||||
orb.posZ += orb.motionZ;
|
||||
orb.damage = 5F + potency;
|
||||
p.worldObj.spawnEntityInWorld(orb);
|
||||
if (!isUpgradedWith(wand.getFocusItem(s), tainturgy)) {
|
||||
orb.damage = TaintedMagicHelper.getFocusDamageWithPotency(
|
||||
stack,
|
||||
ConfigHandler.taintStormBaseDamage,
|
||||
ConfigHandler.taintStormStaffMultiple);
|
||||
player.worldObj.spawnEntityInWorld(orb);
|
||||
if (!TaintedMagicHelper.hasFocusUpgrade(stack, tainturgy)) {
|
||||
Random rand = new Random();
|
||||
int randomInt = rand.nextInt(150);
|
||||
if (randomInt == 9) {
|
||||
try {
|
||||
p.addPotionEffect(new PotionEffect(Config.potionVisExhaustID, 1000, 2));
|
||||
player.addPotionEffect(new PotionEffect(Config.potionVisExhaustID, 1000, 2));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -130,10 +145,22 @@ public class ItemFocusTaint extends ItemFocusBasic {
|
||||
}
|
||||
}
|
||||
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack s, int rank) {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
|
||||
super.addInformation(stack, player, list, par4);
|
||||
if (ConfigHandler.taintStormStaffMultiple != 1) {
|
||||
list = TaintedMagicHelper.addTooltipDamageAndStaffMultiplier(
|
||||
list,
|
||||
ConfigHandler.taintStormBaseDamage,
|
||||
stack,
|
||||
ConfigHandler.taintStormStaffMultiple);
|
||||
}
|
||||
}
|
||||
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack stack, int rank) {
|
||||
switch (rank) {
|
||||
case 1:
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal, FocusUpgradeType.potency };
|
||||
case 2:
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal, FocusUpgradeType.potency };
|
||||
case 3:
|
||||
@@ -143,7 +170,8 @@ public class ItemFocusTaint extends ItemFocusBasic {
|
||||
FocusUpgradeType.enlarge };
|
||||
case 5:
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal, FocusUpgradeType.potency, corrosive };
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -15,12 +15,12 @@ import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.handler.ConfigHandler;
|
||||
import taintedmagic.common.helper.TaintedMagicHelper;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.FocusUpgradeType;
|
||||
import thaumcraft.api.wands.ItemFocusBasic;
|
||||
import thaumcraft.codechicken.lib.vec.Vector3;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -29,6 +29,7 @@ public class ItemFocusTaintedBlast extends ItemFocusBasic {
|
||||
|
||||
private static final AspectList costBase = new AspectList().add(Aspect.ENTROPY, 500).add(Aspect.EARTH, 500)
|
||||
.add(Aspect.WATER, 500);
|
||||
private final AspectList costEnlarge = new AspectList().add(Aspect.ENTROPY, 50).add(Aspect.EARTH, 50);
|
||||
|
||||
public static IIcon depthIcon;
|
||||
public static IIcon ornIcon;
|
||||
@@ -45,95 +46,109 @@ public class ItemFocusTaintedBlast extends ItemFocusBasic {
|
||||
this.ornIcon = ir.registerIcon("taintedmagic:ItemFocusTaintedBlast_orn");
|
||||
}
|
||||
|
||||
public IIcon getFocusDepthLayerIcon(ItemStack s) {
|
||||
public IIcon getFocusDepthLayerIcon(ItemStack stack) {
|
||||
return this.depthIcon;
|
||||
}
|
||||
|
||||
public IIcon getOrnament(ItemStack s) {
|
||||
public IIcon getOrnament(ItemStack stack) {
|
||||
return this.ornIcon;
|
||||
}
|
||||
|
||||
public String getSortingHelper(ItemStack s) {
|
||||
return "SHOCKWAVE" + super.getSortingHelper(s);
|
||||
public String getSortingHelper(ItemStack stack) {
|
||||
return "SHOCKWAVE" + super.getSortingHelper(stack);
|
||||
}
|
||||
|
||||
public int getFocusColor(ItemStack s) {
|
||||
public int getFocusColor(ItemStack stack) {
|
||||
return 13107455;
|
||||
}
|
||||
|
||||
public AspectList getVisCost(ItemStack s) {
|
||||
return costBase;
|
||||
public AspectList getVisCost(ItemStack stack) {
|
||||
AspectList list = costBase.copy();
|
||||
if (TaintedMagicHelper.hasFocusUpgrade(stack, FocusUpgradeType.enlarge)) {
|
||||
for (int i = 0; i < TaintedMagicHelper.getFocusLevelUpgrade(stack, FocusUpgradeType.enlarge); i++)
|
||||
list.add(costEnlarge);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public int getActivationCooldown(ItemStack s) {
|
||||
return 15000;
|
||||
public int getActivationCooldown(ItemStack stack) {
|
||||
return 6000;
|
||||
}
|
||||
|
||||
public boolean isVisCostPerTick(ItemStack s) {
|
||||
public boolean isVisCostPerTick(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public ItemFocusBasic.WandFocusAnimation getAnimation(ItemStack s) {
|
||||
public ItemFocusBasic.WandFocusAnimation getAnimation(ItemStack stack) {
|
||||
return ItemFocusBasic.WandFocusAnimation.WAVE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack s, EntityPlayer p, List l, boolean b) {
|
||||
super.addInformation(s, p, l, b);
|
||||
l.add(" ");
|
||||
l.add(
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean b) {
|
||||
super.addInformation(stack, player, list, b);
|
||||
|
||||
list.add(
|
||||
EnumChatFormatting.BLUE + "+"
|
||||
+ new String(
|
||||
this.isUpgradedWith(s, FocusUpgradeType.enlarge)
|
||||
? Integer.toString(15 + this.getUpgradeLevel(s, FocusUpgradeType.enlarge))
|
||||
: "15")
|
||||
+ (this.isUpgradedWith(stack, FocusUpgradeType.enlarge)
|
||||
? Integer.toString(10 + this.getUpgradeLevel(stack, FocusUpgradeType.enlarge) * 2)
|
||||
: "10")
|
||||
+ " "
|
||||
+ StatCollector.translateToLocal("text.radius"));
|
||||
if (ConfigHandler.taintStormStaffMultiple != 1) list = TaintedMagicHelper.addTooltipDamageAndStaffMultiplier(
|
||||
list,
|
||||
ConfigHandler.taintedBlastBaseDamage,
|
||||
stack,
|
||||
ConfigHandler.taintedBlastStaffMultiple);
|
||||
}
|
||||
|
||||
public ItemStack onFocusRightClick(ItemStack s, World w, EntityPlayer p, MovingObjectPosition mop) {
|
||||
ItemWandCasting wand = (ItemWandCasting) s.getItem();
|
||||
public ItemStack onFocusRightClick(ItemStack stack, World world, EntityPlayer player, MovingObjectPosition mop) {
|
||||
ItemWandCasting wand = (ItemWandCasting) stack.getItem();
|
||||
|
||||
int pot = wand.getFocusPotency(s);
|
||||
if (wand.consumeAllVis(s, p, getVisCost(s), true, false)) {
|
||||
List<EntityLivingBase> ents = w.getEntitiesWithinAABB(
|
||||
if (wand.consumeAllVis(stack, player, getVisCost(stack), true, false)) {
|
||||
final double radius = 10D + 2 * this.getUpgradeLevel(stack, FocusUpgradeType.enlarge);
|
||||
final float damage = TaintedMagicHelper.getFocusDamageWithPotency(
|
||||
stack,
|
||||
ConfigHandler.taintedBlastBaseDamage,
|
||||
ConfigHandler.taintedBlastStaffMultiple);
|
||||
final float reclining = ConfigHandler.taintedBlastReclining / 5;
|
||||
|
||||
List<EntityLivingBase> ents = world.getEntitiesWithinAABB(
|
||||
EntityLivingBase.class,
|
||||
AxisAlignedBB.getBoundingBox(p.posX, p.posY, p.posZ, p.posX + 1, p.posY + 1, p.posZ + 1).expand(
|
||||
15.0D + this.getUpgradeLevel(s, FocusUpgradeType.enlarge),
|
||||
15.0D + this.getUpgradeLevel(s, FocusUpgradeType.enlarge),
|
||||
15.0D + this.getUpgradeLevel(s, FocusUpgradeType.enlarge)));
|
||||
AxisAlignedBB.getBoundingBox(
|
||||
player.posX,
|
||||
player.posY,
|
||||
player.posZ,
|
||||
player.posX + 1,
|
||||
player.posY + 1,
|
||||
player.posZ + 1).expand(radius, 10D, radius));
|
||||
if (ents != null && ents.size() > 0) {
|
||||
for (int a = 0; a < ents.size(); a++) {
|
||||
EntityLivingBase e = ents.get(a);
|
||||
|
||||
if (e != p && e.isEntityAlive() && !e.isEntityInvulnerable()) {
|
||||
double dist = TaintedMagicHelper.getDistanceTo(e.posX, e.posY, e.posZ, p);
|
||||
if (dist < 7.0D) e.attackEntityFrom(DamageSource.magic, 2.0F);
|
||||
Vector3 movement = TaintedMagicHelper.getDistanceBetween(e, p);
|
||||
e.addVelocity(movement.x * 3, 0.8, movement.z * 3);
|
||||
for (EntityLivingBase e : ents) {
|
||||
if (e != player && e.isEntityAlive() && !e.isEntityInvulnerable()) {
|
||||
e.attackEntityFrom(DamageSource.magic, damage);
|
||||
e.addVelocity(reclining, reclining, reclining);
|
||||
}
|
||||
}
|
||||
}
|
||||
w.playSoundAtEntity(p, "taintedmagic:shockwave", 5.0F, 1.0F * (float) Math.random());
|
||||
TaintedMagic.proxy.spawnShockwaveParticles(p.worldObj);
|
||||
return s;
|
||||
world.playSoundAtEntity(player, "taintedmagic:shockwave", 5.0F, (float) Math.random());
|
||||
TaintedMagic.proxy.spawnShockwaveParticles(player.worldObj);
|
||||
return stack;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack s, int rank) {
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack stack, int rank) {
|
||||
switch (rank) {
|
||||
case 1:
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal, FocusUpgradeType.enlarge };
|
||||
case 2:
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal, FocusUpgradeType.enlarge };
|
||||
case 3:
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal, FocusUpgradeType.enlarge };
|
||||
case 4:
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal, FocusUpgradeType.enlarge };
|
||||
case 5:
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal, FocusUpgradeType.enlarge };
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal, FocusUpgradeType.enlarge,
|
||||
FocusUpgradeType.potency };
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ import net.minecraft.world.World;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.FocusUpgradeType;
|
||||
import thaumcraft.api.wands.ItemFocusBasic;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
import thaumcraft.common.items.wands.WandManager;
|
||||
@@ -23,8 +24,8 @@ public class ItemFocusTime extends ItemFocusBasic {
|
||||
|
||||
IIcon depthIcon = null;
|
||||
|
||||
private static final AspectList costBase = new AspectList().add(Aspect.AIR, 1000).add(Aspect.WATER, 1000)
|
||||
.add(Aspect.FIRE, 1000).add(Aspect.EARTH, 1000).add(Aspect.ORDER, 1000).add(Aspect.ENTROPY, 1000);
|
||||
private static final AspectList costBase = new AspectList().add(Aspect.AIR, 8000).add(Aspect.WATER, 8000)
|
||||
.add(Aspect.FIRE, 8000).add(Aspect.EARTH, 8000).add(Aspect.ORDER, 8000).add(Aspect.ENTROPY, 8000);
|
||||
|
||||
public ItemFocusTime() {
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
@@ -51,8 +52,7 @@ public class ItemFocusTime extends ItemFocusBasic {
|
||||
}
|
||||
|
||||
public AspectList getVisCost(ItemStack s) {
|
||||
return new AspectList().add(Aspect.AIR, 1000).add(Aspect.WATER, 1000).add(Aspect.FIRE, 1000)
|
||||
.add(Aspect.EARTH, 1000).add(Aspect.ORDER, 1000).add(Aspect.ENTROPY, 1000);
|
||||
return costBase;
|
||||
}
|
||||
|
||||
public int getActivationCooldown(ItemStack s) {
|
||||
@@ -88,4 +88,17 @@ public class ItemFocusTime extends ItemFocusBasic {
|
||||
public EnumRarity getRarity(ItemStack s) {
|
||||
return TaintedMagic.rarityCreation;
|
||||
}
|
||||
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack s, int r) {
|
||||
switch (r) {
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
case 5:
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal };
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package taintedmagic.common.items.wand.foci;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -11,6 +13,8 @@ import net.minecraft.world.World;
|
||||
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.entities.EntityHomingShard;
|
||||
import taintedmagic.common.handler.ConfigHandler;
|
||||
import taintedmagic.common.helper.TaintedMagicHelper;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.FocusUpgradeType;
|
||||
@@ -25,10 +29,9 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
*/
|
||||
public class ItemFocusVisShard extends ItemFocusBasic {
|
||||
|
||||
private static final AspectList cost = new AspectList().add(Aspect.FIRE, 1).add(Aspect.ENTROPY, 1)
|
||||
.add(Aspect.AIR, 1);
|
||||
private static final AspectList costPersistant = new AspectList().add(Aspect.FIRE, 1).add(Aspect.ENTROPY, 1)
|
||||
.add(Aspect.WATER, 1).add(Aspect.AIR, 1);
|
||||
private static final AspectList costBase = new AspectList().add(Aspect.FIRE, 120).add(Aspect.ENTROPY, 120)
|
||||
.add(Aspect.AIR, 120);
|
||||
private static final AspectList costPersistant = new AspectList().add(Aspect.WATER, 120);
|
||||
|
||||
public static FocusUpgradeType persistant = new FocusUpgradeType(
|
||||
69,
|
||||
@@ -47,59 +50,78 @@ public class ItemFocusVisShard extends ItemFocusBasic {
|
||||
this.icon = ir.registerIcon("taintedmagic:ItemFocusVisShard");
|
||||
}
|
||||
|
||||
public String getSortingHelper(ItemStack s) {
|
||||
return "SHARD" + super.getSortingHelper(s);
|
||||
public String getSortingHelper(ItemStack stack) {
|
||||
return "SHARD" + super.getSortingHelper(stack);
|
||||
}
|
||||
|
||||
public int getFocusColor(ItemStack s) {
|
||||
public int getFocusColor(ItemStack stack) {
|
||||
return 10037693;
|
||||
}
|
||||
|
||||
public int getActivationCooldown(ItemStack s) {
|
||||
return 300;
|
||||
public int getActivationCooldown(ItemStack stack) {
|
||||
return 500;
|
||||
}
|
||||
|
||||
public ItemFocusBasic.WandFocusAnimation getAnimation(ItemStack s) {
|
||||
public ItemFocusBasic.WandFocusAnimation getAnimation(ItemStack stack) {
|
||||
return ItemFocusBasic.WandFocusAnimation.WAVE;
|
||||
}
|
||||
|
||||
public ItemStack onFocusRightClick(ItemStack s, World w, EntityPlayer p, MovingObjectPosition mop) {
|
||||
ItemWandCasting wand = (ItemWandCasting) s.getItem();
|
||||
public ItemStack onFocusRightClick(ItemStack stack, World world, EntityPlayer player, MovingObjectPosition mop) {
|
||||
ItemWandCasting wand = (ItemWandCasting) stack.getItem();
|
||||
|
||||
Entity look = EntityUtils.getPointedEntity(p.worldObj, p, 0.0D, 32.0D, 1.1F);
|
||||
if (look != null && look instanceof EntityLivingBase) {
|
||||
if (!w.isRemote) {
|
||||
Entity look = EntityUtils.getPointedEntity(player.worldObj, player, 0.0D, 32.0D, 1.1F);
|
||||
if (look instanceof EntityLivingBase && wand.consumeAllVis(stack, player, getVisCost(stack), true, false)) {
|
||||
if (!world.isRemote) {
|
||||
EntityHomingShard blast = new EntityHomingShard(
|
||||
w,
|
||||
p,
|
||||
world,
|
||||
player,
|
||||
(EntityLivingBase) look,
|
||||
wand.getFocusPotency(s),
|
||||
isUpgradedWith(wand.getFocusItem(s), persistant));
|
||||
w.spawnEntityInWorld(blast);
|
||||
w.playSoundAtEntity(blast, "taintedmagic:shard", 0.3F, 1.1F + w.rand.nextFloat() * 0.1F);
|
||||
(int) TaintedMagicHelper.getFocusDamageWithPotency(
|
||||
stack,
|
||||
ConfigHandler.visShardBaseDamage,
|
||||
ConfigHandler.visShardStaffMultiple),
|
||||
isUpgradedWith(wand.getFocusItem(stack), persistant));
|
||||
world.spawnEntityInWorld(blast);
|
||||
world.playSoundAtEntity(blast, "taintedmagic:shard", 0.3F, 1.1F + world.rand.nextFloat() * 0.1F);
|
||||
}
|
||||
p.swingItem();
|
||||
player.swingItem();
|
||||
}
|
||||
return s;
|
||||
return stack;
|
||||
}
|
||||
|
||||
public AspectList getVisCost(ItemStack s) {
|
||||
return isUpgradedWith(s, persistant) ? costPersistant : cost;
|
||||
public AspectList getVisCost(ItemStack stack) {
|
||||
AspectList list = costBase.copy();
|
||||
if (TaintedMagicHelper.hasFocusUpgrade(stack, persistant)) {
|
||||
list.add(costPersistant);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
|
||||
super.addInformation(stack, player, list, par4);
|
||||
if (ConfigHandler.taintStormStaffMultiple != 1) {
|
||||
list = TaintedMagicHelper.addTooltipDamageAndStaffMultiplier(
|
||||
list,
|
||||
ConfigHandler.visShardBaseDamage,
|
||||
stack,
|
||||
ConfigHandler.visShardStaffMultiple);
|
||||
}
|
||||
}
|
||||
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack s, int r) {
|
||||
switch (r) {
|
||||
case 1:
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal, FocusUpgradeType.potency };
|
||||
case 2:
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal, FocusUpgradeType.potency };
|
||||
case 3:
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal, FocusUpgradeType.potency };
|
||||
case 4:
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal, FocusUpgradeType.potency };
|
||||
case 5:
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal, FocusUpgradeType.potency, persistant };
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user