mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
tainted heart effect, tainted syringe
This commit is contained in:
parent
8a57af6e0d
commit
33d4876767
@ -31,7 +31,7 @@ achievement.FOEQ=Pegasi und Raketensilos
|
||||
achievement.FOEQ.desc=Sende ein Relais in den Mars-...ich meine Duna-Orbit.
|
||||
|
||||
potion.hbm_taint=Verdorben
|
||||
potion.hbm_taint_boost=Verdorbenes Herz
|
||||
potion.hbm_mutation=Verdorbenes Herz
|
||||
potion.hbm_radiation=Strahlenkrankheit
|
||||
potion.hbm_bang=! ! !
|
||||
|
||||
@ -1236,6 +1236,7 @@ item.syringe_metal_stimpak.name=Stimpak
|
||||
item.syringe_metal_medx.name=Med-X
|
||||
item.syringe_metal_psycho.name=Psycho
|
||||
item.syringe_metal_super.name=Super Stimpak
|
||||
item.syringe_taint.name=Wässrige Schmutzinjektion
|
||||
item.med_bag.name=Ärztetasche
|
||||
item.radaway.name=Radaway
|
||||
item.pill_iodine.name=Iodpille
|
||||
|
||||
@ -31,7 +31,7 @@ achievement.FOEQ=Pegasi and Missile Silos
|
||||
achievement.FOEQ.desc=Send a relay into martian...I mean dunaian orbit.
|
||||
|
||||
potion.hbm_taint=Tainted
|
||||
potion.hbm_taint_boost=Tainted Heart
|
||||
potion.hbm_mutation=Tainted Heart
|
||||
potion.hbm_radiation=Radiation Sickness
|
||||
potion.hbm_bang=! ! !
|
||||
|
||||
@ -1236,6 +1236,7 @@ item.syringe_metal_stimpak.name=Stimpak
|
||||
item.syringe_metal_medx.name=Med-X
|
||||
item.syringe_metal_psycho.name=Psycho
|
||||
item.syringe_metal_super.name=Super Stimpak
|
||||
item.syringe_taint.name=Watery Taint Injection
|
||||
item.med_bag.name=Doctor's Bag
|
||||
item.radaway.name=Radaway
|
||||
item.pill_iodine.name=Iodine Pill
|
||||
|
||||
BIN
assets/hbm/textures/items/syringe_taint.png
Normal file
BIN
assets/hbm/textures/items/syringe_taint.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 294 B |
@ -27,6 +27,7 @@ import com.hbm.interfaces.IConsumer;
|
||||
import com.hbm.interfaces.ISource;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
@ -740,7 +741,13 @@ public class ExplosionChaos {
|
||||
}
|
||||
|
||||
if (entity instanceof EntityPlayer && Library.checkForHazmat((EntityPlayer) entity)) { } else {
|
||||
entity.attackEntityFrom(ModDamageSource.cloud, 3);
|
||||
|
||||
if(entity instanceof EntityLivingBase && ((EntityLivingBase)entity).isPotionActive(HbmPotion.taint.id)) {
|
||||
((EntityLivingBase)entity).removePotionEffect(HbmPotion.taint.id);
|
||||
((EntityLivingBase)entity).addPotionEffect(new PotionEffect(HbmPotion.mutation.id, 1 * 60 * 60 * 20, 0));
|
||||
} else {
|
||||
entity.attackEntityFrom(ModDamageSource.cloud, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -518,6 +518,7 @@ public class ModItems {
|
||||
public static Item syringe_metal_medx;
|
||||
public static Item syringe_metal_psycho;
|
||||
public static Item syringe_metal_super;
|
||||
public static Item syringe_taint;
|
||||
public static Item radaway;
|
||||
public static Item med_bag;
|
||||
public static Item pill_iodine;
|
||||
@ -1765,6 +1766,7 @@ public class ModItems {
|
||||
syringe_metal_medx = new ItemSyringe().setUnlocalizedName("syringe_metal_medx").setFull3D().setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":syringe_metal_medx");
|
||||
syringe_metal_psycho = new ItemSyringe().setUnlocalizedName("syringe_metal_psycho").setFull3D().setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":syringe_metal_psycho");
|
||||
syringe_metal_super = new ItemSyringe().setUnlocalizedName("syringe_metal_super").setFull3D().setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":syringe_metal_super");
|
||||
syringe_taint = new ItemSyringe().setUnlocalizedName("syringe_taint").setFull3D().setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":syringe_taint");
|
||||
med_bag = new ItemSyringe().setUnlocalizedName("med_bag").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":med_bag");
|
||||
radaway = new ItemSyringe().setUnlocalizedName("radaway").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":radaway");
|
||||
pill_iodine = new ItemPill(0).setUnlocalizedName("pill_iodine").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":pill_iodine");
|
||||
@ -3589,6 +3591,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(syringe_metal_medx, syringe_metal_medx.getUnlocalizedName());
|
||||
GameRegistry.registerItem(syringe_metal_psycho, syringe_metal_psycho.getUnlocalizedName());
|
||||
GameRegistry.registerItem(syringe_metal_super, syringe_metal_super.getUnlocalizedName());
|
||||
GameRegistry.registerItem(syringe_taint, syringe_taint.getUnlocalizedName());
|
||||
GameRegistry.registerItem(med_bag, med_bag.getUnlocalizedName());
|
||||
GameRegistry.registerItem(radaway, radaway.getUnlocalizedName());
|
||||
GameRegistry.registerItem(pill_iodine, pill_iodine.getUnlocalizedName());
|
||||
|
||||
@ -209,6 +209,27 @@ public class ItemSyringe extends Item {
|
||||
}
|
||||
}
|
||||
|
||||
if(this == ModItems.syringe_taint)
|
||||
{
|
||||
if (!world.isRemote)
|
||||
{
|
||||
player.addPotionEffect(new PotionEffect(HbmPotion.taint.id, 60 * 20, 0));
|
||||
player.addPotionEffect(new PotionEffect(Potion.confusion.id, 5 * 20, 0));
|
||||
|
||||
stack.stackSize--;
|
||||
}
|
||||
|
||||
if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.syringe_metal_empty)))
|
||||
{
|
||||
player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.syringe_metal_empty, 1, 0), false);
|
||||
}
|
||||
|
||||
if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle2_empty)))
|
||||
{
|
||||
player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.bottle2_empty, 1, 0), false);
|
||||
}
|
||||
}
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
@ -388,6 +409,30 @@ public class ItemSyringe extends Item {
|
||||
}
|
||||
}
|
||||
|
||||
if(this == ModItems.syringe_taint)
|
||||
{
|
||||
if (!world.isRemote)
|
||||
{
|
||||
entity.addPotionEffect(new PotionEffect(HbmPotion.taint.id, 60 * 20, 0));
|
||||
entity.addPotionEffect(new PotionEffect(Potion.confusion.id, 5 * 20, 0));
|
||||
|
||||
stack.stackSize--;
|
||||
|
||||
if(entityPlayer instanceof EntityPlayer)
|
||||
{
|
||||
EntityPlayer player = (EntityPlayer)entityPlayer;
|
||||
if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.syringe_metal_empty)))
|
||||
{
|
||||
player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.syringe_metal_empty, 1, 0), false);
|
||||
}
|
||||
if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle2_empty)))
|
||||
{
|
||||
player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.bottle2_empty, 1, 0), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(this == ModItems.euphemium_stopper)
|
||||
{
|
||||
if (!world.isRemote)
|
||||
@ -434,5 +479,10 @@ public class ItemSyringe extends Item {
|
||||
if(this == ModItems.radaway) {
|
||||
list.add("Removes radiation effect");
|
||||
}
|
||||
if(this == ModItems.syringe_taint) {
|
||||
list.add("Tainted I for 60 seconds");
|
||||
list.add("Nausea I for 5 seconds");
|
||||
list.add("Cloud damage + taint = tainted heart effect");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -258,11 +258,14 @@ public class Library {
|
||||
if(checkArmor(player, ModItems.hazmat_helmet, ModItems.hazmat_plate, ModItems.hazmat_legs, ModItems.hazmat_boots) ||
|
||||
checkArmor(player, ModItems.t45_helmet, ModItems.t45_plate, ModItems.t45_legs, ModItems.t45_boots) ||
|
||||
checkArmor(player, ModItems.schrabidium_helmet, ModItems.schrabidium_plate, ModItems.schrabidium_legs, ModItems.schrabidium_boots) ||
|
||||
checkForHaz2(player))
|
||||
{
|
||||
checkForHaz2(player)) {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if(player.isPotionActive(HbmPotion.mutation))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -318,6 +321,9 @@ public class Library {
|
||||
return true;
|
||||
}
|
||||
|
||||
if(player.isPotionActive(HbmPotion.mutation))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -1191,8 +1191,6 @@ public class CraftingManager {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.plate_dineutronium, 4), new Object[] { "PIP", "IDI", "PIP", 'P', ModItems.powder_spark_mix, 'I', "ingotDineutronium", 'D', "ingotDesh" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.plate_desh, 4), new Object[] { "PIP", "IDI", "PIP", 'P', ModItems.powder_polymer, 'I', "ingotDesh", 'D', "ingotDuraSteel" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.piston_selenium, 1), new Object[] { "SSS", "STS", " D ", 'S', "plateSteel", 'T', "ingotTungsten", 'D', ModItems.bolt_dura_steel }));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModBlocks.taint), new Object[] { "nuggetEuphemium", ModItems.nuclear_waste }));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModBlocks.taint), new Object[] { "nuggetEuphemium", ModItems.trinitite }));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.meteor_remote), new Object[] { "nuggetSchrabidium", ModItems.fragment_meteorite, ModItems.crate_caller }));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.crate_caller), new Object[] { "nuggetSchrabidium", ModItems.crowbar, ModItems.detonator }));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.catalyst_clay), new Object[] { "dustIron", Items.clay_ball }));
|
||||
@ -1244,6 +1242,7 @@ public class CraftingManager {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.mine_he, 1), new Object[] { " C ", "PTP", 'C', ModItems.circuit_targeting_tier2, 'P', "plateSteel", 'T', Blocks.tnt }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.mine_shrap, 2), new Object[] { "LLL", " C ", "PTP", 'C', ModItems.circuit_targeting_tier2, 'P', "plateSteel", 'T', ModBlocks.det_cord, 'L', ModItems.pellet_buckshot }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.defuser, 1), new Object[] { " PS", "P P", " P ", 'P', "ingotPolymer", 'S', "plateSteel" }));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.syringe_taint), new Object[] { ModItems.bottle2_empty, ModItems.syringe_metal_empty, ModItems.ducttape, ModItems.powder_magic, "nuggetSchrabidium", Items.potionitem }));
|
||||
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.paper, 1), new Object[] { new ItemStack(ModItems.assembly_template, 1, OreDictionary.WILDCARD_VALUE) });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.paper, 1), new Object[] { new ItemStack(ModItems.chemistry_template, 1, OreDictionary.WILDCARD_VALUE) });
|
||||
|
||||
@ -503,6 +503,7 @@ public class MainRegistry
|
||||
public static int taintID = 62;
|
||||
public static int radiationID = 63;
|
||||
public static int bangID = 64;
|
||||
public static int mutationID = 65;
|
||||
|
||||
public static int x;
|
||||
public static int y;
|
||||
@ -1519,6 +1520,9 @@ public class MainRegistry
|
||||
Property propBangID = config.get(Configuration.CATEGORY_GENERAL, "8.02_bangPotionID", 64);
|
||||
propBangID.comment = "What potion ID the B93 timebomb effect will have";
|
||||
bangID = propBangID.getInt();
|
||||
Property propMutationID = config.get(Configuration.CATEGORY_GENERAL, "8.03_mutationPotionID", 65);
|
||||
propMutationID.comment = "What potion ID the taint mutation effect will have";
|
||||
mutationID = propMutationID.getInt();
|
||||
|
||||
config.save();
|
||||
}
|
||||
|
||||
@ -153,7 +153,7 @@ public class ModEventHandler
|
||||
entity.attackEntityFrom(ModDamageSource.radiation, 100F);
|
||||
}
|
||||
|
||||
} else if(entity instanceof EntityCow) {
|
||||
} else if(entity instanceof EntityCow && !(entity instanceof EntityMooshroom)) {
|
||||
EntityMooshroom creep = new EntityMooshroom(event.world);
|
||||
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
|
||||
|
||||
@ -205,6 +205,40 @@ public class ModEventHandler
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(entity.isPotionActive(HbmPotion.mutation) && !entity.isDead && entity.getHealth() > 0) {
|
||||
|
||||
if(event.world.rand.nextInt(300) == 0)
|
||||
entity.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 10 * 20, 1));
|
||||
if(event.world.rand.nextInt(300) == 0)
|
||||
entity.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 15 * 20, 0));
|
||||
if(event.world.rand.nextInt(300) == 0)
|
||||
entity.addPotionEffect(new PotionEffect(Potion.jump.id, 30 * 20, 1));
|
||||
|
||||
if(entity.getHealth() <= entity.getMaxHealth() / 10F * 5F)
|
||||
entity.addPotionEffect(new PotionEffect(Potion.resistance.id, 5 * 20, 2));
|
||||
if(entity.getHealth() <= entity.getMaxHealth() / 10F * 4F)
|
||||
entity.addPotionEffect(new PotionEffect(Potion.regeneration.id, 5 * 20, 1));
|
||||
if(entity.getHealth() <= entity.getMaxHealth() / 10F * 3F)
|
||||
entity.addPotionEffect(new PotionEffect(Potion.resistance.id, 5 * 20, 4));
|
||||
if(entity.getHealth() <= entity.getMaxHealth() / 10F * 2F)
|
||||
entity.addPotionEffect(new PotionEffect(Potion.regeneration.id, 5 * 20, 3));
|
||||
if(entity.getHealth() <= entity.getMaxHealth() / 10F * 1F)
|
||||
entity.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 5 * 20, 0));
|
||||
|
||||
if(entity.isPotionActive(Potion.poison))
|
||||
entity.removePotionEffect(Potion.poison.id);
|
||||
if(entity.isPotionActive(Potion.wither))
|
||||
entity.removePotionEffect(Potion.wither.id);
|
||||
if(entity.isPotionActive(Potion.hunger))
|
||||
entity.removePotionEffect(Potion.hunger.id);
|
||||
if(entity.isPotionActive(Potion.confusion))
|
||||
entity.removePotionEffect(Potion.confusion.id);
|
||||
if(entity.isPotionActive(Potion.digSlowdown))
|
||||
entity.removePotionEffect(Potion.digSlowdown.id);
|
||||
if(entity.isPotionActive(Potion.moveSlowdown))
|
||||
entity.removePotionEffect(Potion.moveSlowdown.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -20,6 +20,7 @@ public class HbmPotion extends Potion {
|
||||
public static HbmPotion taint;
|
||||
public static HbmPotion radiation;
|
||||
public static HbmPotion bang;
|
||||
public static HbmPotion mutation;
|
||||
|
||||
public HbmPotion(int id, boolean isBad, int color) {
|
||||
super(id, isBad, color);
|
||||
@ -29,6 +30,7 @@ public class HbmPotion extends Potion {
|
||||
taint = registerPotion(MainRegistry.taintID, true, 8388736, "potion.hbm_taint", 0, 0);
|
||||
radiation = registerPotion(MainRegistry.radiationID, true, 8700200, "potion.hbm_radiation", 1, 0);
|
||||
bang = registerPotion(MainRegistry.bangID, true, 1118481, "potion.hbm_bang", 3, 0);
|
||||
mutation = registerPotion(MainRegistry.mutationID, false, 8388736, "potion.hbm_mutation", 2, 0);
|
||||
}
|
||||
|
||||
public static HbmPotion registerPotion(int id, boolean isBad, int color, String name, int x, int y) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user